Class AbstractParamEditor

    • Constructor Detail

      • AbstractParamEditor

        protected AbstractParamEditor​(Parameter parameter,
                                      boolean useDefaultVerifier)
        Creates the object with a given parameter.
        Parameters:
        parameter - the Parameter to be edited.
        useDefaultVerifier - true if a default verifier should be used
    • Method Detail

      • setDefaultLabelComponent

        protected void setDefaultLabelComponent​(boolean ensureTrailingColon)
      • setDefaultPhysUnitLabelComponent

        protected void setDefaultPhysUnitLabelComponent​(boolean ensureLeadingSpace)
      • isEnabled

        public boolean isEnabled()
        Checks whether or not the editor is enabled,
        Specified by:
        isEnabled in interface ParamEditor
      • setEnabled

        public void setEnabled​(boolean enabled)
        Enables/disables this editor.
        Specified by:
        setEnabled in interface ParamEditor
      • initUI

        protected void initUI()
        Initialized the UI of this editor. Called only once within this editor's constructor.

        The default implementation creates a label component for the parameter's "label" and "physicalUnit" properties.

      • updateUI

        public void updateUI()
        Tells the UI to update it's state. The default implementations en-/disables the label components (if any) of this editor.

        Note: If you override this method, you should call this base class version first.

        Specified by:
        updateUI in interface ParamEditor
      • reconfigureUI

        public void reconfigureUI()
        Tells the UI component to reconfigure itself, since the parameter's properties have changed.

        The default implementation simply calls the updateUI method.

        Specified by:
        reconfigureUI in interface ParamEditor
      • handleParamException

        public boolean handleParamException​(ParamException e)
        Implements the default behaviour for _parameter errors: A message box is shown for the given message string.
        Specified by:
        handleParamException in interface ParamExceptionHandler
        Parameters:
        e - the exception
        Returns:
        true if the exception was handled successfully, false otherwise
      • getDefaultInputVerifier

        protected InputVerifier getDefaultInputVerifier()
      • getDefaultActionListener

        protected ActionListener getDefaultActionListener()
      • setParameterValue

        protected boolean setParameterValue​(JTextComponent textComponent)
      • checkParameterValue

        protected boolean checkParameterValue​(JTextComponent textComponent)
        Checks whether or not the given text component provides a valid value for this parameter. This method has no side-effects.
        Parameters:
        textComponent - the text component which provides the parameter value.
        Returns:
        true if so
      • nameLabelComponent

        protected void nameLabelComponent​(JComponent component)
      • nameEditorComponent

        protected void nameEditorComponent​(JComponent component)
      • nameUnitComponent

        protected void nameUnitComponent​(JComponent component)
      • nameComponent

        protected void nameComponent​(JComponent component,
                                     String suffix)