Package org.pushingpixels.radiance.theming.ktx

Types

RadianceComponentOrParentChainScope
Link copied to clipboard
annotation class RadianceComponentOrParentChainScope

APIs in this scope apply to individual application Components or all nested child components of a container.

RadianceComponentOrParentScope
Link copied to clipboard
annotation class RadianceComponentOrParentScope

APIs in this scope apply to individual application Components or all immediate child components of a container.

RadianceComponentScope
Link copied to clipboard
annotation class RadianceComponentScope

APIs in this scope apply to individual application Components.

RadianceRootPaneScope
Link copied to clipboard
annotation class RadianceRootPaneScope

APIs in this scope apply to individual application JRootPanes.

RadianceWindowScope
Link copied to clipboard
annotation class RadianceWindowScope

APIs in this scope apply to individual application Windows.

Functions

allowAnimations
Link copied to clipboard
fun Component.allowAnimations(animationFacet: RadianceThemingSlices.AnimationFacet)

Allows animations of the specified facet on this control.

createTitlePaneControlButton
Link copied to clipboard
fun Window.createTitlePaneControlButton(): JButton?

Returns a new instance of a button that has consistent visuals and preferred size to be used in application content that is extended into the title pane area with Window.extendContentIntoTitlePane API. If the content of the button will need more space (horizontally and / or vertically), you can query the preferred size and then tweak it.

disallowAnimations
Link copied to clipboard
fun Component.disallowAnimations(animationFacet: RadianceThemingSlices.AnimationFacet)

Disallows animations of the specified facet on this control.

extendContentIntoTitlePane
Link copied to clipboard
fun Window.extendContentIntoTitlePane(controlButtonGroupHorizontalGravity: RadianceThemingSlices.HorizontalGravity, controlButtonGroupVerticalGravity: RadianceThemingSlices.VerticalGravity?)

Marks this window to have its content extend vertically into the title pane area. Use the following methods for finer control over such extended content:

getAllTabCloseListeners
Link copied to clipboard
fun JTabbedPane.getAllTabCloseListeners(): Set<BaseTabCloseListener>

Returns all listeners registered on tab closing of this tabbed pane.

getCurrentSkin
Link copied to clipboard
fun Component.getCurrentSkin(): RadianceSkin?

Returns the current skin for the this component. If the current look-and-feel is not Radiance, this method returns null.

getDecorationType
Link copied to clipboard
fun Component.getDecorationType(): RadianceThemingSlices.DecorationAreaType

Returns the decoration area type of this component. The component and its ancestor hierarchy are scanned for the registered decoration area type. If JComponent.setDecorationType has been called on the specified component, the matching decoration type is returned. Otherwise, the component hierarchy is scanned to find the closest ancestor that was passed to JComponent.setDecorationType - and its decoration type is returned. If neither the component, nor any one of its parent components has been passed to the setter method, RadianceThemingSlices.DecorationAreaType.NONE is returned.

getImmediateDecorationType
Link copied to clipboard
fun Component.getImmediateDecorationType(): RadianceThemingSlices.DecorationAreaType?

Returns the immediate decoration area type of this component. The component is checked for the registered decoration area type. If JComponent.setDecorationType was not called on this component, this method returns null.

fun Window.getTitleControlButtonGroupHorizontalGravity(): RadianceThemingSlices.HorizontalGravity

Returns the horizontal gravity for the control button group in the title pane of this window.

getTitlePaneControlInsets
Link copied to clipboard
fun Window.getTitlePaneControlInsets(): Insets?

Queries the insets that should be reserved for the main control buttons (close / maximize / minimize) in application content that is extended into the title pane area with Window.extendContentIntoTitlePane API. Insets.left and Insets.right give the horizontal insets of the control buttons. Insets.top and Insets.right give the vertical insets within the matching horizontal insets.

isAnimationAllowed
Link copied to clipboard
fun Component.isAnimationAllowed(animationFacet: RadianceThemingSlices.AnimationFacet): Boolean

Checks whether the specified animation facet is allowed on this component.

registerTabCloseChangeListener
Link copied to clipboard
fun JTabbedPane.registerTabCloseChangeListener(tabCloseListener: BaseTabCloseListener)

Registers the specified listener on tab-close events on this tabbed pane.

setAutomaticDragAndDropSupportPresence
Link copied to clipboard
fun JTree.setAutomaticDragAndDropSupportPresence(hasAutomaticDragAndDropSupport: Boolean?)

Specifies whether this tree should have automatic drag and drop support.

setAutomaticScrollPresence
Link copied to clipboard
fun JScrollPane.setAutomaticScrollPresence(hasAutomaticScroll: Boolean?)

Specifies whether this scroll pane should have have auto-scroll support invoked on mouse button click that triggers popups.

setBackgroundAppearanceStrategy
Link copied to clipboard
fun JComponent.setBackgroundAppearanceStrategy(backgroundAppearanceStrategy: RadianceThemingSlices.BackgroundAppearanceStrategy?)

Specifies when this component or its immediate children should paint the background.

setButtonIgnoreMinimumSize
Link copied to clipboard
fun JComponent.setButtonIgnoreMinimumSize(buttonIgnoreMinimumSize: Boolean?)

Specifies whether this component or its immediate children should ignore the default (minimum) dimension for buttons. Note that RadianceButtonShaper implementations are not required to respect this call. The current implementations of the default PillButtonShaper and ClassicButtonShaper respect this setting.

setButtonOpenSide
Link copied to clipboard
fun JComponent.setButtonOpenSide(openSide: RadianceThemingSlices.Side)

Specifies the open side for this component. Note that the RadianceButtonShaper implementations are not required to respect this call. The default PillButtonShaper and ClassicButtonShaper respect this call.

setButtonOpenSides
Link copied to clipboard
fun JComponent.setButtonOpenSides(openSides: Set<RadianceThemingSlices.Side>)

Specifies the open sides for this component. Note that the RadianceButtonShaper implementations are not required to respect this call. The default PillButtonShaper and ClassicButtonShaper respect this call.

setButtonShaper
Link copied to clipboard
fun JComponent.setButtonShaper(buttonShaper: RadianceButtonShaper)

Specifies the button shaper to be used for this component.

setButtonStraightSide
Link copied to clipboard
fun JComponent.setButtonStraightSide(straightSide: RadianceThemingSlices.Side)

Specifies the straight side for this component. Note that the RadianceButtonShaper implementations are not required to respect this call. The default PillButtonShaper and ClassicButtonShaper respect this call.

setButtonStraightSides
Link copied to clipboard
fun JComponent.setButtonStraightSides(straightSides: Set<RadianceThemingSlices.Side>)

Specifies the straight sides for this component. Note that the RadianceButtonShaper implementations are not required to respect this call. The default PillButtonShaper and ClassicButtonShaper respect this call.

setCapsLockIconVisible
Link copied to clipboard
fun JPasswordField.setCapsLockIconVisible(visible: Boolean?)

Specifies component-level visibility of the caps lock indicator on this password field.

setColorizationFactor
Link copied to clipboard
fun JComponent.setColorizationFactor(colorizationFactor: Double)

Specifies colorization amount applied to the background and foreground of the current color scheme and the specific control. By default, when the application does not use any custom colors, all the controls are painted with the colors of the current color scheme / skin. The colors coming from the look-and-feel implement the marker UIResource interface which allows the UI delegates to differentiate between application-specific colors which are not changed, and the LAF-provide colors that are changed on LAF switch.

setComboBoxPopupFlyoutOrientation
Link copied to clipboard
fun JComboBox<*>.setComboBoxPopupFlyoutOrientation(comboPopupFlyoutOrientation: Int?)

Specifies the combobox popup flyout orientation. The value should be either null to reset to the default flyout orientation or one of the Integers below:

setComboBoxPrototypeCallback
Link copied to clipboard
fun JComboBox<*>.setComboBoxPrototypeCallback(comboPopupPrototypeCallback: ComboPopupPrototypeCallback<*>)

Specifies the combobox popup prototype callback which is used to compute the width of the popup at runtime.

setComboBoxPrototypeDisplayValue
Link copied to clipboard
fun JComboBox<*>.setComboBoxPrototypeDisplayValue(comboPopupPrototypeDisplayValue: Any)

Specifies the combobox popup prototype display value which is used to compute the width of the popup at runtime.

setComponentPreviewPainter
Link copied to clipboard
fun JComponent.setComponentPreviewPainter(previewPainter: PreviewPainter)

Specifies preview painter to be used for showing preview of this component or its immediate children. Default implementation is available in the DefaultPreviewPainter.

setContentsModified
Link copied to clipboard
fun JRootPane.setContentsModified(contentsModified: Boolean?)

Specifies that contents of this root pane have been modified and not saved. The close button of the title pane of the matching frame / dialog will be animated (in case that the frame / dialog have decorated title pane). In case the root pane belongs to a JInternalFrame and that frame is iconified (to a JInternalFrame.JDesktopIcon), the close button of the its desktop icon is animated as well.

setDecorationType
Link copied to clipboard
fun JComponent.setDecorationType(type: RadianceThemingSlices.DecorationAreaType)

Sets the decoration type of this component and all its children.

setExtraWidgetsPresence
Link copied to clipboard
fun JComponent.setExtraWidgetsPresence(extraWidgetsPresence: Boolean?)

Specifies that extra UI elements (such as menu items in system menu or lock borders) should be shown in this component.

setFlipTextSelectionOnEscape
Link copied to clipboard
fun JTextComponent.setFlipTextSelectionOnEscape(flipTextSelectionOnEscape: Boolean?)

Specifies whether this text component contents should flip selection on ESCAPE key press.

setFocusKind
Link copied to clipboard
fun JComponent.setFocusKind(focusKind: RadianceThemingSlices.FocusKind)

Specifies the kind of focus indication to be used on this component and its nested children.

setIconFilterStrategies
Link copied to clipboard
fun JComponent.setIconFilterStrategies(activeIconFilterStrategy: RadianceThemingSlices.IconFilterStrategy, enabledIconFilterStrategy: RadianceThemingSlices.IconFilterStrategy, disabledIconFilterStrategy: RadianceThemingSlices.IconFilterStrategy)

Specifies how icon on the specified control is themed.

setLockIconVisible
Link copied to clipboard
fun JComponent.setLockIconVisible(visible: Boolean?)

Specifies component-level visibility of the lock icon on this component.

setNumberOfPasswordEchoesPerCharacter
Link copied to clipboard
fun JPasswordField.setNumberOfPasswordEchoesPerCharacter(echoCount: Int)

Specifies the number of echo characters for each password character in this password field.

setPasswordStrengthChecker
Link copied to clipboard
fun JPasswordField.setPasswordStrengthChecker(passwordStrengthChecker: PasswordStrengthChecker)

Specifies password strength checker for this password field.

setPreferredTitlePaneHeight
Link copied to clipboard
fun Window.setPreferredTitlePaneHeight(preferredTitlePaneHeight: Int)

Increase the preferred height of the title pane area in case the content you extend into that area with Window.extendContentIntoTitlePane API is taller than the main control buttons.

setRunModifiedAnimationOnTabCloseButton
Link copied to clipboard
fun JTabbedPane.setRunModifiedAnimationOnTabCloseButton(runModifiedAnimationOnTabCloseButton: Boolean?)

Specifies that only the close button of a marked-as-modified tab components should pulsate. By default, the animation on modified tabs is on the entire tab rectangle. Note that this is only relevant for tabs configured with JTabbedPane.setTabContentsModified.

fun JComponent.setRunModifiedAnimationOnTabComponentCloseButton(runModifiedAnimationOnTabCloseButton: Boolean?)

Specifies that only the close button of a marked-as-modified tab component should pulsate. By default, the animation on modified tabs is on the entire tab rectangle. Note that this is only relevant for tabs configured with JComponent.setTabContentsModified.

setSelectTextOnFocus
Link copied to clipboard
fun JComponent.setSelectTextOnFocus(selectTextOnFocus: Boolean?)

Specifies whether the contents of this component or its nested children should be selected on focus gain.

setSkin
Link copied to clipboard
fun JRootPane.setSkin(skin: RadianceSkin)

Specifies a skin to be used on this root pane. This will affect all the controls in this root pane. After calling this method, call SwingUtilities.updateComponentTreeUI on the matching window.

setTabCloseButtonsVisible
Link copied to clipboard
fun JTabbedPane.setTabCloseButtonsVisible(tabCloseButtonsVisible: Boolean?)

Configures visibility of close buttons on all tabs in this tabbed pane.

setTabCloseCallback
Link copied to clipboard
fun JTabbedPane.setTabCloseCallback(tabCloseCallback: TabCloseCallback)

Configures the callback for deciding on the tab close type on all tabs in this tabbed pane. Note that this is only relevant for tabs configured with JComponent.setTabComponentCloseButtonVisible and JTabbedPane.setTabCloseButtonsVisible APIs.

setTabComponentCloseButtonVisible
Link copied to clipboard
fun JComponent.setTabComponentCloseButtonVisible(tabCloseButtonVisible: Boolean?)

Configures visibility of close button on the specified tab component.

setTabComponentCloseCallback
Link copied to clipboard
fun JComponent.setTabComponentCloseCallback(tabCloseCallback: TabCloseCallback)

Configures the callback for deciding on the tab close type on this tab component. Note that this is only relevant for tabs configured with JComponent.setTabComponentCloseButtonVisible and JTabbedPane.setTabCloseButtonsVisible APIs.

setTabContentPaneBorderKind
Link copied to clipboard
fun JTabbedPane.setTabContentPaneBorderKind(tabContentPaneBorderKind: RadianceThemingSlices.TabContentPaneBorderKind)

Specifies the content pane border kind for this tabbed pane.

setTabContentsModified
Link copied to clipboard
fun JComponent.setTabContentsModified(contentsModified: Boolean?)

Specifies that contents of contents of this tab component in JTabbedPane have been modified and not saved. JTabbedPane.setRunModifiedAnimationOnTabCloseButton and JTabbedPane.setRunModifiedAnimationOnTabCloseButton APIs control whether the entire tab or its close button area is animated.

setTextEditContextMenuPresence
Link copied to clipboard
fun JTextComponent.setTextEditContextMenuPresence(hasEditContextMenu: Boolean?)

Specifies whether this text component should have the edit context menu (with Cut / Copy / Paste / ... menu items).

setToolbarButtonCornerRadius
Link copied to clipboard
fun AbstractButton.setToolbarButtonCornerRadius(toolbarButtonCornerRadius: Float)

Specifies corner radius for this button. Note that this only applies when the button is in a JToolBar.

fun JToolBar.setToolbarButtonCornerRadius(toolbarButtonCornerRadius: Float)

Specifies corner radius for all buttons in this toolbar.

setWidgetVisible
Link copied to clipboard
fun Window.setWidgetVisible(visible: Boolean, vararg radianceWidgets: RadianceThemingSlices.WidgetType)

Sets the visibility of the specified widget type(s). This method should not be called from inside the initialization sequence of this window. If the specific widget needs to be visible when the window is shown, wrap the call with SwingUtilities.invokeLater or GlobalScope.launch(Dispatchers.Swing)

unregisterTabCloseChangeListener
Link copied to clipboard
fun JTabbedPane.unregisterTabCloseChangeListener(tabCloseListener: BaseTabCloseListener)

Unregisters the specified listener on tab-close events on this tabbed pane.