|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.plaf.synth.Region
public class 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 Component
s
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"/>
Field Summary | |
---|---|
static Region |
ARROW_BUTTON
ArrowButton's are special types of buttons that also render a directional indicator, typically an arrow. |
static Region |
BUTTON
Button region. |
static Region |
CHECK_BOX
CheckBox region. |
static Region |
CHECK_BOX_MENU_ITEM
CheckBoxMenuItem region. |
static Region |
COLOR_CHOOSER
ColorChooser region. |
static Region |
COMBO_BOX
ComboBox region. |
static Region |
DESKTOP_ICON
DesktopIcon region. |
static Region |
DESKTOP_PANE
DesktopPane region. |
static Region |
EDITOR_PANE
EditorPane region. |
static Region |
FILE_CHOOSER
FileChooser region. |
static Region |
FORMATTED_TEXT_FIELD
FormattedTextField region. |
static Region |
INTERNAL_FRAME
InternalFrame region. |
static Region |
INTERNAL_FRAME_TITLE_PANE
TitlePane of an InternalFrame. |
static Region |
LABEL
Label region. |
static Region |
LIST
List region. |
static Region |
MENU
Menu region. |
static Region |
MENU_BAR
MenuBar region. |
static Region |
MENU_ITEM
MenuItem region. |
static Region |
MENU_ITEM_ACCELERATOR
Accelerator region of a MenuItem. |
static Region |
OPTION_PANE
OptionPane region. |
static Region |
PANEL
Panel region. |
static Region |
PASSWORD_FIELD
PasswordField region. |
static Region |
POPUP_MENU
PopupMenu region. |
static Region |
POPUP_MENU_SEPARATOR
PopupMenuSeparator region. |
static Region |
PROGRESS_BAR
ProgressBar region. |
static Region |
RADIO_BUTTON
RadioButton region. |
static Region |
RADIO_BUTTON_MENU_ITEM
RegionButtonMenuItem region. |
static Region |
ROOT_PANE
RootPane region. |
static Region |
SCROLL_BAR
ScrollBar region. |
static Region |
SCROLL_BAR_THUMB
Thumb of the ScrollBar. |
static Region |
SCROLL_BAR_TRACK
Track of the ScrollBar. |
static Region |
SCROLL_PANE
ScrollPane region. |
static Region |
SEPARATOR
Separator region. |
static Region |
SLIDER
Slider region. |
static Region |
SLIDER_THUMB
Thumb of the Slider. |
static Region |
SLIDER_TRACK
Track of the Slider. |
static Region |
SPINNER
Spinner region. |
static Region |
SPLIT_PANE
SplitPane region. |
static Region |
SPLIT_PANE_DIVIDER
Divider of the SplitPane. |
static Region |
TABBED_PANE
TabbedPane region. |
static Region |
TABBED_PANE_CONTENT
Region of a TabbedPane containing the content. |
static Region |
TABBED_PANE_TAB
Region of a TabbedPane for one tab. |
static Region |
TABBED_PANE_TAB_AREA
Region of a TabbedPane containing the tabs. |
static Region |
TABLE
Table region. |
static Region |
TABLE_HEADER
TableHeader region. |
static Region |
TEXT_AREA
TextArea region. |
static Region |
TEXT_FIELD
TextField region. |
static Region |
TEXT_PANE
TextPane region. |
static Region |
TOGGLE_BUTTON
ToggleButton region. |
static Region |
TOOL_BAR
ToolBar region. |
static Region |
TOOL_BAR_CONTENT
Region of the ToolBar containing the content. |
static Region |
TOOL_BAR_DRAG_WINDOW
Region for the Window containing the ToolBar. |
static Region |
TOOL_BAR_SEPARATOR
ToolBar separator region. |
static Region |
TOOL_TIP
ToolTip region. |
static Region |
TREE
Tree region. |
static Region |
TREE_CELL
Region of the Tree for one cell. |
static Region |
VIEWPORT
Viewport region. |
Constructor Summary | |
---|---|
protected |
Region(String name,
String ui,
boolean subregion)
Creates a Region with the specified name. |
Method Summary | |
---|---|
String |
getName()
Returns the name of the region. |
boolean |
isSubregion()
Returns true if the Region is a subregion of a Component, otherwise false. |
String |
toString()
Returns the name of the Region. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Region ARROW_BUTTON
Region
use the name
ArrowButton
.
public static final Region BUTTON
Region
use the name
Button
.
public static final Region CHECK_BOX
Region
use the name
CheckBox
.
public static final Region CHECK_BOX_MENU_ITEM
Region
use
the name CheckBoxMenuItem
.
public static final Region COLOR_CHOOSER
Region
use
the name ColorChooser
.
public static final Region COMBO_BOX
Region
use
the name ComboBox
.
public static final Region DESKTOP_PANE
Region
use
the name DesktopPane
.
public static final Region DESKTOP_ICON
Region
use
the name DesktopIcon
.
public static final Region EDITOR_PANE
Region
use
the name EditorPane
.
public static final Region FILE_CHOOSER
Region
use
the name FileChooser
.
public static final Region FORMATTED_TEXT_FIELD
Region
use
the name FormattedTextField
.
public static final Region INTERNAL_FRAME
Region
use
the name InternalFrame
.
public static final Region INTERNAL_FRAME_TITLE_PANE
Region
use the name
InternalFrameTitlePane
.
public static final Region LABEL
Region
use the name
Label
.
public static final Region LIST
Region
use the name
List
.
public static final Region MENU
Region
use the name
Menu
.
public static final Region MENU_BAR
Region
use the name
MenuBar
.
public static final Region MENU_ITEM
Region
use the name
MenuItem
.
public static final Region MENU_ITEM_ACCELERATOR
Region
use the name MenuItemAccelerator
.
public static final Region OPTION_PANE
Region
use
the name OptionPane
.
public static final Region PANEL
Region
use the name
Panel
.
public static final Region PASSWORD_FIELD
Region
use
the name PasswordField
.
public static final Region POPUP_MENU
Region
use
the name PopupMenu
.
public static final Region POPUP_MENU_SEPARATOR
Region
use the name PopupMenuSeparator
.
public static final Region PROGRESS_BAR
Region
use the name ProgressBar
.
public static final Region RADIO_BUTTON
Region
use the name RadioButton
.
public static final Region RADIO_BUTTON_MENU_ITEM
Region
use the name RadioButtonMenuItem
.
public static final Region ROOT_PANE
Region
use
the name RootPane
.
public static final Region SCROLL_BAR
Region
use
the name ScrollBar
.
public static final Region SCROLL_BAR_TRACK
Region
use
the name ScrollBarTrack
.
public static final Region SCROLL_BAR_THUMB
Region
use
the name ScrollBarThumb
.
public static final Region SCROLL_PANE
Region
use
the name ScrollPane
.
public static final Region SEPARATOR
Region
use
the name Separator
.
public static final Region SLIDER
Region
use
the name Slider
.
public static final Region SLIDER_TRACK
Region
use
the name SliderTrack
.
public static final Region SLIDER_THUMB
Region
use the name
SliderThumb
.
public static final Region SPINNER
Region
use the name
Spinner
.
public static final Region SPLIT_PANE
Region
use the name
SplitPane
.
public static final Region SPLIT_PANE_DIVIDER
Region
use the name SplitPaneDivider
.
public static final Region TABBED_PANE
Region
use
the name TabbedPane
.
public static final Region TABBED_PANE_TAB
Region
use the name TabbedPaneTab
.
public static final Region TABBED_PANE_TAB_AREA
Region
use the name TabbedPaneTabArea
.
public static final Region TABBED_PANE_CONTENT
Region
use the name TabbedPaneContent
.
public static final Region TABLE
Region
use
the name Table
.
public static final Region TABLE_HEADER
Region
use
the name TableHeader
.
public static final Region TEXT_AREA
Region
use
the name TextArea
.
public static final Region TEXT_FIELD
Region
use
the name TextField
.
public static final Region TEXT_PANE
Region
use
the name TextPane
.
public static final Region TOGGLE_BUTTON
Region
use
the name ToggleButton
.
public static final Region TOOL_BAR
Region
use
the name ToolBar
.
public static final Region TOOL_BAR_CONTENT
Region
use the name ToolBarContent
.
public static final Region TOOL_BAR_DRAG_WINDOW
Region
use the name ToolBarDragWindow
.
public static final Region TOOL_TIP
Region
use
the name ToolTip
.
public static final Region TOOL_BAR_SEPARATOR
Region
use
the name ToolBarSeparator
.
public static final Region TREE
Region
use the name
Tree
.
public static final Region TREE_CELL
Region
use the name TreeCell
.
public static final Region VIEWPORT
Region
use
the name Viewport
.
Constructor Detail |
---|
protected Region(String name, String ui, boolean subregion)
JComponent
subclass
with a custom ComponentUI
class.
name
- Name of the regionui
- 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 |
---|
public boolean isSubregion()
Region.BUTTON
corresponds do a
Component
so that Region.BUTTON.isSubregion()
returns false.
public String getName()
public String toString()
toString
in class Object
|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.