Class GridEditor

All Implemented Interfaces:
KeyListener, MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
HexGrid.HexGridEditor, SquareGrid.SquareGridEditor

public abstract class GridEditor extends JDialog implements MouseListener, KeyListener
See Also:
  • Field Details

    • SET

      protected static final String SET
    • CANCEL

      protected static final String CANCEL
    • CANCEL_SET

      protected static final String CANCEL_SET
    • OK

      protected static final String OK
    • NUMBERING

      protected static final String NUMBERING
    • grid

      protected GridEditor.EditableGrid grid
    • board

      protected Board board
    • view

      protected JPanel view
    • scroll

      protected JScrollPane scroll
    • setMode

      protected boolean setMode
    • hp1

      protected Point hp1
    • hp2

      protected Point hp2
    • hp3

      protected Point hp3
    • okButton

      protected JButton okButton
    • canSetButton

      protected JButton canSetButton
    • setButton

      protected JButton setButton
    • numberingButton

      protected JButton numberingButton
    • saveGridVisible

      protected boolean saveGridVisible
    • saveNumberingVisible

      protected boolean saveNumberingVisible
    • saveDx

      protected double saveDx
    • saveDy

      protected double saveDy
    • saveOrigin

      protected Point saveOrigin
    • DELTA

      protected static final int DELTA
      See Also:
    • DDELTA

      protected static final double DDELTA
      See Also:
    • FAST

      protected static final int FAST
      See Also:
    • ERROR_MARGIN

      protected static final int ERROR_MARGIN
      See Also:
  • Constructor Details

  • Method Details

    • initComponents

      protected void initComponents()
    • cancel

      protected void cancel()
    • cancelSetMode

      protected void cancelSetMode()
    • startSetMode

      protected void startSetMode()
    • keyPressed

      public void keyPressed(KeyEvent e)
      Specified by:
      keyPressed in interface KeyListener
    • rebuild

      public void rebuild()
    • keyReleased

      public void keyReleased(KeyEvent e)
      Specified by:
      keyReleased in interface KeyListener
    • keyTyped

      public void keyTyped(KeyEvent e)
      Specified by:
      keyTyped in interface KeyListener
    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Specified by:
      mouseClicked in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent e)
      Specified by:
      mouseExited in interface MouseListener
    • mousePressed

      public void mousePressed(MouseEvent e)
      Specified by:
      mousePressed in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Specified by:
      mouseReleased in interface MouseListener
    • adjustX0

      protected void adjustX0(int direction, KeyEvent e)
    • adjustY0

      protected void adjustY0(int direction, KeyEvent e)
    • adjustDx

      protected void adjustDx(int direction, KeyEvent e)
    • adjustDy

      protected void adjustDy(int direction, KeyEvent e)
    • setNewOrigin

      protected void setNewOrigin(Point p)
    • isHorizontal

      protected boolean isHorizontal(Point p1, Point p2)
    • isVertical

      protected boolean isVertical(Point p1, Point p2)
    • isPerpendicular

      protected boolean isPerpendicular(Point p1, Point p2)
    • reportShapeError

      protected void reportShapeError()
    • calculate

      public abstract void calculate()