Package swingtree

Class UIForScrollPane<P extends JScrollPane>


public final class UIForScrollPane<P extends JScrollPane> extends UIForAnyScrollPane<UIForScrollPane<P>,P>
A SwingTree builder node designed for configuring JScrollPane instances.
Use UIFactoryMethods.scrollPane() or UIFactoryMethods.scrollPane(Configurator) to create a new instance of this builder type.
  • Method Details

    • _state

      protected swingtree.BuilderState<P> _state()
      Description copied from class: UIForAnything
      Returns the state of the builder, which is a container for the wrapped component as well as it's type and current EventProcessor.
      Specified by:
      _state in class UIForAnything<UIForScrollPane<P extends JScrollPane>,P extends JScrollPane,JComponent>
      Returns:
      The state of the builder.
    • _newBuilderWithState

      protected UIForScrollPane<P> _newBuilderWithState(swingtree.BuilderState<P> newState)
      Description copied from class: UIForAnything
      An internal wither method which creates a new builder instance with the provided BuilderState stored inside it.
      Specified by:
      _newBuilderWithState in class UIForAnything<UIForScrollPane<P extends JScrollPane>,P extends JScrollPane,JComponent>
      Parameters:
      newState - The new state which should be stored inside the new builder instance.
      Returns:
      A new builder instance with the provided state stored inside it.
    • _addComponentTo

      protected void _addComponentTo(P thisComponent, JComponent addedComponent, @Nullable AddConstraint constraints)
      We override this method to wrap the added component in a UIForScrollPane.ScrollableBox instance in case a Configurator for ScrollableComponentDelegate instances was provided. We then use the continuously supplied ScrollableComponentDelegate objects to satisfy the needs of the Scrollable implementation of the UIForScrollPane.ScrollableBox.
      This way the user can take advantage of the Scrollable interface without the need for a custom implementation
      Overrides:
      _addComponentTo in class UIForAnyScrollPane<UIForScrollPane<P extends JScrollPane>,P extends JScrollPane>
      Parameters:
      thisComponent - The component which is wrapped by this builder.
      addedComponent - A component instance which ought to be added to the wrapped component type.
      constraints - The layout constraint which ought to be used to add the component to the wrapped component type.