作者LPH66 (-858993460)
看板java
标题Re: [问题] JFace的IContributionManager.update()??
时间Tue Jan 4 10:09:22 2011
※ 引述《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