Class EditedStyleOGL2D
java.lang.Object
repast.simphony.visualization.editedStyle.EditedStyleOGL2D
- All Implemented Interfaces:
StyleOGL2D<Object>
Loads style info from a serialized EditedStyleData class.
- Author:
- Nick Collier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBorderColor(Object object) Gets the border color for the specified object.intgetBorderSize(Object object) Gets the size of the border for the specified object.Gets the color for the specified object.Gets a label for the specified object.getLabelColor(Object object) Gets the label color.getLabelFont(Object object) Gets the font for this objects label.saf.v3d.scene.PositiongetLabelPosition(Object object) Gets the position of the label relative the VSpatial.floatgetLabelXOffset(Object object) Gets an optional X offset for the label location.floatgetLabelYOffset(Object object) Gets an optional Y offset for the label location.floatgetRotation(Object object) Gets the rotation, in degrees, of the VSpatial for the specified object.floatGets the scale for the specified object.saf.v3d.scene.VSpatialgetVSpatial(Object object, saf.v3d.scene.VSpatial spatial) Gets the VSpatial visual representation of the object.voidinit(saf.v3d.ShapeFactory2D factory) Initializes this style with the ShapeFactory2D that should be used to create any VSpatials produced by this style.
-
Constructor Details
-
EditedStyleOGL2D
-
-
Method Details
-
init
public void init(saf.v3d.ShapeFactory2D factory) Description copied from interface:StyleOGL2DInitializes this style with the ShapeFactory2D that should be used to create any VSpatials produced by this style.- Specified by:
initin interfaceStyleOGL2D<Object>- Parameters:
factory- the factory to intialize this style with
-
getVSpatial
Description copied from interface:StyleOGL2DGets the VSpatial visual representation of the object. If there are no changes to the representation then the VSpatial spatial parameter should be returned.- Specified by:
getVSpatialin interfaceStyleOGL2D<Object>- Parameters:
object- the object whose VSpatial representation we wantspatial- the current VSpatial representation- Returns:
- a new VSpatial visual representation of the object or the current one if there has been no change.
-
getColor
Description copied from interface:StyleOGL2DGets the color for the specified object.- Specified by:
getColorin interfaceStyleOGL2D<Object>- Returns:
- the color for the specified object.
-
getBorderSize
Description copied from interface:StyleOGL2DGets the size of the border for the specified object. A size of 0 means no border is drawn.- Specified by:
getBorderSizein interfaceStyleOGL2D<Object>- Returns:
- the size of the border for the specified object.
-
getBorderColor
Description copied from interface:StyleOGL2DGets the border color for the specified object. This will be ignored if the border size is 0.- Specified by:
getBorderColorin interfaceStyleOGL2D<Object>- Returns:
- the border color for the specified object.
-
getRotation
Description copied from interface:StyleOGL2DGets the rotation, in degrees, of the VSpatial for the specified object.- Specified by:
getRotationin interfaceStyleOGL2D<Object>- Returns:
- the rotation, in degrees, of the VSpatial for the specified object.
-
getScale
Description copied from interface:StyleOGL2DGets the scale for the specified object.- Specified by:
getScalein interfaceStyleOGL2D<Object>- Returns:
- the for the specified object.
-
getLabel
Description copied from interface:StyleOGL2DGets a label for the specified object. Null and an empty String are permitted values.- Specified by:
getLabelin interfaceStyleOGL2D<Object>- Parameters:
object- the object to get the label for- Returns:
- a label for the specified object. Null and an empty String are permitted values.
-
getLabelFont
Description copied from interface:StyleOGL2DGets the font for this objects label. This can be null if there is no label.- Specified by:
getLabelFontin interfaceStyleOGL2D<Object>- Returns:
- the font for this objects label. This can be null if there is no label.
-
getLabelXOffset
Description copied from interface:StyleOGL2DGets an optional X offset for the label location. This can be used to make small adjustments the label location.- Specified by:
getLabelXOffsetin interfaceStyleOGL2D<Object>- Returns:
- an optional X offset for the label placement.
-
getLabelYOffset
Description copied from interface:StyleOGL2DGets an optional Y offset for the label location. This can be used to make small adjustments the label location.- Specified by:
getLabelYOffsetin interfaceStyleOGL2D<Object>- Returns:
- an optional Y offset for the label placement.
-
getLabelPosition
Description copied from interface:StyleOGL2DGets the position of the label relative the VSpatial. Valid values are- Position.CENTER
- Position.NORTH
- Position.SOUTH
- Position.EAST
- Position.WEST
- Position.NORTH_EAST
- Position.NORTH_WEST
- Position.SOUTH_EAST
- Position.SOUTH_WEST
- Specified by:
getLabelPositionin interfaceStyleOGL2D<Object>- Returns:
- the position of the label relative the VSpatial.
-
getLabelColor
Description copied from interface:StyleOGL2DGets the label color. Can return null if there is no label.- Specified by:
getLabelColorin interfaceStyleOGL2D<Object>- Returns:
- the label color. Can return null if there is no label.
-