Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Make my code visual editor aware
Make my code visual editor aware [message #145545] Wed, 17 December 2008 17:49 Go to next message
Silvio Sisto is currently offline Silvio SistoFriend
Messages: 4
Registered: July 2009
Junior Member
I've created a class that inherits from JFrame and then overridden the
paintComponent method.
This hidered Visual Editor to correctly displaying the components.
If I comment my custom code on the paintComponent method VE works
correctly.
Is there a way for me to programmatically differentiate whether the code
is being executed by VE or it is actually being run?
Thanks for any assistance.
Best regards,
Silvio Sisto
Re: Make my code visual editor aware [message #145557 is a reply to message #145545] Wed, 17 December 2008 17:58 Go to previous messageGo to next message
Silvio Sisto is currently offline Silvio SistoFriend
Messages: 4
Registered: July 2009
Junior Member
Sorry for the last post. It was very easy to solve.
I was able to solve the problem by placing a static boolean on my class
and making my main class set it to true.
I made it so that the custom code is only run when this variable is set to
true.
Re: Make my code visual editor aware [message #145566 is a reply to message #145557] Wed, 17 December 2008 19:02 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

There's an easier official way. java.beans.Beans.isDesignTime() will
return true when running in the VE and false when running in any other
non-design time environment, such as an application.

--
Thanks,
Rich Kulp
Re: Make my code visual editor aware [message #617311 is a reply to message #145545] Wed, 17 December 2008 17:58 Go to previous message
Silvio Sisto is currently offline Silvio SistoFriend
Messages: 4
Registered: July 2009
Junior Member
Sorry for the last post. It was very easy to solve.
I was able to solve the problem by placing a static boolean on my class
and making my main class set it to true.
I made it so that the custom code is only run when this variable is set to
true.
Re: Make my code visual editor aware [message #617312 is a reply to message #145557] Wed, 17 December 2008 19:02 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

There's an easier official way. java.beans.Beans.isDesignTime() will
return true when running in the VE and false when running in any other
non-design time environment, such as an application.

--
Thanks,
Rich Kulp
Previous Topic:Make my code visual editor aware
Next Topic:any release for 3.4?
Goto Forum:
  


Current Time: Tue Mar 19 10:43:26 GMT 2024

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

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

Back to the top