Package sim.portrayal.grid
Class FastHexaValueGridPortrayal2D
java.lang.Object
sim.portrayal.FieldPortrayal
sim.portrayal.FieldPortrayal2D
sim.portrayal.grid.ValueGridPortrayal2D
sim.portrayal.grid.HexaValueGridPortrayal2D
sim.portrayal.grid.FastHexaValueGridPortrayal2D
- All Implemented Interfaces:
Portrayal,Portrayal2D
-
Field Summary
Fields inherited from class sim.portrayal.grid.ValueGridPortrayal2D
locationToPassFields inherited from class sim.portrayal.FieldPortrayal2D
DEFAULT, DONT_USE_BUFFER, USE_BUFFERFields inherited from class sim.portrayal.FieldPortrayal
classPortrayals, field, immutableField, portrayalForAll, portrayalForNonNull, portrayalForNull, portrayalForRemainder, portrayals -
Constructor Summary
ConstructorsConstructorDescriptionFastHexaValueGridPortrayal2D(boolean immutableField) If immutableField is true, we presume that the grid doesn't change.FastHexaValueGridPortrayal2D(String valueName) FastHexaValueGridPortrayal2D(String valueName, boolean immutableField) If immutableField is true, we presume that the grid doesn't change. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Object object, Graphics2D graphics, DrawInfo2D info) Draws the field with its origin at [info.draw.x,info.draw.y], relative to the scaled coordinate system defined by [info.draw.width,info.draw.height].Methods inherited from class sim.portrayal.grid.HexaValueGridPortrayal2D
getLocationPosition, getPositionLocation, getScale, hitOrDraw, setBorder, setGridLinesMethods inherited from class sim.portrayal.grid.ValueGridPortrayal2D
getDefaultPortrayal, getMap, getValueName, getWrapper, newValue, setBorderColor, setBorderLineFraction, setBorderLineMinMaxWidth, setField, setGridColor, setGridLineFraction, setGridLineMinMaxWidth, setGridMinSpacing, setGridModulus, setMap, setValueNameMethods inherited from class sim.portrayal.FieldPortrayal2D
getBuffering, getClipLocation, getObjectPosition, getRelativeObjectPosition, hitObjects, setBuffering, setObjectPositionMethods inherited from class sim.portrayal.FieldPortrayal
getAlternatePortrayalOrdering, getDefaultNullPortrayal, getField, getInspector, getName, getObjectLocation, getPortrayalForAll, getPortrayalForNonNull, getPortrayalForNull, getPortrayalForObject, getPortrayalForRemainder, getStatus, isDirtyField, isImmutableField, reset, setAlternatePortrayalOrdering, setDirtyField, setImmutableField, setObjectLocation, setPortrayalForAll, setPortrayalForClass, setPortrayalForNonNull, setPortrayalForNull, setPortrayalForObject, setPortrayalForRemainder, setSelected, setSelectedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sim.portrayal.Portrayal
getInspector, getName, getStatus, setSelected
-
Constructor Details
-
FastHexaValueGridPortrayal2D
If immutableField is true, we presume that the grid doesn't change. This allows us to just re-splat the buffer. -
FastHexaValueGridPortrayal2D
-
FastHexaValueGridPortrayal2D
public FastHexaValueGridPortrayal2D(boolean immutableField) If immutableField is true, we presume that the grid doesn't change. This allows us to just re-splat the buffer. -
FastHexaValueGridPortrayal2D
public FastHexaValueGridPortrayal2D()
-
-
Method Details
-
draw
Description copied from class:FieldPortrayal2DDraws the field with its origin at [info.draw.x,info.draw.y], relative to the scaled coordinate system defined by [info.draw.width,info.draw.height]. The only parts that need be drawn are those which fall within the [info.clip] rectangle. Since your draw and hitObjects methods are likely to be nearly identical, you can choose instead to override the hitOrDraw method to handle both of them. By default this method simply calls hitOrDraw. FieldPortrayals will receive null for the object; they should just draw their own fields.- Specified by:
drawin interfacePortrayal2D- Overrides:
drawin classFieldPortrayal2D
-