|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel abbot.editor.ScriptModel
class ScriptModel
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.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
ScriptModel()
|
|
ScriptModel(Script script)
|
Method Summary | |
---|---|
Class |
getColumnClass(int col)
|
int |
getColumnCount()
|
String |
getColumnName(int col)
|
int |
getNestingDepthAt(int row)
|
Sequence |
getParent(Step step)
Return the parent sequence of the given step. |
int |
getRowCount()
|
int |
getRowOf(Step step)
Returns -1 if the step is not found or not visible. |
Script |
getScript()
|
Script |
getScriptOf(int row)
|
Step |
getStepAt(int row)
|
Object |
getValueAt(int row,
int col)
Returns the step at the given row. |
void |
insertStep(Sequence parent,
Step step,
int index)
Insert the given step at the given index in its parent. |
void |
insertSteps(Sequence parent,
List steps,
int index)
Insert the steps into the given sequence at the given index. |
boolean |
isOpen(int row)
Return whether the given row is "open". |
boolean |
isOpen(Step step)
|
void |
moveSteps(Sequence parent,
List steps,
int index)
Move the given steps and all between them to the new location. |
void |
removeStep(Step step)
Remove the given step from the script. |
void |
removeSteps(List steps)
Remove all the given steps. |
void |
setScript(Script script)
Set the script to display. |
void |
setValueAt(Object value,
int row,
int col)
Assumes value is XML for a script step. |
void |
toggle(int row)
Toggle the open state of the node, if it's a sequence. |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptModel()
public ScriptModel(Script script)
Method Detail |
---|
public void removeStep(Step step)
public void removeSteps(List steps)
public void insertStep(Sequence parent, Step step, int index)
public void insertSteps(Sequence parent, List steps, int index)
public int getRowOf(Step step)
public boolean isOpen(int row)
public boolean isOpen(Step step)
public void toggle(int row)
public void setScript(Script script)
public int getRowCount()
public int getColumnCount()
public Step getStepAt(int row)
public Object getValueAt(int row, int col)
public void setValueAt(Object value, int row, int col)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
public String getColumnName(int col)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public Class getColumnClass(int col)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public Script getScript()
public int getNestingDepthAt(int row)
public Script getScriptOf(int row)
public Sequence getParent(Step step)
public void moveSteps(Sequence parent, List steps, int index)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |