Substance client properties

View all API methods.

View all client properties.


Client property name

SubstanceLookAndFeel.DEBUG_UI_MODE

Description

Property name for specifying the debug UI mode. Application running in debug UI mode will have additional UI controls for inspecting / changing the state of various controls. This property can be set as either VM flag (no value needed) or as a global setting on UIManager. In the latter case, the value should be either Boolean.TRUE or Boolean.FALSE.


See also


Sample code

import javax.swing.*;

import org.jvnet.substance.SubstanceLookAndFeel;

/**
 * Test application that shows the use of the
 {@link SubstanceLookAndFeel#DEBUG_UI_MODE} client property.
 
 @author Kirill Grouchnikov
 @see SubstanceLookAndFeel#DEBUG_UI_MODE
 */
public class DebugUiMode extends JFrame {
  /**
   * Creates the main frame for <code>this</code> sample.
   */
  public DebugUiMode() {
    super("Right-click title for debug menu");

    this.setSize(400200);
    this.setLocationRelativeTo(null);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }

  /**
   * The main method for <code>this</code> sample. The arguments are
   * ignored.
   
   @param args
   *            Ignored.
   @throws Exception
   *             If some exception occured. Note that there is no special
   *             treatment of exception conditions in <code>this</code>
   *             sample code.
   */
  public static void main(String[] argsthrows Exception {
    UIManager.setLookAndFeel(new SubstanceLookAndFeel());
    // put the application in debug-ui mode
    UIManager.put(SubstanceLookAndFeel.DEBUG_UI_MODE, Boolean.TRUE);
    JFrame.setDefaultLookAndFeelDecorated(true);
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        new DebugUiMode().setVisible(true);
      }
    });
  }
}

The screenshot below application frame in debug UI mode (the menu is showed after right-clicking the title pane):