java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.inductiveautomation.ignition.designer.sqltags.editor.editors.AbstractTagPropEditor
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
AbstractDirectTagPropEditor, PermissionsCategory.PermissionModelEditor, TagValueEditor

public abstract class AbstractTagPropEditor extends JPanel
See Also:
  • Field Details

    • NO_ACC_BTNS

      protected static final List<JComponent> NO_ACC_BTNS
    • multiBox

      protected JCheckBox multiBox
    • errorIndicator

      protected JLabel errorIndicator
    • label

      protected JLabel label
    • showError

      protected boolean showError
    • mainComponent

      protected JComponent mainComponent
    • accessoryComponents

      protected List<JComponent> accessoryComponents
    • tag

      protected TagEditController tag
    • fill

      protected boolean fill
    • overrideControl

      protected OverrideControl overrideControl
    • disabled

      protected boolean disabled
    • changeEvent

      protected transient ChangeEvent changeEvent
    • listenerList

      protected EventListenerList listenerList
  • Constructor Details

    • AbstractTagPropEditor

      public AbstractTagPropEditor()
    • AbstractTagPropEditor

      public AbstractTagPropEditor(String labelKey)
  • Method Details

    • getTagController

      protected TagEditController getTagController()
    • setBorderText

      public void setBorderText(String textKey)
    • createLabel

      protected JLabel createLabel(String key)
    • initComponents

      protected void initComponents()
    • updateOverrideState

      protected void updateOverrideState()
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • setDisabled

      public void setDisabled(boolean val)
      Sets whether this editor is currently disabled. This is the more "conceptual" counter part to enabled, which is best left as a purely mechanical function. In other words, this is the parameter that should be used when the current tag is not valid for the editor, or some other condition is not met. In will then be used to determine whether the component should be enabled or not, along with other conditions.

      Note that disabled editors don't show the override control.

    • setAccessoryItems

      public void setAccessoryItems(List<JComponent> items)
    • getAccessoryComponents

      public List<JComponent> getAccessoryComponents()
    • initMainComponent

      protected abstract JComponent initMainComponent()
    • initButtons

      protected List<JComponent> initButtons()
      Override to create accessory buttons
    • init

      public void init(TagEditController tag)
    • refreshVisualState

      protected void refreshVisualState()
    • supportsValueOverride

      protected boolean supportsValueOverride()
      Controls whether this control supports the tag value override feature. If overridden to return false, the override toggle control will not be used.
      Returns:
      true unless overriden
    • isValueOverridden

      protected abstract boolean isValueOverridden()
      Should return whether the value of tag used by the component is currently overridden. Only called when the tag controller is not null and we know the tag is inherited.
    • revertOverride

      protected abstract void revertOverride()
      Called when the tag is not null and is inherited, when the user chooses to revert a property override.
    • commit

      public abstract void commit()
      Commits the current value, if any edits are outstanding.
    • isEditValid

      public final boolean isEditValid()
      Checks to see if the current edit is valid or not. Will show that the edit is invalid.
    • showError

      protected void showError(String error)
    • clearError

      protected void clearError()
    • isErrorShown

      protected boolean isErrorShown()
    • checkCurrentEdit

      protected void checkCurrentEdit() throws InvalidEditException
      Throws:
      InvalidEditException
    • isModified

      public boolean isModified()
    • isValueModified

      public abstract boolean isValueModified()
    • hasChanged

      public boolean hasChanged()
    • addChangeListener

      public void addChangeListener(ChangeListener l)
    • removeChangeListener

      public void removeChangeListener(ChangeListener l)
    • fireStateChanged

      protected void fireStateChanged()
      Notifies all listeners that have registered interest for notification on this event type. The event instance is created lazily.
      See Also:
    • isFill

      public boolean isFill()
    • setFill

      public void setFill(boolean fill)
    • enableExpandables

      public void enableExpandables()
      Turns on expandible property support for this component. The component must support expandibles (that is, have a text component, and override getExpandablesTarget())
    • getExpandablesTarget

      protected JTextComponent getExpandablesTarget()
      Should be overridden by components that want to support expandables