Package Summary  Overview Summary

class:Region [NONE]


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 a Region. The name is derived from the field name of the constant:

  1. Map all characters to lowercase.
  2. Map the first character to uppercase.
  3. Map the first character after underscores to uppercase.
  4. Remove all underscores.
For example, to identify the SPLIT_PANERegion 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:ARROW_BUTTON [NONE]

  • ARROW_BUTTON

    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 Region use the name ArrowButton.
  • field:BUTTON [NONE]

    BUTTON

    public static final  Region BUTTON
    Button region. To bind a style to this Region use the name Button.

    field:CHECK_BOX [NONE]

    CHECK_BOX

    public static final  Region CHECK_BOX
    CheckBox region. To bind a style to this Region use the name CheckBox.

    field:CHECK_BOX_MENU_ITEM [NONE]

    CHECK_BOX_MENU_ITEM

    public static final  Region CHECK_BOX_MENU_ITEM
    CheckBoxMenuItem region. To bind a style to this Region use the name CheckBoxMenuItem.

    field:COLOR_CHOOSER [NONE]

    COLOR_CHOOSER

    public static final  Region COLOR_CHOOSER
    ColorChooser region. To bind a style to this Region use the name ColorChooser.

    field:COMBO_BOX [NONE]

    COMBO_BOX

    public static final  Region COMBO_BOX
    ComboBox region. To bind a style to this Region use the name ComboBox.

    field:DESKTOP_PANE [NONE]

    DESKTOP_PANE

    public static final  Region DESKTOP_PANE
    DesktopPane region. To bind a style to this Region use the name DesktopPane.

    field:DESKTOP_ICON [NONE]

    DESKTOP_ICON

    public static final  Region DESKTOP_ICON
    DesktopIcon region. To bind a style to this Region use the name DesktopIcon.

    field:EDITOR_PANE [NONE]

    EDITOR_PANE

    public static final  Region EDITOR_PANE
    EditorPane region. To bind a style to this Region use the name EditorPane.

    field:FILE_CHOOSER [NONE]

    FILE_CHOOSER

    public static final  Region FILE_CHOOSER
    FileChooser region. To bind a style to this Region use the name FileChooser.

    field:FORMATTED_TEXT_FIELD [NONE]

    FORMATTED_TEXT_FIELD

    public static final  Region FORMATTED_TEXT_FIELD
    FormattedTextField region. To bind a style to this Region use the name FormattedTextField.

    field:INTERNAL_FRAME [NONE]

    INTERNAL_FRAME

    public static final  Region INTERNAL_FRAME
    InternalFrame region. To bind a style to this Region use the name InternalFrame.

    field:INTERNAL_FRAME_TITLE_PANE [NONE]

    INTERNAL_FRAME_TITLE_PANE

    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 Region use the name InternalFrameTitlePane.

    field:LABEL [NONE]

    LABEL

    public static final  Region LABEL
    Label region. To bind a style to this Region use the name Label.

    field:LIST [NONE]

    LIST

    public static final  Region LIST
    List region. To bind a style to this Region use the name List.

    field:MENU [NONE]

    MENU

    public static final  Region MENU
    Menu region. To bind a style to this Region use the name Menu.

    field:MENU_BAR [NONE]

    MENU_BAR

    public static final  Region MENU_BAR
    MenuBar region. To bind a style to this Region use the name MenuBar.

    field:MENU_ITEM [NONE]

    MENU_ITEM

    public static final  Region MENU_ITEM
    MenuItem region. To bind a style to this Region use the name MenuItem.

    field:MENU_ITEM_ACCELERATOR [NONE]

    MENU_ITEM_ACCELERATOR

    public static final  Region MENU_ITEM_ACCELERATOR
    Accelerator region of a MenuItem. To bind a style to this Region use the name MenuItemAccelerator.

    field:OPTION_PANE [NONE]

    OPTION_PANE

    public static final  Region OPTION_PANE
    OptionPane region. To bind a style to this Region use the name OptionPane.

    field:PANEL [NONE]

    PANEL

    public static final  Region PANEL
    Panel region. To bind a style to this Region use the name Panel.

    field:PASSWORD_FIELD [NONE]

    PASSWORD_FIELD

    public static final  Region PASSWORD_FIELD
    PasswordField region. To bind a style to this Region use the name PasswordField.

    field:POPUP_MENU [NONE]

    POPUP_MENU

    public static final  Region POPUP_MENU
    PopupMenu region. To bind a style to this Region use the name PopupMenu.

    field:POPUP_MENU_SEPARATOR [NONE]

    POPUP_MENU_SEPARATOR

    public static final  Region POPUP_MENU_SEPARATOR
    PopupMenuSeparator region. To bind a style to this Region use the name PopupMenuSeparator.

    field:PROGRESS_BAR [NONE]

    PROGRESS_BAR

    public static final  Region PROGRESS_BAR
    ProgressBar region. To bind a style to this Region use the name ProgressBar.

    field:RADIO_BUTTON [NONE]

    RADIO_BUTTON

    public static final  Region RADIO_BUTTON
    RadioButton region. To bind a style to this Region use the name RadioButton.

    field:RADIO_BUTTON_MENU_ITEM [NONE]

    RADIO_BUTTON_MENU_ITEM

    public static final  Region RADIO_BUTTON_MENU_ITEM
    RegionButtonMenuItem region. To bind a style to this Region use the name RadioButtonMenuItem.

    field:ROOT_PANE [NONE]

    ROOT_PANE

    public static final  Region ROOT_PANE
    RootPane region. To bind a style to this Region use the name RootPane.

    field:SCROLL_BAR [NONE]

    SCROLL_BAR

    public static final  Region SCROLL_BAR
    ScrollBar region. To bind a style to this Region use the name ScrollBar.

    field:SCROLL_BAR_TRACK [NONE]

    SCROLL_BAR_TRACK

    public static final  Region SCROLL_BAR_TRACK
    Track of the ScrollBar. To bind a style to this Region use the name ScrollBarTrack.

    field:SCROLL_BAR_THUMB [NONE]

    SCROLL_BAR_THUMB

    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 Region use the name ScrollBarThumb.

    field:SCROLL_PANE [NONE]

    SCROLL_PANE

    public static final  Region SCROLL_PANE
    ScrollPane region. To bind a style to this Region use the name ScrollPane.

    field:SEPARATOR [NONE]

    SEPARATOR

    public static final  Region SEPARATOR
    Separator region. To bind a style to this Region use the name Separator.

    field:SLIDER [NONE]

    SLIDER

    public static final  Region SLIDER
    Slider region. To bind a style to this Region use the name Slider.

    field:SLIDER_TRACK [NONE]

    SLIDER_TRACK

    public static final  Region SLIDER_TRACK
    Track of the Slider. To bind a style to this Region use the name SliderTrack.

    field:SLIDER_THUMB [NONE]

    SLIDER_THUMB

    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 Region use the name SliderThumb.

    field:SPINNER [NONE]

    SPINNER

    public static final  Region SPINNER
    Spinner region. To bind a style to this Region use the name Spinner.

    field:SPLIT_PANE [NONE]

    SPLIT_PANE

    public static final  Region SPLIT_PANE
    SplitPane region. To bind a style to this Region use the name SplitPane.

    field:SPLIT_PANE_DIVIDER [NONE]

    SPLIT_PANE_DIVIDER

    public static final  Region SPLIT_PANE_DIVIDER
    Divider of the SplitPane. To bind a style to this Region use the name SplitPaneDivider.

    field:TABBED_PANE [NONE]

    TABBED_PANE

    public static final  Region TABBED_PANE
    TabbedPane region. To bind a style to this Region use the name TabbedPane.

    field:TABBED_PANE_TAB [NONE]

    TABBED_PANE_TAB

    public static final  Region TABBED_PANE_TAB
    Region of a TabbedPane for one tab. To bind a style to this Region use the name TabbedPaneTab.

    field:TABBED_PANE_TAB_AREA [NONE]

    TABBED_PANE_TAB_AREA

    public static final  Region TABBED_PANE_TAB_AREA
    Region of a TabbedPane containing the tabs. To bind a style to this Region use the name TabbedPaneTabArea.

    field:TABBED_PANE_CONTENT [NONE]

    TABBED_PANE_CONTENT

    public static final  Region TABBED_PANE_CONTENT
    Region of a TabbedPane containing the content. To bind a style to this Region use the name TabbedPaneContent.

    field:TABLE [NONE]

    TABLE

    public static final  Region TABLE
    Table region. To bind a style to this Region use the name Table.

    field:TABLE_HEADER [NONE]

    TABLE_HEADER

    public static final  Region TABLE_HEADER
    TableHeader region. To bind a style to this Region use the name TableHeader.

    field:TEXT_AREA [NONE]

    TEXT_AREA

    public static final  Region TEXT_AREA
    TextArea region. To bind a style to this Region use the name TextArea.

    field:TEXT_FIELD [NONE]

    TEXT_FIELD

    public static final  Region TEXT_FIELD
    TextField region. To bind a style to this Region use the name TextField.

    field:TEXT_PANE [NONE]

    TEXT_PANE

    public static final  Region TEXT_PANE
    TextPane region. To bind a style to this Region use the name TextPane.

    field:TOGGLE_BUTTON [NONE]

    TOGGLE_BUTTON

    public static final  Region TOGGLE_BUTTON
    ToggleButton region. To bind a style to this Region use the name ToggleButton.

    field:TOOL_BAR [NONE]

    TOOL_BAR

    public static final  Region TOOL_BAR
    ToolBar region. To bind a style to this Region use the name ToolBar.

    field:TOOL_BAR_CONTENT [NONE]

    TOOL_BAR_CONTENT

    public static final  Region TOOL_BAR_CONTENT
    Region of the ToolBar containing the content. To bind a style to this Region use the name ToolBarContent.

    field:TOOL_BAR_DRAG_WINDOW [NONE]

    TOOL_BAR_DRAG_WINDOW

    public static final  Region TOOL_BAR_DRAG_WINDOW
    Region for the Window containing the ToolBar. To bind a style to this Region use the name ToolBarDragWindow.

    field:TOOL_TIP [NONE]

    TOOL_TIP

    public static final  Region TOOL_TIP
    ToolTip region. To bind a style to this Region use the name ToolTip.

    field:TOOL_BAR_SEPARATOR [NONE]

    TOOL_BAR_SEPARATOR

    public static final  Region TOOL_BAR_SEPARATOR
    ToolBar separator region. To bind a style to this Region use the name ToolBarSeparator.

    field:TREE [NONE]

    TREE

    public static final  Region TREE
    Tree region. To bind a style to this Region use the name Tree.

    field:TREE_CELL [NONE]

    TREE_CELL

    public static final  Region TREE_CELL
    Region of the Tree for one cell. To bind a style to this Region use the name TreeCell.

    field:VIEWPORT [NONE]

    VIEWPORT

    public static final  Region VIEWPORT
    Viewport region. To bind a style to this Region use the name Viewport.

    constructor:Region(java.lang.String,java.lang.String,boolean) [NONE]

    • Region

      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 JComponent subclass with a custom ComponentUI class.
      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:isSubregion() [NONE]

  • isSubregion

    public boolean isSubregion()
    Returns true if the Region is a subregion of a Component, otherwise false. For example, Region.BUTTON corresponds do a Component so that Region.BUTTON.isSubregion() returns false.
    Returns:
    true if the Region is a subregion of a Component.
  • method:getName() [NONE]

    getName

    public String getName()
    Returns the name of the region.
    Returns:
    name of the Region.

    method:toString() [NONE]

    toString

    public String toString()
    Returns the name of the Region.
    Overrides:
    toString in class Object
    Returns:
    name of the Region.

    © 2020 Oracle Corporation and/or its affiliates