Skip to main content



      Home
Home » Eclipse Projects » WindowBuilder » Check if opened in design mode
Check if opened in design mode [message #725252] Wed, 14 September 2011 07:27 Go to next message
Eclipse UserFriend
I'd like to draw my custom swing components a little different if they're opened in window builder. Is there a way to check this?
Re: Check if opened in design mode [message #725265 is a reply to message #725252] Wed, 14 September 2011 07:41 Go to previous messageGo to next message
Eclipse UserFriend
try

if (Beans.isDesignTime()) {
}

- christian
Re: Check if opened in design mode [message #725269 is a reply to message #725265] Wed, 14 September 2011 07:49 Go to previous messageGo to next message
Eclipse UserFriend
works. thank you!
Re: Check if opened in design mode [message #725777 is a reply to message #725269] Thu, 15 September 2011 14:22 Go to previous message
Eclipse UserFriend
In addition to allowing you to provide design-time specific rendering, Beans.isDesignTime() is also very useful for suppressing other runtime behavior that won't work at design time. From the WB FAQ...

Quote:
A component may rely on some runtime behavior that is not possible at design time (such as accessing an application database or some other file). Runtime specific behavior should be isolated (and stubbed out as necessary) by wrappering the runtime specific code with a call to Beans.isDesignTime() which will answer true when the component is loaded within WindowBuilder and false at runtime.
Previous Topic:ResourceManager class
Next Topic:JFace Databinding
Goto Forum:
  


Current Time: Thu Jul 24 09:24:08 EDT 2025

Powered by FUDForum. Page generated in 0.17239 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top