Interface FlatClientProperties
-
public interface FlatClientPropertiesDefines/documents own client properties used in FlatLaf.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUTTON_TYPESpecifies type of a button.static java.lang.StringBUTTON_TYPE_HELPPaint a help button (circle with question mark).static java.lang.StringBUTTON_TYPE_ROUND_RECTPaint the button with round edges.static java.lang.StringBUTTON_TYPE_SQUAREPaint the button with square edges.static java.lang.StringBUTTON_TYPE_TABPaint the toggle button in tab style.static java.lang.StringBUTTON_TYPE_TOOLBAR_BUTTONPaint the button in toolbar style.static java.lang.StringCOMPONENT_FOCUS_OWNERSpecifies a callback that is invoked to check whether a component is permanent focus owner.static java.lang.StringCOMPONENT_ROUND_RECTPaint the component with round edges.static java.lang.StringMENU_BAR_EMBEDDEDSpecifies whether the menu bar is embedded into the title pane if custom window decorations are enabled.static java.lang.StringMINIMUM_HEIGHTSpecifies minimum height of a component.static java.lang.StringMINIMUM_WIDTHSpecifies minimum width of a component.static java.lang.StringOUTLINESpecifies the outline color of the component border.static java.lang.StringOUTLINE_ERRORPaint the component border in another color (usually reddish) to indicate an error.static java.lang.StringOUTLINE_WARNINGPaint the component border in another color (usually yellowish) to indicate a warning.static java.lang.StringPLACEHOLDER_TEXTPlaceholder text that is only painted if the text field is empty.static java.lang.StringPOPUP_DROP_SHADOW_PAINTEDSpecifies whether a drop shadow is painted if the component is shown in a popup or if the component is the owner of another component that is shown in a popup.static java.lang.StringPOPUP_FORCE_HEAVY_WEIGHTSpecifies whether a heavy weight window should be used if the component is shown in a popup or if the component is the owner of another component that is shown in a popup.static java.lang.StringPROGRESS_BAR_LARGE_HEIGHTSpecifies whether the progress bar has always the larger height even if no string is painted.static java.lang.StringPROGRESS_BAR_SQUARESpecifies whether the progress bar is paint with square edges.static java.lang.StringSCROLL_BAR_SHOW_BUTTONSSpecifies whether the decrease/increase arrow buttons of a scrollbar are shown.static java.lang.StringSCROLL_PANE_SMOOTH_SCROLLINGSpecifies whether the scroll pane uses smooth scrolling.static java.lang.StringSELECT_ALL_ON_FOCUS_POLICYSpecifies whether all text is selected when the text component gains focus.static java.lang.StringSELECT_ALL_ON_FOCUS_POLICY_ALWAYSAlways select all text when the text component gains focus.static java.lang.StringSELECT_ALL_ON_FOCUS_POLICY_NEVERNever select all text when the text component gains focus.static java.lang.StringSELECT_ALL_ON_FOCUS_POLICY_ONCESelect all text when the text component gains focus for the first time and selection was not modified (is at end of text).static java.lang.StringSELECTED_STATESpecifies selected state of a checkbox.static java.lang.StringSELECTED_STATE_INDETERMINATEPaint an indeterminate state on a checkbox.static java.lang.StringSQUARE_SIZESpecifies whether the button preferred size will be made square (quadratically).static java.lang.StringTAB_BUTTON_SELECTED_BACKGROUNDBackground color if selected and toggle button type isBUTTON_TYPE_TAB.static java.lang.StringTAB_BUTTON_UNDERLINE_COLORColor of underline if toggle button type isBUTTON_TYPE_TAB.static java.lang.StringTAB_BUTTON_UNDERLINE_HEIGHTHeight of underline if toggle button type isBUTTON_TYPE_TAB.static java.lang.StringTABBED_PANE_ALIGN_CENTERAlign to center.static java.lang.StringTABBED_PANE_ALIGN_FILLStretch to fill all available space.static java.lang.StringTABBED_PANE_ALIGN_LEADINGAlign to the leading edge.static java.lang.StringTABBED_PANE_ALIGN_TRAILINGAlign to the trailing edge.static java.lang.StringTABBED_PANE_HAS_FULL_BORDERSpecifies whether a full border is painted around a tabbed pane.static java.lang.StringTABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TABSpecifies whether the tab area should be hidden if it contains only one tab.static java.lang.StringTABBED_PANE_LEADING_COMPONENTSpecifies a component that will be placed at the leading edge of the tabs area.static java.lang.StringTABBED_PANE_MAXIMUM_TAB_WIDTHSpecifies the maximum width of a tab.static java.lang.StringTABBED_PANE_MINIMUM_TAB_WIDTHSpecifies the minimum width of a tab.static java.lang.StringTABBED_PANE_PLACEMENT_BOTHThe forward/backward scroll arrow buttons are placed on both sides of the tab area.static java.lang.StringTABBED_PANE_PLACEMENT_TRAILINGThe forward/backward scroll arrow buttons are placed on the trailing side of the tab area.static java.lang.StringTABBED_PANE_POLICY_AS_NEEDEDDisplay only when needed.static java.lang.StringTABBED_PANE_POLICY_AS_NEEDED_SINGLEDisplay single button only when needed.static java.lang.StringTABBED_PANE_POLICY_NEVERDisplay never.static java.lang.StringTABBED_PANE_SCROLL_BUTTONS_PLACEMENTSpecifies the placement of the forward/backward scroll arrow buttons.static java.lang.StringTABBED_PANE_SCROLL_BUTTONS_POLICYSpecifies the display policy for the forward/backward scroll arrow buttons.static java.lang.StringTABBED_PANE_SHOW_CONTENT_SEPARATORSpecifies whether the separator between tabs area and content area should be shown.static java.lang.StringTABBED_PANE_SHOW_TAB_SEPARATORSSpecifies whether separators are shown between tabs.static java.lang.StringTABBED_PANE_TAB_ALIGNMENTSpecifies the horizontal alignment of the tab title and icon.static java.lang.StringTABBED_PANE_TAB_AREA_ALIGNMENTSpecifies the alignment of the tab area.static java.lang.StringTABBED_PANE_TAB_AREA_INSETSSpecifies the insets of the tab area.static java.lang.StringTABBED_PANE_TAB_CLOSABLESpecifies whether tabs are closable.static java.lang.StringTABBED_PANE_TAB_CLOSE_CALLBACKSpecifies the callback that is invoked when a tab close button is clicked.static java.lang.StringTABBED_PANE_TAB_CLOSE_TOOLTIPTEXTSpecifies the tooltip text used for tab close buttons.static java.lang.StringTABBED_PANE_TAB_HEIGHTSpecifies the minimum height of a tab.static java.lang.StringTABBED_PANE_TAB_ICON_PLACEMENTSpecifies the tab icon placement (relative to tab title).static java.lang.StringTABBED_PANE_TAB_INSETSSpecifies the insets of a tab.static java.lang.StringTABBED_PANE_TAB_WIDTH_MODESpecifies how the tabs should be sized.static java.lang.StringTABBED_PANE_TAB_WIDTH_MODE_COMPACTUnselected tabs are smaller because they show only the tab icon, but no tab title.static java.lang.StringTABBED_PANE_TAB_WIDTH_MODE_EQUALAll tabs in a tabbed pane has same width.static java.lang.StringTABBED_PANE_TAB_WIDTH_MODE_PREFERREDTab width is adjusted to tab icon and title.static java.lang.StringTABBED_PANE_TABS_POPUP_POLICYSpecifies the display policy for the "more tabs" button, which shows a popup menu with the (partly) hidden tabs.static java.lang.StringTABBED_PANE_TRAILING_COMPONENTSpecifies a component that will be placed at the trailing edge of the tabs area.static java.lang.StringTREE_PAINT_SELECTIONSpecifies whether tree item selection is painted.static java.lang.StringTREE_WIDE_SELECTIONOverride if a tree shows a wide selection.
-
Method Summary
Static Methods Modifier and Type Method Description static booleanclientPropertyBoolean(javax.swing.JComponent c, java.lang.String key, boolean defaultValue)Checks whether a client property of a component is a boolean and returns its value.static java.lang.BooleanclientPropertyBooleanStrict(javax.swing.JComponent c, java.lang.String key, java.lang.Boolean defaultValue)Checks whether a client property of a component is aBooleanand returns its value.static java.awt.ColorclientPropertyColor(javax.swing.JComponent c, java.lang.String key, java.awt.Color defaultValue)Checks whether a client property of a component is a color and returns its value.static booleanclientPropertyEquals(javax.swing.JComponent c, java.lang.String key, java.lang.Object value)Checks whether a client property of a component has the given value.static intclientPropertyInt(javax.swing.JComponent c, java.lang.String key, int defaultValue)Checks whether a client property of a component is an integer and returns its value.
-
-
-
Field Detail
-
BUTTON_TYPE
static final java.lang.String BUTTON_TYPE
Specifies type of a button.Components
JButtonandJToggleButton
Value typeString
Allowed ValuesBUTTON_TYPE_SQUARE,BUTTON_TYPE_ROUND_RECT,BUTTON_TYPE_TAB,BUTTON_TYPE_HELPorBUTTON_TYPE_TOOLBAR_BUTTON- See Also:
- Constant Field Values
-
BUTTON_TYPE_SQUARE
static final java.lang.String BUTTON_TYPE_SQUARE
Paint the button with square edges.Components
JButtonandJToggleButton- See Also:
BUTTON_TYPE, Constant Field Values
-
BUTTON_TYPE_ROUND_RECT
static final java.lang.String BUTTON_TYPE_ROUND_RECT
Paint the button with round edges.Components
JButtonandJToggleButton- See Also:
BUTTON_TYPE, Constant Field Values
-
BUTTON_TYPE_TAB
static final java.lang.String BUTTON_TYPE_TAB
Paint the toggle button in tab style.Components
JToggleButton- See Also:
BUTTON_TYPE, Constant Field Values
-
BUTTON_TYPE_HELP
static final java.lang.String BUTTON_TYPE_HELP
Paint a help button (circle with question mark).Components
JButton- See Also:
BUTTON_TYPE, Constant Field Values
-
BUTTON_TYPE_TOOLBAR_BUTTON
static final java.lang.String BUTTON_TYPE_TOOLBAR_BUTTON
Paint the button in toolbar style.Components
JButtonandJToggleButton- See Also:
BUTTON_TYPE, Constant Field Values
-
SELECTED_STATE
static final java.lang.String SELECTED_STATE
Specifies selected state of a checkbox.Component
JCheckBox
Value typeString
Allowed ValuesSELECTED_STATE_INDETERMINATE- See Also:
- Constant Field Values
-
SELECTED_STATE_INDETERMINATE
static final java.lang.String SELECTED_STATE_INDETERMINATE
Paint an indeterminate state on a checkbox.- See Also:
SELECTED_STATE, Constant Field Values
-
SQUARE_SIZE
static final java.lang.String SQUARE_SIZE
Specifies whether the button preferred size will be made square (quadratically).Components
JButtonandJToggleButton
Value typeBoolean- See Also:
- Constant Field Values
-
MINIMUM_WIDTH
static final java.lang.String MINIMUM_WIDTH
Specifies minimum width of a component.Component
JButton,JToggleButton,JComboBox,JSpinnerandJTextComponent
Value typeInteger- See Also:
- Constant Field Values
-
MINIMUM_HEIGHT
static final java.lang.String MINIMUM_HEIGHT
Specifies minimum height of a component.Component
JButtonandJToggleButton
Value typeInteger- See Also:
- Constant Field Values
-
COMPONENT_ROUND_RECT
static final java.lang.String COMPONENT_ROUND_RECT
Paint the component with round edges.Components
JComboBox,JSpinner,JTextField,JFormattedTextFieldandJPasswordField
Value typeBoolean- See Also:
- Constant Field Values
-
OUTLINE
static final java.lang.String OUTLINE
Specifies the outline color of the component border.Components
JButton,JComboBox,JFormattedTextField,JPasswordField,JScrollPane,JSpinner,JTextFieldandJToggleButton
Value typeStringorColororColor[2]
Allowed ValuesOUTLINE_ERROR,OUTLINE_WARNING, any color (typeColor) or an array of two colors (typeColor[2]) where the first color is for focused state and the second for unfocused state- See Also:
- Constant Field Values
-
OUTLINE_ERROR
static final java.lang.String OUTLINE_ERROR
Paint the component border in another color (usually reddish) to indicate an error.- See Also:
OUTLINE, Constant Field Values
-
OUTLINE_WARNING
static final java.lang.String OUTLINE_WARNING
Paint the component border in another color (usually yellowish) to indicate a warning.- See Also:
OUTLINE, Constant Field Values
-
COMPONENT_FOCUS_OWNER
static final java.lang.String COMPONENT_FOCUS_OWNER
Specifies a callback that is invoked to check whether a component is permanent focus owner. Used to paint focus indicators.May be useful in special cases for custom components.
Use a
Predicatethat receives the component as parameter:myComponent.putClientProperty( "JComponent.focusOwner", (Predicate<JComponent>) c -> { return ...; // check here } );Component
JComponent
Value typePredicate<javax.swing.JComponent>- See Also:
- Constant Field Values
-
POPUP_DROP_SHADOW_PAINTED
static final java.lang.String POPUP_DROP_SHADOW_PAINTED
Specifies whether a drop shadow is painted if the component is shown in a popup or if the component is the owner of another component that is shown in a popup.Component
JComponent
Value typeBoolean- See Also:
- Constant Field Values
-
POPUP_FORCE_HEAVY_WEIGHT
static final java.lang.String POPUP_FORCE_HEAVY_WEIGHT
Specifies whether a heavy weight window should be used if the component is shown in a popup or if the component is the owner of another component that is shown in a popup.Component
JComponent
Value typeBoolean- See Also:
- Constant Field Values
-
PROGRESS_BAR_LARGE_HEIGHT
static final java.lang.String PROGRESS_BAR_LARGE_HEIGHT
Specifies whether the progress bar has always the larger height even if no string is painted.Component
JProgressBar
Value typeBoolean- See Also:
- Constant Field Values
-
PROGRESS_BAR_SQUARE
static final java.lang.String PROGRESS_BAR_SQUARE
Specifies whether the progress bar is paint with square edges.Component
JProgressBar
Value typeBoolean- See Also:
- Constant Field Values
-
MENU_BAR_EMBEDDED
static final java.lang.String MENU_BAR_EMBEDDED
Specifies whether the menu bar is embedded into the title pane if custom window decorations are enabled. Default istrue.Component
JRootPane
Value typeBoolean- See Also:
- Constant Field Values
-
SCROLL_BAR_SHOW_BUTTONS
static final java.lang.String SCROLL_BAR_SHOW_BUTTONS
Specifies whether the decrease/increase arrow buttons of a scrollbar are shown.Component
JScrollBarorJScrollPane
Value typeBoolean- See Also:
- Constant Field Values
-
SCROLL_PANE_SMOOTH_SCROLLING
static final java.lang.String SCROLL_PANE_SMOOTH_SCROLLING
Specifies whether the scroll pane uses smooth scrolling.Component
JScrollPane
Value typeBoolean- See Also:
- Constant Field Values
-
TABBED_PANE_SHOW_TAB_SEPARATORS
static final java.lang.String TABBED_PANE_SHOW_TAB_SEPARATORS
Specifies whether separators are shown between tabs.Component
JTabbedPane
Value typeBoolean- See Also:
- Constant Field Values
-
TABBED_PANE_SHOW_CONTENT_SEPARATOR
static final java.lang.String TABBED_PANE_SHOW_CONTENT_SEPARATOR
Specifies whether the separator between tabs area and content area should be shown.Component
JTabbedPane
Value typeBoolean- See Also:
- Constant Field Values
-
TABBED_PANE_HAS_FULL_BORDER
static final java.lang.String TABBED_PANE_HAS_FULL_BORDER
Specifies whether a full border is painted around a tabbed pane.Component
JTabbedPane
Value typeBoolean- See Also:
- Constant Field Values
-
TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB
static final java.lang.String TABBED_PANE_HIDE_TAB_AREA_WITH_ONE_TAB
Specifies whether the tab area should be hidden if it contains only one tab.Component
JTabbedPane
Value typeBoolean- See Also:
- Constant Field Values
-
TABBED_PANE_MINIMUM_TAB_WIDTH
static final java.lang.String TABBED_PANE_MINIMUM_TAB_WIDTH
Specifies the minimum width of a tab.Component
JTabbedPaneor tab content components (seeJTabbedPane.setComponentAt(int, java.awt.Component))
Value typeInteger- See Also:
- Constant Field Values
-
TABBED_PANE_MAXIMUM_TAB_WIDTH
static final java.lang.String TABBED_PANE_MAXIMUM_TAB_WIDTH
Specifies the maximum width of a tab.Applied only if tab does not have a custom tab component (see
JTabbedPane.setTabComponentAt(int, java.awt.Component)).Component
JTabbedPaneor tab content components (seeJTabbedPane.setComponentAt(int, java.awt.Component))
Value typeInteger- See Also:
- Constant Field Values
-
TABBED_PANE_TAB_HEIGHT
static final java.lang.String TABBED_PANE_TAB_HEIGHT
Specifies the minimum height of a tab.Component
JTabbedPane
Value typeInteger- See Also:
TABBED_PANE_TAB_INSETS, Constant Field Values
-
TABBED_PANE_TAB_INSETS
static final java.lang.String TABBED_PANE_TAB_INSETS
Specifies the insets of a tab.Component
JTabbedPaneor tab content components (seeJTabbedPane.setComponentAt(int, java.awt.Component))
Value typeInsets- See Also:
TABBED_PANE_TAB_HEIGHT, Constant Field Values
-
TABBED_PANE_TAB_AREA_INSETS
static final java.lang.String TABBED_PANE_TAB_AREA_INSETS
Specifies the insets of the tab area.Component
JTabbedPane
Value typeInsets- See Also:
- Constant Field Values
-
TABBED_PANE_TAB_CLOSABLE
static final java.lang.String TABBED_PANE_TAB_CLOSABLE
Specifies whether tabs are closable. If set totrueon a tabbed pane component, all tabs in that tabbed pane are closable. To make individual tabs closable, set it totrueon a tab content component.Note that you have to specify a callback (see
TABBED_PANE_TAB_CLOSABLE) that is invoked when the user clicks a tab close button. The callback is responsible for closing the tab.Component
JTabbedPaneor tab content components (seeJTabbedPane.setComponentAt(int, java.awt.Component))
Value typeBoolean
-
TABBED_PANE_TAB_CLOSE_TOOLTIPTEXT
static final java.lang.String TABBED_PANE_TAB_CLOSE_TOOLTIPTEXT
Specifies the tooltip text used for tab close buttons.Component
JTabbedPaneor tab content components (seeJTabbedPane.setComponentAt(int, java.awt.Component))
Value typeString- See Also:
TABBED_PANE_TAB_CLOSABLE, Constant Field Values
-
TABBED_PANE_TAB_CLOSE_CALLBACK
static final java.lang.String TABBED_PANE_TAB_CLOSE_CALLBACK
Specifies the callback that is invoked when a tab close button is clicked. The callback is responsible for closing the tab.Either use a
IntConsumerthat receives the tab index as parameter:
Or use amyTabbedPane.putClientProperty( "JTabbedPane.tabCloseCallback", (IntConsumer) tabIndex -> { // close tab here } );BiConsumer<javax.swing.JTabbedPane, Integer> that receives the tabbed pane and the tab index as parameters:
If you need to check whether a modifier key (e.g. Alt or Shift) was pressed while the user clicked the tab close button, usemyTabbedPane.putClientProperty( "JTabbedPane.tabCloseCallback", (BiConsumer<JTabbedPane, Integer>) (tabbedPane, tabIndex) -> { // close tab here } );EventQueue.getCurrentEvent()to get current event, check whether it is aMouseEventand invoke its methods. E.g.AWTEvent e = EventQueue.getCurrentEvent(); boolean shift = (e instanceof MouseEvent) ? ((MouseEvent)e).isShiftDown() : false;Component
JTabbedPaneor tab content components (seeJTabbedPane.setComponentAt(int, java.awt.Component))
Value typeIntConsumerorBiConsumer<javax.swing.JTabbedPane, Integer>- See Also:
TABBED_PANE_TAB_CLOSABLE, Constant Field Values
-
TABBED_PANE_TABS_POPUP_POLICY
static final java.lang.String TABBED_PANE_TABS_POPUP_POLICY
Specifies the display policy for the "more tabs" button, which shows a popup menu with the (partly) hidden tabs.Component
JTabbedPane
Value typeString
Allowed ValuesTABBED_PANE_POLICY_NEVERorTABBED_PANE_POLICY_AS_NEEDED- See Also:
- Constant Field Values
-
TABBED_PANE_SCROLL_BUTTONS_POLICY
static final java.lang.String TABBED_PANE_SCROLL_BUTTONS_POLICY
Specifies the display policy for the forward/backward scroll arrow buttons.Component
JTabbedPane
Value typeString
Allowed ValuesTABBED_PANE_POLICY_NEVER,TABBED_PANE_POLICY_AS_NEEDEDorTABBED_PANE_POLICY_AS_NEEDED_SINGLE- See Also:
- Constant Field Values
-
TABBED_PANE_POLICY_NEVER
static final java.lang.String TABBED_PANE_POLICY_NEVER
Display never.
-
TABBED_PANE_POLICY_AS_NEEDED
static final java.lang.String TABBED_PANE_POLICY_AS_NEEDED
Display only when needed.If used for
TABBED_PANE_SCROLL_BUTTONS_POLICY, both scroll arrow buttons are either shown or hidden. Buttons are disabled if scrolling in that direction is not applicable.
-
TABBED_PANE_POLICY_AS_NEEDED_SINGLE
static final java.lang.String TABBED_PANE_POLICY_AS_NEEDED_SINGLE
Display single button only when needed.If scroll button placement is trailing, then this option is ignored and both buttons are shown or hidden as needed.
-
TABBED_PANE_SCROLL_BUTTONS_PLACEMENT
static final java.lang.String TABBED_PANE_SCROLL_BUTTONS_PLACEMENT
Specifies the placement of the forward/backward scroll arrow buttons.Component
JTabbedPane
Value typeString
Allowed ValuesTABBED_PANE_PLACEMENT_BOTHorTABBED_PANE_PLACEMENT_TRAILING- See Also:
- Constant Field Values
-
TABBED_PANE_PLACEMENT_BOTH
static final java.lang.String TABBED_PANE_PLACEMENT_BOTH
The forward/backward scroll arrow buttons are placed on both sides of the tab area. The backward scroll button at the left/top side. The forward scroll button at the right/bottom side.
-
TABBED_PANE_PLACEMENT_TRAILING
static final java.lang.String TABBED_PANE_PLACEMENT_TRAILING
The forward/backward scroll arrow buttons are placed on the trailing side of the tab area.
-
TABBED_PANE_TAB_AREA_ALIGNMENT
static final java.lang.String TABBED_PANE_TAB_AREA_ALIGNMENT
Specifies the alignment of the tab area.Component
JTabbedPane
Value typeIntegerorString
Allowed ValuesSwingConstants.LEADING(default)SwingConstants.TRAILING,SwingConstants.CENTER,TABBED_PANE_ALIGN_LEADING(default),TABBED_PANE_ALIGN_TRAILING,TABBED_PANE_ALIGN_CENTERorTABBED_PANE_ALIGN_FILL- See Also:
- Constant Field Values
-
TABBED_PANE_TAB_ALIGNMENT
static final java.lang.String TABBED_PANE_TAB_ALIGNMENT
Specifies the horizontal alignment of the tab title and icon.Component
JTabbedPaneor tab content components (seeJTabbedPane.setComponentAt(int, java.awt.Component))
Value typeIntegerorString
Allowed ValuesSwingConstants.LEADING,SwingConstants.TRAILING,SwingConstants.CENTER(default),TABBED_PANE_ALIGN_LEADING,TABBED_PANE_ALIGN_TRAILINGorTABBED_PANE_ALIGN_CENTER(default)- See Also:
- Constant Field Values
-
TABBED_PANE_ALIGN_LEADING
static final java.lang.String TABBED_PANE_ALIGN_LEADING
Align to the leading edge.
-
TABBED_PANE_ALIGN_TRAILING
static final java.lang.String TABBED_PANE_ALIGN_TRAILING
Align to the trailing edge.
-
TABBED_PANE_ALIGN_CENTER
static final java.lang.String TABBED_PANE_ALIGN_CENTER
Align to center.
-
TABBED_PANE_ALIGN_FILL
static final java.lang.String TABBED_PANE_ALIGN_FILL
Stretch to fill all available space.
-
TABBED_PANE_TAB_WIDTH_MODE
static final java.lang.String TABBED_PANE_TAB_WIDTH_MODE
Specifies how the tabs should be sized.Component
JTabbedPane
Value typeString
Allowed ValuesTABBED_PANE_TAB_WIDTH_MODE_PREFERRED(default),TABBED_PANE_TAB_WIDTH_MODE_EQUALorTABBED_PANE_TAB_WIDTH_MODE_COMPACT- See Also:
- Constant Field Values
-
TABBED_PANE_TAB_WIDTH_MODE_PREFERRED
static final java.lang.String TABBED_PANE_TAB_WIDTH_MODE_PREFERRED
Tab width is adjusted to tab icon and title.- See Also:
TABBED_PANE_TAB_WIDTH_MODE, Constant Field Values
-
TABBED_PANE_TAB_WIDTH_MODE_EQUAL
static final java.lang.String TABBED_PANE_TAB_WIDTH_MODE_EQUAL
All tabs in a tabbed pane has same width.- See Also:
TABBED_PANE_TAB_WIDTH_MODE, Constant Field Values
-
TABBED_PANE_TAB_WIDTH_MODE_COMPACT
static final java.lang.String TABBED_PANE_TAB_WIDTH_MODE_COMPACT
Unselected tabs are smaller because they show only the tab icon, but no tab title. Selected tabs show both.- See Also:
TABBED_PANE_TAB_WIDTH_MODE, Constant Field Values
-
TABBED_PANE_TAB_ICON_PLACEMENT
static final java.lang.String TABBED_PANE_TAB_ICON_PLACEMENT
Specifies the tab icon placement (relative to tab title).Component
JTabbedPane
Value typeInteger
Allowed ValuesSwingConstants.LEADING(default),SwingConstants.TRAILING,SwingConstants.TOPorSwingConstants.BOTTOM- See Also:
- Constant Field Values
-
TABBED_PANE_LEADING_COMPONENT
static final java.lang.String TABBED_PANE_LEADING_COMPONENT
Specifies a component that will be placed at the leading edge of the tabs area.For top and bottom tab placement, the layed out component size will be the preferred component width and the tab area height.
For left and right tab placement, the layed out component size will be the tab area width and the preferred component height.Component
JTabbedPane
Value typeComponent- See Also:
- Constant Field Values
-
TABBED_PANE_TRAILING_COMPONENT
static final java.lang.String TABBED_PANE_TRAILING_COMPONENT
Specifies a component that will be placed at the trailing edge of the tabs area.For top and bottom tab placement, the layed out component size will be the available horizontal space (minimum is preferred component width) and the tab area height.
For left and right tab placement, the layed out component size will be the tab area width and the available vertical space (minimum is preferred component height).Component
JTabbedPane
Value typeComponent- See Also:
- Constant Field Values
-
SELECT_ALL_ON_FOCUS_POLICY
static final java.lang.String SELECT_ALL_ON_FOCUS_POLICY
Specifies whether all text is selected when the text component gains focus.Component
JTextField(and subclasses)
Value typeString
Allowed ValuesSELECT_ALL_ON_FOCUS_POLICY_NEVER,SELECT_ALL_ON_FOCUS_POLICY_ONCE(default) orSELECT_ALL_ON_FOCUS_POLICY_ALWAYS- See Also:
- Constant Field Values
-
SELECT_ALL_ON_FOCUS_POLICY_NEVER
static final java.lang.String SELECT_ALL_ON_FOCUS_POLICY_NEVER
Never select all text when the text component gains focus.- See Also:
SELECT_ALL_ON_FOCUS_POLICY, Constant Field Values
-
SELECT_ALL_ON_FOCUS_POLICY_ONCE
static final java.lang.String SELECT_ALL_ON_FOCUS_POLICY_ONCE
Select all text when the text component gains focus for the first time and selection was not modified (is at end of text). This is the default.- See Also:
SELECT_ALL_ON_FOCUS_POLICY, Constant Field Values
-
SELECT_ALL_ON_FOCUS_POLICY_ALWAYS
static final java.lang.String SELECT_ALL_ON_FOCUS_POLICY_ALWAYS
Always select all text when the text component gains focus.- See Also:
SELECT_ALL_ON_FOCUS_POLICY, Constant Field Values
-
PLACEHOLDER_TEXT
static final java.lang.String PLACEHOLDER_TEXT
Placeholder text that is only painted if the text field is empty.Component
JTextField(and subclasses) orJComboBox
Value typeString- See Also:
- Constant Field Values
-
TAB_BUTTON_UNDERLINE_HEIGHT
static final java.lang.String TAB_BUTTON_UNDERLINE_HEIGHT
Height of underline if toggle button type isBUTTON_TYPE_TAB.Component
JToggleButton
Value typeInteger- See Also:
- Constant Field Values
-
TAB_BUTTON_UNDERLINE_COLOR
static final java.lang.String TAB_BUTTON_UNDERLINE_COLOR
Color of underline if toggle button type isBUTTON_TYPE_TAB.Component
JToggleButton
Value typeColor- See Also:
- Constant Field Values
-
TAB_BUTTON_SELECTED_BACKGROUND
static final java.lang.String TAB_BUTTON_SELECTED_BACKGROUND
Background color if selected and toggle button type isBUTTON_TYPE_TAB.Component
JToggleButton
Value typeColor- See Also:
- Constant Field Values
-
TREE_WIDE_SELECTION
static final java.lang.String TREE_WIDE_SELECTION
Override if a tree shows a wide selection. Default istrue.Component
JTree
Value typeBoolean- See Also:
- Constant Field Values
-
TREE_PAINT_SELECTION
static final java.lang.String TREE_PAINT_SELECTION
Specifies whether tree item selection is painted. Default istrue. If set tofalse, then the tree cell renderer is responsible for painting selection.Component
JTree
Value typeBoolean- See Also:
- Constant Field Values
-
-
Method Detail
-
clientPropertyEquals
static boolean clientPropertyEquals(javax.swing.JComponent c, java.lang.String key, java.lang.Object value)Checks whether a client property of a component has the given value.
-
clientPropertyBoolean
static boolean clientPropertyBoolean(javax.swing.JComponent c, java.lang.String key, boolean defaultValue)Checks whether a client property of a component is a boolean and returns its value. If the client property is not set, or not a boolean, defaultValue is returned.
-
clientPropertyBooleanStrict
static java.lang.Boolean clientPropertyBooleanStrict(javax.swing.JComponent c, java.lang.String key, java.lang.Boolean defaultValue)Checks whether a client property of a component is aBooleanand returns its value. If the client property is not set, or not aBoolean, defaultValue is returned.
-
clientPropertyInt
static int clientPropertyInt(javax.swing.JComponent c, java.lang.String key, int defaultValue)Checks whether a client property of a component is an integer and returns its value. If the client property is not set, or not an integer, defaultValue is returned.
-
clientPropertyColor
static java.awt.Color clientPropertyColor(javax.swing.JComponent c, java.lang.String key, java.awt.Color defaultValue)Checks whether a client property of a component is a color and returns its value. If the client property is not set, or not a color, defaultValue is returned.
-
-