public class HumanLayer extends StandardEntityViewLayer<Human>
entities
VISIBILITY_SUFFIX, world
component
Constructor and Description |
---|
HumanLayer()
Construct a human view layer.
|
Modifier and Type | Method and Description |
---|---|
protected Pair<java.lang.Integer,java.lang.Integer> |
getLocation(Human h)
Get the location of a human.
|
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.
|
protected void |
postView()
Perform any post-processing required after
StandardEntityViewLayer.view(java.lang.Object...) has been called. |
java.awt.Shape |
render(Human h,
java.awt.Graphics2D g,
ScreenTransform t)
Render an entity and return the shape.
|
preView, render, view, viewObject
isVisible, processView, setLayerViewComponent, setVisible
public void initialise(Config config)
ViewLayer
initialise
in interface ViewLayer
initialise
in class StandardViewLayer
config
- The system configuration.public java.lang.String getName()
ViewLayer
public java.awt.Shape render(Human h, java.awt.Graphics2D g, ScreenTransform t)
StandardEntityViewLayer
render
in class StandardEntityViewLayer<Human>
h
- The entity to render.g
- The graphics to render on.t
- A helpful coordinate transformer.public java.util.List<javax.swing.JMenuItem> getPopupMenuItems()
ViewLayer
getPopupMenuItems
in interface ViewLayer
getPopupMenuItems
in class AbstractViewLayer
protected void postView()
StandardEntityViewLayer
StandardEntityViewLayer.view(java.lang.Object...)
has been called.postView
in class StandardEntityViewLayer<Human>