java.lang.Object
javax.swing.plaf.synth.Region
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.
 
 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:
 
- Map all characters to lowercase.
- Map the first character to uppercase.
- Map the first character after underscores to uppercase.
- Remove all underscores.
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"/>
- Since:
- 1.5
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final RegionArrowButton's are special types of buttons that also render a directional indicator, typically an arrow.static final RegionButton region.static final RegionCheckBox region.static final RegionCheckBoxMenuItem region.static final RegionColorChooser region.static final RegionComboBox region.static final RegionDesktopIcon region.static final RegionDesktopPane region.static final RegionEditorPane region.static final RegionFileChooser region.static final RegionFormattedTextField region.static final RegionInternalFrame region.static final RegionTitlePane of an InternalFrame.static final RegionLabel region.static final RegionList region.static final RegionMenu region.static final RegionMenuBar region.static final RegionMenuItem region.static final RegionAccelerator region of a MenuItem.static final RegionOptionPane region.static final RegionPanel region.static final RegionPasswordField region.static final RegionPopupMenu region.static final RegionPopupMenuSeparator region.static final RegionProgressBar region.static final RegionRadioButton region.static final RegionRadioButtonMenuItem region.static final RegionRootPane region.static final RegionScrollBar region.static final RegionThumb of the ScrollBar.static final RegionTrack of the ScrollBar.static final RegionScrollPane region.static final RegionSeparator region.static final RegionSlider region.static final RegionThumb of the Slider.static final RegionTrack of the Slider.static final RegionSpinner region.static final RegionSplitPane region.static final RegionDivider of the SplitPane.static final RegionTabbedPane region.static final RegionRegion of a TabbedPane containing the content.static final RegionRegion of a TabbedPane for one tab.static final RegionRegion of a TabbedPane containing the tabs.static final RegionTable region.static final RegionTableHeader region.static final RegionTextArea region.static final RegionTextField region.static final RegionTextPane region.static final RegionToggleButton region.static final RegionToolBar region.static final RegionRegion of the ToolBar containing the content.static final RegionRegion for the Window containing the ToolBar.static final RegionToolBar separator region.static final RegionToolTip region.static final RegionTree region.static final RegionRegion of the Tree for one cell.static final RegionViewport region.
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Field Details- 
ARROW_BUTTONArrowButton'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 thisRegionuse the nameArrowButton.
- 
BUTTONButton region. To bind a style to thisRegionuse the nameButton.
- 
CHECK_BOXCheckBox region. To bind a style to thisRegionuse the nameCheckBox.
- 
CHECK_BOX_MENU_ITEMCheckBoxMenuItem region. To bind a style to thisRegionuse the nameCheckBoxMenuItem.
- 
COLOR_CHOOSERColorChooser region. To bind a style to thisRegionuse the nameColorChooser.
- 
COMBO_BOXComboBox region. To bind a style to thisRegionuse the nameComboBox.
- 
DESKTOP_PANEDesktopPane region. To bind a style to thisRegionuse the nameDesktopPane.
- 
DESKTOP_ICONDesktopIcon region. To bind a style to thisRegionuse the nameDesktopIcon.
- 
EDITOR_PANEEditorPane region. To bind a style to thisRegionuse the nameEditorPane.
- 
FILE_CHOOSERFileChooser region. To bind a style to thisRegionuse the nameFileChooser.
- 
FORMATTED_TEXT_FIELDFormattedTextField region. To bind a style to thisRegionuse the nameFormattedTextField.
- 
INTERNAL_FRAMEInternalFrame region. To bind a style to thisRegionuse the nameInternalFrame.
- 
INTERNAL_FRAME_TITLE_PANETitlePane of an InternalFrame. The TitlePane typically shows a menu, title, widgets to manipulate the internal frame. To bind a style to thisRegionuse the nameInternalFrameTitlePane.
- 
LABELLabel region. To bind a style to thisRegionuse the nameLabel.
- 
LISTList region. To bind a style to thisRegionuse the nameList.
- 
MENUMenu region. To bind a style to thisRegionuse the nameMenu.
- 
MENU_BARMenuBar region. To bind a style to thisRegionuse the nameMenuBar.
- 
MENU_ITEMMenuItem region. To bind a style to thisRegionuse the nameMenuItem.
- 
MENU_ITEM_ACCELERATORAccelerator region of a MenuItem. To bind a style to thisRegionuse the nameMenuItemAccelerator.
- 
OPTION_PANEOptionPane region. To bind a style to thisRegionuse the nameOptionPane.
- 
PANELPanel region. To bind a style to thisRegionuse the namePanel.
- 
PASSWORD_FIELDPasswordField region. To bind a style to thisRegionuse the namePasswordField.
- 
POPUP_MENUPopupMenu region. To bind a style to thisRegionuse the namePopupMenu.
- 
POPUP_MENU_SEPARATORPopupMenuSeparator region. To bind a style to thisRegionuse the namePopupMenuSeparator.
- 
PROGRESS_BARProgressBar region. To bind a style to thisRegionuse the nameProgressBar.
- 
RADIO_BUTTONRadioButton region. To bind a style to thisRegionuse the nameRadioButton.
- 
RADIO_BUTTON_MENU_ITEMRadioButtonMenuItem region. To bind a style to thisRegionuse the nameRadioButtonMenuItem.
- 
ROOT_PANERootPane region. To bind a style to thisRegionuse the nameRootPane.
- 
SCROLL_BARScrollBar region. To bind a style to thisRegionuse the nameScrollBar.
- 
SCROLL_BAR_TRACKTrack of the ScrollBar. To bind a style to thisRegionuse the nameScrollBarTrack.
- 
SCROLL_BAR_THUMBThumb 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 thisRegionuse the nameScrollBarThumb.
- 
SCROLL_PANEScrollPane region. To bind a style to thisRegionuse the nameScrollPane.
- 
SEPARATORSeparator region. To bind a style to thisRegionuse the nameSeparator.
- 
SLIDERSlider region. To bind a style to thisRegionuse the nameSlider.
- 
SLIDER_TRACKTrack of the Slider. To bind a style to thisRegionuse the nameSliderTrack.
- 
SLIDER_THUMBThumb of the Slider. The thumb of the Slider identifies the current value. To bind a style to thisRegionuse the nameSliderThumb.
- 
SPINNERSpinner region. To bind a style to thisRegionuse the nameSpinner.
- 
SPLIT_PANESplitPane region. To bind a style to thisRegionuse the nameSplitPane.
- 
SPLIT_PANE_DIVIDERDivider of the SplitPane. To bind a style to thisRegionuse the nameSplitPaneDivider.
- 
TABBED_PANETabbedPane region. To bind a style to thisRegionuse the nameTabbedPane.
- 
TABBED_PANE_TABRegion of a TabbedPane for one tab. To bind a style to thisRegionuse the nameTabbedPaneTab.
- 
TABBED_PANE_TAB_AREARegion of a TabbedPane containing the tabs. To bind a style to thisRegionuse the nameTabbedPaneTabArea.
- 
TABBED_PANE_CONTENTRegion of a TabbedPane containing the content. To bind a style to thisRegionuse the nameTabbedPaneContent.
- 
TABLETable region. To bind a style to thisRegionuse the nameTable.
- 
TABLE_HEADERTableHeader region. To bind a style to thisRegionuse the nameTableHeader.
- 
TEXT_AREATextArea region. To bind a style to thisRegionuse the nameTextArea.
- 
TEXT_FIELDTextField region. To bind a style to thisRegionuse the nameTextField.
- 
TEXT_PANETextPane region. To bind a style to thisRegionuse the nameTextPane.
- 
TOGGLE_BUTTONToggleButton region. To bind a style to thisRegionuse the nameToggleButton.
- 
TOOL_BARToolBar region. To bind a style to thisRegionuse the nameToolBar.
- 
TOOL_BAR_CONTENTRegion of the ToolBar containing the content. To bind a style to thisRegionuse the nameToolBarContent.
- 
TOOL_BAR_DRAG_WINDOWRegion for the Window containing the ToolBar. To bind a style to thisRegionuse the nameToolBarDragWindow.
- 
TOOL_TIPToolTip region. To bind a style to thisRegionuse the nameToolTip.
- 
TOOL_BAR_SEPARATORToolBar separator region. To bind a style to thisRegionuse the nameToolBarSeparator.
- 
TREETree region. To bind a style to thisRegionuse the nameTree.
- 
TREE_CELLRegion of the Tree for one cell. To bind a style to thisRegionuse the nameTreeCell.
- 
VIEWPORTViewport region. To bind a style to thisRegionuse the nameViewport.
 
- 
- 
Constructor Details- 
RegionCreates a Region with the specified name. This should only be used if you are creating your ownJComponentsubclass with a customComponentUIclass.- Parameters:
- name- Name of the region
- ui- String that will be returned from- component.getUIClassID. This will be null if this is a subregion.
- subregion- Whether or not this is a subregion.
 
 
- 
- 
Method Details- 
isSubregionpublic boolean isSubregion()Returns true if the Region is a subregion of a Component, otherwise false. For example,Region.BUTTONcorresponds do aComponentso thatRegion.BUTTON.isSubregion()returns false.- Returns:
- true if the Region is a subregion of a Component.
 
- 
getNameReturns the name of the region.- Returns:
- name of the Region.
 
- 
toStringReturns the name of the Region.
 
-