public interface ViewLayer
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Get the name of this layer.
|
java.util.List<javax.swing.JMenuItem> |
getPopupMenuItems()
Get the menu items this layer wants added to the LayerViewComponent popup menu.
|
void |
initialise(Config config)
Initialise this view layer.
|
boolean |
isVisible()
Find out if this layer should be rendered or not.
|
java.util.Collection<RenderedObject> |
render(java.awt.Graphics2D g,
ScreenTransform transform,
int width,
int height)
Render this layer and return a collection of RenderedObjects.
|
void |
setLayerViewComponent(LayerViewComponent component)
Set the LayerViewComponent for this layer.
|
void |
setVisible(boolean b)
Set whether this layer should be rendered or not.
|
java.awt.geom.Rectangle2D |
view(java.lang.Object... objects)
Set the list of objects this layer should view.
|
void initialise(Config config)
config
- The system configuration.void setLayerViewComponent(LayerViewComponent component)
component
- The LayerViewComponent that this layer is part of.java.util.List<javax.swing.JMenuItem> getPopupMenuItems()
java.awt.geom.Rectangle2D view(java.lang.Object... objects)
render(Graphics2D, ScreenTransform, int, int)
is called.objects
- The objects to view.java.util.Collection<RenderedObject> render(java.awt.Graphics2D g, ScreenTransform transform, int width, int height)
g
- The graphics to render to.transform
- The ScreenTransform that will convert world coordinates to screen coordinates.width
- The width of the screen in pixels.height
- The height of the screen in pixels.void setVisible(boolean b)
b
- True if this layer should be rendered, false otherwise.boolean isVisible()
java.lang.String getName()