|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A MarkupMouseRegion represents a portion (sub-region) of a markup component's rendered markup that has special design-time behavior. This special behavior may include a name, description, right-click context menu, and/or custom behavior in response to mouse clicks.
An instance of MarkupMouseRegion is associated with a particular sub-region of markup via a unique attribute name-value pair. The 'MarkupDesignInfo.annoteRender' method adds the additional design-time only attributes to the markup, as well as supplies an array of these MarkupMouseRegion instances.
IMPLEMENTED BY THE COMPONENT AUTHOR - This interface is designed to be implemented by the component (bean) author. BasicMarkupMouseRegion is available for convenient subclassing.
BasicMarkupMouseRegion| Method Summary | |
boolean |
canLinkBeans(DesignBean targetBean,
DesignBean sourceBean,
java.lang.Class sourceClass)
This method is called when an object from a design surface or palette is being dragged 'over' a region represented by this MarkupMouseRegion. |
DisplayAction[] |
getContextItems()
Returns an array of DisplayAction objects - used to render a right-click context menu when the user right-clicks on this mouse region. |
boolean |
isClickable()
Returns true if this markup region wishes to respond to a mouse click (or series of clicks). |
Result |
linkBeans(DesignBean targetBean,
DesignBean sourceBean)
This method is called when an object from a design surface or palette has been dropped 'on' a region represented by this MarkupMouseRegion (to establish a link). |
Result |
regionClicked(int clickCount)
This method is called when a user clicks the mouse within the bounds of this mouse region. |
| Methods inherited from interface com.sun.rave.designtime.DisplayItem |
getDescription, getDisplayName, getHelpKey, getLargeIcon, getSmallIcon |
| Method Detail |
public boolean canLinkBeans(DesignBean targetBean,
DesignBean sourceBean,
java.lang.Class sourceClass)
targetBean - The DesignBean instance that the user is 'hovering' the mouse oversourceBean - The DesignBean instance that the user may potentially 'drop' to link - may
be null if this drag operation originated from the palette, because the instance will
not have been created yetsourceClass - The class type of the object that the user may potentially 'drop' to link
linkBeans(DesignBean, DesignBean)public DisplayAction[] getContextItems()
public boolean isClickable()
regionClicked(int)
public Result linkBeans(DesignBean targetBean,
DesignBean sourceBean)
This method is called when an object from a design surface or palette has been dropped 'on' a region represented by this MarkupMouseRegion (to establish a link). This method will not be called unless the corresponding 'canLinkBeans' method call returned true. Typically, this results in property settings on potentially both of the DesignBean objects.
targetBean - The target DesignBean instance that the user has 'dropped' an object onto to
establish a linksourceBean - The DesignBean instance that has been 'dropped'
canLinkBeans(DesignBean, DesignBean, Class)public Result regionClicked(int clickCount)
clickCount - The count of mouse clicks
isClickable()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||