Package swingtree

Class UIForPanel<P extends JPanel>


public final class UIForPanel<P extends JPanel> extends UIForAnySwing<UIForPanel<P>,P>
A SwingTree builder node designed for configuring JPanel instances.
  • 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<UIForPanel<P extends JPanel>,P extends JPanel,JComponent>
      Returns:
      The state of the builder.
    • _newBuilderWithState

      protected UIForPanel<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<UIForPanel<P extends JPanel>,P extends JPanel,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.
    • withLayout

      public final UIForPanel<P> withLayout(sprouts.Val<LayoutConstraint> attr)
      Use this to dynamically set the MigLayout attributes of the MigLayout of the JPanel.
      Parameters:
      attr - The layout attributes property which will be dynamically passed to the MigLayout constructor as first argument.
      Returns:
      A builder instance for a new JPanel, which enables fluent method chaining.
      Throws:
      IllegalArgumentException - if attr is null.
    • _setEnabled

      protected void _setEnabled(P thisComponent, boolean isEnabled)
      Overrides:
      _setEnabled in class UIForAnySwing<UIForPanel<P extends JPanel>,P extends JPanel>