Package swingtree
@NullMarked
package swingtree
-
ClassDescriptionA delegate object for text event listeners served by the numerous
TextComponent
types.This class models the state of an individual table/list/drop down cell alongside various properties that a cell should have, like for example the value of the cell, its position within the table as well as a renderer in the form of a AWTComponent
which may or not be replaced or modified.Instances of this are delegates for a specific components and events that are passed to user event action handlers (seeAction
), with the purpose of providing useful context information to the action handler.ComponentDragEventDelegate<C extends JComponent>AJComponent
andMouseEvent
delegate providing useful context information to variousAction
listeners used byUIForAnySwing.onMouseDrag(Action)
like for example theComponentMouseEventDelegate.mouseX()
andComponentMouseEventDelegate.mouseY()
of the event as well as more drag specific information likeComponentDragEventDelegate.dragEvents()
andComponentDragEventDelegate.dragPositions()
.ComponentMouseEventDelegate<C extends JComponent>AJComponent
as well asMouseEvent
delegate providing useful context information to variousAction
listeners which are typically registered throughUIForAnySwing.onMouseClick(sprouts.Action)
},UIForAnySwing.onMousePress(sprouts.Action)
andUIForAnySwing.onMouseRelease(sprouts.Action)
, among others.OptionalUI<C extends Component>A container object for AWTComponent
types which may or may not contain a non-null
value.This class models the API of theRenderBuilder
which allows you to specify how a cell should be rendered.A builder type for creating cell renderer for a list, combo box or table using a fluent API, typically through methods likeUIForList.withRenderer(Configurator)
,UIForCombo.withRenderer(Configurator)
orUIForTable.withRenderer(Configurator)
, where the builder is exposed to the configurator lambda.SplitButtonDelegate<I extends JMenuItem>This class is a delegate for events of theJSplitButton
component.An immutable data carrier exposing everything needed to configure an item of aJSplitButton
.SplitItemDelegate<I extends JMenuItem>Instances of this are delegated to the individualJSplitButton
items and theirActionEvent
s exposed to you inside yourAction
handlers, like for example one you would supply toSplitItem.onSelection(Action)
.ASwingTree
is a singleton that holds global configuration context for the SwingTree library.A functional interface for configuring aSwingTree
instance throughSwingTree.initialiseUsing(SwingTreeConfigurator)
.An immutable configuration object for theSwingTree
library, which can be configured using a functionalSwingTreeConfigurator
lambda passed toSwingTree.initialiseUsing(SwingTreeConfigurator)
.Defines how theFont
, specified throughSwingTreeInitConfig.defaultFont(Font)
, is installed in theUIManager
.Defines how the scaling factor for the UI should be determined.An immutable data carrier exposing everything needed to configure a tab of aJTabbedPane
.AJTabbedPane
delegate providing useful context information to variousAction
listeners used byUIForTabbedPane.onTabMouseClick(Action)
,UIForTabbedPane.onTabMousePress(Action)
andUIForTabbedPane.onTabMouseRelease(Action)
, for example.A delegate object for theAction
lambda passed to theUIForAnyTextComponent.onTextInsert(Action)
method, which is used to register a listener for text insertion events.A delegate object for theAction
lambda passed to theUIForAnyTextComponent.onTextRemove(Action)
method, which is used to register a listener for text removal events.A delegate object for theAction
lambda passed to theUIForAnyTextComponent.onTextReplace(Action)
method, which is used to register a listener for text replacement events.This class is a static API for exposing swing tree builder types for wrapping and assembling variousJComponent
types to form a UI tree.A general purpose enum describing if something is never, always or sometimes active.Vertical or horizontal alignment.The logical combination of a vertical and horizontal alignment.Used to define how a layout manager (typically theBoxLayout
) will lay out components along the given axis.{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}ThisColor
class is a refined and more complete/modernized implementation of theColor
class which models colors in the default sRGB color space or colors in arbitrary color spaces identified by aColorSpace
.UI.ComboBox<E>{inheritDoc}{inheritDoc}Defines the areas of a component, which is used to by theImageConf
to determine if and how an image should be clipped.Enum representing the different boundaries of a UI component.Use this to specify the orientation of a component.Use this in the style API (seeUIForAnySwing.withStyle(Styler)
) to target specific corners of aJComponent
and apply customStyleConf
properties to them.An enum set of all the available swing cursors which map to the cursor type id.Used to specify the cycle method for a gradient conf in the style API.Use this to target specific edges of aJComponent
and apply customStyleConf
properties to them.{inheritDoc}This enum is used to specify how an image or icon (usually aSvgIcon
) should be scaled to fit the dimensions of the component that it is being rendered into, like for example through theSvgIcon.paintIcon(java.awt.Component, Graphics, int, int)
method.This class represents a SwingTree font and is used to specify the font of a component.Use this to specify the font style of a component.Use these enum instances to specify the gradient type for various sub styles, like for example the gradient style API exposed byComponentStyleDelegate.gradient(Layer, String, Configurator)
orComponentStyleDelegate.gradient(Configurator)
methods (seeUIForAnySwing.withStyle(Styler)
).Different positions along a horizontally aligned UI component.{inheritDoc}Instances of this enum are used to configure onto which layer a particular style configuration should be applied.UI.List<E>{inheritDoc}Defines whether the list based data model of aJTable
is row or column major and whether it is editable or not.Set of enum instances defining common types of Swing look and feels.Defines whether the data model of aJTable
should be editable or not.{inheritDoc}{inheritDoc}{inheritDoc}Defines the different types of noise functions that can be used to render aNoiseConf
style.Overflow policy of UI components.{inheritDoc}{inheritDoc}Use this to specify the placement of an image as part of theImageConf
through theImageConf.placement(Placement)
method exposed by the style API (seeUIForAnySwing.withStyle(Styler)
).{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}All UI components are at their core rectangular, meaning they always have exactly 4 uniquely identifiable sides.{inheritDoc}Use these enum instances to specify the gradient alignment for various sub styles, like for example the gradient style API exposed byComponentStyleDelegate.gradient(Configurator)
orComponentStyleDelegate.gradient(Configurator)
methods (seeUIForAnySwing.withStyle(Styler)
).{inheritDoc}An implementation of a "split button" where the left (larger) side acts like a normal button and the right side down arrow based button opens an attachedJPopupMenu
.{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}{inheritDoc}Different positions along a vertically aligned UI component.A set of extension methods for various SwingTree enums.A namespace for useful factory methods likeUIFactoryMethods.color(String)
andUIFactoryMethods.font(String)
, and layout constants (seeUILayoutConstants
).UIForAnyButton<I,B extends AbstractButton> The following is a more specialized type of builder node based on theUIForAnySwing
builder type, and provides additional features associated with the more specializedAbstractButton
" Swing component type.UIForAnyEditorPane<I,C extends JEditorPane> UIForAnyMenuItem<I,M extends JMenuItem> A builder forJMenuItem
s.UIForAnyScrollPane<I,P extends JScrollPane> UIForAnySwing<I,C extends JComponent> A generic SwingTree builder node designed as a basis for configuring any kind ofJComponent
instance.UIForAnyTextComponent<I,C extends JTextComponent> A SwingTree builder node designed for configuring various kinds ofJTextComponent
instances in a fluent and declarative way.UIForAnyToggleButton<I,B extends JToggleButton> An abstract precursor for swing tree builder nodes forJToggleButton
instances.A SwingTree builder node for configuring any kind ofWindow
type.A SwingTree builder node designed for configuringJBox
instances.UIForButton<B extends AbstractButton>A SwingTree builder node designed for configuringAbstractButton
sub-type instances, usually theJButton
type.UIForCheckBox<B extends JCheckBox>A SwingTree builder node designed for configuringJCheckBox
instances.UIForCheckBoxMenuItem<M extends JCheckBoxMenuItem>UIForCombo<E,C extends JComboBox<E>> A SwingTree builder node designed for configuringJComboBox
instances.UIForEditorPane<P extends JEditorPane>A SwingTree builder node designed for configuringJEditorPane
instances.AUIForAnySwing
subclass specifically designed for adding icons to your SwingTree.UIForJDialog<D extends JDialog>UIForJFrame<F extends JFrame>A declarative builder forJFrame
components.UIForLabel<L extends JLabel>A SwingTree builder node designed for configuringJLabel
instances.A SwingTree builder node designed for configuringJList
instances.A SwingTree builder node designed for configuringJMenu
instances.UIForMenuItem<M extends JMenuItem>A SwingTree builder node designed for configuringJMenuItem
instances.UIForPanel<P extends JPanel>A SwingTree builder node designed for configuringJPanel
instances.UIForPasswordField<F extends JPasswordField>A SwingTree builder node designed for configuringJPasswordField
instances.UIForPopup<P extends JPopupMenu>A SwingTree builder node designed for configuringJPopupMenu
instances.UIForProgressBar<P extends JProgressBar>A SwingTree builder node designed for configuringJProgressBar
instances.UIForRadioButton<R extends JRadioButton>A SwingTree builder node designed for configuringJRadioButton
instances.UIForRadioButtonMenuItem<M extends JRadioButtonMenuItem>A SwingTree builder node designed for configuringJRadioButtonMenuItem
instances.UIForScrollPane<P extends JScrollPane>A SwingTree builder node designed for configuringJScrollPane
instances.UIForScrollPanels<P extends JScrollPanels>A builder node forJScrollPanels
, a custom SwingTree component, which is similar to aJList
but with the ability to interact with the individual components in the list.UIForSeparator<S extends JSeparator>A SwingTree builder node designed for configuringJSeparator
instances.UIForSlider<S extends JSlider>A SwingTree builder node designed for configuringJSlider
instances.UIForSpinner<S extends JSpinner>A SwingTree builder node designed for configuringJSpinner
instances.UIForSplitButton<B extends JSplitButton>A SwingTree builder node designed for configuringJSplitButton
instances.UIForSplitPane<P extends JSplitPane>A SwingTree builder node designed for configuringJSplitPane
instances.UIForSwing<C extends JComponent>A SwingTree builder node designed for configuringJComponent
types.UIForTabbedPane<P extends JTabbedPane>A SwingTree builder node designed for configuringJTabbedPane
instances.UIForTable<T extends JTable>A SwingTree builder node designed for configuringJTable
instances allowing for a fluent API to build tables in a declarative way.UIForTableHeader<H extends UI.TableHeader>A declarative builder node for theUI.TableHeader
component.UIForTextArea<A extends JTextArea>A SwingTree builder node designed for configuringJTextArea
instances.UIForTextField<F extends JTextField>A SwingTree builder node designed for configuringJTextField
instances.UIForTextPane<P extends JTextPane>A SwingTree builder node designed for configuringUIForTextPane
instances.UIForToggleButton<B extends JToggleButton>A SwingTree builder node designed for configuringJToggleButton
instances.UIForToolBar<T extends JToolBar>Essentially just a namespace for static layout constants for theMigLayout
LayoutManager
type.