Interface StyleOGL2D<T>
- All Known Implementing Classes:
DefaultStyleOGL2D
,EditedStyleOGL2D
public interface StyleOGL2D<T>
Style interface for ogl 2D styling.
- Author:
- Nick Collier
-
Method Summary
Modifier and TypeMethodDescriptiongetBorderColor
(T object) Gets the border color for the specified object.int
getBorderSize
(T 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
(T object) Gets the label color.getLabelFont
(T object) Gets the font for this objects label.saf.v3d.scene.Position
getLabelPosition
(T object) Gets the position of the label relative the VSpatial.float
getLabelXOffset
(T object) Gets an optional X offset for the label location.float
getLabelYOffset
(T object) Gets an optional Y offset for the label location.float
getRotation
(T 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
(T 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.
-
Method Details
-
init
void init(saf.v3d.ShapeFactory2D factory) Initializes this style with the ShapeFactory2D that should be used to create any VSpatials produced by this style.- Parameters:
factory
- the factory to intialize this style with
-
getVSpatial
Gets the VSpatial visual representation of the object. If there are no changes to the representation then the VSpatial spatial parameter should be returned.- 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
Gets the color for the specified object.- Parameters:
object
-- Returns:
- the color for the specified object.
-
getBorderSize
Gets the size of the border for the specified object. A size of 0 means no border is drawn.- Parameters:
object
-- Returns:
- the size of the border for the specified object.
-
getBorderColor
Gets the border color for the specified object. This will be ignored if the border size is 0.- Parameters:
object
-- Returns:
- the border color for the specified object.
-
getRotation
Gets the rotation, in degrees, of the VSpatial for the specified object.- Parameters:
object
-- Returns:
- the rotation, in degrees, of the VSpatial for the specified object.
-
getScale
Gets the scale for the specified object.- Parameters:
object
-- Returns:
- the for the specified object.
-
getLabel
Gets a label for the specified object. Null and an empty String are permitted values.- 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
Gets the font for this objects label. This can be null if there is no label.- Parameters:
object
-- Returns:
- the font for this objects label. This can be null if there is no label.
-
getLabelXOffset
Gets an optional X offset for the label location. This can be used to make small adjustments the label location.- Returns:
- an optional X offset for the label placement.
-
getLabelYOffset
Gets an optional Y offset for the label location. This can be used to make small adjustments the label location.- Returns:
- an optional Y offset for the label placement.
-
getLabelPosition
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
- Parameters:
object
-- Returns:
- the position of the label relative the VSpatial.
-
getLabelColor
Gets the label color. Can return null if there is no label.- Parameters:
object
-- Returns:
- the label color. Can return null if there is no label.
-