Extension SDK

oracle.jdevimpl.uieditor.assistant
Class BasicLayoutAssistant

java.lang.Object
  extended byoracle.jdevimpl.uieditor.assistant.BasicLayoutAssistant
All Implemented Interfaces:
LayoutAssistant
Direct Known Subclasses:
BorderComponentLayoutAssistant, BorderLayoutAssistant, CardLayoutAssistant, FlowLayoutAssistant, GridBagLayoutAssistant, GridLayoutAssistant, NullLayoutAssistant, PaneLayoutAssistant, SplitPaneLayoutAssistant, TabbedPaneLayoutAssistant

public class BasicLayoutAssistant
extends java.lang.Object
implements LayoutAssistant


Field Summary
protected static IdeAction BIG_DECREASE_HEIGHT_ACTION
           
static int BIG_DECREASE_HEIGHT_CMD_ID
           
protected static IdeAction BIG_DECREASE_WIDTH_ACTION
           
static int BIG_DECREASE_WIDTH_CMD_ID
           
protected static IdeAction BIG_INCREASE_HEIGHT_ACTION
           
static int BIG_INCREASE_HEIGHT_CMD_ID
           
protected static IdeAction BIG_INCREASE_WIDTH_ACTION
           
static int BIG_INCREASE_WIDTH_CMD_ID
           
protected static IdeAction BIG_MOVE_DOWN_ACTION
           
static int BIG_MOVE_DOWN_CMD_ID
           
protected static IdeAction BIG_MOVE_LEFT_ACTION
           
static int BIG_MOVE_LEFT_CMD_ID
           
protected static IdeAction BIG_MOVE_RIGHT_ACTION
           
static int BIG_MOVE_RIGHT_CMD_ID
           
protected static IdeAction BIG_MOVE_UP_ACTION
           
static int BIG_MOVE_UP_CMD_ID
           
protected static IdeAction DECREASE_HEIGHT_ACTION
           
static int DECREASE_HEIGHT_CMD_ID
           
protected static IdeAction DECREASE_WIDTH_ACTION
           
static int DECREASE_WIDTH_CMD_ID
           
protected static IdeAction INCREASE_HEIGHT_ACTION
           
static int INCREASE_HEIGHT_CMD_ID
           
protected static IdeAction INCREASE_WIDTH_ACTION
           
static int INCREASE_WIDTH_CMD_ID
           
protected static IdeAction MOVE_DOWN_ACTION
           
static int MOVE_DOWN_CMD_ID
           
protected static IdeAction MOVE_LEFT_ACTION
           
static int MOVE_LEFT_CMD_ID
           
protected static IdeAction MOVE_RIGHT_ACTION
           
static int MOVE_RIGHT_CMD_ID
           
protected static IdeAction MOVE_TO_FIRST_ACTION
           
static int MOVE_TO_FIRST_CMD_ID
           
static javax.swing.JMenuItem MOVE_TO_FIRST_ITEM
           
protected static IdeAction MOVE_TO_LAST_ACTION
           
static int MOVE_TO_LAST_CMD_ID
           
static javax.swing.JMenuItem MOVE_TO_LAST_ITEM
           
protected static IdeAction MOVE_UP_ACTION
           
static int MOVE_UP_CMD_ID
           
static javax.swing.JMenu ZORDER_MENU
           
static javax.swing.JSeparator ZORDER_SEPARATOR
           
 
Fields inherited from interface oracle.jdevimpl.uieditor.LayoutAssistant
TOOLBAR_ITEM, TOOLBAR_ITEM_COUNT
 
Constructor Summary
BasicLayoutAssistant()
           
 
Method Summary
protected  int calcBestZ(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode, java.awt.Point location, java.awt.Dimension size, java.awt.Rectangle zBounds)
           
protected  void changeSize(int cmd, Context context)
           
protected  boolean changeZ(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode, int z)
          move a node within its parent to a specific zorder.
 void cleanupRemovedComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode child)
          A child of this node's container has been removed.
 void constrainAdd(oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode, java.awt.Point mouseOrigin, java.awt.Point mousePos, java.awt.Point newPos, java.awt.Dimension newSize)
          Optionally modify size and position of an object being added to conform to the constraints imposed by the LayoutManager being represented.
 java.lang.String constrainMove(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode, java.awt.Point mousePos, java.awt.Point mouseOffset, java.awt.Point newPos, java.awt.Dimension newSize)
          Optionally modify size and position of an object being moved to conform to the constraints imposed by the LayoutManager being represented.
 Explorer getConstraintsEditor(Context context)
          Get an Explorer implementation with which to modify the constraints settings, else null.
 java.lang.String getConstraintsType()
           
 javax.swing.JComponent[] getContextMenuItems(Context context)
          Get an array of JComponent for population onto a ContextMenu.
 javax.swing.JComponent getEffects(java.awt.Container c)
          Get a JComponent whose redering provides any special effects applicable during object creation, object resize or object move for the LayoutManager being represented.
protected  java.lang.Object getKey(oracle.jdevimpl.uieditor.uicanvas.ModelNode node)
           
 java.beans.PropertyEditor getPropertyEditor()
           
protected static java.util.ArrayList getSelectedSiblings(Context context)
           
 java.lang.String getToolbarPrefix()
          Get the prefix to use in combination with the TOOLBAR_ITEM_COUNT and TOOLBAR_ITEM suffixes in order to fetch Toolbar related properties for this LayoutAssistant from the IDE settings.
 boolean handleEvent(IdeAction action, Context context)
          Respond to the given user action within the given context.
 void layoutChanged(oracle.jdevimpl.uieditor.uicanvas.ModelNode container)
          Layout has been switched.
protected  boolean lessThan(java.lang.Object p, java.lang.Object q)
           
protected  void move(int cmd, Context context)
           
 void prepareAddComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode, java.awt.Point location, java.awt.Point offset, java.awt.Dimension size)
          Perform any preparation on a child component that will be added into to a container.
 java.lang.String prepareAddStatus(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode, java.awt.Point location, java.awt.Dimension size)
          Return a string for display during the add process.
 void prepareChangeLayout(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent)
          Perform changes on children of a container to best handle a layout type change.
 java.lang.String prepareMouseMoveStatus(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode, java.awt.Point location)
          Return a string for display while the user is moving the mouse over a component.
 void prepareMoveComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode, java.awt.Point location, java.awt.Point offset)
          Child is being moved.
 void prepareResizeComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, oracle.jdevimpl.uieditor.uicanvas.SelectNib nib)
          Perform a requested resize on a child.
 java.lang.String prepareResizeStatus(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, java.awt.Point location, java.awt.Dimension size)
          Return a string for display during the resize process.
 void prepareSelectComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode node, oracle.jdevimpl.uieditor.uicanvas.UICanvas canvas)
          An immedate child node has been selected.
 void prepareSelectDescendant(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent, oracle.jdevimpl.uieditor.uicanvas.ModelNode child)
          A descendant node has been selected.
protected  void raiseChildToView(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent, oracle.jdevimpl.uieditor.uicanvas.ModelNode child)
           
protected static void removeBoundsSetting(oracle.jdevimpl.uieditor.uicanvas.ModelNode node)
           
 java.lang.String resizeAction(java.awt.Point location, oracle.jdevimpl.uieditor.uicanvas.UICanvas canvas, oracle.jdevimpl.uieditor.uicanvas.SelectNib nib)
          Return a status message string that will be displayed while the user is dragging the nib.
protected  void sort(java.util.ArrayList array, java.util.ArrayList key)
           
protected  java.util.ArrayList sortedNodes(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent)
           
 boolean update(IdeAction action, Context context)
          Update the enabled state of the given action within the given context.
 boolean usesReverseZOrder()
          Determine whether or not z-order is reversed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MOVE_TO_FIRST_CMD_ID

public static final int MOVE_TO_FIRST_CMD_ID

MOVE_TO_LAST_CMD_ID

public static final int MOVE_TO_LAST_CMD_ID

MOVE_LEFT_CMD_ID

public static final int MOVE_LEFT_CMD_ID

BIG_MOVE_LEFT_CMD_ID

public static final int BIG_MOVE_LEFT_CMD_ID

MOVE_RIGHT_CMD_ID

public static final int MOVE_RIGHT_CMD_ID

BIG_MOVE_RIGHT_CMD_ID

public static final int BIG_MOVE_RIGHT_CMD_ID

MOVE_UP_CMD_ID

public static final int MOVE_UP_CMD_ID

BIG_MOVE_UP_CMD_ID

public static final int BIG_MOVE_UP_CMD_ID

MOVE_DOWN_CMD_ID

public static final int MOVE_DOWN_CMD_ID

BIG_MOVE_DOWN_CMD_ID

public static final int BIG_MOVE_DOWN_CMD_ID

INCREASE_WIDTH_CMD_ID

public static final int INCREASE_WIDTH_CMD_ID

BIG_INCREASE_WIDTH_CMD_ID

public static final int BIG_INCREASE_WIDTH_CMD_ID

DECREASE_WIDTH_CMD_ID

public static final int DECREASE_WIDTH_CMD_ID

BIG_DECREASE_WIDTH_CMD_ID

public static final int BIG_DECREASE_WIDTH_CMD_ID

INCREASE_HEIGHT_CMD_ID

public static final int INCREASE_HEIGHT_CMD_ID

BIG_INCREASE_HEIGHT_CMD_ID

public static final int BIG_INCREASE_HEIGHT_CMD_ID

DECREASE_HEIGHT_CMD_ID

public static final int DECREASE_HEIGHT_CMD_ID

BIG_DECREASE_HEIGHT_CMD_ID

public static final int BIG_DECREASE_HEIGHT_CMD_ID

ZORDER_SEPARATOR

public static javax.swing.JSeparator ZORDER_SEPARATOR

ZORDER_MENU

public static javax.swing.JMenu ZORDER_MENU

MOVE_TO_FIRST_ITEM

public static javax.swing.JMenuItem MOVE_TO_FIRST_ITEM

MOVE_TO_LAST_ITEM

public static javax.swing.JMenuItem MOVE_TO_LAST_ITEM

MOVE_TO_FIRST_ACTION

protected static IdeAction MOVE_TO_FIRST_ACTION

MOVE_TO_LAST_ACTION

protected static IdeAction MOVE_TO_LAST_ACTION

MOVE_LEFT_ACTION

protected static IdeAction MOVE_LEFT_ACTION

BIG_MOVE_LEFT_ACTION

protected static IdeAction BIG_MOVE_LEFT_ACTION

MOVE_RIGHT_ACTION

protected static IdeAction MOVE_RIGHT_ACTION

BIG_MOVE_RIGHT_ACTION

protected static IdeAction BIG_MOVE_RIGHT_ACTION

MOVE_UP_ACTION

protected static IdeAction MOVE_UP_ACTION

BIG_MOVE_UP_ACTION

protected static IdeAction BIG_MOVE_UP_ACTION

MOVE_DOWN_ACTION

protected static IdeAction MOVE_DOWN_ACTION

BIG_MOVE_DOWN_ACTION

protected static IdeAction BIG_MOVE_DOWN_ACTION

INCREASE_WIDTH_ACTION

protected static IdeAction INCREASE_WIDTH_ACTION

BIG_INCREASE_WIDTH_ACTION

protected static IdeAction BIG_INCREASE_WIDTH_ACTION

DECREASE_WIDTH_ACTION

protected static IdeAction DECREASE_WIDTH_ACTION

BIG_DECREASE_WIDTH_ACTION

protected static IdeAction BIG_DECREASE_WIDTH_ACTION

INCREASE_HEIGHT_ACTION

protected static IdeAction INCREASE_HEIGHT_ACTION

BIG_INCREASE_HEIGHT_ACTION

protected static IdeAction BIG_INCREASE_HEIGHT_ACTION

DECREASE_HEIGHT_ACTION

protected static IdeAction DECREASE_HEIGHT_ACTION

BIG_DECREASE_HEIGHT_ACTION

protected static IdeAction BIG_DECREASE_HEIGHT_ACTION
Constructor Detail

BasicLayoutAssistant

public BasicLayoutAssistant()
Method Detail

getConstraintsType

public java.lang.String getConstraintsType()
Specified by:
getConstraintsType in interface LayoutAssistant
Returns:
The class name of the constraints type, else null.

getPropertyEditor

public java.beans.PropertyEditor getPropertyEditor()
Specified by:
getPropertyEditor in interface LayoutAssistant
Returns:
A JavaBean property editor that can edit the constraints.

getConstraintsEditor

public Explorer getConstraintsEditor(Context context)
Description copied from interface: LayoutAssistant
Get an Explorer implementation with which to modify the constraints settings, else null.

Specified by:
getConstraintsEditor in interface LayoutAssistant
Parameters:
context - the Context describing the selection to be edited.
Returns:
an Explorer implementation for editing the constraints of the selected objects.

prepareAddComponent

public void prepareAddComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                                oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode,
                                java.awt.Point location,
                                java.awt.Point offset,
                                java.awt.Dimension size)
Description copied from interface: LayoutAssistant
Perform any preparation on a child component that will be added into to a container. Typically this involves setting the node's constraint value. The new component has already been added to the container via container.add(component). After the constraint is set by this method and/or the add order of the components manipulated, it will be re-added with the supplied constraint.

Specified by:
prepareAddComponent in interface LayoutAssistant
Parameters:
node - the node being added.
toNode - ModelNode receiving the node.
location - the location in the parent.
offset - the mouse down position relative to the node.
size - the size of the component.

prepareMoveComponent

public void prepareMoveComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                                 oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode,
                                 java.awt.Point location,
                                 java.awt.Point offset)
Description copied from interface: LayoutAssistant
Child is being moved. Often implemented by calling prepareAddComponent

Specified by:
prepareMoveComponent in interface LayoutAssistant
Parameters:
node - the ModelNode that has moved.
toNode - ModelNode receiving the node.
location - the new location.
offset - the mouse down position relative to the node.

layoutChanged

public void layoutChanged(oracle.jdevimpl.uieditor.uicanvas.ModelNode container)
Description copied from interface: LayoutAssistant
Layout has been switched. Chance for the old Container to clean up its mess. For instance; when switching from null layout, the NullLayoutAssistant uses this call to remove the Bounds property settings for each component in the Container.

Specified by:
layoutChanged in interface LayoutAssistant

prepareChangeLayout

public void prepareChangeLayout(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent)
Description copied from interface: LayoutAssistant
Perform changes on children of a container to best handle a layout type change. Should set the contraints for each Component in the container. The layout of the container has already been switched when this call is made.

Specified by:
prepareChangeLayout in interface LayoutAssistant
Parameters:
parent - the ModelNode for the container that has changed.

prepareResizeComponent

public void prepareResizeComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                                   oracle.jdevimpl.uieditor.uicanvas.SelectNib nib)
Description copied from interface: LayoutAssistant
Perform a requested resize on a child. Calculate a new constraint value for the node

Specified by:
prepareResizeComponent in interface LayoutAssistant
Parameters:
node - the ModelNode that is being re-sized.
nib - the SelectNib that is being manipulated.

prepareResizeStatus

public java.lang.String prepareResizeStatus(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                                            java.awt.Point location,
                                            java.awt.Dimension size)
Description copied from interface: LayoutAssistant
Return a string for display during the resize process.

Specified by:
prepareResizeStatus in interface LayoutAssistant
Parameters:
node - the node being resized.
location - new Point relative to parent's upper left corner.
size - the size of the new node.
Returns:
A status message.

resizeAction

public java.lang.String resizeAction(java.awt.Point location,
                                     oracle.jdevimpl.uieditor.uicanvas.UICanvas canvas,
                                     oracle.jdevimpl.uieditor.uicanvas.SelectNib nib)
Description copied from interface: LayoutAssistant
Return a status message string that will be displayed while the user is dragging the nib. Called once for each mouse dragged event processed during a resize operation

Specified by:
resizeAction in interface LayoutAssistant
Parameters:
location - new position of nib.
Returns:
String to display as a status message.

prepareSelectComponent

public void prepareSelectComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                                   oracle.jdevimpl.uieditor.uicanvas.UICanvas canvas)
Description copied from interface: LayoutAssistant
An immedate child node has been selected. Display selection nibs as desired and raise child to view as necessary via prepareSelectDescendant such that the child will be visible.

Specified by:
prepareSelectComponent in interface LayoutAssistant
Parameters:
node - the selected node.
canvas - provides access back to the class that owns the nibs.
See Also:
LayoutAssistant.prepareSelectDescendant(oracle.jdevimpl.uieditor.uicanvas.ModelNode, oracle.jdevimpl.uieditor.uicanvas.ModelNode)

prepareSelectDescendant

public void prepareSelectDescendant(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent,
                                    oracle.jdevimpl.uieditor.uicanvas.ModelNode child)
Description copied from interface: LayoutAssistant
A descendant node has been selected. Recursively call up the hierarchy passing the parent as the child and its parent as the parent, then raise the original child within the original parent as necessary such that it will be visible for selection.

Specified by:
prepareSelectDescendant in interface LayoutAssistant
Parameters:
parent - the root of the selection path
child - the branch of the selection path stemming from parent

raiseChildToView

protected void raiseChildToView(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent,
                                oracle.jdevimpl.uieditor.uicanvas.ModelNode child)

prepareAddStatus

public java.lang.String prepareAddStatus(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                                         oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode,
                                         java.awt.Point location,
                                         java.awt.Dimension size)
Description copied from interface: LayoutAssistant
Return a string for display during the add process.

Specified by:
prepareAddStatus in interface LayoutAssistant
Parameters:
node - the node about to be added.
toNode - the parent that the node will be added to.
location - new Point relative to parent's upper left corner.
size - the size of the new node.
Returns:
A status message.

prepareMouseMoveStatus

public java.lang.String prepareMouseMoveStatus(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                                               oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode,
                                               java.awt.Point location)
Description copied from interface: LayoutAssistant
Return a string for display while the user is moving the mouse over a component. Typically used to identify the node and display the constraint for the component that would be selected if the user were to release the mouse.

Specified by:
prepareMouseMoveStatus in interface LayoutAssistant
Parameters:
node - the node that the mouse is over.
toNode - the parent of the node that the mouse is over.
location - Point relative to parent's upper left corner.
Returns:
A status message.

constrainMove

public java.lang.String constrainMove(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                                      oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode,
                                      java.awt.Point mousePos,
                                      java.awt.Point mouseOffset,
                                      java.awt.Point newPos,
                                      java.awt.Dimension newSize)
Description copied from interface: LayoutAssistant
Optionally modify size and position of an object being moved to conform to the constraints imposed by the LayoutManager being represented. This method may be called from the UIEditor during a move operation such that it may provide dynamic feedback to the user depicting the expected bounds of the object throughout the operation.

Specified by:
constrainMove in interface LayoutAssistant
Parameters:
node - node being manipulated.
toNode - parent of node being manipulated.
mousePos - current mouse position relative to toNode.
mouseOffset - mouse position relative to node at beginning of move.
newPos - output parameter for receiving constrained drop location.
newSize - output parameter for receiving constrained drop size.

constrainAdd

public void constrainAdd(oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode,
                         java.awt.Point mouseOrigin,
                         java.awt.Point mousePos,
                         java.awt.Point newPos,
                         java.awt.Dimension newSize)
Description copied from interface: LayoutAssistant
Optionally modify size and position of an object being added to conform to the constraints imposed by the LayoutManager being represented. This method may be called from the UIEditor during an add operation such that it may provide dynamic feedback to the user depicting the expected bounds of the object throughout the operation.

Specified by:
constrainAdd in interface LayoutAssistant
Parameters:
toNode - parent of node being added.

cleanupRemovedComponent

public void cleanupRemovedComponent(oracle.jdevimpl.uieditor.uicanvas.ModelNode child)
Description copied from interface: LayoutAssistant
A child of this node's container has been removed. This offers the LayoutAssistant the chance to clean up any data structures that it keeps for the container.

Specified by:
cleanupRemovedComponent in interface LayoutAssistant
Parameters:
child - The node that had a child removed.

getEffects

public javax.swing.JComponent getEffects(java.awt.Container c)
Description copied from interface: LayoutAssistant
Get a JComponent whose redering provides any special effects applicable during object creation, object resize or object move for the LayoutManager being represented. The effects object will be added to the UIEditor design surface between the glass paen and the content pane such that the effects will overlap the content. An example might be a simple transparent JPanel whose paint method renders equally spaced grid points in support of an XYLayout or Null layout.

Specified by:
getEffects in interface LayoutAssistant
Parameters:
c - Container upon which an object is being added, resized or moved.

usesReverseZOrder

public boolean usesReverseZOrder()
Description copied from interface: LayoutAssistant
Determine whether or not z-order is reversed. Normally, z-order is based on addition order in that the most recently added child is at the top of the z-order (i.e. would obscure any lower z-order sibling with whom it's bounds overlapped). However, some layouts reverse this in that the most recently added child is at the bottom of the z-order (i.e. would be obscured by any higher z-order siblings with whom it's bounds overlapped).

Specified by:
usesReverseZOrder in interface LayoutAssistant

getContextMenuItems

public javax.swing.JComponent[] getContextMenuItems(Context context)
Description copied from interface: LayoutAssistant
Get an array of JComponent for population onto a ContextMenu. Implementations are expected to return a non null array which may contain zero or more instances of JComponent. Implementations are expected to handle all associated listener registration on those items.

Specified by:
getContextMenuItems in interface LayoutAssistant
Parameters:
context - the current context.
Returns:
An array of JComponent that will be added to the ContextMenu on behalf of this LayoutAssistant.
See Also:
ContextMenu

update

public boolean update(IdeAction action,
                      Context context)
Description copied from interface: LayoutAssistant
Update the enabled state of the given action within the given context.

Specified by:
update in interface LayoutAssistant
Parameters:
action - action whose availability is to be updated.
context - the current context.
Returns:
true if the action was recognized and updated.

handleEvent

public boolean handleEvent(IdeAction action,
                           Context context)
Description copied from interface: LayoutAssistant
Respond to the given user action within the given context.

Specified by:
handleEvent in interface LayoutAssistant
Parameters:
action - user action to be responded to.
context - context in which action was initiated.
Returns:
true if the action was recognized and handled.

getToolbarPrefix

public java.lang.String getToolbarPrefix()
Description copied from interface: LayoutAssistant
Get the prefix to use in combination with the TOOLBAR_ITEM_COUNT and TOOLBAR_ITEM suffixes in order to fetch Toolbar related properties for this LayoutAssistant from the IDE settings.

Specified by:
getToolbarPrefix in interface LayoutAssistant

getSelectedSiblings

protected static final java.util.ArrayList getSelectedSiblings(Context context)

move

protected void move(int cmd,
                    Context context)

changeSize

protected void changeSize(int cmd,
                          Context context)

removeBoundsSetting

protected static final void removeBoundsSetting(oracle.jdevimpl.uieditor.uicanvas.ModelNode node)

calcBestZ

protected int calcBestZ(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                        oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode,
                        java.awt.Point location,
                        java.awt.Dimension size,
                        java.awt.Rectangle zBounds)

changeZ

protected boolean changeZ(oracle.jdevimpl.uieditor.uicanvas.ModelNode node,
                          oracle.jdevimpl.uieditor.uicanvas.ModelNode toNode,
                          int z)
move a node within its parent to a specific zorder. return true if an actual move was made called by prepareAddComponent with z being determined by calcBestZ


getKey

protected java.lang.Object getKey(oracle.jdevimpl.uieditor.uicanvas.ModelNode node)

lessThan

protected boolean lessThan(java.lang.Object p,
                           java.lang.Object q)

sort

protected void sort(java.util.ArrayList array,
                    java.util.ArrayList key)

sortedNodes

protected java.util.ArrayList sortedNodes(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent)

Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.