|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.ui.TableModel
ewe.ui.TreeTableModel
| Nested Class Summary |
| Nested classes inherited from class ewe.ui.TableModel |
TableModel.CellControl, TableModel.ControlProxy |
| Field Summary | |
static int |
CanExpand
A Node status. |
static IImage |
closedFolder
|
Vector |
cutNodes
|
protected static int |
DepthMask
|
boolean |
dynamicCanExpand
If this is true then the "canExpand" state of a node will be queried every time it is displayed. |
static IImage |
expandingIcon
|
Vector |
expandingNodes
|
int |
expansionLevel
This is the default number of levels to expand to when the tree is newly displayed. |
protected static int |
FlagMask
|
static int |
HasChildren
A Node status. |
boolean |
hasControls
This is used to indicate that nodes can have different sizes. |
static int |
HasMoreSiblings
A Node status. |
boolean |
hideRoot
Set this true to hide the Root node. |
static int |
IsExpanded
A Node status. |
static int |
IsNode
A Node status. |
protected long[] |
matrix
|
boolean |
noLines
If this is true then no lines connecting nodes will be drawn. |
static IImage |
openFolder
|
static IImage |
page
|
protected static int |
PatternMask
|
Vector |
ranges
|
protected TreeNode |
rootObject
|
Color |
selectedColor
|
int |
selectedLine
|
RangeList |
selectedLines
|
boolean |
selectExpanded
If this is true then expanding/collapsing a node will automatically select that node. |
boolean |
showWaitCursor
If this is true then the wait cursor will be shown when expanding node. |
| Fields inherited from interface ewe.ui.UIConstants |
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN |
| Fields inherited from interface ewe.ui.CellConstants |
BORDER, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, FIXEDSIZE, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST |
| Fields inherited from interface ewe.ui.ControlConstants |
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, Disabled, DisablePopupMenu, DisplayOnly, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpKeyEvents, SendUpPenEvents, ShowSIP, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown |
| Constructor Summary | |
TreeTableModel()
|
|
| Method Summary | |
int[] |
addressOf(int line)
Find the address of the line. |
int[] |
addressOf(TreeNode tn)
Return the address of the TreeNode relative to the root TreeNode. |
int |
calculateColWidth(int col)
This returns the full width of the column. |
int |
calculateRowHeight(int row)
This returns the full height of the row. |
boolean |
canDoCollapse(int index)
Returns if the item at the specified index can be collapsed. |
boolean |
canDoExpand(int index)
Returns if the item at the specified index can be expanded. |
boolean |
canScreenScroll()
This always returns false. |
void |
clicked(Point where)
|
int |
collapse(int whichIndex)
Collapse the index. |
protected int |
collapseMatrix(int parent)
|
protected void |
collapsing(TreeNode node)
|
int |
columnOf(int index)
Returns the column which contains the '+'/'-' box of the entry at the following index. |
int |
countChildren(int parent)
Return the number of children for a node at the specified index. |
int |
countSelectedLines()
|
int |
countTotalChildNodes(int parent)
Count all child nodes of a parent, including children of its children and so on. |
int |
delete(int line,
int length)
Remove a set of entries. |
boolean |
deleted(TreeNode parent,
int previousIndexOfDeletedChild)
This assumes you are using TreeNode objects with the control. |
int |
doCollapse(int whichIndex)
|
int |
doExpand(int whichIndex)
|
int |
doExpand(int whichIndex,
TreeNode node)
Override this to do expansion. |
void |
doubleClicked(Point where)
|
void |
drawNodeData(FontMetrics fm,
Graphics g,
int line,
Rect where,
Rect whereInTable,
TreeNode node)
|
void |
drawNodeLine(Graphics g,
Rect r,
boolean nextTo,
int flags,
int row,
TreeNode node)
|
int |
expand(int whichIndex,
long[] with,
byte[] flags)
Expand the index with the list of object references and the list of flags. |
protected void |
expanding(TreeNode node)
|
protected void |
expandMatrix(int afterIndex,
int length)
|
int |
expandTo(int[] address)
This will expand down the tree until the address specified is displayed. |
int |
expandTo(int[] address,
boolean selectIt)
This will exapand down the tree until the address specified is displayed. |
void |
expandToLevel(int level)
This expands the tree a specified number of levels deep, below the root. |
int |
findChild(int parent,
int whichChild)
Find the child within the parent. |
int |
findNextSibling(int where)
Find the next sibling. |
int |
findParent(int where)
Find the parent. |
protected int |
findParentOrPreviousSibling(int where,
boolean parent)
|
int |
findPreviousSibling(int where)
Find the previous sibling. |
void |
fireSelection()
|
int |
flagsAt(int line)
Returns the flags of the line. |
void |
fullExpandCollapse(int line)
This will either expand or collapse a node depending on its current state. |
Object |
getDataObjectAt(int line)
This returns getTreeNodeAt(line). |
boolean |
getDataToDragAndDrop(DragContext dc)
|
Object |
getDataToTransfer()
|
int |
getDataWidth(int line)
|
int |
getDisplayStatus(int forLine)
Get the display status for the specified line. |
String |
getDisplayString(int forLine,
TreeNode node)
|
protected int |
getDrawOptions(int line,
TreeNode node)
|
byte |
getFlags(int forLine,
TreeNode node)
|
int |
getHeightOfObject(Object obj)
|
IImage |
getIcon(int forLine,
TreeNode node)
|
Menu |
getMenuFor(int line)
|
protected TreeNode |
getNodeToCollapse(int whichIndex)
This is called by the default doExpand(). |
protected TreeNode |
getNodeToExpand(int whichIndex)
This is called by the default doExpand(). |
TreeNode |
getRootObject()
|
int[] |
getSelectedLines()
|
RangeList |
getSelectedRanges()
|
Rect |
getTextRect(int index,
Rect dest)
|
TreeNode |
getTreeNodeAt(int index)
|
int |
indexOf(int[] address)
Finds the index of the address specified. |
int |
indexOf(TreeNode node)
Return the line of the specified node IF it is displayed. |
void |
init(long rootObjectRef,
byte flags)
|
int |
insert(int parent,
int asChild,
long[] what,
byte[] flags)
This will only insert IF there are already children. |
boolean |
inserted(TreeNode parent,
TreeNode child,
boolean selectChild)
This assumes you are using TreeNode objects with the control. |
boolean |
isCut(TreeNode node)
|
boolean |
isSelected(int index)
|
void |
made()
This is called after the TableControl has been made. |
protected void |
modify(int start,
int length,
int on,
int off)
|
long |
objectAt(int line)
Find the object reference number of the line. |
void |
paintLine(int line)
|
void |
paintLine(TableControl tc,
Graphics g,
int line)
|
void |
paintTableCell(TableControl tc,
Graphics g,
int row,
int col)
The real biz. |
void |
paintTableCell(TableControl tc,
Graphics g,
Rect cells)
This paints a matrix of cells. |
void |
pressed(Point where)
|
void |
reExpandNode(int index)
This will cause the selected Node to be collapsed and then expanded again. |
void |
reExpandSelectedNode()
This will cause the selected Node to be collapsed and then expanded again. |
void |
released(Point where)
|
protected int |
removeEntries(int start,
int toRemove)
If you override this to react to a remove, then make sure you call this. |
int |
scrollTo(int current,
int requested,
int scrollAction,
boolean horizontal)
This is called by the table to tell the model that it wants to scroll either vertically or horizontally. |
void |
select(int line)
Selects the specified line. |
void |
select(int index,
boolean selected)
|
void |
selectAll(boolean selectOn)
This either clears the selection or selects all. |
void |
selectOnly(int line)
Select an item - this does not fire a selection event. |
void |
setRootObject(TreeNode root)
|
void |
setSelectedLines(int[] all)
|
protected int |
shrunk(int byHowMany)
|
byte |
toFlags(TreeNode what)
This determines from the TreeNode whether it is a leaf and whether it can expand. |
long |
toReference(TreeNode what)
Creates a reference for the TreeNode. |
void |
update()
|
void |
updateFlags(int line,
byte newFlags)
This changes the flags for the node on a line. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
protected long[] matrix
protected TreeNode rootObject
public boolean noLines
public boolean selectExpanded
public boolean showWaitCursor
public boolean dynamicCanExpand
public boolean hasControls
public int expansionLevel
public boolean hideRoot
public static IImage expandingIcon
public int selectedLine
public RangeList selectedLines
public Vector ranges
public Vector cutNodes
public Vector expandingNodes
public static final int IsNode
public static final int CanExpand
public static final int HasMoreSiblings
public static final int IsExpanded
public static final int HasChildren
protected static final int FlagMask
protected static final int DepthMask
protected static final int PatternMask
public static IImage openFolder
public static IImage closedFolder
public static IImage page
public Color selectedColor
| Constructor Detail |
public TreeTableModel()
| Method Detail |
public boolean canScreenScroll()
canScreenScroll in class TableModelpublic byte toFlags(TreeNode what)
public long toReference(TreeNode what)
public void setRootObject(TreeNode root)
public TreeNode getRootObject()
public int scrollTo(int current,
int requested,
int scrollAction,
boolean horizontal)
scrollTo in class TableModel
protected void expandMatrix(int afterIndex,
int length)
public int countChildren(int parent)
public int countTotalChildNodes(int parent)
protected int removeEntries(int start,
int toRemove)
protected int collapseMatrix(int parent)
public void init(long rootObjectRef,
byte flags)
protected int shrunk(int byHowMany)
protected void modify(int start,
int length,
int on,
int off)
public int findNextSibling(int where)
public int findPreviousSibling(int where)
public int findParent(int where)
public int findChild(int parent,
int whichChild)
public int indexOf(int[] address)
public int[] addressOf(TreeNode tn)
public int columnOf(int index)
public int expandTo(int[] address)
public void expandToLevel(int level)
level - The number of levels below the root to display.
public int expandTo(int[] address,
boolean selectIt)
protected int findParentOrPreviousSibling(int where,
boolean parent)
public int collapse(int whichIndex)
public int expand(int whichIndex,
long[] with,
byte[] flags)
public int delete(int line,
int length)
public int insert(int parent,
int asChild,
long[] what,
byte[] flags)
public long objectAt(int line)
public int flagsAt(int line)
public void updateFlags(int line,
byte newFlags)
public int[] addressOf(int line)
protected TreeNode getNodeToExpand(int whichIndex)
protected TreeNode getNodeToCollapse(int whichIndex)
public boolean canDoExpand(int index)
public boolean canDoCollapse(int index)
protected void expanding(TreeNode node)
throws SlowTaskException
SlowTaskExceptionprotected void collapsing(TreeNode node)
public int doExpand(int whichIndex)
public int doExpand(int whichIndex,
TreeNode node)
public TreeNode getTreeNodeAt(int index)
public int indexOf(TreeNode node)
public int doCollapse(int whichIndex)
public String getDisplayString(int forLine,
TreeNode node)
public IImage getIcon(int forLine,
TreeNode node)
public boolean deleted(TreeNode parent,
int previousIndexOfDeletedChild)
public boolean inserted(TreeNode parent,
TreeNode child,
boolean selectChild)
public int getDisplayStatus(int forLine)
forLine -
public byte getFlags(int forLine,
TreeNode node)
public int calculateRowHeight(int row)
TableModel
calculateRowHeight in class TableModelpublic int getHeightOfObject(Object obj)
public int calculateColWidth(int col)
TableModel
calculateColWidth in class TableModel
public Rect getTextRect(int index,
Rect dest)
public boolean isCut(TreeNode node)
protected int getDrawOptions(int line,
TreeNode node)
public int getDataWidth(int line)
public void drawNodeData(FontMetrics fm,
Graphics g,
int line,
Rect where,
Rect whereInTable,
TreeNode node)
public void drawNodeLine(Graphics g,
Rect r,
boolean nextTo,
int flags,
int row,
TreeNode node)
public void paintTableCell(TableControl tc,
Graphics g,
int row,
int col)
TableModel
paintTableCell in class TableModelpublic void paintLine(int line)
public void paintLine(TableControl tc,
Graphics g,
int line)
public void paintTableCell(TableControl tc,
Graphics g,
Rect cells)
TableModel
paintTableCell in class TableModelpublic void fullExpandCollapse(int line)
public Object getDataObjectAt(int line)
public Object getDataToTransfer()
public boolean getDataToDragAndDrop(DragContext dc)
public void clicked(Point where)
public void selectOnly(int line)
line - the index of the line to select.public void released(Point where)
public void pressed(Point where)
public void doubleClicked(Point where)
public void fireSelection()
public void select(int index,
boolean selected)
public int countSelectedLines()
public RangeList getSelectedRanges()
public int[] getSelectedLines()
public boolean isSelected(int index)
public void selectAll(boolean selectOn)
public void setSelectedLines(int[] all)
public void select(int line)
public void update()
public void made()
TableModel
made in class TableModelpublic void reExpandSelectedNode()
public void reExpandNode(int index)
public Menu getMenuFor(int line)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||