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_Recorders
the 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 void
cleanUp()
Cleans up data structures, frees up memory.static void
cleanUpAll()
Cleans up data structures, frees up memory, for all recorders.abstract boolean
isEnabled(Node added)
Returns whether the recording is active.protected abstract void
record(Actor added, Actor parent, Actor before, Actor after, TreeOperations.InsertPosition position)
Records the actor that was added.void
record(Node added, Node parent, TreeOperations.InsertPosition position)
Records the actor that was added.static void
recordAll(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:
cleanUp
in 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.
-
-