Class TextKeyEditor

    • Constructor Detail

      • TextKeyEditor

        public TextKeyEditor​(org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration config,
                             ConfigDescriptionEntry entry,
                             String displayName)
        Creates a new text key editor for the given configuration and description entry. The given display name will be used as label text.
        Parameters:
        config - the report configuration from where to read the configuration values.
        entry - the entry description supplies the meta data.
        displayName - the label content.
    • Method Detail

      • validateContent

        public void validateContent()
        This method validates the content of the text field. In this implementation no validation is done and all text is accepted.
      • reset

        public void reset()
        Resets the value to the defaults from the report configuration.
      • store

        public void store()
        Stores the input as new value for the report configuration. This method does nothing, if the content is not valid.
      • getContent

        public String getContent()
        Returns the content from the input field.
        Returns:
        the input field text.
      • 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 will be 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.