public class HexaValueGridPortrayal2D extends ValueGridPortrayal2D
locationToPass, valueToPass
DEFAULT, DONT_USE_BUFFER, USE_BUFFER
classPortrayals, field, immutableField, portrayalForAll, portrayalForNonNull, portrayalForNull, portrayalForRemainder, portrayals
Constructor and Description |
---|
HexaValueGridPortrayal2D() |
HexaValueGridPortrayal2D(java.lang.String valueName) |
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Point2D.Double |
getLocationPosition(java.lang.Object location,
DrawInfo2D info)
Returns the position on-screen of the provided location in the underlying field.
|
java.lang.Object |
getPositionLocation(java.awt.geom.Point2D.Double position,
DrawInfo2D info)
Returns the Location, in the parlance of the underlying Field, of the given position.
|
Double2D |
getScale(DrawInfo2D info)
Returns the width and height, in pixels, of 1.0 x 1.0 units in the underlying field.
|
protected void |
hitOrDraw(java.awt.Graphics2D graphics,
DrawInfo2D info,
Bag putInHere)
Instead of overriding the draw and hitObjects methods, you can optionally override
this method to provide both the draw(...) and hitObjects(...)
functionality in a single method, as it's common that these two methods have nearly
identical code.
|
void |
setBorder(boolean on)
This is not supported by hexagonal portrayals.
|
void |
setGridLines(boolean on)
This is not supported by hexagonal portrayals.
|
getDefaultPortrayal, getMap, getValueName, getWrapper, newValue, setBorderColor, setBorderLineFraction, setBorderLineMinMaxWidth, setField, setGridColor, setGridLineFraction, setGridLineMinMaxWidth, setGridMinSpacing, setGridModulus, setMap, setValueName
draw, getBuffering, getClipLocation, getObjectPosition, getRelativeObjectPosition, hitObjects, setBuffering, setObjectPosition
getDefaultNullPortrayal, getField, getInspector, getName, getObjectLocation, getPortrayalForAll, getPortrayalForNonNull, getPortrayalForNull, getPortrayalForObject, getPortrayalForRemainder, getStatus, isDirtyField, isImmutableField, reset, setDirtyField, setImmutableField, setObjectLocation, setPortrayalForAll, setPortrayalForClass, setPortrayalForNonNull, setPortrayalForNull, setPortrayalForObject, setPortrayalForRemainder, setSelected, setSelected
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInspector, getName, getStatus, setSelected
public HexaValueGridPortrayal2D()
public HexaValueGridPortrayal2D(java.lang.String valueName)
public Double2D getScale(DrawInfo2D info)
FieldPortrayal2D
getScale
in class ValueGridPortrayal2D
public java.lang.Object getPositionLocation(java.awt.geom.Point2D.Double position, DrawInfo2D info)
FieldPortrayal2D
getPositionLocation
in class ValueGridPortrayal2D
public java.awt.geom.Point2D.Double getLocationPosition(java.lang.Object location, DrawInfo2D info)
FieldPortrayal2D
getLocationPosition
in class ValueGridPortrayal2D
protected void hitOrDraw(java.awt.Graphics2D graphics, DrawInfo2D info, Bag putInHere)
FieldPortrayal2D
hitOrDraw
in class ValueGridPortrayal2D
public void setBorder(boolean on)
setBorder
in class ValueGridPortrayal2D
public void setGridLines(boolean on)
setGridLines
in class ValueGridPortrayal2D