Package swingtree
@NullMarked
package swingtree
This is he root package for the SwingTree library,
a Swing based UI framework for creating boilerplate free
and composition based Swing UIs fluently.
You will find most of what you need for declaring rich graphical user interface, more specifically the
You will find most of what you need for declaring rich graphical user interface, more specifically the
UI
class, which serves as a namespace for factory methods.-
ClassDescriptionAbstractDelegate<C extends JComponent>Extensions of this class delegate a component as well as provide useful methods for trying the tree of the components in which the delegated component is contained.A delegate object for text event listeners served by the numerous
TextComponenttypes.A builder type for creating cell renderer for a list, combo box or table using a fluent API, typically through methods likeUIForList.withCells(Configurator),UIForCombo.withCells(Configurator)orUIForTable.withCells(Configurator), where the builder is exposed to the configurator lambda.This class models the state of an individual table/tree/list/drop down cell alongside various properties that a cell should have, like for example the value of the cell, its position within the component as well as aCellConf.view()(renderer/editor) in the form of an AWTComponentwhich may or may 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>AJComponentandMouseEventdelegate providing useful context information to variousActionlisteners 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>AJComponentas well asMouseEventdelegate providing useful context information to variousActionlisteners which are typically registered throughUIForAnySwing.onMouseClick(sprouts.Action)},UIForAnySwing.onMousePress(sprouts.Action)andUIForAnySwing.onMouseRelease(sprouts.Action), among others.DragAwayComponentConf<C extends JComponent>A value based builder object for configuring drag away events of a component using theUIForAnySwing.withDragAway(Configurator)method, where an instance of this class is passed to theConfiguratorlambda defining how the component should behave and look when dragged away.DragDropComponentConf<C extends JComponent>A value based builder object for configuring drop target events for a component using theUIForAnySwing.withDropSite(Configurator)method, where an instance of this class is passed to theConfiguratorlambda defining how the component should behave and look when something is dragged and dropped on top of it.OptionalUI<C extends Component>A container object for AWTComponenttypes which may or may not contain a non-nullvalue.This class models the API of theCellBuilderwhich allows you to specify how a cell should be rendered.This class is an immutable builder which defines theScrollablebehavior of a component within aJScrollPane.SplitButtonDelegate<I extends JMenuItem>This class is a delegate for events of theJSplitButtoncomponent.An immutable data carrier exposing everything needed to configure an item of aJSplitButton.SplitItemDelegate<I extends JMenuItem>Instances of this are delegated to the individualJSplitButtonitems and theirActionEvents exposed to you inside yourActionhandlers, like for example one you would supply toSplitItem.onSelection(Action).ASwingTreeis a singleton that holds global configuration context for the SwingTree library.A functional interface for configuring aSwingTreeinstance throughSwingTree.initialiseUsing(SwingTreeConfigurator).An immutable configuration object for theSwingTreelibrary, which can be configured using a functionalSwingTreeConfiguratorlambda 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.AJTabbedPanedelegate providing useful context information to variousActionlisteners used byUIForTabbedPane.onTabMouseClick(Action),UIForTabbedPane.onTabMousePress(Action)andUIForTabbedPane.onTabMouseRelease(Action), for example.A delegate object for theActionlambda passed to theUIForAnyTextComponent.onTextInsert(Action)method, which is used to register a listener for text insertion events.A delegate object for theActionlambda passed to theUIForAnyTextComponent.onTextRemove(Action)method, which is used to register a listener for text removal events.A delegate object for theActionlambda 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 variousJComponenttypes 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}ThisColorclass is a refined and more complete/modernized implementation of theColorclass 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 theImageConfto 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 aJComponentand apply customStyleConfproperties 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.This enum contains constant values representing the type of action(s) to be performed by a Drag and Drop operation.Use this to target specific edges of aJComponentand apply customStyleConfproperties 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(swingtree.UI.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.Defines whether the list based data model of aJTableis row or column major and whether it is editable or not.UI.ListView<E>{inheritDoc}Set of enum instances defining common types of Swing look and feels.Defines whether the data model of aJTableshould be editable or not.{inheritDoc}{inheritDoc}{inheritDoc}Defines the different types of noise functions that can be used to render aNoiseConfstyle.Overflow policy of UI components.{inheritDoc}{inheritDoc}Use this to specify the placement of an image as part of theImageConfthrough theImageConf.placement(swingtree.UI.Placement)method exposed by the style API (seeUIForAnySwing.withStyle(Styler)).{inheritDoc}{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}{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 theUIForAnySwingbuilder 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 forJMenuItems.UIForAnyScrollPane<I,P extends JScrollPane> Defines an abstract builder for constructing a scroll pane or any subclass ofJScrollPane.UIForAnySwing<I,C extends JComponent> A generic SwingTree builder node designed as a basis for configuring any kind ofJComponentinstance.UIForAnyTextComponent<I,C extends JTextComponent> A SwingTree builder designed for configuring various kinds ofJTextComponentinstances in a fluent and declarative way.UIForAnything<I,C extends E, E extends Component> This is the root builder type for all other SwingTree builder subtypes.UIForAnyToggleButton<I,B extends JToggleButton> An abstract precursor for swing tree builder nodes forJToggleButtoninstances.A SwingTree builder node for configuring any kind ofWindowtype.A SwingTree builder node designed for configuringJBoxinstances.UIForButton<B extends AbstractButton>A SwingTree builder node designed for configuringAbstractButtonsub-type instances, usually theJButtontype.UIForCheckBox<B extends JCheckBox>A SwingTree builder node designed for configuringJCheckBoxinstances.UIForCheckBoxMenuItem<M extends JCheckBoxMenuItem>UIForCombo<E,C extends JComboBox<E>> A SwingTree builder node designed for configuringJComboBoxinstances.UIForEditorPane<P extends JEditorPane>A SwingTree builder node designed for configuringJEditorPaneinstances.AUIForAnySwingsubclass specifically designed for adding icons to your SwingTree.UIForJDialog<D extends JDialog>UIForJFrame<F extends JFrame>A declarative builder forJFramecomponents.UIForLabel<L extends JLabel>A SwingTree builder node designed for configuringJLabelinstances.A SwingTree builder node designed for configuringJListinstances.A SwingTree builder node designed for configuringJMenuinstances.UIForMenuItem<M extends JMenuItem>A SwingTree builder node designed for configuringJMenuIteminstances.UIForPanel<P extends JPanel>A SwingTree builder node designed for configuringJPanelinstances.UIForPasswordField<F extends JPasswordField>A SwingTree builder node designed for configuringJPasswordFieldinstances.UIForPopup<P extends JPopupMenu>A SwingTree builder node designed for configuringJPopupMenuinstances.UIForProgressBar<P extends JProgressBar>A SwingTree builder node designed for configuringJProgressBarinstances.UIForRadioButton<R extends JRadioButton>A SwingTree builder node designed for configuringJRadioButtoninstances.UIForRadioButtonMenuItem<M extends JRadioButtonMenuItem>A SwingTree builder node designed for configuringJRadioButtonMenuIteminstances.UIForScrollPane<P extends JScrollPane>A SwingTree builder node designed for configuringJScrollPaneinstances.UIForScrollPanels<P extends JScrollPanels>A builder node forJScrollPanels, a custom SwingTree component, which is similar to aJListbut with the ability to interact with the individual components in the list.UIForSeparator<S extends JSeparator>A SwingTree builder node designed for configuringJSeparatorinstances.UIForSlider<S extends JSlider>A SwingTree builder node designed for configuringJSliderinstances.UIForSpinner<S extends JSpinner>A SwingTree builder node designed for configuringJSpinnerinstances.UIForSplitButton<B extends JSplitButton>A SwingTree builder node designed for configuringJSplitButtoninstances.UIForSplitPane<P extends JSplitPane>A SwingTree builder node designed for configuringJSplitPaneinstances.UIForSwing<C extends JComponent>A SwingTree builder node designed for configuringJComponenttypes.UIForTabbedPane<P extends JTabbedPane>A SwingTree builder node designed for configuringJTabbedPaneinstances.UIForTable<T extends JTable>A SwingTree declarative builder designed for configuringJTableinstances allowing for a fluent API to build tables in a declarative way.UIForTableHeader<H extends UI.TableHeader>A declarative builder node for theUI.TableHeadercomponent.UIForTextArea<A extends JTextArea>A SwingTree builder node designed for configuringJTextAreainstances.UIForTextField<F extends JTextField>A SwingTree builder node designed for configuringJTextFieldinstances.UIForTextPane<P extends JTextPane>A declarative SwingTree builder designed for configuringUIForTextPaneinstances.UIForToggleButton<B extends JToggleButton>A SwingTree builder node designed for configuringJToggleButtoninstances.UIForToolBar<T extends JToolBar>Essentially just a namespace for static layout constants for theMigLayoutLayoutManagertype.