Eclipse GEF
2.1

org.eclipse.gef.editpolicies
Class NonResizableEditPolicy

java.lang.Object
  |
  +--org.eclipse.gef.editpolicies.AbstractEditPolicy
        |
        +--org.eclipse.gef.editpolicies.GraphicalEditPolicy
              |
              +--org.eclipse.gef.editpolicies.SelectionEditPolicy
                    |
                    +--org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy
                          |
                          +--org.eclipse.gef.editpolicies.NonResizableEditPolicy
All Implemented Interfaces:
EditPolicy, IAdaptable, RequestConstants
Direct Known Subclasses:
ResizableEditPolicy

public class NonResizableEditPolicy
extends SelectionHandlesEditPolicy


Field Summary
 
Fields inherited from class org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy
handles
 
Fields inherited from interface org.eclipse.gef.EditPolicy
COMPONENT_ROLE, CONNECTION_BENDPOINTS_ROLE, CONNECTION_ENDPOINTS_ROLE, CONNECTION_ROLE, CONTAINER_ROLE, DIRECT_EDIT_ROLE, GRAPHICAL_NODE_ROLE, LAYOUT_ROLE, NODE_ROLE, PRIMARY_DRAG_ROLE, SELECTION_FEEDBACK_ROLE, TREE_CONTAINER_ROLE
 
Fields inherited from interface org.eclipse.gef.RequestConstants
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER
 
Constructor Summary
NonResizableEditPolicy()
           
 
Method Summary
protected  org.eclipse.draw2d.IFigure createDragSourceFeedbackFigure()
           
protected  List createSelectionHandles()
          Subclasses must implement to provide the list of handles.
 void deactivate()
          Extends deactivate to unhook the seleciton listener and to remove the visual changes for representing selection/focus.
protected  void eraseChangeBoundsFeedback(ChangeBoundsRequest request)
          Erase feedback indicating that the receiver object is being dragged.
 void eraseSourceFeedback(Request request)
          Erase feedback indicating that the receiver object is being dragged.
protected  Command getAlignCommand(AlignmentRequest request)
           
 Command getCommand(Request request)
          Returns null by default.
protected  org.eclipse.draw2d.IFigure getDragSourceFeedbackFigure()
          Return the Figure to be used to paint the drag source feedback.
protected  Command getMoveCommand(ChangeBoundsRequest request)
           
protected  Command getOrphanCommand(Request req)
           
protected  void hideFocus()
          Override to hide focus
protected  void showChangeBoundsFeedback(ChangeBoundsRequest request)
          Display feedback to indicate that the receiver object is being dragged.
protected  void showFocus()
          Override to show focus.
 void showSourceFeedback(Request request)
          Does nothing by default.
 boolean understandsRequest(Request request)
          Returns false by default.
 
Methods inherited from class org.eclipse.gef.editpolicies.SelectionHandlesEditPolicy
addSelectionHandles, getAdapter, hideSelection, removeSelectionHandles, showSelection
 
Methods inherited from class org.eclipse.gef.editpolicies.SelectionEditPolicy
activate, addSelectionListener, getTargetEditPart, removeSelectionListener, setFocus, setSelectedState, showPrimarySelection
 
Methods inherited from class org.eclipse.gef.editpolicies.GraphicalEditPolicy
addFeedback, getHostFigure, getLayer, removeFeedback
 
Methods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicy
debugFeedback, eraseTargetFeedback, getHost, setHost, showTargetFeedback, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonResizableEditPolicy

public NonResizableEditPolicy()
Method Detail

createDragSourceFeedbackFigure

protected org.eclipse.draw2d.IFigure createDragSourceFeedbackFigure()

createSelectionHandles

protected List createSelectionHandles()
Description copied from class: SelectionHandlesEditPolicy
Subclasses must implement to provide the list of handles.

Specified by:
createSelectionHandles in class SelectionHandlesEditPolicy
Returns:
List

deactivate

public void deactivate()
Description copied from class: SelectionEditPolicy
Extends deactivate to unhook the seleciton listener and to remove the visual changes for representing selection/focus.

Specified by:
deactivate in interface EditPolicy
Overrides:
deactivate in class SelectionEditPolicy
See Also:
EditPolicy.deactivate()

eraseChangeBoundsFeedback

protected void eraseChangeBoundsFeedback(ChangeBoundsRequest request)
Erase feedback indicating that the receiver object is being dragged. This method is called when a drag is completed or cancelled on the receiver object.


eraseSourceFeedback

public void eraseSourceFeedback(Request request)
Erase feedback indicating that the receiver object is being dragged. This method is called when a drag is completed or cancelled on the receiver object.

Specified by:
eraseSourceFeedback in interface EditPolicy
Overrides:
eraseSourceFeedback in class AbstractEditPolicy
See Also:
EditPolicy.eraseSourceFeedback(Request)

getCommand

public Command getCommand(Request request)
Description copied from class: AbstractEditPolicy
Returns null by default. null is used to indicate that the EditPolicy does not contribute to the specified Request.

Specified by:
getCommand in interface EditPolicy
Overrides:
getCommand in class AbstractEditPolicy
See Also:
EditPolicy.getCommand(Request)

getDragSourceFeedbackFigure

protected org.eclipse.draw2d.IFigure getDragSourceFeedbackFigure()
Return the Figure to be used to paint the drag source feedback.


getAlignCommand

protected Command getAlignCommand(AlignmentRequest request)

getMoveCommand

protected Command getMoveCommand(ChangeBoundsRequest request)

getOrphanCommand

protected Command getOrphanCommand(Request req)

hideFocus

protected void hideFocus()
Description copied from class: SelectionEditPolicy
Override to hide focus

Overrides:
hideFocus in class SelectionEditPolicy
See Also:
SelectionEditPolicy.showFocus()

showChangeBoundsFeedback

protected void showChangeBoundsFeedback(ChangeBoundsRequest request)
Display feedback to indicate that the receiver object is being dragged. The default feedback is a rectangle the same size as the figure.


showFocus

protected void showFocus()
Description copied from class: SelectionEditPolicy
Override to show focus.

Overrides:
showFocus in class SelectionEditPolicy
See Also:
SelectionEditPolicy.hideFocus()

showSourceFeedback

public void showSourceFeedback(Request request)
Description copied from class: AbstractEditPolicy
Does nothing by default.

Specified by:
showSourceFeedback in interface EditPolicy
Overrides:
showSourceFeedback in class AbstractEditPolicy
See Also:
EditPolicy.showSourceFeedback(Request)

understandsRequest

public boolean understandsRequest(Request request)
Description copied from class: AbstractEditPolicy
Returns false by default.

Specified by:
understandsRequest in interface EditPolicy
Overrides:
understandsRequest in class AbstractEditPolicy
See Also:
EditPolicy.understandsRequest(Request)

Eclipse GEF
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.