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

## Class draw2d.Window

    Object
       |
       +--draw2d.Figure
             |
             +--draw2d.Window

Direct Known Subclasses:
  draw2d.Dialog, draw2d.ToolPalette, draw2d.PropertyWindow

class draw2d.Window
extends draw2d.Figure

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

Constructor Summary
`draw2d.Window ( title)`

Method Summary
`int` | `getMinHeight()` This value is relevant for the interactive resize of the figure.
`int` | `getMinWidth()` This value is relevant for the interactive resize of the figure.
`boolean` | `hasFixedPosition()` Return true if the origin of the Object is the window and not the document.
`boolean` | `hasTitleBar()` Return true if the window has a title bar
`boolean` | `isResizeable()` Returns the true if the figure can be resized.
`boolean` | `onDragstart( <int> x, <int> y)` Will be called if the object are move via drag and drop.
`void` | `onSelectionChanged( <draw2d.Figure> figure)` Call back method of the framework if the selected object has been changed.
`void` | `setBackgroundColor( <draw2d.Color> color)` Set the background color of the window.
`void` | `setCanDrag(<boolean> flag)` Switch on/off the drag drop behaviour of this object
`void` | `setColor( <draw2d.Color> color)`
`void` | `setDimension( <int> w, <int> h)` Set the new dimension of the window.
`void` | `setLineWidth( <int> w)` mmmh, make this sense?
`void` | `setTitle( <String> title)` Set the new title / header of this dialog.
`<static> void` | `setZOrderBaseIndex( <int> index)` Set the common z-index of the window element.

Methods inherited from class draw2d.Figure
`getProperties, getProperty, setProperty, getId, getWorkflow, getParent, getZOrder, setZOrder, setBorder, getContextMenu, onDoubleClick, onMouseEnter, onMouseLeave, setPosition, setResizeable, setSelectable, isStrechable, isDeleteable, setDeleteable, setCanSnapToHelper, getCanSnapToHelper, getSnapToGridAnchor, setSnapToGridAnchor, getBounds, getWidth, getHeight, getY, getX, getAbsoluteY, getAbsoluteX, onKeyDown, getPosition, isOver, attachMoveListener, detachMoveListener`

Constructor Detail

### draw2d.Window

    draw2d.Window( title)

Version: 0.9.14
Author: Andreas Herz

Method Detail

### getMinHeight

    int getMinHeight()

This value is relevant for the interactive resize of the figure.

Returns:

Returns the min height of this object.

### getMinWidth

    int getMinWidth()

This value is relevant for the interactive resize of the figure.

Returns:

Returns the min width of this object.

### hasFixedPosition

    boolean hasFixedPosition()

Return true if the origin of the Object is the window and not the document. This is usefull if you want implement a window or a dialog element. The element doesn't move if the user scroll the document.

Returns:

Returns [true] if the origin of the object the window.

### hasTitleBar

    boolean hasTitleBar()

Return true if the window has a title bar

Returns:

Returns [true] if the window has a title bar

### isResizeable

    boolean isResizeable()

Returns the true if the figure can be resized.

See:

- setResizeable

### onDragstart

    boolean onDragstart( <int> x, <int> y)

Will be called if the object are move via drag and drop. Don't override this method if you want avoid the drag and drob of your window. Use the setCanDrag(false) method instead.

Parameters:

`x` - x position of the mouse in the window

`y` - y position of the mouse in the window

Returns:

Returns [true] if the window can be draged. False in the other case

### onSelectionChanged

    void onSelectionChanged( <draw2d.Figure> figure)

Call back method of the framework if the selected object has been changed.

Parameters:

`figure` - the object which has been selected.

### setBackgroundColor

    void setBackgroundColor( <draw2d.Color> color)

Set the background color of the window.

Parameters:

`color` - The new background color of the object.

### setCanDrag

    void setCanDrag(<boolean> flag)

Switch on/off the drag drop behaviour of this object

Parameters:

`flag` - The flag which handles the drag drop behaviour of this window.

### setColor

    void setColor( <draw2d.Color> color)

Parameters:

`color` - The new border color of the window.

### setDimension

    void setDimension( <int> w, <int> h)

Set the new dimension of the window.

Parameters:

`w` - new width of the window.

`h` - new height of the window.

### setLineWidth

    void setLineWidth( <int> w)

mmmh, make this sense? Line width has beend mapped to the border width. TODO: Implement a propper setBorder() method for the window.

Parameters:

`w` - The new border width of the window.

### setTitle

    void setTitle( <String> title)

Set the new title / header of this dialog.

Parameters:

`title` - The new title of the window

### setZOrderBaseIndex

    <static> void setZOrderBaseIndex( <int> index)

Set the common z-index of the window element. This method exists for compatibility reason to dojo or another UI javascript library. It is now ossible to arange the draw2d elements behind/before other UI elements-

Parameters:

`index` - The z-order for all new window objects.

See:

- setZOrder

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