Class ComponentHorizontalLine

java.lang.Object
de.julianweinelt.datacat.dbx.api.ui.Component<Void,ComponentHorizontalLine>
de.julianweinelt.datacat.dbx.api.ui.components.ComponentHorizontalLine

public class ComponentHorizontalLine extends Component<Void,ComponentHorizontalLine>
  • Constructor Details

    • ComponentHorizontalLine

      public ComponentHorizontalLine()
  • Method Details

    • hasLabel

      public boolean hasLabel()
      Description copied from class: Component
      Checks if a label has been set for this component
      Overrides:
      hasLabel in class Component<Void,ComponentHorizontalLine>
      Returns:
      true if the components has a non-empty label, otherwise false
    • expandHorizontally

      public boolean expandHorizontally()
      Description copied from class: Component
      Defines if the component should be expanded to the window's width size in the component's parent screen.

      Example: a horizontal line for splitting content
      Specified by:
      expandHorizontally in class Component<Void,ComponentHorizontalLine>
      Returns:
      true if it should be expanded, otherwise false
    • initialValue

      public ComponentHorizontalLine initialValue(Object val)
      Description copied from class: Component
      For setting an initial value that should be displayed before any of the user's input.
      It should always return the instance of the Component.

      Implementation example:
      
       protected JTextField textField;
      
       @Override
       public ComponentTextField initialValue(Object value) {
           if (value instanceof String) {
               textField.setText((String) value);
           }
           return this;
       }
       
      Specified by:
      initialValue in class Component<Void,ComponentHorizontalLine>
      Parameters:
      val - The value to set.
      Returns:
      The Component's instance.
    • value

      public Void value()
      Description copied from class: Component
      Should return the value of the Component's Swing Object. e.g., if implementing a text field, it should return the entered value of the text field.
      Specified by:
      value in class Component<Void,ComponentHorizontalLine>
      Returns:
      The entered value of this component.
    • create

      public JComponent create()
      Description copied from class: Component
      Should return the internal Swing object.
      Specified by:
      create in class Component<Void,ComponentHorizontalLine>
      Returns:
      An object extending JComponent