Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class draw2d.Workflow

    Object
       |
       +--draw2d.Canvas
             |
             +--draw2d.Workflow

class draw2d.Workflow
extends draw2d.Canvas

Defined in Workflow.js
Version: 0.9.14
Author: Andreas Herz

Field Summary
`Object` | `oldScrollPosTop`
`Object` | `resizeHandleHalfWidth`
`Object` | `tooltip`

Fields inherited from class draw2d.Canvas
`enableSmoothFigureHandling`

Constructor Summary
`draw2d.Workflow (id)`

Method Summary
`void` | `addFigure( <draw2d.Figure> figure , xPos, yPos)` Add a figure at the hands over x/y position.
`void` | `addSelectionListener( <draw2d.Window> w)`
`Object` | `getBestCompartmentFigure( <int> x, <int> y, <draw2d.Figure> figureToIgnore)` Retruns the best comparment figure at the location [x,y].
`draw2d.CommandStack` | `getCommandStack()` Returns the command stack for the Canvas.
`draw2d.Menu` | `getContextMenu()`
`Object` | `getCurrentSelection()` Returns the current selected figure in the Canvas.
`draw2d.Document` | `getDocument()` Returns the document of the canvas.
`ArrayList` | `getLines()`
`void` | `hideSnapToHelperLineHorizontal()`
`void` | `hideSnapToHelperLineVertical()`
`void` | `moveBack( <draw2d.Figure> figure)` Move the hands over figure back.
`void` | `moveFront( <draw2d.Figure> figure)` Move the hands over figure in front of a other figures.
`void` | `removeFigure( <draw2d.Figure> figure)` Remove a figure from the Canvas.
`void` | `removeSelectionListener( <Window> w )`
`void` | `scrollTo( <int> x, <int> y, fast)` You can scroll the view to a well defined position.
`void` | `setCurrentSelection( <draw2d.Figure> figure )` Set the current selected figure in the workflow Canvas.
`void` | `setGridWidth( <int> dx, <int> dy)` Set the grid width of the canvas.
`void` | `setPanning(flag)`
`void` | `setSnapToGeometry( flag)` Used to perform snapping to existing elements.
`void` | `setSnapToGrid( flag)` Enable/disable the snap to grid behaviour of the canvas.
`void` | `setToolWindow( <draw2d.Window> toolWindow, x, y)` Set the tool window of this Canvas.
`void` | `showDialog(<draw2d.Dialog> dialog , xPos , yPos)`
`void` | `showTooltip( <draw2d.Figure> tooltip, <boolean> autoHide)`

Methods inherited from class draw2d.Canvas
`setViewPort, getEnableSmoothFigureHandling, setEnableSmoothFigureHandling, getWidth, getHeight, setBackgroundImage, getY, getX, getAbsoluteY, getAbsoluteX, getScrollLeft, getScrollTop`

Field Detail

### oldScrollPosTop

    Object oldScrollPosTop

### resizeHandleHalfWidth

    Object resizeHandleHalfWidth

### tooltip

    Object tooltip

Constructor Detail

### draw2d.Workflow

    draw2d.Workflow(id)

Version: 0.9.14
Author: Andreas Herz

Method Detail

### addFigure

    void addFigure( <draw2d.Figure> figure , xPos, yPos)

Add a figure at the hands over x/y position.

Parameters:

`figure` - The figure to add.

`x` - The x position.

`y` - The y position.

### addSelectionListener

    void addSelectionListener( <draw2d.Window> w)

Parameters:

`w` - The window which will be notified if an object has been selected

See:

- draw2d.Window.onSelectionChanged()

### getBestCompartmentFigure

    Object getBestCompartmentFigure( <int> x, <int> y, <draw2d.Figure> figureToIgnore)

Retruns the best comparment figure at the location [x,y].

Parameters:

`x` - The x position.

`y` - The y position.

`figureToIgnore` - The figure which should be ignored.

### getCommandStack

    draw2d.CommandStack getCommandStack()

Returns the command stack for the Canvas. Required for undo/redo support.

### getContextMenu

    draw2d.Menu getContextMenu()

Returns:

null or the Menu object for this figure.

### getCurrentSelection

    Object getCurrentSelection()

Returns the current selected figure in the Canvas.

Parameters:

`figure` - The new selection.

### getDocument

    draw2d.Document getDocument()

Returns the document of the canvas.

### getLines

    ArrayList getLines()

### hideSnapToHelperLineHorizontal

    void hideSnapToHelperLineHorizontal()

### hideSnapToHelperLineVertical

    void hideSnapToHelperLineVertical()

### moveBack

    void moveBack( <draw2d.Figure> figure)

Move the hands over figure back.

Parameters:

`figure` - The figure to bring back.

### moveFront

    void moveFront( <draw2d.Figure> figure)

Move the hands over figure in front of a other figures.

Parameters:

`figure` - The figure to bring on top.

### removeFigure

    void removeFigure( <draw2d.Figure> figure)

Remove a figure from the Canvas.

Parameters:

`figure` - The figure to remove

### removeSelectionListener

    void removeSelectionListener( <Window> w )

Parameters:

`w` - The window which will be removed from the slection eventing

See:

- draw2d.Window.onSelectionChanged()

### scrollTo

    void scrollTo( <int> x, <int> y, fast)

You can scroll the view to a well defined position.

Parameters:

`x` - the new X scroll position

`y` - the Y scroll position

### setCurrentSelection

    void setCurrentSelection( <draw2d.Figure> figure )

Set the current selected figure in the workflow Canvas.

Parameters:

`figure` - The new selection.

### setGridWidth

    void setGridWidth( <int> dx, <int> dy)

Set the grid width of the canvas.

Parameters:

`dx` - The width of the grid.

`dy` - The height of the grid.

### setPanning

    void setPanning(flag)

### setSnapToGeometry

    void setSnapToGeometry( flag)

Used to perform snapping to existing elements. Snapping is based on the existing children of a container. When snapping a rectangle, the edges of the rectangle will snap to edges of other rectangles generated from the children of the given container/canvas. Similarly, the centers and middles of rectangles will snap to each other.

Parameters:

`boolean` - } true if you want snap to the geometry.

### setSnapToGrid

    void setSnapToGrid( flag)

Enable/disable the snap to grid behaviour of the canvas. All figures will snap to the grid during the the drap and drop operation.

Parameters:

`boolean` - } true if you want snap to the grid.

### setToolWindow

    void setToolWindow( <draw2d.Window> toolWindow, x, y)

Set the tool window of this Canvas. At the moment a workflow instance can only handle one tool window instance.

Parameters:

`toolWindow` - The tool window of the canvas

### showDialog

    void showDialog(<draw2d.Dialog> dialog , xPos , yPos)

Parameters:

`dialog` - The dialog to show.

`x` - The x position.

`y` - The y position.

### showTooltip

    void showTooltip( <draw2d.Figure> tooltip, <boolean> autoHide)

Parameters:

`tooltip` - The tooltip to show

`autoHide` - Indicate if the tooltip should be removed after a timeout period..

Overview | File | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Thu Feb 7 23:45:47 2008