- java.lang.Object
- 
- javax.swing.plaf.synth.Region
 
- 
 public class Region extends Object 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 aRegion. 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_PANERegionyou would useSplitPane. The following shows a customSynthStyleFactorythat 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 SummaryFields Modifier and Type Field Description static RegionARROW_BUTTONArrowButton's are special types of buttons that also render a directional indicator, typically an arrow.static RegionBUTTONButton region.static RegionCHECK_BOXCheckBox region.static RegionCHECK_BOX_MENU_ITEMCheckBoxMenuItem region.static RegionCOLOR_CHOOSERColorChooser region.static RegionCOMBO_BOXComboBox region.static RegionDESKTOP_ICONDesktopIcon region.static RegionDESKTOP_PANEDesktopPane region.static RegionEDITOR_PANEEditorPane region.static RegionFILE_CHOOSERFileChooser region.static RegionFORMATTED_TEXT_FIELDFormattedTextField region.static RegionINTERNAL_FRAMEInternalFrame region.static RegionINTERNAL_FRAME_TITLE_PANETitlePane of an InternalFrame.static RegionLABELLabel region.static RegionLISTList region.static RegionMENUMenu region.static RegionMENU_BARMenuBar region.static RegionMENU_ITEMMenuItem region.static RegionMENU_ITEM_ACCELERATORAccelerator region of a MenuItem.static RegionOPTION_PANEOptionPane region.static RegionPANELPanel region.static RegionPASSWORD_FIELDPasswordField region.static RegionPOPUP_MENUPopupMenu region.static RegionPOPUP_MENU_SEPARATORPopupMenuSeparator region.static RegionPROGRESS_BARProgressBar region.static RegionRADIO_BUTTONRadioButton region.static RegionRADIO_BUTTON_MENU_ITEMRegionButtonMenuItem region.static RegionROOT_PANERootPane region.static RegionSCROLL_BARScrollBar region.static RegionSCROLL_BAR_THUMBThumb of the ScrollBar.static RegionSCROLL_BAR_TRACKTrack of the ScrollBar.static RegionSCROLL_PANEScrollPane region.static RegionSEPARATORSeparator region.static RegionSLIDERSlider region.static RegionSLIDER_THUMBThumb of the Slider.static RegionSLIDER_TRACKTrack of the Slider.static RegionSPINNERSpinner region.static RegionSPLIT_PANESplitPane region.static RegionSPLIT_PANE_DIVIDERDivider of the SplitPane.static RegionTABBED_PANETabbedPane region.static RegionTABBED_PANE_CONTENTRegion of a TabbedPane containing the content.static RegionTABBED_PANE_TABRegion of a TabbedPane for one tab.static RegionTABBED_PANE_TAB_AREARegion of a TabbedPane containing the tabs.static RegionTABLETable region.static RegionTABLE_HEADERTableHeader region.static RegionTEXT_AREATextArea region.static RegionTEXT_FIELDTextField region.static RegionTEXT_PANETextPane region.static RegionTOGGLE_BUTTONToggleButton region.static RegionTOOL_BARToolBar region.static RegionTOOL_BAR_CONTENTRegion of the ToolBar containing the content.static RegionTOOL_BAR_DRAG_WINDOWRegion for the Window containing the ToolBar.static RegionTOOL_BAR_SEPARATORToolBar separator region.static RegionTOOL_TIPToolTip region.static RegionTREETree region.static RegionTREE_CELLRegion of the Tree for one cell.static RegionVIEWPORTViewport region.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Returns the name of the region.booleanisSubregion()Returns true if the Region is a subregion of a Component, otherwise false.StringtoString()Returns the name of the Region.
 
- 
- 
- 
Field Detail- 
ARROW_BUTTONpublic 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 thisRegionuse the nameArrowButton.
 - 
BUTTONpublic static final Region BUTTON Button region. To bind a style to thisRegionuse the nameButton.
 - 
CHECK_BOXpublic static final Region CHECK_BOX CheckBox region. To bind a style to thisRegionuse the nameCheckBox.
 - 
CHECK_BOX_MENU_ITEMpublic static final Region CHECK_BOX_MENU_ITEM CheckBoxMenuItem region. To bind a style to thisRegionuse the nameCheckBoxMenuItem.
 - 
COLOR_CHOOSERpublic static final Region COLOR_CHOOSER ColorChooser region. To bind a style to thisRegionuse the nameColorChooser.
 - 
COMBO_BOXpublic static final Region COMBO_BOX ComboBox region. To bind a style to thisRegionuse the nameComboBox.
 - 
DESKTOP_PANEpublic static final Region DESKTOP_PANE DesktopPane region. To bind a style to thisRegionuse the nameDesktopPane.
 - 
DESKTOP_ICONpublic static final Region DESKTOP_ICON DesktopIcon region. To bind a style to thisRegionuse the nameDesktopIcon.
 - 
EDITOR_PANEpublic static final Region EDITOR_PANE EditorPane region. To bind a style to thisRegionuse the nameEditorPane.
 - 
FILE_CHOOSERpublic static final Region FILE_CHOOSER FileChooser region. To bind a style to thisRegionuse the nameFileChooser.
 - 
FORMATTED_TEXT_FIELDpublic static final Region FORMATTED_TEXT_FIELD FormattedTextField region. To bind a style to thisRegionuse the nameFormattedTextField.
 - 
INTERNAL_FRAMEpublic static final Region INTERNAL_FRAME InternalFrame region. To bind a style to thisRegionuse the nameInternalFrame.
 - 
INTERNAL_FRAME_TITLE_PANEpublic 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 thisRegionuse the nameInternalFrameTitlePane.
 - 
LABELpublic static final Region LABEL Label region. To bind a style to thisRegionuse the nameLabel.
 - 
LISTpublic static final Region LIST List region. To bind a style to thisRegionuse the nameList.
 - 
MENUpublic static final Region MENU Menu region. To bind a style to thisRegionuse the nameMenu.
 - 
MENU_BARpublic static final Region MENU_BAR MenuBar region. To bind a style to thisRegionuse the nameMenuBar.
 - 
MENU_ITEMpublic static final Region MENU_ITEM MenuItem region. To bind a style to thisRegionuse the nameMenuItem.
 - 
MENU_ITEM_ACCELERATORpublic static final Region MENU_ITEM_ACCELERATOR Accelerator region of a MenuItem. To bind a style to thisRegionuse the nameMenuItemAccelerator.
 - 
OPTION_PANEpublic static final Region OPTION_PANE OptionPane region. To bind a style to thisRegionuse the nameOptionPane.
 - 
PANELpublic static final Region PANEL Panel region. To bind a style to thisRegionuse the namePanel.
 - 
PASSWORD_FIELDpublic static final Region PASSWORD_FIELD PasswordField region. To bind a style to thisRegionuse the namePasswordField.
 - 
POPUP_MENUpublic static final Region POPUP_MENU PopupMenu region. To bind a style to thisRegionuse the namePopupMenu.
 - 
POPUP_MENU_SEPARATORpublic static final Region POPUP_MENU_SEPARATOR PopupMenuSeparator region. To bind a style to thisRegionuse the namePopupMenuSeparator.
 - 
PROGRESS_BARpublic static final Region PROGRESS_BAR ProgressBar region. To bind a style to thisRegionuse the nameProgressBar.
 - 
RADIO_BUTTONpublic static final Region RADIO_BUTTON RadioButton region. To bind a style to thisRegionuse the nameRadioButton.
 - 
RADIO_BUTTON_MENU_ITEMpublic static final Region RADIO_BUTTON_MENU_ITEM RegionButtonMenuItem region. To bind a style to thisRegionuse the nameRadioButtonMenuItem.
 - 
ROOT_PANEpublic static final Region ROOT_PANE RootPane region. To bind a style to thisRegionuse the nameRootPane.
 - 
SCROLL_BARpublic static final Region SCROLL_BAR ScrollBar region. To bind a style to thisRegionuse the nameScrollBar.
 - 
SCROLL_BAR_TRACKpublic static final Region SCROLL_BAR_TRACK Track of the ScrollBar. To bind a style to thisRegionuse the nameScrollBarTrack.
 - 
SCROLL_BAR_THUMBpublic 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 thisRegionuse the nameScrollBarThumb.
 - 
SCROLL_PANEpublic static final Region SCROLL_PANE ScrollPane region. To bind a style to thisRegionuse the nameScrollPane.
 - 
SEPARATORpublic static final Region SEPARATOR Separator region. To bind a style to thisRegionuse the nameSeparator.
 - 
SLIDERpublic static final Region SLIDER Slider region. To bind a style to thisRegionuse the nameSlider.
 - 
SLIDER_TRACKpublic static final Region SLIDER_TRACK Track of the Slider. To bind a style to thisRegionuse the nameSliderTrack.
 - 
SLIDER_THUMBpublic static final Region SLIDER_THUMB Thumb of the Slider. The thumb of the Slider identifies the current value. To bind a style to thisRegionuse the nameSliderThumb.
 - 
SPINNERpublic static final Region SPINNER Spinner region. To bind a style to thisRegionuse the nameSpinner.
 - 
SPLIT_PANEpublic static final Region SPLIT_PANE SplitPane region. To bind a style to thisRegionuse the nameSplitPane.
 - 
SPLIT_PANE_DIVIDERpublic static final Region SPLIT_PANE_DIVIDER Divider of the SplitPane. To bind a style to thisRegionuse the nameSplitPaneDivider.
 - 
TABBED_PANEpublic static final Region TABBED_PANE TabbedPane region. To bind a style to thisRegionuse the nameTabbedPane.
 - 
TABBED_PANE_TABpublic static final Region TABBED_PANE_TAB Region of a TabbedPane for one tab. To bind a style to thisRegionuse the nameTabbedPaneTab.
 - 
TABBED_PANE_TAB_AREApublic static final Region TABBED_PANE_TAB_AREA Region of a TabbedPane containing the tabs. To bind a style to thisRegionuse the nameTabbedPaneTabArea.
 - 
TABBED_PANE_CONTENTpublic static final Region TABBED_PANE_CONTENT Region of a TabbedPane containing the content. To bind a style to thisRegionuse the nameTabbedPaneContent.
 - 
TABLEpublic static final Region TABLE Table region. To bind a style to thisRegionuse the nameTable.
 - 
TABLE_HEADERpublic static final Region TABLE_HEADER TableHeader region. To bind a style to thisRegionuse the nameTableHeader.
 - 
TEXT_AREApublic static final Region TEXT_AREA TextArea region. To bind a style to thisRegionuse the nameTextArea.
 - 
TEXT_FIELDpublic static final Region TEXT_FIELD TextField region. To bind a style to thisRegionuse the nameTextField.
 - 
TEXT_PANEpublic static final Region TEXT_PANE TextPane region. To bind a style to thisRegionuse the nameTextPane.
 - 
TOGGLE_BUTTONpublic static final Region TOGGLE_BUTTON ToggleButton region. To bind a style to thisRegionuse the nameToggleButton.
 - 
TOOL_BARpublic static final Region TOOL_BAR ToolBar region. To bind a style to thisRegionuse the nameToolBar.
 - 
TOOL_BAR_CONTENTpublic static final Region TOOL_BAR_CONTENT Region of the ToolBar containing the content. To bind a style to thisRegionuse the nameToolBarContent.
 - 
TOOL_BAR_DRAG_WINDOWpublic static final Region TOOL_BAR_DRAG_WINDOW Region for the Window containing the ToolBar. To bind a style to thisRegionuse the nameToolBarDragWindow.
 - 
TOOL_TIPpublic static final Region TOOL_TIP ToolTip region. To bind a style to thisRegionuse the nameToolTip.
 - 
TOOL_BAR_SEPARATORpublic static final Region TOOL_BAR_SEPARATOR ToolBar separator region. To bind a style to thisRegionuse the nameToolBarSeparator.
 - 
TREEpublic static final Region TREE Tree region. To bind a style to thisRegionuse the nameTree.
 - 
TREE_CELLpublic static final Region TREE_CELL Region of the Tree for one cell. To bind a style to thisRegionuse the nameTreeCell.
 - 
VIEWPORTpublic static final Region VIEWPORT Viewport region. To bind a style to thisRegionuse the nameViewport.
 
- 
 - 
Constructor Detail- 
Regionprotected Region(String name, String ui, boolean subregion) Creates 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 Detail- 
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.
 
 - 
getNamepublic String getName() Returns the name of the region.- Returns:
- name of the Region.
 
 
- 
 
-