oracle.jdevimpl.uieditor.assistant
Class FlowLayoutAssistant
java.lang.Object
|
+--oracle.jdevimpl.uieditor.assistant.BasicLayoutAssistant
|
+--oracle.jdevimpl.uieditor.assistant.FlowLayoutAssistant
- All Implemented Interfaces:
- java.util.Comparator, LayoutAssistant
- Direct Known Subclasses:
- VerticalFlowLayoutAssistant
- public class FlowLayoutAssistant
- extends BasicLayoutAssistant
- implements java.util.Comparator
Fields inherited from class oracle.jdevimpl.uieditor.assistant.BasicLayoutAssistant |
BIG_DECREASE_HEIGHT_ACTION, BIG_DECREASE_HEIGHT_CMD_ID, BIG_DECREASE_WIDTH_ACTION, BIG_DECREASE_WIDTH_CMD_ID, BIG_INCREASE_HEIGHT_ACTION, BIG_INCREASE_HEIGHT_CMD_ID, BIG_INCREASE_WIDTH_ACTION, BIG_INCREASE_WIDTH_CMD_ID, BIG_MOVE_DOWN_ACTION, BIG_MOVE_DOWN_CMD_ID, BIG_MOVE_LEFT_ACTION, BIG_MOVE_LEFT_CMD_ID, BIG_MOVE_RIGHT_ACTION, BIG_MOVE_RIGHT_CMD_ID, BIG_MOVE_UP_ACTION, BIG_MOVE_UP_CMD_ID, DECREASE_HEIGHT_ACTION, DECREASE_HEIGHT_CMD_ID, DECREASE_WIDTH_ACTION, DECREASE_WIDTH_CMD_ID, INCREASE_HEIGHT_ACTION, INCREASE_HEIGHT_CMD_ID, INCREASE_WIDTH_ACTION, INCREASE_WIDTH_CMD_ID, MOVE_DOWN_ACTION, MOVE_DOWN_CMD_ID, MOVE_LEFT_ACTION, MOVE_LEFT_CMD_ID, MOVE_RIGHT_ACTION, MOVE_RIGHT_CMD_ID, MOVE_TO_FIRST_ACTION, MOVE_TO_FIRST_CMD_ID, MOVE_TO_FIRST_ITEM, MOVE_TO_LAST_ACTION, MOVE_TO_LAST_CMD_ID, MOVE_TO_LAST_ITEM, MOVE_UP_ACTION, MOVE_UP_CMD_ID, ZORDER_MENU, ZORDER_SEPARATOR |
Method Summary |
int |
compare(java.lang.Object obj1,
java.lang.Object obj2)
|
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. |
void |
prepareChangeLayout(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent)
sort components by y position; starting from the top, add to group until a
component is found that overlaps in the x direction with any in the group
sort the group by x position; repeat for next group
change the add order to match |
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. |
Methods inherited from class oracle.jdevimpl.uieditor.assistant.BasicLayoutAssistant |
calcBestZ, changeSize, changeZ, cleanupRemovedComponent, constrainAdd, getConstraintsEditor, getConstraintsType, getContextMenuItems, getEffects, getKey, getPropertyEditor, getSelectedSiblings, getToolbarPrefix, handleEvent, layoutChanged, lessThan, move, prepareAddComponent, prepareAddStatus, prepareMouseMoveStatus, prepareMoveComponent, prepareResizeComponent, prepareSelectComponent, prepareSelectDescendant, raiseChildToView, removeBoundsSetting, resizeAction, sort, sortedNodes, update, usesReverseZOrder |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
FlowLayoutAssistant
public FlowLayoutAssistant()
prepareChangeLayout
public final void prepareChangeLayout(oracle.jdevimpl.uieditor.uicanvas.ModelNode parent)
- sort components by y position; starting from the top, add to group until a
component is found that overlaps in the x direction with any in the group
sort the group by x position; repeat for next group
change the add order to match
- Specified by:
prepareChangeLayout
in interface LayoutAssistant
- Overrides:
prepareChangeLayout
in class BasicLayoutAssistant
- Parameters:
parent
- the ModelNode for the container that has changed.
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
- Overrides:
constrainMove
in class BasicLayoutAssistant
- 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.
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
- Overrides:
prepareResizeStatus
in class BasicLayoutAssistant
- 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.
compare
public final int compare(java.lang.Object obj1,
java.lang.Object obj2)
- Specified by:
compare
in interface java.util.Comparator
Copyright ©1997, 2003, Oracle. All rights reserved.