Class EnumKeyEditor

    • Constructor Detail

      • EnumKeyEditor

        public EnumKeyEditor​(org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration config,
                             EnumConfigDescriptionEntry entry,
                             String displayName)
        Creates a new enumeration key editor for the given configuration and key definition. The given displayname will be used as label.
        Parameters:
        config - the report configuration used to read the values.
        entry - the metadata for the edited key.
        displayName - the text for the label.
    • Method Detail

      • reset

        public void reset()
        Restores the original value as read from the report configuration.
      • validateInput

        protected void validateInput()
        Checks whether the input from the combobox is a valid option.
      • store

        public void store()
        Saves the currently selected option as new value in the report configuration.
      • setEnabled

        public void setEnabled​(boolean enabled)
        Sets whether or not this component is enabled. A component which is enabled may respond to user input, while a component which is not enabled cannot respond to user input. Some components may alter their visual representation when they are disabled in order to provide feedback to the user that they cannot take input.
        Specified by:
        setEnabled in interface KeyEditor
        Overrides:
        setEnabled in class JComponent
        Parameters:
        enabled - defines, whether this editor is enabled.
        See Also:
        Component.isEnabled()
      • setLabelWidth

        public void setLabelWidth​(int width)
        Defines the preferred width of the label.
        Parameters:
        width - the new preferred width.
      • getLabelWidth

        public int getLabelWidth()
        Returns the preferred width of the label.
        Returns:
        the preferred width.