Package adams.gui.flow.tree.record.add
Class AbstractRecordActorAdded
- java.lang.Object
-
- adams.core.logging.ConsoleLoggingObject
-
- adams.gui.flow.tree.record.add.AbstractRecordActorAdded
-
- All Implemented Interfaces:
CleanUpHandler,Serializable
- Direct Known Subclasses:
MostCommon,SimpleLog
public abstract class AbstractRecordActorAdded extends ConsoleLoggingObject implements CleanUpHandler
Ancestor schemes that record when an actor got added.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static List<AbstractRecordActorAdded>m_Recordersthe available recording schemes.-
Fields inherited from class adams.core.logging.ConsoleLoggingObject
m_Logger
-
-
Constructor Summary
Constructors Constructor Description AbstractRecordActorAdded()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Cleans up data structures, frees up memory.static voidcleanUpAll()Cleans up data structures, frees up memory, for all recorders.abstract booleanisEnabled(Node added)Returns whether the recording is active.protected abstract voidrecord(Actor added, Actor parent, Actor before, Actor after, TreeOperations.InsertPosition position)Records the actor that was added.voidrecord(Node added, Node parent, TreeOperations.InsertPosition position)Records the actor that was added.static voidrecordAll(Node added, Node parent, TreeOperations.InsertPosition position)Records the actor that was added.-
Methods inherited from class adams.core.logging.ConsoleLoggingObject
getLogger, initializeLogger, isLoggingEnabled
-
-
-
-
Field Detail
-
m_Recorders
protected static List<AbstractRecordActorAdded> m_Recorders
the available recording schemes.
-
-
Method Detail
-
isEnabled
public abstract boolean isEnabled(Node added)
Returns whether the recording is active.- Parameters:
added- the node that got added (for context)- Returns:
- true if active
-
record
protected abstract void record(Actor added, Actor parent, Actor before, Actor after, TreeOperations.InsertPosition position)
Records the actor that was added.- Parameters:
added- the actor that was addedparent- the parent of the added actorbefore- the immediate actor before the added actor, can be nullafter- the immediate actor after the added actor, can be nullposition- how the actor was added
-
record
public void record(Node added, Node parent, TreeOperations.InsertPosition position)
Records the actor that was added.- Parameters:
added- the node that was addedparent- the parent of the added actorposition- how the actor was added
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.
Default implementation does nothing.- Specified by:
cleanUpin interfaceCleanUpHandler
-
recordAll
public static void recordAll(Node added, Node parent, TreeOperations.InsertPosition position)
Records the actor that was added.- Parameters:
added- the node that was addedparent- the parent of the added actorposition- how the actor was added
-
cleanUpAll
public static void cleanUpAll()
Cleans up data structures, frees up memory, for all recorders.
-
-