|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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.sourceforge.swtlayeredgraph.SwtLayeredGraph
public class SwtLayeredGraph
Field Summary |
---|
Fields inherited from class org.eclipse.swt.widgets.Composite |
---|
embeddedHandle |
Fields inherited from class org.eclipse.swt.widgets.Widget |
---|
handle |
Constructor Summary | |
---|---|
SwtLayeredGraph(org.eclipse.swt.widgets.Composite parent)
Builds a new SwtLayeredGraph with the specified parent and SWT style. |
|
SwtLayeredGraph(org.eclipse.swt.widgets.Composite parent,
java.lang.Boolean useScrollBars)
|
Method Summary | |
---|---|
void |
addLayer(GraphLayer layer)
Adds the specified layer to the graph. |
void |
addMouseMoveListener(GraphMouseListener listener)
Adds a subscriber to the list of subscribers notified when the mouse is moved in the graph. |
GraphLayer |
createLayer(java.lang.String layerName)
Creates a new layer with the specified name and adds it to the graph. |
protected void |
drawLayers(org.eclipse.swt.events.PaintEvent pe)
Draws the individual layers. |
CoordinateType |
getCoordinateType()
|
IGraphCursor |
getGraphCursor()
Gets the current cursor for the canvas. |
IGraphGridLayer |
getGrid()
Gets the current grid layer. |
LayerDrawable |
getItem(java.lang.String... paths)
Gets the item specified by the path. |
GraphLayer |
getLayer(java.lang.String layerName)
Gets the layer with the specified name. |
LayerContainer<GraphLayer> |
getLayerContainer()
Gets the graph container. |
java.util.List<java.lang.String> |
getLayerNames()
Gets the list of the name of all of the layers. |
java.util.List<GraphLayer> |
getLayers()
Gets a copy of the list of layers. |
java.util.List<LayerDrawable> |
getSelectedItems()
Gets a list of currently selected items. |
java.lang.Double |
getXScaleFactor()
Gets the X scale factor. |
java.lang.Double |
getYScaleFactor()
Gets the Y scale factor. |
void |
removeLayer(GraphLayer layer)
Removes the specified layer. |
void |
removeLayer(java.lang.String layerName)
Removes the specified layer. |
void |
removeMouseMoveListener(GraphMouseListener listener)
Removes a subscriber from the list of subscribers notified when the mouse is moved in the graph. |
void |
setCoordinateType(CoordinateType newType)
|
void |
setGraphCursor(IGraphCursor cursor)
Sets the cursor to use on the canvas. |
void |
setGrid(IGraphGridLayer grid)
Sets the current grid layer to the specified grid. |
void |
setScrollBarEnable(java.lang.Boolean enabled)
|
void |
setXScaleFactor(java.lang.Double factor)
Sets the X scale factor with 1.0 being 100%. |
void |
setYScaleFactor(java.lang.Double factor)
Sets the Y scale factor with 1.0 being 100%. |
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, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
---|
computeTrim, getBorderWidth, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Control |
---|
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, 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, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, 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, dispose, 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 SwtLayeredGraph(org.eclipse.swt.widgets.Composite parent)
parent
- Parent of this object.style
- SWT Style info.public SwtLayeredGraph(org.eclipse.swt.widgets.Composite parent, java.lang.Boolean useScrollBars)
Method Detail |
---|
public void addLayer(GraphLayer layer)
layer
- Layer to add to the graph.
java.lang.IllegalArgumentException
- If layer is null.
DuplicateItemException
- If a layer of the same name exists. Note that name
comparisons are case sensitive.public GraphLayer createLayer(java.lang.String layerName)
layerName
- Name of new layer.
java.lang.IllegalArgumentException
- If layerName is empty or null.
DuplicateItemException
- If a layer with the same name exists. Note that comparisons
are case sensitive.public GraphLayer getLayer(java.lang.String layerName)
layerName
- Name of layer to return. Note that this comparison is case
sensitive.
java.lang.IllegalArgumentException
- If layerName is null or empty.public java.util.List<GraphLayer> getLayers()
public java.util.List<java.lang.String> getLayerNames()
public void removeLayer(GraphLayer layer)
layer
- Layer to remove.
java.lang.IllegalArgumentException
- If layer is null.public void removeLayer(java.lang.String layerName)
layerName
- Name of layer to remove.
java.lang.IllegalArgumentException
- If layerName is null.public LayerContainer<GraphLayer> getLayerContainer()
protected void drawLayers(org.eclipse.swt.events.PaintEvent pe)
pe
- Event that contains the GC to draw on.public IGraphGridLayer getGrid()
public void setGrid(IGraphGridLayer grid)
grid
- New grid layer.
java.lang.IllegalArgumentException
- If grid is null.public java.lang.Double getXScaleFactor()
public java.lang.Double getYScaleFactor()
public void setXScaleFactor(java.lang.Double factor)
factor
- New X scale factor.
java.lang.IllegalArgumentException
- If factor is null.public void setYScaleFactor(java.lang.Double factor)
factor
- New Y scale factor.
java.lang.IllegalArgumentException
- If factor is null.public java.util.List<LayerDrawable> getSelectedItems()
public void addMouseMoveListener(GraphMouseListener listener)
listener
- New listener to be called.
java.lang.IllegalArgumentException
- If listener is null.public void removeMouseMoveListener(GraphMouseListener listener)
listener
- Listener to be removed.
java.lang.IllegalArgumentException
- If listener is null.public void setScrollBarEnable(java.lang.Boolean enabled)
public void setGraphCursor(IGraphCursor cursor)
cursor
- Cursor to use when in canvas. If cursor is null, default OS
cursor will be used.public IGraphCursor getGraphCursor()
public void setCoordinateType(CoordinateType newType)
public CoordinateType getCoordinateType()
public LayerDrawable getItem(java.lang.String... paths)
paths
- Path to the item
InvalidItemPathException
- When an item does not exist on the specified path, or if the
path is invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |