Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] How to get Display instance

I imagine Display.getCurrent() will be another guess.


On Tue, 12 Oct 2004 10:58:02 +0800, Cheng Mo <w21009@xxxxxxxxxxxx> wrote:
> Hi All,
> I am developing a lib that can change widgets look-and-feel dynamically.
> All customized widgets implement a XYZListener interface defined by me
> and implement the method updateStyle(). In updateStyle(),
> custome-widgets call redraw() to redraw themselves.
> Then, I have to make sure to call all updateStyle() in UI Thread.
> In order to take advantage of UI Thread from another thread, I have to
> use Display#asyncExec() or Display#syncExec(). The problem is how to get
> a Display instance. My lib has nothing to do with UI.
> Can I just call Display.getDefault() to get the Display instance of the
> application?
> 
> Thanks & Regards,
> Cheng Mo
> 
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> 


-- 
Money can't buy everything.
Sometimes money can't even buy a gun...


Back to the top