Java Reference
In-Depth Information
perform a resize on the selected parts that understand a “resize.” Shift and Ctrl
key modifiers can constrain the resize operation.
The types of handles available on an EditPart depend on the layout man-
ager in which its figure is placed. For example, parts inside a table might have
handles for adjusting insets, padding, column span, or other attributes. Some lay-
outs don't need handles, but four corner handles should be added just to indicate
selection. Dragging these handles works the same as dragging the part itself.
Because of the relationship between handles and layouts, the parent's
LayoutEditPolicy should install the PRIMARY_DRAG_ROLE EditPolicy
because it defines abstract methods for this purpose. If a container changes lay-
out managers during editing, typically the layout policy gets swapped with one
for the new layout manager. The new policy then replaces the stale
PRIMARY_DRAG_ROLE policies on each child.
The MatchSizeAction matches the size of the selected parts to the primary
selected part's size. This action is implemented in a way similar to manually resiz-
ing the individual parts, and it uses the same request and type.
The AlignmentAction uses an AlignmentRequest , which extends
ChangeBoundsRequest . When using a ChangeBoundsRequest , the part's
current placement in t he control (in absolute coordinates) is passed to the request,
which then returns a modified version. Using this pattern, alignment can adjust
each part's rectangle by different amounts. In most cases, alignment can be
treated no differently from a move. This action aligns all selected parts with one
of the edges of the primary selected part.
Connection Creation
Table 9-6 details the elements involved in connection creation interactions.
Table 9-6
Connection Creation Interactions
Tools
Requests
Edit Policies and Roles
Actions
ConnectionCreation
CreateConnectionRequest
GraphicalNodeEditPolicy
Tool
ConnectionDrag
REQ_CONNECTION_
NODE_ROLE
CreationTool
START
REQ_CONNECTION_
END
The ConnectionCreationTool creates a new connection between nodes.
This interaction requires the user to activate the tool (typically using the palette)
 
Search WWH ::




Custom Search