| java.lang.Object javax.swing.table.AbstractTableModel abbot.editor.ScriptModel
ScriptModel | class ScriptModel extends AbstractTableModel (Code) | | Formats a Script for display in a table. Keeps track of
"open" nodes to create a tree-like display
NOTE: this is a brute-force implementation with no attempts at
optimization. But it's a very simple tree+table implementation.
|
Method Summary | |
public Class | getColumnClass(int col) | public int | getColumnCount() | public String | getColumnName(int col) | public synchronized int | getNestingDepthAt(int row) | public synchronized Sequence | getParent(Step step) Return the parent sequence of the given step. | public synchronized int | getRowCount() | public synchronized int | getRowOf(Step step) Returns -1 if the step is not found or not visible. | public Script | getScript() | public synchronized Script | getScriptOf(int row) | public synchronized Step | getStepAt(int row) | public synchronized Object | getValueAt(int row, int col) Returns the step at the given row. | public synchronized void | insertStep(Sequence parent, Step step, int index) Insert the given step at the given index in its parent. | public synchronized void | insertSteps(Sequence parent, List steps, int index) Insert the steps into the given sequence at the given index. | public synchronized boolean | isOpen(int row) Return whether the given row is "open". | public synchronized boolean | isOpen(Step step) | public synchronized void | moveSteps(Sequence parent, List steps, int index) Move the given steps and all between them to the new location. | public synchronized void | removeStep(Step step) Remove the given step from the script. | public synchronized void | removeSteps(List steps) Remove all the given steps. | public synchronized void | setScript(Script script) Set the script to display. | public synchronized void | setValueAt(Object value, int row, int col) Assumes value is XML for a script step. | public synchronized void | toggle(int row) Toggle the open state of the node, if it's a sequence. |
ScriptModel | public ScriptModel()(Code) | | |
getColumnClass | public Class getColumnClass(int col)(Code) | | |
getColumnCount | public int getColumnCount()(Code) | | |
getNestingDepthAt | public synchronized int getNestingDepthAt(int row)(Code) | | |
getParent | public synchronized Sequence getParent(Step step)(Code) | | Return the parent sequence of the given step.
|
getRowCount | public synchronized int getRowCount()(Code) | | |
getRowOf | public synchronized int getRowOf(Step step)(Code) | | Returns -1 if the step is not found or not visible.
|
getScriptOf | public synchronized Script getScriptOf(int row)(Code) | | |
getStepAt | public synchronized Step getStepAt(int row)(Code) | | |
getValueAt | public synchronized Object getValueAt(int row, int col)(Code) | | Returns the step at the given row.
|
insertStep | public synchronized void insertStep(Sequence parent, Step step, int index)(Code) | | Insert the given step at the given index in its parent.
|
insertSteps | public synchronized void insertSteps(Sequence parent, List steps, int index)(Code) | | Insert the steps into the given sequence at the given index.
|
isOpen | public synchronized boolean isOpen(int row)(Code) | | Return whether the given row is "open".
|
isOpen | public synchronized boolean isOpen(Step step)(Code) | | |
moveSteps | public synchronized void moveSteps(Sequence parent, List steps, int index)(Code) | | Move the given steps and all between them to the new location.
If the steps are being moved later in the same sequence, the index
represents the target index before the move.
|
removeStep | public synchronized void removeStep(Step step)(Code) | | Remove the given step from the script.
|
removeSteps | public synchronized void removeSteps(List steps)(Code) | | Remove all the given steps. If any are not found, an exception is
thrown before any changes are made.
|
setScript | public synchronized void setScript(Script script)(Code) | | Set the script to display. Don't allow any model accesses until
this method has completed.
|
setValueAt | public synchronized void setValueAt(Object value, int row, int col)(Code) | | Assumes value is XML for a script step.
|
toggle | public synchronized void toggle(int row)(Code) | | Toggle the open state of the node, if it's a sequence.
|
|
|