Package repast.simphony.visualization
Class AbstractLayoutUpdater
- java.lang.Object
-
- repast.simphony.visualization.AbstractLayoutUpdater
-
- All Implemented Interfaces:
LayoutUpdater
- Direct Known Subclasses:
AddedRemovedLayoutUpdater
,IntervalLayoutUpdater
,MovedLayoutUpdater
,UpdateLayoutUpdater
public abstract class AbstractLayoutUpdater extends Object implements LayoutUpdater
Abstract base class for LayoutUpdaters.- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface repast.simphony.visualization.LayoutUpdater
LayoutUpdater.Condition
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<LayoutUpdater.Condition>
conditions
protected Layout
layout
-
Constructor Summary
Constructors Constructor Description AbstractLayoutUpdater(Layout layout)
Creates a UpdateLayoutUpdater to manage the updates of the specified layout.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTriggerCondition(LayoutUpdater.Condition condition)
Adds a trigger condition to the current set.Layout
getLayout()
Gets the layout whose updates this updater manages.protected boolean
hasCondition(LayoutUpdater.Condition... conditions)
void
setLayout(Layout layout)
Sets the layout whose updates this updater manages.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface repast.simphony.visualization.LayoutUpdater
getDoSetLocationForAdded, getUpdateItemsLocation, update
-
-
-
-
Field Detail
-
layout
protected Layout layout
-
conditions
protected Set<LayoutUpdater.Condition> conditions
-
-
Constructor Detail
-
AbstractLayoutUpdater
public AbstractLayoutUpdater(Layout layout)
Creates a UpdateLayoutUpdater to manage the updates of the specified layout.- Parameters:
layout
-
-
-
Method Detail
-
getLayout
public Layout getLayout()
Gets the layout whose updates this updater manages.- Specified by:
getLayout
in interfaceLayoutUpdater
- Returns:
- the layout whose updates this updater manages.
-
setLayout
public void setLayout(Layout layout)
Sets the layout whose updates this updater manages.- Specified by:
setLayout
in interfaceLayoutUpdater
- Parameters:
layout
-
-
hasCondition
protected boolean hasCondition(LayoutUpdater.Condition... conditions)
- Parameters:
conditions
-- Returns:
- true if the current set of conditions contains one of the specified conditions.
-
addTriggerCondition
public void addTriggerCondition(LayoutUpdater.Condition condition)
Adds a trigger condition to the current set. This layout updater will update or not in response to whatever its current condition is.- Specified by:
addTriggerCondition
in interfaceLayoutUpdater
- Parameters:
condition
-
-
-