|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.widgets.Widget org.eclipse.swt.widgets.Control org.eclipse.swt.widgets.Scrollable org.eclipse.swt.widgets.Composite org.eclipse.swt.widgets.Canvas net.sf.jtreemap.ktreemap.KTreeMap
public class KTreeMap
Widget who represents each element of a tree in a rectangle of more or less big size according to its importance in the tree.
A tree structure may includes more or less important elements. For example, in a tree structure of files, there can be files of big size. Then it can be interesting to know which repertory is the most important on a hard disk.
Moreover, we can add a code color which makes it possible to introduce new information into the representation of the tree structure.
So, in a KTreeMap, you can see the size and the value of an element in a tree.
TreeMapNode
Nested Class Summary | |
---|---|
protected class |
KTreeMap.HandleMouseMotion
Listener who define the active leaf and set the tooltip text. |
Field Summary |
---|
Fields inherited from class org.eclipse.swt.widgets.Control |
---|
handle |
Constructor Summary | |
---|---|
KTreeMap(org.eclipse.swt.widgets.Composite parent,
int style,
TreeMapNode root)
Constructor of JTreeMap. |
|
KTreeMap(org.eclipse.swt.widgets.Composite parent,
int style,
TreeMapNode root,
SplitStrategy strategy)
Constructor of JTreeMap. |
Method Summary | |
---|---|
void |
calculatePositions()
calculate the postitions for the displayed root. |
void |
dispose()
|
protected void |
draw(org.eclipse.swt.graphics.GC gc,
TreeMapNode item)
draw the item. |
protected void |
drawLabel(org.eclipse.swt.graphics.GC gc,
TreeMapNode item)
write the label in the middle of the item. |
protected void |
drawLabels(org.eclipse.swt.graphics.GC gc,
TreeMapNode item)
Draw all the labels to draw. |
TreeMapNode |
getActiveLeaf()
get the active leaf (the one under the mouse). |
ITreeMapColorProvider |
getColorProvider()
|
org.eclipse.swt.graphics.Point |
getCursorPosition()
|
TreeMapNode |
getDisplayedRoot()
get the displayed root. |
TreeMapNode |
getRoot()
get the root. |
SplitStrategy |
getStrategy()
get the SplitStrategy. |
ITreeMapProvider |
getTreeMapProvider()
get the IColorLabelProvider. |
protected void |
reveal(org.eclipse.swt.graphics.GC gc,
TreeMapNode item)
reveal the item. |
void |
setActiveLeaf(TreeMapNode newActiveLeaf)
set the active leaf. |
void |
setColorProvider(ITreeMapColorProvider colorProvider)
|
void |
setDisplayedRoot(TreeMapNode newDisplayedRoot)
set the displayed root. |
void |
setRoot(TreeMapNode newRoot)
set the new root. |
void |
setStrategy(SplitStrategy newStrat)
set the new strategy. |
void |
setTreeMapProvider(ITreeMapProvider newColorProvider)
set the ColorProvider. |
void |
setZoomKeepProportion(boolean keepProportion)
When you zoom the jTreeMap, you have the choice to keep proportions or not. |
void |
unzoom()
Undo the zoom to display the root. |
void |
zoom(TreeMapNode dest)
Zoom the JTreeMap to the dest node. |
Methods inherited from class org.eclipse.swt.widgets.Canvas |
---|
drawBackground, getCaret, scroll, setCaret, setFont |
Methods inherited from class org.eclipse.swt.widgets.Composite |
---|
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Control |
---|
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
Methods inherited from class org.eclipse.swt.widgets.Widget |
---|
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KTreeMap(org.eclipse.swt.widgets.Composite parent, int style, TreeMapNode root)
parent
- parent Compositestyle
- styleroot
- the root of the tree to displaySplitSquarified
public KTreeMap(org.eclipse.swt.widgets.Composite parent, int style, TreeMapNode root, SplitStrategy strategy)
parent
- parent Compositestyle
- styleroot
- the root of the tree to displaystrategy
- the split strategyMethod Detail |
---|
public void calculatePositions()
public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget
public TreeMapNode getActiveLeaf()
public ITreeMapColorProvider getColorProvider()
public org.eclipse.swt.graphics.Point getCursorPosition()
public TreeMapNode getDisplayedRoot()
This may be not the root of the jTreeMap. After a zoom, the displayed root can be the root of an under-tree.
public TreeMapNode getRoot()
public SplitStrategy getStrategy()
public ITreeMapProvider getTreeMapProvider()
public void setActiveLeaf(TreeMapNode newActiveLeaf)
newActiveLeaf
- the new active leafpublic void setColorProvider(ITreeMapColorProvider colorProvider)
colorProvider
- the colorProvider to setpublic void setDisplayedRoot(TreeMapNode newDisplayedRoot)
This may be not the root of the jTreeMap. After a zoom, the displayed root can be the root of an under-tree.
newDisplayedRoot
- new DiplayedRootpublic void setRoot(TreeMapNode newRoot)
newRoot
- the new root to setpublic void setStrategy(SplitStrategy newStrat)
newStrat
- the new strategy to setpublic void setTreeMapProvider(ITreeMapProvider newColorProvider)
newColorProvider
- the new ColorPorviderpublic void setZoomKeepProportion(boolean keepProportion)
keepProportion
- true if you want to keep proportions, else falsepublic void unzoom()
public void zoom(TreeMapNode dest)
dest
- node we want to zoomprotected void draw(org.eclipse.swt.graphics.GC gc, TreeMapNode item)
gc
- Graphics where you have to drawitem
- item to drawprotected void drawLabel(org.eclipse.swt.graphics.GC gc, TreeMapNode item)
gc
- Graphics where you have to drawitem
- TreeMapNode to drawprotected void drawLabels(org.eclipse.swt.graphics.GC gc, TreeMapNode item)
gc
- Graphics where you have to drawitem
- TreeMapNode to drawprotected void reveal(org.eclipse.swt.graphics.GC gc, TreeMapNode item)
gc
- Graphics where you have to drawitem
- TreeMapNode to reveal
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |