civquest.swing.fieldview
Class LayeredFieldView
java.lang.Object
civquest.swing.fieldview.CompositeFieldView
civquest.swing.fieldview.LayeredFieldView
- All Implemented Interfaces:
- FieldView, FieldViewManager
- Direct Known Subclasses:
- QuadFlatLayeredFieldView, QuadIsoLayeredFieldView
- public abstract class LayeredFieldView
- extends CompositeFieldView
A CompositeFieldView that paints a Field by using some more
basic FieldViews. Their paint-methods get called in the following,
fixed order:
1. TerrainView (paints vegetation/height-level)
Paint of this class feeds these FieldViews with exactly the same
Coordinate and the same graphics-object it gets itself.
Class-invariant: All FieldViews getPaintSize-methods must return the
same value.
Method Summary |
java.util.List |
getListenerSectionsForParent()
Returns a List of Sections defining which GameChanges this FieldView
listens to. |
Coordinate |
getPaintSize()
Returns the paint-size as specified in the interface FieldView. |
void |
paint(Coordinate coord,
java.awt.Graphics graphics)
Paint the field as specified in the interface FieldView. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
terrainView
protected TerrainView terrainView
- Used for painting vegetation/height-level
LayeredFieldView
public LayeredFieldView(Field field,
FieldViewManager parent)
paint
public void paint(Coordinate coord,
java.awt.Graphics graphics)
- Paint the field as specified in the interface FieldView.
For more information, see the class-comment.
- Parameters:
coord
- graphics
-
getPaintSize
public Coordinate getPaintSize()
- Returns the paint-size as specified in the interface FieldView.
- Returns:
- paint-size as specified in the interface FieldView
getListenerSectionsForParent
public java.util.List getListenerSectionsForParent()
- Returns a List of Sections defining which GameChanges this FieldView
listens to. Only those sections which have to be processed by the
parent of this FieldView (because this FieldView doesn't process
them itself) are inserted into this List.
(description copied from FieldView)
- Returns:
- a List of Section as defined