Package adams.gui.goe

Class GenericArrayEditorPanel

    • Field Detail

      • m_Default

        protected Object m_Default
        the default value.
      • m_Current

        protected Object m_Current
        the current value.
      • m_MaxDisplayItems

        protected int m_MaxDisplayItems
        the maximum number of array items to display via toString().
    • Constructor Detail

      • GenericArrayEditorPanel

        public GenericArrayEditorPanel​(Object defValue)
        Initializes the panel with the given class and default value. Cannot change the class.
        Parameters:
        defValue - the default value
    • Method Detail

      • supportsFavorites

        protected boolean supportsFavorites()
        Whether the favorites button is shown or not.
        Overrides:
        supportsFavorites in class AbstractChooserPanel
        Returns:
        true if to show
      • doChoose

        protected Object doChoose()
        Performs the actual choosing of an object.
        Specified by:
        doChoose in class AbstractChooserPanel
        Returns:
        the chosen object or null if none chosen
      • hasValue

        public boolean hasValue()
        Checks whether the value of text field is different from the default value, i.e., a proper value.
        Overrides:
        hasValue in class AbstractChooserPanel
        Returns:
        true if a proper value is available
      • updateDisplay

        protected void updateDisplay()
        Updates the display.
      • setCurrent

        public boolean setCurrent​(Object value)
        Sets the current value.
        Overrides:
        setCurrent in class AbstractChooserPanel
        Parameters:
        value - the value to use, can be null (in that case, m_Default is used)
        Returns:
        true if successfully set
      • setMaxDisplayItems

        public void setMaxDisplayItems​(int value)
        Sets the maximum number of array items to display via toString().
        Parameters:
        value - the maximum number
      • getMaxDisplayItems

        public int getMaxDisplayItems()
        Returns the maximum number of array items to display via toString().
        Returns:
        the maximum number