Class Configuration_UI<INPUT,​OUTPUT>

  • Type Parameters:
    INPUT -
    OUTPUT -
    All Implemented Interfaces:
    Structured_UI<INPUT,​OUTPUT>
    Direct Known Subclasses:
    ConfigurableFeature_UI, ConfigureFeature_UI

    public abstract class Configuration_UI<INPUT,​OUTPUT>
    extends java.lang.Object
    implements Structured_UI<INPUT,​OUTPUT>
    Abstract class for configuration UIs providing a standard panel for controls used by all subclasses.
    Author:
    dfahland
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getId()  
      javax.swing.JPanel getPanel()  
      javax.swing.JComponent getRoot()  
      protected void handlePanelIsActive()
      called when the mouse enters the panel
      protected void handlePanelIsInActive()
      called when the mouse leaves the panel
      protected void initialize​(java.lang.String label, int line_height)  
      protected abstract void initializeOptionsPanel​(javax.swing.JPanel optionsPanel)
      The provided panel is filled with controls that set the values of this feature.
      void setId​(java.lang.String name)
      Set name set for this feature (either fixed or editable)
      void setIdEditable​(boolean editable)
      Toggle whether name of this feature is editable
      void setRoot​(javax.swing.JComponent root)
      Set the root component of this ui element.
      void showOptions​(boolean show)
      Whether to show the options provided by this panel
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BACKGROUND_INACTIVE

        public static final java.awt.Color BACKGROUND_INACTIVE
      • BACKGROUND_ACTIVE

        public static final java.awt.Color BACKGROUND_ACTIVE
    • Constructor Detail

      • Configuration_UI

        public Configuration_UI()
    • Method Detail

      • initialize

        protected void initialize​(java.lang.String label,
                                  int line_height)
      • setIdEditable

        public void setIdEditable​(boolean editable)
        Toggle whether name of this feature is editable
        Parameters:
        editable -
      • getId

        public java.lang.String getId()
        Returns:
        name set for this feature (either fixed or editable)
      • setId

        public void setId​(java.lang.String name)
        Set name set for this feature (either fixed or editable)
        Parameters:
        name -
      • initializeOptionsPanel

        protected abstract void initializeOptionsPanel​(javax.swing.JPanel optionsPanel)
        The provided panel is filled with controls that set the values of this feature.
        Parameters:
        optionsPanel -
      • showOptions

        public void showOptions​(boolean show)
        Whether to show the options provided by this panel
        Parameters:
        show -
      • getPanel

        public javax.swing.JPanel getPanel()
        Returns:
        the panel containing all visual controls
      • setRoot

        public void setRoot​(javax.swing.JComponent root)
        Set the root component of this ui element. May be needed to update visualization of the component in case of layout changes.
        Parameters:
        root -
      • getRoot

        public javax.swing.JComponent getRoot()
        Returns:
        root component of this ui
      • handlePanelIsActive

        protected void handlePanelIsActive()
        called when the mouse enters the panel
      • handlePanelIsInActive

        protected void handlePanelIsInActive()
        called when the mouse leaves the panel