Class PolygonEditor

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
VASSAL.build.module.map.boardPicker.board.mapgrid.PolygonEditor
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PolygonEditor extends JPanel
See Also:
  • Field Details

  • Constructor Details

    • PolygonEditor

      public PolygonEditor(Polygon p)
    • PolygonEditor

      public PolygonEditor(Polygon p, Point offsetView)
  • Method Details

    • getOffsetView

      public Point getOffsetView()
    • setMyConfigurer

      public void setMyConfigurer(PolygonConfigurer myConfigurer)
    • reset

      public void reset()
    • getPolygon

      public Polygon getPolygon()
    • getRawPolygon

      public Polygon getRawPolygon()
    • clonePolygon

      public Polygon clonePolygon()
    • setPolygon

      public void setPolygon(Polygon polygon)
    • setScroll

      public void setScroll(JScrollPane scroll)
    • center

      public void center(Point p)
    • scrollAtEdge

      public void scrollAtEdge(Point p, int dist)
    • stringToPolygon

      public static Polygon stringToPolygon(String pathStr)
    • reset

      @Deprecated(since="2021-11-29", forRemoval=true) public static void reset(Polygon p, String pathStr)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use stringToPolygon for parsing and setPolygon(Polygon) for setting the editor instead.
    • polygonToString

      public static String polygonToString(Polygon p)
    • paint

      public void paint(Graphics g)
      Overrides:
      paint in class JComponent
    • paintBackground

      protected void paintBackground(Graphics g)
    • nearestVertex

      protected static org.apache.commons.lang3.tuple.Pair<Integer,Double> nearestVertex(Polygon p, int x, int y)
    • nearestSegment

      protected static org.apache.commons.lang3.tuple.Triple<Integer,Point,Double> nearestSegment(Polygon p, int x, int y)
    • deleteVertex

      protected static void deleteVertex(Polygon p, int i)
    • insertVertex

      protected static void insertVertex(Polygon p, int i, int x, int y)
    • moveVertex

      protected static void moveVertex(Polygon p, int i, int x, int y)
    • main

      public static void main(String[] args)