A DrawGroup has no local visual representation
other than that of its drawItems. Adding items to a drawGroup allows for central event handling, and allows them to be
manipulated (drawn, scaled, etc) together.

DrawItems are added to a DrawGroup by creating the DrawItems with DrawItem.drawGroup set to the DrawGroup, or by creating a
DrawGroup with drawItems.

DrawGroups handle
events by having an explicitly specified group rectangle (see getGroupRect()). This rectangle has no visual representation
within the draw pane (is not visible) but any user-interactions within the specified coordinates will trigger group
level events.

setHeight

If this method is called after the component has been drawn/initialized:
Sets the height of this DrawGroup's group rectangle. Note that setting the height will not move or resize the items in this DrawGroup.

setLeft

If this method is called after the component has been drawn/initialized:
Sets the left coordinate of this DrawGroup's group rectangle. Note that setting the left coordinate will not move the items in this DrawGroup.

setTop

If this method is called after the component has been drawn/initialized:
Sets the top coordinate of this DrawGroup's group rectangle. Note that setting the top coordinate will not move the items in this DrawGroup.

setUseGroupRect

When should this drawGroup receive event notifications? If set to true, the developer can specify an
explicit set of coordinates. Whenever the user
interacts with this rectangle, the drawGroup will be notified and the appropriate event handlers will be fired. Note
that rectangle need not contain all DrawItems within the group, and is manually managed by the developer. If set to
false, the event rectangle coordinates
are unused - instead as a user interacts with specific drawItems within this group, the appropriate event handler would
be fired on the item, then the event would "bubble" to the drawGroup, firing the appropriate event handler at the group
level as well.

Parameters:

useGroupRect - New useGroupRect value. Default value is false

Throws:

java.lang.IllegalStateException - this property cannot be changed after the component has been created

getUseGroupRect

public boolean getUseGroupRect()

When should this drawGroup receive event notifications? If set to true, the developer can specify an
explicit set of coordinates. Whenever the user
interacts with this rectangle, the drawGroup will be notified and the appropriate event handlers will be fired. Note
that rectangle need not contain all DrawItems within the group, and is manually managed by the developer. If set to
false, the event rectangle coordinates
are unused - instead as a user interacts with specific drawItems within this group, the appropriate event handler would
be fired on the item, then the event would "bubble" to the drawGroup, firing the appropriate event handler at the group
level as well.

Returns:

Current useGroupRect value. Default value is false

setWidth

If this method is called after the component has been drawn/initialized:
Sets the width of this DrawGroup's group rectangle. Note that setting the width will not move or resize the items in this DrawGroup.

getWidth

click

public java.lang.Boolean click()

Notification fired when the user clicks on this DrawGroup.

Note that if useGroupRect is true, this notification will be triggered
by the user interacting with the specified group
rectangle for the group. If useGroupRect is
false, the notification will bubble up from interactions with individual items within the group.

Returns:

false to prevent this event from bubbling to this widget's parent, true or undefined to bubble.

dragMove

public boolean dragMove()

Notification fired for every mouseMove event triggered while the user is dragging this DrawGroup. Will only fire if
canDrag is true for this group.

Note that if useGroupRect is true, this notification will be triggered
by the user interacting with the specified group
rectangle for the group. If useGroupRect is
false, the notification will bubble up from interactions with individual items within the group.

Default drag
behavior will be to reposition all items in the group (and update the group rectangle).

dragStart

public boolean dragStart()

Notification fired when the user starts to drag this DrawGroup. Will only fire if canDrag is true for this group.

Note that if useGroupRect is true, this notification will be triggered
by the user interacting with the specified group
rectangle for the group. If useGroupRect is
false, the notification will bubble up from interactions with individual items within the group.

Default drag
behavior will be to reposition all items in the group (and update the group rectangle).

dragStop

public boolean dragStop()

Notification fired when the user stops dragging this DrawGroup. Will only fire if canDrag is true for this group.

Note that if useGroupRect is true, this notification will be triggered
by the user interacting with the specified group
rectangle for the group. If useGroupRect is
false, the notification will bubble up from interactions with individual items within the group.

getCenter

mouseDown

public java.lang.Boolean mouseDown()

Notification fired when the user presses the left mouse button on this DrawGroup.

Note that if useGroupRect is true, this notification will be triggered
by the user interacting with the specified group
rectangle for the group. If useGroupRect is
false, the notification will bubble up from interactions with individual items within the group.

Returns:

false to prevent this event from bubbling to this widget's parent, true or undefined to bubble.

mouseMove

public java.lang.Boolean mouseMove()

Notification fired when the user moves the mouse over this DrawGroup.

Note that if useGroupRect is true, this notification will be triggered
by the user interacting with the specified group
rectangle for the group. If useGroupRect is
false, the notification will bubble up from interactions with individual items within the group.

Returns:

false to prevent this event from bubbling to this widget's parent, true or undefined to bubble.

mouseOut

public java.lang.Boolean mouseOut()

Notification fired when the mouse leaves this DrawGroup.

Note that if useGroupRect is true, this notification will be triggered
by the user interacting with the specified group
rectangle for the group. If useGroupRect is
false, the notification will bubble up from interactions with individual items within the group.

Returns:

false to prevent this event from bubbling to this widget's parent, true or undefined to bubble.

mouseOver

public java.lang.Boolean mouseOver()

Notification fired when the mouse enters this DrawGroup.

Note that if useGroupRect is true, this notification will be triggered
by the user interacting with the specified group
rectangle for the group. If useGroupRect is
false, the notification will bubble up from interactions with individual items within the group.

Returns:

false to prevent this event from bubbling to this widget's parent, true or undefined to bubble.

mouseUp

public java.lang.Boolean mouseUp()

Notification fired when the user releases the left mouse button on this DrawGroup.

Note that if useGroupRect is true, this notification will be triggered
by the user interacting with the specified group
rectangle for the group. If useGroupRect is
false, the notification will bubble up from interactions with individual items within the group.

Returns:

false to prevent this event from bubbling to this widget's parent, true or undefined to bubble.

setDefaultProperties

Class level method to set the default properties of this class. If set, then all
existing and subsequently created instances of this class will automatically have
default properties corresponding to
the properties set on the SmartGWT class instance passed to this function before its
underlying SmartClient JS object was created.
This is a powerful feature that eliminates the need for users to create a separate
hierarchy of subclasses that only alter the default properties of this class. Can also
be used for skinning / styling purposes.

Note: This method is intended for
setting default attributes only and will affect all instances of the underlying class
(including those automatically generated in JavaScript). This method should not be used
to apply standard EventHandlers or override methods for a class - use a custom subclass
instead. Calling this method after instances have been created can result in undefined
behavior, since it bypasses any setters and a class instance may have already examined
a particular property and not be expecting any changes through this route.

Parameters:

drawGroupProperties - properties that should be used as new defaults when instances of this class are created

getGroupRect

This method will return an array of integers mapping out the coordinates (left, top, width, height) of the "group
rectangle" for the group. This is the area of the drawPane where user interactions will fire event notifications on this
drawGroup.