Re: [問題] JFace的IContributionManager.update()??
※ 引述《wfgh (lyle)》之銘言:
: 請問JFace中的 IContributionManager介面中的update()是幹嘛的呢?
: update
: void update(boolean force)Updates this manager's underlying widget(s) with
: any changes which have been made to it or its items. Normally changes to a
: contribution manager merely mark it as dirty, without updating the underlying
: widgets. This brings the underlying widgets up to date with any changes.
: Parameters:
: force - true means update even if not dirty, and false for normal incremental
: updating
: --------------------------------------------------------------------------------
: document上寫的我不太懂
: 何謂mark it as dirty??
: 什麼情況下會他的widgets會被change呢?
: 感恩
通常視窗程式為了簡化畫面更新流程以及增進效率
當有動作更動畫面時只會"mark it dirty" 也就是標記說畫面上這個地方是"髒"的
(更動畫面包含其他視窗重疊後復原或元件更新等等)
這個"髒"的意思就是等等這塊要重畫
而那個"等等"的時間點就是當 update() 被呼叫的時候
到這個時候才會把更新後的畫面畫到螢幕上來
然後 force 參數設成 true 就是不管是不是"髒"的全部重畫
--
実琴:「河野!你真的就這樣被物質慾望給吸引過去了嗎?!」
亨:「只要穿著女裝擺出親切的樣子,所有必要花費就能全免,似乎一點都不壞啊。」
実琴:「難道你沒有男人的尊嚴了嗎?!」
亨:(斷然道)「沒有。在節衣縮食且生活吃緊的學生面前,沒有那種東西。」
--プリンセス・プリンセス 第二話
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.30.82
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):