sim.portrayal.simple
Class HexagonalPortrayal2D

java.lang.Object
  extended by sim.portrayal.SimplePortrayal2D
      extended by sim.portrayal.simple.ShapePortrayal2D
          extended by sim.portrayal.simple.HexagonalPortrayal2D
All Implemented Interfaces:
java.io.Serializable, Portrayal, Portrayal2D

public class HexagonalPortrayal2D
extends ShapePortrayal2D

A simple portrayal for 2D visualization of hexagons. It extends the SimplePortrayal2D and it manages the drawing and hit-testing for hexagonal shapes. If the DrawInfo2D parameter received by draw and hitObject functions is an instance of HexaDrawInfo2D, better information is extracted and used to make everthing look better. Otherwise, hexagons may be created from information stored in simple DrawInfo2D objects, but overlapping or extra empty spaces may be observed (especially when increasing the scale).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class sim.portrayal.simple.ShapePortrayal2D
filled, paint, scale, shape, stroke
 
Fields inherited from class sim.portrayal.SimplePortrayal2D
TYPE_HIT_OBJECT, TYPE_SELECTED_OBJECT
 
Constructor Summary
HexagonalPortrayal2D()
           
HexagonalPortrayal2D(boolean filled)
           
HexagonalPortrayal2D(double scale)
           
HexagonalPortrayal2D(double scale, boolean filled)
           
HexagonalPortrayal2D(java.awt.Paint paint)
           
HexagonalPortrayal2D(java.awt.Paint paint, boolean filled)
           
HexagonalPortrayal2D(java.awt.Paint paint, double scale)
           
HexagonalPortrayal2D(java.awt.Paint paint, double scale, boolean filled)
           
 
Method Summary
 
Methods inherited from class sim.portrayal.simple.ShapePortrayal2D
draw, hitObject, setStroke
 
Methods inherited from class sim.portrayal.SimplePortrayal2D
getInspector, getName, getStatus, handleMouseEvent, setSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HexagonalPortrayal2D

public HexagonalPortrayal2D()

HexagonalPortrayal2D

public HexagonalPortrayal2D(java.awt.Paint paint)

HexagonalPortrayal2D

public HexagonalPortrayal2D(double scale)

HexagonalPortrayal2D

public HexagonalPortrayal2D(boolean filled)

HexagonalPortrayal2D

public HexagonalPortrayal2D(java.awt.Paint paint,
                            double scale)

HexagonalPortrayal2D

public HexagonalPortrayal2D(java.awt.Paint paint,
                            boolean filled)

HexagonalPortrayal2D

public HexagonalPortrayal2D(double scale,
                            boolean filled)

HexagonalPortrayal2D

public HexagonalPortrayal2D(java.awt.Paint paint,
                            double scale,
                            boolean filled)