Class GroupField<T>

All Implemented Interfaces:
TierEditor, ImageObserver, MenuContainer, Serializable, Accessible, Scrollable
Direct Known Subclasses:
IPAGroupField, NotesField, OrthoGroupField

public class GroupField<T> extends JTextArea implements TierEditor
Text field for editing tier data for a group.
See Also:
  • Field Details

    • allowNewline

      protected volatile boolean allowNewline
  • Constructor Details

    • GroupField

      public GroupField(Tier<T> tier, int groupIndex)
    • GroupField

      public GroupField(Tier<T> tier, int groupIndex, boolean allowNewLine)
  • Method Details

    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • getTier

      public Tier<T> getTier()
    • getGroupIndex

      public int getGroupIndex()
    • onUndo

      public void onUndo()
    • onRedo

      public void onRedo()
    • onSave

      public void onSave()
    • setFont

      public void setFont(Font font)
      Overrides:
      setFont in class JTextArea
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JTextArea
    • _init

      protected void _init()
      Setup border, listeners and initial text value.
    • getGroupFieldBorder

      public GroupFieldBorder getGroupFieldBorder()
    • getErrorHighlighter

      public Highlighter getErrorHighlighter()
    • addErrorHighlight

      public Object addErrorHighlight(int p0, int p1)
    • removeErrorHighlight

      public void removeErrorHighlight(Object tag)
    • removeAllErrorHighlights

      public void removeAllErrorHighlights()
    • changeErrorHighlight

      public void changeErrorHighlight(Object tag, int p0, int p1)
    • getErrorHighlights

      public Highlighter.Highlight[] getErrorHighlights()
    • getGroupValue

      public T getGroupValue()
      Get the group value
      Returns:
      current group value
    • onEnter

      public void onEnter()
      Called when the 'Enter' key is pressed.
    • validateText

      protected boolean validateText()
    • update

      protected void update()
    • validateAndUpdate

      public void validateAndUpdate()
    • getValidatedObject

      protected T getValidatedObject()
    • setValidatedObject

      protected void setValidatedObject(T object)
    • getEditorComponent

      public JComponent getEditorComponent()
      Description copied from interface: TierEditor
      Get the editor component
      Specified by:
      getEditorComponent in interface TierEditor
      Returns:
      component
    • addTierEditorListener

      public void addTierEditorListener(TierEditorListener listener)
      Description copied from interface: TierEditor
      Add tier editor listener
      Specified by:
      addTierEditorListener in interface TierEditor
    • removeTierEditorListener

      public void removeTierEditorListener(TierEditorListener listener)
      Description copied from interface: TierEditor
      remove tier editor listener
      Specified by:
      removeTierEditorListener in interface TierEditor
    • getTierEditorListeners

      public List<TierEditorListener> getTierEditorListeners()
      Description copied from interface: TierEditor
      Get tier editor listeners
      Specified by:
      getTierEditorListeners in interface TierEditor