Class AbstractDisplayLayerOGL2D<S>
java.lang.Object
repast.simphony.visualizationOGL2D.AbstractDisplayLayerOGL2D<S>
- Record Components:
S
- the Style type
- All Implemented Interfaces:
IDisplayLayer<saf.v3d.scene.VSpatial>
- Direct Known Subclasses:
NetworkLayerOGL2D
,StyledDisplayLayerOGL2D
public abstract class AbstractDisplayLayerOGL2D<S>
extends Object
implements IDisplayLayer<saf.v3d.scene.VSpatial>
Abstract base class for OGL2D display layers.
- Author:
- Nick Collier
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the specified object to the layer.void
No-op for ogl based code as the displaying the GLAutoDrawable will reflect the updates.getStyle()
Gets the style used by this display layer.saf.v3d.scene.VSpatial
getVisualItem
(Object obj) Gets the visual item that represents the specified object in the display.void
removeObject
(Object obj) Removes this specified object from this layer.void
Sets the style used by this display layer.abstract void
update
(LayoutUpdater updater) Updates the displayed nodes by applying styles etc.
-
Field Details
-
MODEL_OBJECT_KEY
- See Also:
-
LABEL_KEY
- See Also:
-
style
-
layer
protected saf.v3d.scene.VLayer layer -
toBeAdded
-
toBeRemoved
-
objMap
-
labelLayers
-
-
Constructor Details
-
AbstractDisplayLayerOGL2D
-
-
Method Details
-
getStyle
Gets the style used by this display layer.- Returns:
- the style used by this display layer.
-
setStyle
Sets the style used by this display layer.- Parameters:
style
- the new style
-
addObject
Description copied from interface:IDisplayLayer
Adds the specified object to the layer.- Specified by:
addObject
in interfaceIDisplayLayer<S>
- Parameters:
obj
- the object to add
-
applyUpdates
public void applyUpdates()No-op for ogl based code as the displaying the GLAutoDrawable will reflect the updates. Nothing needs to be done here.- Specified by:
applyUpdates
in interfaceIDisplayLayer<S>
-
getVisualItem
Gets the visual item that represents the specified object in the display.- Specified by:
getVisualItem
in interfaceIDisplayLayer<S>
- Parameters:
obj
- the object whose visual representation we want to get- Returns:
- the visual item that represents the specified object in the display.
-
removeObject
Removes this specified object from this layer.- Specified by:
removeObject
in interfaceIDisplayLayer<S>
- Parameters:
obj
- the object to remove
-
update
Updates the displayed nodes by applying styles etc. The display is not updated to reflect these changes.- Specified by:
update
in interfaceIDisplayLayer<S>
- Parameters:
updater
- used to update the layout and position information
-