Start page / Plug-In Development / Universal Extensions / Input Components / SiteArchitect / Swing Gadget

Swing Gadget

Interface: de.espirit.firstspirit.ui.gadgets.swing.SwingGadget
Access API documentation: SwingGadget

An input component's SwingGadget implementation is responsible for providing the component's Swing-based user interface, which will be shown in form views that make use of the component.

The user interface is provided as a JComponent object and may be enhanced with interactive functionality necessary to implement the component's functional requirements.

Additionally, the Swing gadget class may provide aspects which are implemented alongside the SwingGadget interface or implemented in separate classes. Component developers may choose to implement a number of aspect interfaces provided by FirstSpirit, and which signal to the SiteArchitect that the Swing gadget supports specific central functionality such as editing and storing the component's value data, difference highlighting, etc. See Gadget Aspects for further information about available aspect types.

Implementing Standard Swing Gadget Functionality

Abstract class: de.espirit.firstspirit.ui.gadgets.swing.AbstractValueHoldingSwingGadget
Access API documentation: AbstractValueHoldingSwingGadget<T, F extends GomFormElement>

For convenience, the FirstSpirit Access API provides an abstract class AbstractValueHoldingSwingGadget<T, F extends GomFormDefinition> which implements SwingGadget along with several frequently used aspect interfaces useful to create an input component with editable and storable data:

  • ValueHolder<T>
    connects the input component to FirstSpirit's persistence functionality, allowing the component to be filled with stored data and to store data entered into the component when saving a form.
  • Editable
    supports SiteArchitect's edit mode handling, allowing the input component to become editable while edit mode is turned on and to prevent edits while edit mode is turned off.
  • Labelable
    provides access to the input component's label as defined in a template's form definition.

For descriptions of the listed aspects as well as other aspects which may be provided by a Swing gadget class, see Gadget Aspects.

Parameterization:

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy