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
-
Method Summary
Modifier and TypeMethodDescriptiongetBorderColor
(Object object) Gets the border color for the specified object.int
getBorderSize
(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.Position
getLabelPosition
(Object object) Gets the position of the label relative the VSpatial.float
getLabelXOffset
(Object object) Gets an optional X offset for the label location.float
getLabelYOffset
(Object object) Gets an optional Y offset for the label location.float
getRotation
(Object object) Gets the rotation, in degrees, of the VSpatial for the specified object.float
Gets the scale for the specified object.saf.v3d.scene.VSpatial
getVSpatial
(Object object, saf.v3d.scene.VSpatial spatial) Gets the VSpatial visual representation of the object.void
init
(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:StyleOGL2D
Initializes this style with the ShapeFactory2D that should be used to create any VSpatials produced by this style.- Specified by:
init
in interfaceStyleOGL2D<Object>
- Parameters:
factory
- the factory to intialize this style with
-
getVSpatial
Description copied from interface:StyleOGL2D
Gets 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:
getVSpatial
in 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:StyleOGL2D
Gets the color for the specified object.- Specified by:
getColor
in interfaceStyleOGL2D<Object>
- Returns:
- the color for the specified object.
-
getBorderSize
Description copied from interface:StyleOGL2D
Gets the size of the border for the specified object. A size of 0 means no border is drawn.- Specified by:
getBorderSize
in interfaceStyleOGL2D<Object>
- Returns:
- the size of the border for the specified object.
-
getBorderColor
Description copied from interface:StyleOGL2D
Gets the border color for the specified object. This will be ignored if the border size is 0.- Specified by:
getBorderColor
in interfaceStyleOGL2D<Object>
- Returns:
- the border color for the specified object.
-
getRotation
Description copied from interface:StyleOGL2D
Gets the rotation, in degrees, of the VSpatial for the specified object.- Specified by:
getRotation
in interfaceStyleOGL2D<Object>
- Returns:
- the rotation, in degrees, of the VSpatial for the specified object.
-
getScale
Description copied from interface:StyleOGL2D
Gets the scale for the specified object.- Specified by:
getScale
in interfaceStyleOGL2D<Object>
- Returns:
- the for the specified object.
-
getLabel
Description copied from interface:StyleOGL2D
Gets a label for the specified object. Null and an empty String are permitted values.- Specified by:
getLabel
in 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:StyleOGL2D
Gets the font for this objects label. This can be null if there is no label.- Specified by:
getLabelFont
in interfaceStyleOGL2D<Object>
- Returns:
- the font for this objects label. This can be null if there is no label.
-
getLabelXOffset
Description copied from interface:StyleOGL2D
Gets an optional X offset for the label location. This can be used to make small adjustments the label location.- Specified by:
getLabelXOffset
in interfaceStyleOGL2D<Object>
- Returns:
- an optional X offset for the label placement.
-
getLabelYOffset
Description copied from interface:StyleOGL2D
Gets an optional Y offset for the label location. This can be used to make small adjustments the label location.- Specified by:
getLabelYOffset
in interfaceStyleOGL2D<Object>
- Returns:
- an optional Y offset for the label placement.
-
getLabelPosition
Description copied from interface:StyleOGL2D
Gets 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:
getLabelPosition
in interfaceStyleOGL2D<Object>
- Returns:
- the position of the label relative the VSpatial.
-
getLabelColor
Description copied from interface:StyleOGL2D
Gets the label color. Can return null if there is no label.- Specified by:
getLabelColor
in interfaceStyleOGL2D<Object>
- Returns:
- the label color. Can return null if there is no label.
-