Class IpaMap

All Implemented Interfaces:
ClipboardOwner, ImageObserver, MenuContainer, Serializable, Accessible

public class IpaMap extends JPanel implements ClipboardOwner
Displays a sectioned list of ipa grids. Each grid is inside a collapsible panel. The entire thing is already inside a scroll pane. The UI is scaled by font size. Minimum font is 12pt and maximum is 24pt. Scale is set as a floating point value between 0 and 1.
See Also:
  • Field Details

    • SCALE_PROP

      public static final String SCALE_PROP
      Pref prop for scale
    • FONT_PROP

      public static final String FONT_PROP
      Pref prop for font
    • HIGHLIGHT_RECENT_PROP

      public static final String HIGHLIGHT_RECENT_PROP
      Pref for highlighting recently used
    • FADE_WINDOW_PROP

      public static final String FADE_WINDOW_PROP
      Pref for fading window
    • FADE_OPACITY_PROP

      public static final String FADE_OPACITY_PROP
      Pref for fade amount
    • FAVORITES_PROP

      public static final String FAVORITES_PROP
      Pref for favorites storage
  • Constructor Details

    • IpaMap

      public IpaMap()
  • Method Details

    • addListener

      public void addListener(IpaMapListener listener)
    • removeListener

      public void removeListener(IpaMapListener listener)
    • fireMapEvent

      public void fireMapEvent(String txt)
    • showSearchFrame

      public void showSearchFrame(ActionEvent ae)
    • getScale

      public float getScale()
    • setScale

      public void setScale(float s)
    • onGoto

      public void onGoto(PhonActionEvent<JComponent> pae)
    • setFont

      public void setFont(Font f)
      Overrides:
      setFont in class JComponent
    • getFont

      public Font getFont()
      Specified by:
      getFont in interface MenuContainer
      Overrides:
      getFont in class Component
    • isHighlightRecent

      public boolean isHighlightRecent()
    • setHighlightRecent

      public void setHighlightRecent(boolean highlightRecent)
    • getCellDimension

      public Dimension getCellDimension()
      Calculate cell dimensions
    • getPreferredSize

      public Dimension getPreferredSize()
      Get preferred size. Pref size is to see the vowels and consonants at the same time.
      Overrides:
      getPreferredSize in class JComponent
      Returns:
      preferred size
    • setupContextMenu

      public void setupContextMenu(JPopupMenu menu, JComponent comp)
      Create the context menu based on source component
    • updateDisplay

      public void updateDisplay()
      Update display Called when font or scale changes
    • onToggleHighlightRecent

      public void onToggleHighlightRecent(PhonActionEvent<Void> pae)
      Toggle highlighting recent
    • onCellClicked

      public void onCellClicked(PhonActionEvent<Cell> pae)
      Cell button clicked
    • onCopyToClipboard

      public void onCopyToClipboard(PhonActionEvent<String> pae)
      Copy text to system clipboard
    • onAddCellToFavorites

      public void onAddCellToFavorites(PhonActionEvent<Cell> pae)
      Add cell to favorites grid
    • onRemoveCellFromFavorites

      public void onRemoveCellFromFavorites(PhonActionEvent<Cell> pae)
      Remove cell from the favorites list
    • lostOwnership

      public void lostOwnership(Clipboard clipboard, Transferable contents)
      Specified by:
      lostOwnership in interface ClipboardOwner