Monday, December 21, 2009

Can I run NetBeans with a custom Look and Feel (laf)?


Yes. You can switch the look and feel (laf) of NetBeans to any of the following widgets: (Screenshots)

Available Themes

  • Metal: Also known as "Cross Platform Look And Feel" or "Ocean theme". The typical Java look - this is the default. This class is part of the Java Runtime as javax.swing.plaf.metal.MetalLookAndFeel.
  • Nimbus: A modern Synth-based laf. This class is part of the Java Runtime 6u10 as com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel.
  • Native: Also known as "System Look And Feel". These classes are part of the Java Runtime ascom.sun.java.swing.plaf.windows.WindowsLookAndFeel (MS Windows), or com.sun.java.swing.plaf.gtk.GTKLookAndFeel (Linux), orcom.sun.java.swing.plaf.mac.MacLookAndFeel (Mac OS) depending on the operating system you use (See alsoUIManager.getSystemLookAndFeelClassName()).
  • Motif: A classic laf. This class is part of the Java Runtime as com.sun.java.swing.plaf.motif.MotifLookAndFeel.
  • ... or choose a third-party laf such as Substance ( more...), NapkinSyntheticaTinyLaFJGoodies Plastic, and many more. Note that NetBeans is not being regularly tested with alternate/third-party look and feel implementations. Various implementations may or may not work well.

Activating a Theme

Follow these steps to try out different lafs:
  1. Decide which Look and Feel widget you want (see list above) and remember it's class name (<laf_class>).
  2. If it's a third-party widget, download the JAR file containing the custom laf classes (<jar_path>).
  3. Start NetBeans from the command line with the following options (cf. examples below):
    1. If it's a third-party widget, place the JAR in the classpath using the --cp:p <jar_path> start-up option.
    2. Select the laf using the --laf <laf_class> start-up option.
  4. When NetBeans starts you should notice the different look. If not, check for typos.
  5. If you like the theme, make your custom start-up parameters permanent.

Original link: http://wiki.netbeans.org/FaqCustomLaf

Friday, December 11, 2009

Seam contextual events

Found nice link related to Seam framework contextual events, here is list:

Seam defines a number of built-in events that the application can use to perform special kinds of framework integration. The events are:





org.jboss.seam.validationFailed — called when JSF validation fails
org.jboss.seam.noConversation — called when there is no long running conversation and a long running conversation is required
org.jboss.seam.preSetVariable.<name> — called when the context variable <name> is set
org.jboss.seam.postSetVariable.<name> — called when the context variable <name> is set
org.jboss.seam.preRemoveVariable.<name> — called when the context variable <name> is unset
org.jboss.seam.postRemoveVariable.<name> — called when the context variable <name> is unset
org.jboss.seam.preDestroyContext.<SCOPE> — called before the <SCOPE> context is destroyed
org.jboss.seam.postDestroyContext.<SCOPE> — called after the <SCOPE> context is destroyed
org.jboss.seam.beginConversation — called whenever a long-running conversation begins
org.jboss.seam.endConversation — called whenever a long-running conversation ends
org.jboss.seam.beginPageflow.<name> — called when the pageflow <name> begins
org.jboss.seam.endPageflow.<name> — called when the pageflow <name> ends
org.jboss.seam.createProcess.<name> — called when the process <name> is created
org.jboss.seam.endProcess.<name> — called when the process <name> ends
org.jboss.seam.initProcess.<name> — called when the process <name> is associated with the conversation
org.jboss.seam.initTask.<name> — called when the task <name> is associated with the conversation
org.jboss.seam.startTask.<name> — called when the task <name> is started
org.jboss.seam.endTask.<name> — called when the task <name> is ended
org.jboss.seam.postCreate.<name> — called when the component <name> is created
org.jboss.seam.preDestroy.<name> — called when the component <name> is destroyed
org.jboss.seam.beforePhase — called before the start of a JSF phase
org.jboss.seam.afterPhase — called after the end of a JSF phase
org.jboss.seam.postAuthenticate.<name> — called after a user is authenticated
org.jboss.seam.preAuthenticate.<name> — called before attempting to authenticate a user
org.jboss.seam.notLoggedIn — called there is no authenticated user and authentication is required
org.jboss.seam.rememberMe — occurs when Seam security detects the username in a cookie



Seam components may observe any of these events in just the same way they observe any other component-driven events.


And original link: http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.3/doc/seam/Seam_Reference_Guide/html/Seam_Reference_Guide-Seam_events-Contextual_events.html