< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/synth/Region.java

Print this page

        

@@ -35,23 +35,23 @@
 /**
  * A distinct rendering area of a Swing component.  A component may
  * support one or more regions.  Specific component regions are defined
  * by the typesafe enumeration in this class.
  * <p>
- * Regions are typically used as a way to identify the <code>Component</code>s
+ * Regions are typically used as a way to identify the {@code Component}s
  * and areas a particular style is to apply to. Synth's file format allows you
- * to bind styles based on the name of a <code>Region</code>.
+ * to bind styles based on the name of a {@code Region}.
  * The name is derived from the field name of the constant:
  * <ol>
  *  <li>Map all characters to lowercase.
  *  <li>Map the first character to uppercase.
  *  <li>Map the first character after underscores to uppercase.
  *  <li>Remove all underscores.
  * </ol>
- * For example, to identify the <code>SPLIT_PANE</code>
- * <code>Region</code> you would use <code>SplitPane</code>.
- * The following shows a custom <code>SynthStyleFactory</code>
+ * For example, to identify the {@code SPLIT_PANE}
+ * {@code Region} you would use {@code SplitPane}.
+ * The following shows a custom {@code SynthStyleFactory}
  * that returns a specific style for split panes:
  * <pre>
  *    public SynthStyle getStyle(JComponent c, Region id) {
  *        if (id == Region.SPLIT_PANE) {
  *            return splitPaneStyle;

@@ -77,353 +77,353 @@
 
     /**
      * ArrowButton's are special types of buttons that also render a
      * directional indicator, typically an arrow. ArrowButtons are used by
      * composite components, for example ScrollBar's contain ArrowButtons.
-     * To bind a style to this <code>Region</code> use the name
-     * <code>ArrowButton</code>.
+     * To bind a style to this {@code Region} use the name
+     * {@code ArrowButton}.
      */
     public static final Region ARROW_BUTTON = new Region("ArrowButton", false);
 
     /**
-     * Button region. To bind a style to this <code>Region</code> use the name
-     * <code>Button</code>.
+     * Button region. To bind a style to this {@code Region} use the name
+     * {@code Button}.
      */
     public static final Region BUTTON = new Region("Button", false);
 
     /**
-     * CheckBox region. To bind a style to this <code>Region</code> use the name
-     * <code>CheckBox</code>.
+     * CheckBox region. To bind a style to this {@code Region} use the name
+     * {@code CheckBox}.
      */
     public static final Region CHECK_BOX = new Region("CheckBox", false);
 
     /**
-     * CheckBoxMenuItem region. To bind a style to this <code>Region</code> use
-     * the name <code>CheckBoxMenuItem</code>.
+     * CheckBoxMenuItem region. To bind a style to this {@code Region} use
+     * the name {@code CheckBoxMenuItem}.
      */
     public static final Region CHECK_BOX_MENU_ITEM = new Region("CheckBoxMenuItem", false);
 
     /**
-     * ColorChooser region. To bind a style to this <code>Region</code> use
-     * the name <code>ColorChooser</code>.
+     * ColorChooser region. To bind a style to this {@code Region} use
+     * the name {@code ColorChooser}.
      */
     public static final Region COLOR_CHOOSER = new Region("ColorChooser", false);
 
     /**
-     * ComboBox region. To bind a style to this <code>Region</code> use
-     * the name <code>ComboBox</code>.
+     * ComboBox region. To bind a style to this {@code Region} use
+     * the name {@code ComboBox}.
      */
     public static final Region COMBO_BOX = new Region("ComboBox", false);
 
     /**
-     * DesktopPane region. To bind a style to this <code>Region</code> use
-     * the name <code>DesktopPane</code>.
+     * DesktopPane region. To bind a style to this {@code Region} use
+     * the name {@code DesktopPane}.
      */
     public static final Region DESKTOP_PANE = new Region("DesktopPane", false);
 
     /**
-     * DesktopIcon region. To bind a style to this <code>Region</code> use
-     * the name <code>DesktopIcon</code>.
+     * DesktopIcon region. To bind a style to this {@code Region} use
+     * the name {@code DesktopIcon}.
      */
     public static final Region DESKTOP_ICON = new Region("DesktopIcon", false);
 
     /**
-     * EditorPane region. To bind a style to this <code>Region</code> use
-     * the name <code>EditorPane</code>.
+     * EditorPane region. To bind a style to this {@code Region} use
+     * the name {@code EditorPane}.
      */
     public static final Region EDITOR_PANE = new Region("EditorPane", false);
 
     /**
-     * FileChooser region. To bind a style to this <code>Region</code> use
-     * the name <code>FileChooser</code>.
+     * FileChooser region. To bind a style to this {@code Region} use
+     * the name {@code FileChooser}.
      */
     public static final Region FILE_CHOOSER = new Region("FileChooser", false);
 
     /**
-     * FormattedTextField region. To bind a style to this <code>Region</code> use
-     * the name <code>FormattedTextField</code>.
+     * FormattedTextField region. To bind a style to this {@code Region} use
+     * the name {@code FormattedTextField}.
      */
     public static final Region FORMATTED_TEXT_FIELD = new Region("FormattedTextField", false);
 
     /**
-     * InternalFrame region. To bind a style to this <code>Region</code> use
-     * the name <code>InternalFrame</code>.
+     * InternalFrame region. To bind a style to this {@code Region} use
+     * the name {@code InternalFrame}.
      */
     public static final Region INTERNAL_FRAME = new Region("InternalFrame", false);
 
     /**
      * TitlePane of an InternalFrame. The TitlePane typically
      * shows a menu, title, widgets to manipulate the internal frame.
-     * To bind a style to this <code>Region</code> use the name
-     * <code>InternalFrameTitlePane</code>.
+     * To bind a style to this {@code Region} use the name
+     * {@code InternalFrameTitlePane}.
      */
     public static final Region INTERNAL_FRAME_TITLE_PANE = new Region("InternalFrameTitlePane", false);
 
     /**
-     * Label region. To bind a style to this <code>Region</code> use the name
-     * <code>Label</code>.
+     * Label region. To bind a style to this {@code Region} use the name
+     * {@code Label}.
      */
     public static final Region LABEL = new Region("Label", false);
 
     /**
-     * List region. To bind a style to this <code>Region</code> use the name
-     * <code>List</code>.
+     * List region. To bind a style to this {@code Region} use the name
+     * {@code List}.
      */
     public static final Region LIST = new Region("List", false);
 
     /**
-     * Menu region. To bind a style to this <code>Region</code> use the name
-     * <code>Menu</code>.
+     * Menu region. To bind a style to this {@code Region} use the name
+     * {@code Menu}.
      */
     public static final Region MENU = new Region("Menu", false);
 
     /**
-     * MenuBar region. To bind a style to this <code>Region</code> use the name
-     * <code>MenuBar</code>.
+     * MenuBar region. To bind a style to this {@code Region} use the name
+     * {@code MenuBar}.
      */
     public static final Region MENU_BAR = new Region("MenuBar", false);
 
     /**
-     * MenuItem region. To bind a style to this <code>Region</code> use the name
-     * <code>MenuItem</code>.
+     * MenuItem region. To bind a style to this {@code Region} use the name
+     * {@code MenuItem}.
      */
     public static final Region MENU_ITEM = new Region("MenuItem", false);
 
     /**
      * Accelerator region of a MenuItem. To bind a style to this
-     * <code>Region</code> use the name <code>MenuItemAccelerator</code>.
+     * {@code Region} use the name {@code MenuItemAccelerator}.
      */
     public static final Region MENU_ITEM_ACCELERATOR = new Region("MenuItemAccelerator", true);
 
     /**
-     * OptionPane region. To bind a style to this <code>Region</code> use
-     * the name <code>OptionPane</code>.
+     * OptionPane region. To bind a style to this {@code Region} use
+     * the name {@code OptionPane}.
      */
     public static final Region OPTION_PANE = new Region("OptionPane", false);
 
     /**
-     * Panel region. To bind a style to this <code>Region</code> use the name
-     * <code>Panel</code>.
+     * Panel region. To bind a style to this {@code Region} use the name
+     * {@code Panel}.
      */
     public static final Region PANEL = new Region("Panel", false);
 
     /**
-     * PasswordField region. To bind a style to this <code>Region</code> use
-     * the name <code>PasswordField</code>.
+     * PasswordField region. To bind a style to this {@code Region} use
+     * the name {@code PasswordField}.
      */
     public static final Region PASSWORD_FIELD = new Region("PasswordField", false);
 
     /**
-     * PopupMenu region. To bind a style to this <code>Region</code> use
-     * the name <code>PopupMenu</code>.
+     * PopupMenu region. To bind a style to this {@code Region} use
+     * the name {@code PopupMenu}.
      */
     public static final Region POPUP_MENU = new Region("PopupMenu", false);
 
     /**
-     * PopupMenuSeparator region. To bind a style to this <code>Region</code>
-     * use the name <code>PopupMenuSeparator</code>.
+     * PopupMenuSeparator region. To bind a style to this {@code Region}
+     * use the name {@code PopupMenuSeparator}.
      */
     public static final Region POPUP_MENU_SEPARATOR = new Region("PopupMenuSeparator", false);
 
     /**
-     * ProgressBar region. To bind a style to this <code>Region</code>
-     * use the name <code>ProgressBar</code>.
+     * ProgressBar region. To bind a style to this {@code Region}
+     * use the name {@code ProgressBar}.
      */
     public static final Region PROGRESS_BAR = new Region("ProgressBar", false);
 
     /**
-     * RadioButton region. To bind a style to this <code>Region</code>
-     * use the name <code>RadioButton</code>.
+     * RadioButton region. To bind a style to this {@code Region}
+     * use the name {@code RadioButton}.
      */
     public static final Region RADIO_BUTTON = new Region("RadioButton", false);
 
     /**
-     * RegionButtonMenuItem region. To bind a style to this <code>Region</code>
-     * use the name <code>RadioButtonMenuItem</code>.
+     * RegionButtonMenuItem region. To bind a style to this {@code Region}
+     * use the name {@code RadioButtonMenuItem}.
      */
     public static final Region RADIO_BUTTON_MENU_ITEM = new Region("RadioButtonMenuItem", false);
 
     /**
-     * RootPane region. To bind a style to this <code>Region</code> use
-     * the name <code>RootPane</code>.
+     * RootPane region. To bind a style to this {@code Region} use
+     * the name {@code RootPane}.
      */
     public static final Region ROOT_PANE = new Region("RootPane", false);
 
     /**
-     * ScrollBar region. To bind a style to this <code>Region</code> use
-     * the name <code>ScrollBar</code>.
+     * ScrollBar region. To bind a style to this {@code Region} use
+     * the name {@code ScrollBar}.
      */
     public static final Region SCROLL_BAR = new Region("ScrollBar", false);
 
     /**
-     * Track of the ScrollBar. To bind a style to this <code>Region</code> use
-     * the name <code>ScrollBarTrack</code>.
+     * Track of the ScrollBar. To bind a style to this {@code Region} use
+     * the name {@code ScrollBarTrack}.
      */
     public static final Region SCROLL_BAR_TRACK = new Region("ScrollBarTrack", true);
 
     /**
      * Thumb of the ScrollBar. The thumb is the region of the ScrollBar
      * that gives a graphical depiction of what percentage of the View is
-     * currently visible. To bind a style to this <code>Region</code> use
-     * the name <code>ScrollBarThumb</code>.
+     * currently visible. To bind a style to this {@code Region} use
+     * the name {@code ScrollBarThumb}.
      */
     public static final Region SCROLL_BAR_THUMB = new Region("ScrollBarThumb", true);
 
     /**
-     * ScrollPane region. To bind a style to this <code>Region</code> use
-     * the name <code>ScrollPane</code>.
+     * ScrollPane region. To bind a style to this {@code Region} use
+     * the name {@code ScrollPane}.
      */
     public static final Region SCROLL_PANE = new Region("ScrollPane", false);
 
     /**
-     * Separator region. To bind a style to this <code>Region</code> use
-     * the name <code>Separator</code>.
+     * Separator region. To bind a style to this {@code Region} use
+     * the name {@code Separator}.
      */
     public static final Region SEPARATOR = new Region("Separator", false);
 
     /**
-     * Slider region. To bind a style to this <code>Region</code> use
-     * the name <code>Slider</code>.
+     * Slider region. To bind a style to this {@code Region} use
+     * the name {@code Slider}.
      */
     public static final Region SLIDER = new Region("Slider", false);
 
     /**
-     * Track of the Slider. To bind a style to this <code>Region</code> use
-     * the name <code>SliderTrack</code>.
+     * Track of the Slider. To bind a style to this {@code Region} use
+     * the name {@code SliderTrack}.
      */
     public static final Region SLIDER_TRACK = new Region("SliderTrack", true);
 
     /**
      * Thumb of the Slider. The thumb of the Slider identifies the current
-     * value. To bind a style to this <code>Region</code> use the name
-     * <code>SliderThumb</code>.
+     * value. To bind a style to this {@code Region} use the name
+     * {@code SliderThumb}.
      */
     public static final Region SLIDER_THUMB = new Region("SliderThumb", true);
 
     /**
-     * Spinner region. To bind a style to this <code>Region</code> use the name
-     * <code>Spinner</code>.
+     * Spinner region. To bind a style to this {@code Region} use the name
+     * {@code Spinner}.
      */
     public static final Region SPINNER = new Region("Spinner", false);
 
     /**
-     * SplitPane region. To bind a style to this <code>Region</code> use the name
-     * <code>SplitPane</code>.
+     * SplitPane region. To bind a style to this {@code Region} use the name
+     * {@code SplitPane}.
      */
     public static final Region SPLIT_PANE = new Region("SplitPane", false);
 
     /**
-     * Divider of the SplitPane. To bind a style to this <code>Region</code>
-     * use the name <code>SplitPaneDivider</code>.
+     * Divider of the SplitPane. To bind a style to this {@code Region}
+     * use the name {@code SplitPaneDivider}.
      */
     public static final Region SPLIT_PANE_DIVIDER = new Region("SplitPaneDivider", true);
 
     /**
-     * TabbedPane region. To bind a style to this <code>Region</code> use
-     * the name <code>TabbedPane</code>.
+     * TabbedPane region. To bind a style to this {@code Region} use
+     * the name {@code TabbedPane}.
      */
     public static final Region TABBED_PANE = new Region("TabbedPane", false);
 
     /**
      * Region of a TabbedPane for one tab. To bind a style to this
-     * <code>Region</code> use the name <code>TabbedPaneTab</code>.
+     * {@code Region} use the name {@code TabbedPaneTab}.
      */
     public static final Region TABBED_PANE_TAB = new Region("TabbedPaneTab", true);
 
     /**
      * Region of a TabbedPane containing the tabs. To bind a style to this
-     * <code>Region</code> use the name <code>TabbedPaneTabArea</code>.
+     * {@code Region} use the name {@code TabbedPaneTabArea}.
      */
     public static final Region TABBED_PANE_TAB_AREA = new Region("TabbedPaneTabArea", true);
 
     /**
      * Region of a TabbedPane containing the content. To bind a style to this
-     * <code>Region</code> use the name <code>TabbedPaneContent</code>.
+     * {@code Region} use the name {@code TabbedPaneContent}.
      */
     public static final Region TABBED_PANE_CONTENT = new Region("TabbedPaneContent", true);
 
     /**
-     * Table region. To bind a style to this <code>Region</code> use
-     * the name <code>Table</code>.
+     * Table region. To bind a style to this {@code Region} use
+     * the name {@code Table}.
      */
     public static final Region TABLE = new Region("Table", false);
 
     /**
-     * TableHeader region. To bind a style to this <code>Region</code> use
-     * the name <code>TableHeader</code>.
+     * TableHeader region. To bind a style to this {@code Region} use
+     * the name {@code TableHeader}.
      */
     public static final Region TABLE_HEADER = new Region("TableHeader", false);
 
     /**
-     * TextArea region. To bind a style to this <code>Region</code> use
-     * the name <code>TextArea</code>.
+     * TextArea region. To bind a style to this {@code Region} use
+     * the name {@code TextArea}.
      */
     public static final Region TEXT_AREA = new Region("TextArea", false);
 
     /**
-     * TextField region. To bind a style to this <code>Region</code> use
-     * the name <code>TextField</code>.
+     * TextField region. To bind a style to this {@code Region} use
+     * the name {@code TextField}.
      */
     public static final Region TEXT_FIELD = new Region("TextField", false);
 
     /**
-     * TextPane region. To bind a style to this <code>Region</code> use
-     * the name <code>TextPane</code>.
+     * TextPane region. To bind a style to this {@code Region} use
+     * the name {@code TextPane}.
      */
     public static final Region TEXT_PANE = new Region("TextPane", false);
 
     /**
-     * ToggleButton region. To bind a style to this <code>Region</code> use
-     * the name <code>ToggleButton</code>.
+     * ToggleButton region. To bind a style to this {@code Region} use
+     * the name {@code ToggleButton}.
      */
     public static final Region TOGGLE_BUTTON = new Region("ToggleButton", false);
 
     /**
-     * ToolBar region. To bind a style to this <code>Region</code> use
-     * the name <code>ToolBar</code>.
+     * ToolBar region. To bind a style to this {@code Region} use
+     * the name {@code ToolBar}.
      */
     public static final Region TOOL_BAR = new Region("ToolBar", false);
 
     /**
      * Region of the ToolBar containing the content. To bind a style to this
-     * <code>Region</code> use the name <code>ToolBarContent</code>.
+     * {@code Region} use the name {@code ToolBarContent}.
      */
     public static final Region TOOL_BAR_CONTENT = new Region("ToolBarContent", true);
 
     /**
      * Region for the Window containing the ToolBar. To bind a style to this
-     * <code>Region</code> use the name <code>ToolBarDragWindow</code>.
+     * {@code Region} use the name {@code ToolBarDragWindow}.
      */
     public static final Region TOOL_BAR_DRAG_WINDOW = new Region("ToolBarDragWindow", false);
 
     /**
-     * ToolTip region. To bind a style to this <code>Region</code> use
-     * the name <code>ToolTip</code>.
+     * ToolTip region. To bind a style to this {@code Region} use
+     * the name {@code ToolTip}.
      */
     public static final Region TOOL_TIP = new Region("ToolTip", false);
 
     /**
-     * ToolBar separator region. To bind a style to this <code>Region</code> use
-     * the name <code>ToolBarSeparator</code>.
+     * ToolBar separator region. To bind a style to this {@code Region} use
+     * the name {@code ToolBarSeparator}.
      */
     public static final Region TOOL_BAR_SEPARATOR = new Region("ToolBarSeparator", false);
 
     /**
-     * Tree region. To bind a style to this <code>Region</code> use the name
-     * <code>Tree</code>.
+     * Tree region. To bind a style to this {@code Region} use the name
+     * {@code Tree}.
      */
     public static final Region TREE = new Region("Tree", false);
 
     /**
      * Region of the Tree for one cell. To bind a style to this
-     * <code>Region</code> use the name <code>TreeCell</code>.
+     * {@code Region} use the name {@code TreeCell}.
      */
     public static final Region TREE_CELL = new Region("TreeCell", true);
 
     /**
-     * Viewport region. To bind a style to this <code>Region</code> use
-     * the name <code>Viewport</code>.
+     * Viewport region. To bind a style to this {@code Region} use
+     * the name {@code Viewport}.
      */
     public static final Region VIEWPORT = new Region("Viewport", false);
 
     private static Map<String, Region> getUItoRegionMap() {
         AppContext context = AppContext.getAppContext();

@@ -513,16 +513,16 @@
         this.subregion = subregion;
     }
 
     /**
      * Creates a Region with the specified name. This should only be
-     * used if you are creating your own <code>JComponent</code> subclass
-     * with a custom <code>ComponentUI</code> class.
+     * used if you are creating your own {@code JComponent} subclass
+     * with a custom {@code ComponentUI} class.
      *
      * @param name Name of the region
      * @param ui String that will be returned from
-     *           <code>component.getUIClassID</code>. This will be null
+     *           {@code component.getUIClassID}. This will be null
      *           if this is a subregion.
      * @param subregion Whether or not this is a subregion.
      */
     protected Region(String name, String ui, boolean subregion) {
         this(name, subregion);

@@ -531,12 +531,12 @@
         }
     }
 
     /**
      * Returns true if the Region is a subregion of a Component, otherwise
-     * false. For example, <code>Region.BUTTON</code> corresponds do a
-     * <code>Component</code> so that <code>Region.BUTTON.isSubregion()</code>
+     * false. For example, {@code Region.BUTTON} corresponds do a
+     * {@code Component} so that {@code Region.BUTTON.isSubregion()}
      * returns false.
      *
      * @return true if the Region is a subregion of a Component.
      */
     public boolean isSubregion() {
< prev index next >