Class PhoneMapDisplay

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable

public class PhoneMapDisplay extends JComponent
Display a list of phonemaps for editing. Each phonemap adds to the number of possible phone positions (for alignment.)
See Also:
  • Field Details

    • ALIGNMENT_CHANGE_PROP

      public static final String ALIGNMENT_CHANGE_PROP
      Alignment change property
      See Also:
    • PAINT_PHONE_BACKGROUND_PROP

      public static final String PAINT_PHONE_BACKGROUND_PROP
      Property for drawing colours
      See Also:
  • Constructor Details

    • PhoneMapDisplay

      public PhoneMapDisplay()
  • Method Details

    • getUIClassID

      public String getUIClassID()
      Overrides:
      getUIClassID in class JComponent
    • setUI

      protected void setUI(ComponentUI newUI)
      Overrides:
      setUI in class JComponent
    • updateUI

      public void updateUI()
      Overrides:
      updateUI in class JComponent
    • getUI

      public PhoneMapDisplayUI getUI()
      Overrides:
      getUI in class JComponent
    • isShowDiacritics

      public boolean isShowDiacritics()
    • setShowDiacritics

      public void setShowDiacritics(boolean showDiacritics)
    • getNumberOfAlignmentPositions

      public int getNumberOfAlignmentPositions()
      Get the number of positions in the display. This includes indel positions.
    • getNumberOfGroups

      public int getNumberOfGroups()
    • getPhoneMapForGroup

      public PhoneMap getPhoneMapForGroup(int gIdx)
    • setPhoneMapForGroup

      public void setPhoneMapForGroup(int gIdx, PhoneMap pm)
    • clear

      public void clear()
    • getFocusedPosition

      public int getFocusedPosition()
    • setFocusedPosition

      public void setFocusedPosition(int nextFocus)
    • positionToGroupPos

      public Tuple<Integer,Integer> positionToGroupPos(int pos)
    • getAlignedPhones

      public Tuple<IPAElement,IPAElement> getAlignedPhones(int idx)
      Get aligned phones at the given position. Target alignment is obj1, actual is obj2. Indels are indicated by null.
      Parameters:
      idx -
      Returns:
      the aligned phones at the given position
    • isPaintPhoneBackground

      public boolean isPaintPhoneBackground()
    • setPaintPhoneBackground

      public void setPaintPhoneBackground(boolean v)
    • togglePaintPhoneBackground

      public void togglePaintPhoneBackground()
    • mutateAlignment

      public Integer[][] mutateAlignment(Integer[][] alignment, int position)
      This method will move the value at alignment[0][position] one place right. The return value is the mutated alignment.
    • movePhoneRight

      public void movePhoneRight(int groupIndex, int alignmentIndex, boolean top)
      Move specified phone one position right
      Parameters:
      groupIndex -
      alignmentIndex -
      top - true if top side of alignment, false if bottom
    • movePhoneLeft

      public void movePhoneLeft(int groupIndex, int alignmentIndex, boolean top)
    • fireAlignmentChange

      public void fireAlignmentChange(PhoneMapDisplay.AlignmentChangeData oldValue, PhoneMapDisplay.AlignmentChangeData newValue)