Regions are typically used as a way to identify the Components
and areas a particular style is to apply to. Synth's file format allows you
to bind styles based on the name of a Region.
The name is derived from the field name of the constant:
SPLIT_PANE
Region you would use SplitPane.
The following shows a custom SynthStyleFactory
that returns a specific style for split panes:
public SynthStyle getStyle(JComponent c, Region id) {
if (id == Region.SPLIT_PANE) {
return splitPaneStyle;
}
...
}
The following xml
accomplishes the same thing:
<style id="splitPaneStyle"> ... </style> <bind style="splitPaneStyle" type="region" key="SplitPane"/>
| Modifier and Type | Field and Description |
|---|---|
| public static final Region | ARROW_BUTTON
ArrowButton's are special types of buttons that also render a directional indicator, typically an arrow. |
| public static final Region | BUTTON
Button region. |
| public static final Region | CHECK_BOX
CheckBox region. |
| public static final Region | CHECK_BOX_MENU_ITEM
CheckBoxMenuItem region. |
| public static final Region | COLOR_CHOOSER
ColorChooser region. |
| public static final Region | COMBO_BOX
ComboBox region. |
| public static final Region | DESKTOP_ICON
DesktopIcon region. |
| public static final Region | DESKTOP_PANE
DesktopPane region. |
| public static final Region | EDITOR_PANE
EditorPane region. |
| public static final Region | FILE_CHOOSER
FileChooser region. |
| public static final Region | FORMATTED_TEXT_FIELD
FormattedTextField region. |
| public static final Region | INTERNAL_FRAME
InternalFrame region. |
| public static final Region | INTERNAL_FRAME_TITLE_PANE
TitlePane of an InternalFrame. |
| public static final Region | LABEL
Label region. |
| private static Map | |
| public static final Region | LIST
List region. |
| public static final Region | MENU
Menu region. |
| public static final Region | MENU_BAR
MenuBar region. |
| public static final Region | MENU_ITEM
MenuItem region. |
| public static final Region | MENU_ITEM_ACCELERATOR
Accelerator region of a MenuItem. |
| private final String | |
| public static final Region | OPTION_PANE
OptionPane region. |
| public static final Region | PANEL
Panel region. |
| public static final Region | PASSWORD_FIELD
PasswordField region. |
| public static final Region | POPUP_MENU
PopupMenu region. |
| public static final Region | POPUP_MENU_SEPARATOR
PopupMenuSeparator region. |
| public static final Region | PROGRESS_BAR
ProgressBar region. |
| public static final Region | RADIO_BUTTON
RadioButton region. |
| public static final Region | RADIO_BUTTON_MENU_ITEM
RadioButtonMenuItem region. |
| private static Map | |
| public static final Region | ROOT_PANE
RootPane region. |
| public static final Region | SCROLL_BAR
ScrollBar region. |
| public static final Region | SCROLL_BAR_THUMB
Thumb of the ScrollBar. |
| public static final Region | SCROLL_BAR_TRACK
Track of the ScrollBar. |
| public static final Region | SCROLL_PANE
ScrollPane region. |
| public static final Region | SEPARATOR
Separator region. |
| public static final Region | SLIDER
Slider region. |
| public static final Region | SLIDER_THUMB
Thumb of the Slider. |
| public static final Region | SLIDER_TRACK
Track of the Slider. |
| public static final Region | SPINNER
Spinner region. |
| public static final Region | SPLIT_PANE
SplitPane region. |
| public static final Region | SPLIT_PANE_DIVIDER
Divider of the SplitPane. |
| private final boolean | |
| public static final Region | TABBED_PANE
TabbedPane region. |
| public static final Region | TABBED_PANE_CONTENT
Region of a TabbedPane containing the content. |
| public static final Region | TABBED_PANE_TAB
Region of a TabbedPane for one tab. |
| public static final Region | TABBED_PANE_TAB_AREA
Region of a TabbedPane containing the tabs. |
| public static final Region | TABLE
Table region. |
| public static final Region | TABLE_HEADER
TableHeader region. |
| public static final Region | TEXT_AREA
TextArea region. |
| public static final Region | TEXT_FIELD
TextField region. |
| public static final Region | TEXT_PANE
TextPane region. |
| public static final Region | TOGGLE_BUTTON
ToggleButton region. |
| public static final Region | TOOL_BAR
ToolBar region. |
| public static final Region | TOOL_BAR_CONTENT
Region of the ToolBar containing the content. |
| public static final Region | TOOL_BAR_DRAG_WINDOW
Region for the Window containing the ToolBar. |
| public static final Region | TOOL_BAR_SEPARATOR
ToolBar separator region. |
| public static final Region | TOOL_TIP
ToolTip region. |
| public static final Region | TREE
Tree region. |
| public static final Region | TREE_CELL
Region of the Tree for one cell. |
| public static final Region | VIEWPORT
Viewport region. |
| Access | Constructor and Description |
|---|---|
| private | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String | Returns: lower case representation of the name of the RegionReturns the name, in lowercase. |
| private static synchronized Map | |
| public String | |
| pack-priv static Region | |
| private static synchronized Map | |
| public boolean | Returns: true if the Region is a subregion of a Component.Returns true if the Region is a subregion of a Component, otherwise false. |
| pack-priv static void | |
| public String | Returns: name of the Region.Overrides java. Returns the name of the Region. |
| ARROW_BUTTON | back to summary |
|---|---|
| public static final Region ARROW_BUTTON 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 | |
| BUTTON | back to summary |
|---|---|
| public static final Region BUTTON Button region. To bind a style to this | |
| CHECK_BOX | back to summary |
|---|---|
| public static final Region CHECK_BOX CheckBox region. To bind a style to this | |
| CHECK_BOX_MENU_ITEM | back to summary |
|---|---|
| public static final Region CHECK_BOX_MENU_ITEM CheckBoxMenuItem region. To bind a style to this | |
| COLOR_CHOOSER | back to summary |
|---|---|
| public static final Region COLOR_CHOOSER ColorChooser region. To bind a style to this | |
| COMBO_BOX | back to summary |
|---|---|
| public static final Region COMBO_BOX ComboBox region. To bind a style to this | |
| DESKTOP_ICON | back to summary |
|---|---|
| public static final Region DESKTOP_ICON DesktopIcon region. To bind a style to this | |
| DESKTOP_PANE | back to summary |
|---|---|
| public static final Region DESKTOP_PANE DesktopPane region. To bind a style to this | |
| EDITOR_PANE | back to summary |
|---|---|
| public static final Region EDITOR_PANE EditorPane region. To bind a style to this | |
| FILE_CHOOSER | back to summary |
|---|---|
| public static final Region FILE_CHOOSER FileChooser region. To bind a style to this | |
| FORMATTED_TEXT_FIELD | back to summary |
|---|---|
| public static final Region FORMATTED_TEXT_FIELD FormattedTextField region. To bind a style to this | |
| INTERNAL_FRAME | back to summary |
|---|---|
| public static final Region INTERNAL_FRAME InternalFrame region. To bind a style to this | |
| INTERNAL_FRAME_TITLE_PANE | back to summary |
|---|---|
| public static final Region INTERNAL_FRAME_TITLE_PANE TitlePane of an InternalFrame. The TitlePane typically
shows a menu, title, widgets to manipulate the internal frame.
To bind a style to this | |
| LABEL | back to summary |
|---|---|
| public static final Region LABEL Label region. To bind a style to this | |
| lcRegionMap | back to summary |
|---|---|
| private static Map<Region, String> lcRegionMap | |
| LIST | back to summary |
|---|---|
| public static final Region LIST List region. To bind a style to this | |
| MENU | back to summary |
|---|---|
| public static final Region MENU Menu region. To bind a style to this | |
| MENU_BAR | back to summary |
|---|---|
| public static final Region MENU_BAR MenuBar region. To bind a style to this | |
| MENU_ITEM | back to summary |
|---|---|
| public static final Region MENU_ITEM MenuItem region. To bind a style to this | |
| MENU_ITEM_ACCELERATOR | back to summary |
|---|---|
| public static final Region MENU_ITEM_ACCELERATOR Accelerator region of a MenuItem. To bind a style to this
| |
| name | back to summary |
|---|---|
| private final String name | |
| OPTION_PANE | back to summary |
|---|---|
| public static final Region OPTION_PANE OptionPane region. To bind a style to this | |
| PANEL | back to summary |
|---|---|
| public static final Region PANEL Panel region. To bind a style to this | |
| PASSWORD_FIELD | back to summary |
|---|---|
| public static final Region PASSWORD_FIELD PasswordField region. To bind a style to this | |
| POPUP_MENU | back to summary |
|---|---|
| public static final Region POPUP_MENU PopupMenu region. To bind a style to this | |
| POPUP_MENU_SEPARATOR | back to summary |
|---|---|
| public static final Region POPUP_MENU_SEPARATOR PopupMenuSeparator region. To bind a style to this | |
| PROGRESS_BAR | back to summary |
|---|---|
| public static final Region PROGRESS_BAR ProgressBar region. To bind a style to this | |
| RADIO_BUTTON | back to summary |
|---|---|
| public static final Region RADIO_BUTTON RadioButton region. To bind a style to this | |
| RADIO_BUTTON_MENU_ITEM | back to summary |
|---|---|
| public static final Region RADIO_BUTTON_MENU_ITEM RadioButtonMenuItem region. To bind a style to this | |
| regionMap | back to summary |
|---|---|
| private static Map<String, Region> regionMap | |
| ROOT_PANE | back to summary |
|---|---|
| public static final Region ROOT_PANE RootPane region. To bind a style to this | |
| SCROLL_BAR | back to summary |
|---|---|
| public static final Region SCROLL_BAR ScrollBar region. To bind a style to this | |
| SCROLL_BAR_THUMB | back to summary |
|---|---|
| public static final Region SCROLL_BAR_THUMB 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 | |
| SCROLL_BAR_TRACK | back to summary |
|---|---|
| public static final Region SCROLL_BAR_TRACK Track of the ScrollBar. To bind a style to this | |
| SCROLL_PANE | back to summary |
|---|---|
| public static final Region SCROLL_PANE ScrollPane region. To bind a style to this | |
| SEPARATOR | back to summary |
|---|---|
| public static final Region SEPARATOR Separator region. To bind a style to this | |
| SLIDER | back to summary |
|---|---|
| public static final Region SLIDER Slider region. To bind a style to this | |
| SLIDER_THUMB | back to summary |
|---|---|
| public static final Region SLIDER_THUMB Thumb of the Slider. The thumb of the Slider identifies the current
value. To bind a style to this | |
| SLIDER_TRACK | back to summary |
|---|---|
| public static final Region SLIDER_TRACK Track of the Slider. To bind a style to this | |
| SPINNER | back to summary |
|---|---|
| public static final Region SPINNER Spinner region. To bind a style to this | |
| SPLIT_PANE | back to summary |
|---|---|
| public static final Region SPLIT_PANE SplitPane region. To bind a style to this | |
| SPLIT_PANE_DIVIDER | back to summary |
|---|---|
| public static final Region SPLIT_PANE_DIVIDER Divider of the SplitPane. To bind a style to this | |
| subregion | back to summary |
|---|---|
| private final boolean subregion | |
| TABBED_PANE | back to summary |
|---|---|
| public static final Region TABBED_PANE TabbedPane region. To bind a style to this | |
| TABBED_PANE_CONTENT | back to summary |
|---|---|
| public static final Region TABBED_PANE_CONTENT Region of a TabbedPane containing the content. To bind a style to this
| |
| TABBED_PANE_TAB | back to summary |
|---|---|
| public static final Region TABBED_PANE_TAB Region of a TabbedPane for one tab. To bind a style to this
| |
| TABBED_PANE_TAB_AREA | back to summary |
|---|---|
| public static final Region TABBED_PANE_TAB_AREA Region of a TabbedPane containing the tabs. To bind a style to this
| |
| TABLE | back to summary |
|---|---|
| public static final Region TABLE Table region. To bind a style to this | |
| TABLE_HEADER | back to summary |
|---|---|
| public static final Region TABLE_HEADER TableHeader region. To bind a style to this | |
| TEXT_AREA | back to summary |
|---|---|
| public static final Region TEXT_AREA TextArea region. To bind a style to this | |
| TEXT_FIELD | back to summary |
|---|---|
| public static final Region TEXT_FIELD TextField region. To bind a style to this | |
| TEXT_PANE | back to summary |
|---|---|
| public static final Region TEXT_PANE TextPane region. To bind a style to this | |
| TOGGLE_BUTTON | back to summary |
|---|---|
| public static final Region TOGGLE_BUTTON ToggleButton region. To bind a style to this | |
| TOOL_BAR | back to summary |
|---|---|
| public static final Region TOOL_BAR ToolBar region. To bind a style to this | |
| TOOL_BAR_CONTENT | back to summary |
|---|---|
| public static final Region TOOL_BAR_CONTENT Region of the ToolBar containing the content. To bind a style to this
| |
| TOOL_BAR_DRAG_WINDOW | back to summary |
|---|---|
| public static final Region TOOL_BAR_DRAG_WINDOW Region for the Window containing the ToolBar. To bind a style to this
| |
| TOOL_BAR_SEPARATOR | back to summary |
|---|---|
| public static final Region TOOL_BAR_SEPARATOR ToolBar separator region. To bind a style to this | |
| TOOL_TIP | back to summary |
|---|---|
| public static final Region TOOL_TIP ToolTip region. To bind a style to this | |
| TREE | back to summary |
|---|---|
| public static final Region TREE Tree region. To bind a style to this | |
| TREE_CELL | back to summary |
|---|---|
| public static final Region TREE_CELL Region of the Tree for one cell. To bind a style to this
| |
| VIEWPORT | back to summary |
|---|---|
| public static final Region VIEWPORT Viewport region. To bind a style to this | |
| Region | back to summary |
|---|---|
| private Region(String name, boolean subregion) | |
| Region | back to summary |
|---|---|
| protected Region(String name, String ui, boolean subregion) Creates a Region with the specified name. This should only be
used if you are creating your own | |
| getLowerCaseName | back to summary |
|---|---|
| pack-priv String getLowerCaseName() Returns the name, in lowercase.
| |
| getLowerCaseNameMap | back to summary |
|---|---|
| private static synchronized Map | |
| getName | back to summary |
|---|---|
| public String getName() Returns the name of the region.
| |
| getRegion | back to summary |
|---|---|
| pack-priv static Region getRegion(JComponent c) | |
| getUItoRegionMap | back to summary |
|---|---|
| private static synchronized Map | |
| isSubregion | back to summary |
|---|---|
| public boolean isSubregion() Returns true if the Region is a subregion of a Component, otherwise
false. For example,
| |
| registerUIs | back to summary |
|---|---|
| pack-priv static void registerUIs(UIDefaults table) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the name of the Region. | |