2362N/A * Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A distinct rendering area of a Swing component. A component may 0N/A * support one or more regions. Specific component regions are defined 0N/A * by the typesafe enumeration in this class. 0N/A * Regions are typically used as a way to identify the <code>Component</code>s 0N/A * and areas a particular style is to apply to. Synth's file format allows you 0N/A * to bind styles based on the name of a <code>Region</code>. 0N/A * The name is derived from the field name of the constant: 0N/A * <li>Map all characters to lowercase. 0N/A * <li>Map the first character to uppercase. 0N/A * <li>Map the first character after underscores to uppercase. 0N/A * <li>Remove all underscores. 0N/A * For example, to identify the <code>SPLIT_PANE</code> 0N/A * <code>Region</code> you would use <code>SplitPane</code>. 0N/A * The following shows a custom <code>SynthStyleFactory</code> 0N/A * that returns a specific style for split panes: 0N/A * public SynthStyle getStyle(JComponent c, Region id) { 0N/A * if (id == Region.SPLIT_PANE) { 0N/A * return splitPaneStyle; 0N/A * accomplishes the same thing: 0N/A * <style id="splitPaneStyle"> 0N/A * <bind style="splitPaneStyle" type="region" key="SplitPane"/> 0N/A * @author Scott Violet 0N/A * ArrowButton's are special types of buttons that also render a 0N/A * directional indicator, typically an arrow. ArrowButtons are used by 0N/A * composite components, for example ScrollBar's contain ArrowButtons. 0N/A * To bind a style to this <code>Region</code> use the name 0N/A * <code>ArrowButton</code>. 0N/A * Button region. To bind a style to this <code>Region</code> use the name 0N/A * <code>Button</code>. 0N/A * CheckBox region. To bind a style to this <code>Region</code> use the name 0N/A * <code>CheckBox</code>. 0N/A * CheckBoxMenuItem region. To bind a style to this <code>Region</code> use 0N/A * the name <code>CheckBoxMenuItem</code>. 0N/A * ColorChooser region. To bind a style to this <code>Region</code> use 0N/A * the name <code>ColorChooser</code>. 0N/A * ComboBox region. To bind a style to this <code>Region</code> use 0N/A * the name <code>ComboBox</code>. 0N/A * DesktopPane region. To bind a style to this <code>Region</code> use 0N/A * the name <code>DesktopPane</code>. 0N/A * DesktopIcon region. To bind a style to this <code>Region</code> use 0N/A * the name <code>DesktopIcon</code>. 0N/A * EditorPane region. To bind a style to this <code>Region</code> use 0N/A * the name <code>EditorPane</code>. 0N/A * FileChooser region. To bind a style to this <code>Region</code> use 0N/A * the name <code>FileChooser</code>. 0N/A * FormattedTextField region. To bind a style to this <code>Region</code> use 0N/A * the name <code>FormattedTextField</code>. 0N/A * InternalFrame region. To bind a style to this <code>Region</code> use 0N/A * the name <code>InternalFrame</code>. 0N/A * TitlePane of an InternalFrame. The TitlePane typically 0N/A * shows a menu, title, widgets to manipulate the internal frame. 0N/A * To bind a style to this <code>Region</code> use the name 0N/A * <code>InternalFrameTitlePane</code>. 0N/A * Label region. To bind a style to this <code>Region</code> use the name 0N/A * <code>Label</code>. 0N/A * List region. To bind a style to this <code>Region</code> use the name 0N/A * <code>List</code>. 0N/A * Menu region. To bind a style to this <code>Region</code> use the name 0N/A * <code>Menu</code>. 0N/A * MenuBar region. To bind a style to this <code>Region</code> use the name 0N/A * <code>MenuBar</code>. 0N/A * MenuItem region. To bind a style to this <code>Region</code> use the name 0N/A * <code>MenuItem</code>. 0N/A * Accelerator region of a MenuItem. To bind a style to this 0N/A * <code>Region</code> use the name <code>MenuItemAccelerator</code>. 0N/A * OptionPane region. To bind a style to this <code>Region</code> use 0N/A * the name <code>OptionPane</code>. 0N/A * Panel region. To bind a style to this <code>Region</code> use the name 0N/A * <code>Panel</code>. 0N/A * PasswordField region. To bind a style to this <code>Region</code> use 0N/A * the name <code>PasswordField</code>. 0N/A * PopupMenu region. To bind a style to this <code>Region</code> use 0N/A * the name <code>PopupMenu</code>. 0N/A * PopupMenuSeparator region. To bind a style to this <code>Region</code> 0N/A * use the name <code>PopupMenuSeparator</code>. 0N/A * ProgressBar region. To bind a style to this <code>Region</code> 0N/A * use the name <code>ProgressBar</code>. 0N/A * RadioButton region. To bind a style to this <code>Region</code> 0N/A * use the name <code>RadioButton</code>. 0N/A * RegionButtonMenuItem region. To bind a style to this <code>Region</code> 0N/A * use the name <code>RadioButtonMenuItem</code>. 0N/A * RootPane region. To bind a style to this <code>Region</code> use 0N/A * the name <code>RootPane</code>. 0N/A * ScrollBar region. To bind a style to this <code>Region</code> use 0N/A * the name <code>ScrollBar</code>. 0N/A * Track of the ScrollBar. To bind a style to this <code>Region</code> use 0N/A * the name <code>ScrollBarTrack</code>. 0N/A * Thumb of the ScrollBar. The thumb is the region of the ScrollBar 0N/A * that gives a graphical depiction of what percentage of the View is 0N/A * currently visible. To bind a style to this <code>Region</code> use 0N/A * the name <code>ScrollBarThumb</code>. 0N/A * ScrollPane region. To bind a style to this <code>Region</code> use 0N/A * the name <code>ScrollPane</code>. 0N/A * Separator region. To bind a style to this <code>Region</code> use 0N/A * the name <code>Separator</code>. 0N/A * Slider region. To bind a style to this <code>Region</code> use 0N/A * the name <code>Slider</code>. 0N/A * Track of the Slider. To bind a style to this <code>Region</code> use 0N/A * the name <code>SliderTrack</code>. 0N/A * Thumb of the Slider. The thumb of the Slider identifies the current 0N/A * value. To bind a style to this <code>Region</code> use the name 0N/A * <code>SliderThumb</code>. 0N/A * Spinner region. To bind a style to this <code>Region</code> use the name 0N/A * <code>Spinner</code>. 0N/A * SplitPane region. To bind a style to this <code>Region</code> use the name 0N/A * <code>SplitPane</code>. 0N/A * Divider of the SplitPane. To bind a style to this <code>Region</code> 0N/A * use the name <code>SplitPaneDivider</code>. 0N/A * TabbedPane region. To bind a style to this <code>Region</code> use 0N/A * the name <code>TabbedPane</code>. 0N/A * Region of a TabbedPane for one tab. To bind a style to this 0N/A * <code>Region</code> use the name <code>TabbedPaneTab</code>. 0N/A * Region of a TabbedPane containing the tabs. To bind a style to this 0N/A * <code>Region</code> use the name <code>TabbedPaneTabArea</code>. 0N/A * Region of a TabbedPane containing the content. To bind a style to this 0N/A * <code>Region</code> use the name <code>TabbedPaneContent</code>. 0N/A * Table region. To bind a style to this <code>Region</code> use 0N/A * the name <code>Table</code>. 0N/A * TableHeader region. To bind a style to this <code>Region</code> use 0N/A * the name <code>TableHeader</code>. 0N/A * TextArea region. To bind a style to this <code>Region</code> use 0N/A * the name <code>TextArea</code>. 0N/A * TextField region. To bind a style to this <code>Region</code> use 0N/A * the name <code>TextField</code>. 0N/A * TextPane region. To bind a style to this <code>Region</code> use 0N/A * the name <code>TextPane</code>. 0N/A * ToggleButton region. To bind a style to this <code>Region</code> use 0N/A * the name <code>ToggleButton</code>. 0N/A * ToolBar region. To bind a style to this <code>Region</code> use 0N/A * the name <code>ToolBar</code>. 0N/A * Region of the ToolBar containing the content. To bind a style to this 0N/A * <code>Region</code> use the name <code>ToolBarContent</code>. 0N/A * Region for the Window containing the ToolBar. To bind a style to this 0N/A * <code>Region</code> use the name <code>ToolBarDragWindow</code>. 0N/A * ToolTip region. To bind a style to this <code>Region</code> use 0N/A * the name <code>ToolTip</code>. 0N/A * ToolBar separator region. To bind a style to this <code>Region</code> use 0N/A * the name <code>ToolBarSeparator</code>. 0N/A * Tree region. To bind a style to this <code>Region</code> use the name 0N/A * <code>Tree</code>. 0N/A * Region of the Tree for one cell. To bind a style to this 0N/A * <code>Region</code> use the name <code>TreeCell</code>. 0N/A * Viewport region. To bind a style to this <code>Region</code> use 0N/A * the name <code>Viewport</code>. 0N/A * Creates a Region with the specified name. This should only be 0N/A * used if you are creating your own <code>JComponent</code> subclass 0N/A * with a custom <code>ComponentUI</code> class. 0N/A * @param name Name of the region 0N/A * @param ui String that will be returned from 0N/A * <code>component.getUIClassID</code>. This will be null 0N/A * if this is a subregion. 0N/A * @param subregion Whether or not this is a subregion. 0N/A * Returns true if the Region is a subregion of a Component, otherwise 0N/A * false. For example, <code>Region.BUTTON</code> corresponds do a 0N/A * <code>Component</code> so that <code>Region.BUTTON.isSubregion()</code> 0N/A * @return true if the Region is a subregion of a Component. 0N/A * Returns the name of the region. 0N/A * @return name of the Region. 0N/A * Returns the name, in lowercase. 1510N/A * @return lower case representation of the name of the Region 0N/A * Returns the name of the Region. 0N/A * @return name of the Region.