Interface EntityEditorPanel.EditorComponent<T>

Type Parameters:
T - the value type
Enclosing class:
EntityEditorPanel

protected static interface EntityEditorPanel.EditorComponent<T>
Manages the component used to edit an attribute
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
     
     
     
    void
    replace(JComponent component)
    Replaces an already set component.
    <C extends JComponent, B extends ComponentValueBuilder<C, T, B>>
    B
    set(B componentBuilder)
    Associates the given component builder with this attribute, configuring it with standard defaults (caption, mnemonic, enabled state, focus transfer, tooltips, and valid/modified indicators) and linking it to the underlying editor value.
    void
    set(ComponentValue<? extends JComponent,T> componentValue)
    Sets the component and links the value with the underlying editor value
    void
    set(JComponent component)
    Note that when setting the component directly using this method, no value linking is performed.
  • Method Details

    • get

      JComponent get()
      Returns:
      the component
      Throws:
      IllegalStateException - in case no component has been set
    • optional

      Optional<JComponent> optional()
      Returns:
      the component or an empty Optional in case none has been set
    • set

      void set(JComponent component)
      Note that when setting the component directly using this method, no value linking is performed.
      Parameters:
      component - the component
      Throws:
      IllegalStateException - in case the component has already been set
      See Also:
    • set

      void set(ComponentValue<? extends JComponent,T> componentValue)
      Sets the component and links the value with the underlying editor value
      Parameters:
      componentValue - the component value
    • set

      <C extends JComponent, B extends ComponentValueBuilder<C, T, B>> B set(B componentBuilder)
      Associates the given component builder with this attribute, configuring it with standard defaults (caption, mnemonic, enabled state, focus transfer, tooltips, and valid/modified indicators) and linking it to the underlying editor value.

      This method enables integration of custom or third-party components by extending AbstractComponentValueBuilder.

      Type Parameters:
      C - the component type
      B - the component builder type
      Parameters:
      componentBuilder - the component builder providing the component for the attribute
      Returns:
      the component builder
      Throws:
      IllegalStateException - in case a component or a component builder has already been associated with the attribute
    • replace

      void replace(JComponent component)
      Replaces an already set component. Note that when replacing the component using this method, no value linking is performed.
      Parameters:
      component - the component
      Throws:
      IllegalStateException - in case no component has been previously set
      See Also:
    • label

      JLabel label()
      Returns:
      the label associated with the component
      Throws:
      IllegalStateException - in case no component has been set or if no label is associated with it
      See Also: