|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmesquite.lib.Snapshot
public class Snapshot
Used by modules (and sometimes other Commandables) to return commands that would restore the module to its current state on file read-in or in other contexts (e.g., cloning a window). On saving a file, a module (currently Manage Mesquite Blocks) recurses through the employee tree, collecting their Snapshots, and using them to compose a Mesquite block for a NEXUS file that will return the active modules and windows to their current state.
| Constructor Summary | |
|---|---|
Snapshot()
|
|
| Method Summary | |
|---|---|
void |
addLine(java.lang.String commandLine)
Add the given command to the list of commands. |
void |
addLine(java.lang.String command,
MesquiteModule module)
Add the given command to the list of commands. |
void |
addLineIfAnythingToTell(java.lang.String command,
MesquiteModule module)
Add command if there is any snapshot from module |
void |
dump()
Dumps the snapshot to the system console |
java.lang.String |
getCommand(int index)
Returns the given command from the list of commands. |
boolean |
getConditional(int index)
Returns whether the line is conditional on anything to tell |
static java.lang.String |
getIDSnapshotCommands(FileElementManager module,
MesquiteFile file,
java.lang.String spacer)
|
java.lang.String |
getLine(int index)
Returns the given command from the list of commands. |
MesquiteModule |
getModule(int index)
Returns the associated module from the list of commands. |
int |
getNumLines()
Returns the number of lines in the snapshot. |
static java.lang.String |
getSnapshotCommands(MesquiteModule module,
MesquiteFile file,
java.lang.String spacer)
accumulate snapshot (e.g., as for MESQUITE block of NEXUS file) beginning at the passed module, as if writing for the file indicated. |
void |
incorporate(Snapshot snap,
boolean addTab)
Incorporates given Snapshot into current ones, pulling in lines and modules |
boolean |
modulePresent(MesquiteModule module)
Returns whether the module is associated with some command. |
void |
suppressCommandsToEmployee(MesquiteModule module)
suppress commands to module; used by module that doesn't want to rehire employee |
java.lang.String |
toString(MesquiteFile file,
java.lang.String spacer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Snapshot()
| Method Detail |
|---|
public void addLine(java.lang.String command,
MesquiteModule module)
This allows the module saving the Nexus block to insert immediately afterward the tell It... endTell block of commands that refer to that employee. (this is important to avoid ambiguity of a getEmployee command that can result if more than one employee has the same name. By placing the tell block immediately afterward, that hired employee will get the commands appropriate to just it.
public void addLineIfAnythingToTell(java.lang.String command,
MesquiteModule module)
public void suppressCommandsToEmployee(MesquiteModule module)
public void addLine(java.lang.String commandLine)
public void incorporate(Snapshot snap,
boolean addTab)
public java.lang.String getLine(int index)
public java.lang.String getCommand(int index)
public MesquiteModule getModule(int index)
public boolean modulePresent(MesquiteModule module)
public boolean getConditional(int index)
public int getNumLines()
public void dump()
public java.lang.String toString(MesquiteFile file,
java.lang.String spacer)
public static java.lang.String getIDSnapshotCommands(FileElementManager module,
MesquiteFile file,
java.lang.String spacer)
public static java.lang.String getSnapshotCommands(MesquiteModule module,
MesquiteFile file,
java.lang.String spacer)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||