Search in sources :

Example 1 with LabelDirectEditPolicy

use of org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy in project tdi-studio-se by Talend.

the class ListBusinessItemNameEditPart method createDefaultEditPolicies.

/**
     * @generated
     */
protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {

        protected List createSelectionHandles() {
            List handles = new ArrayList();
            NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
            return handles;
        }

        public Command getCommand(Request request) {
            return null;
        }

        public boolean understandsRequest(Request request) {
            return false;
        }
    });
}
Also used : LabelDirectEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy) Command(org.eclipse.gef.commands.Command) ArrayList(java.util.ArrayList) Request(org.eclipse.gef.Request) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) List(java.util.List) ArrayList(java.util.ArrayList) NonResizableEditPolicy(org.eclipse.gef.editpolicies.NonResizableEditPolicy) GraphicalEditPart(org.eclipse.gef.GraphicalEditPart) IGraphicalEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)

Example 2 with LabelDirectEditPolicy

use of org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy in project tdi-studio-se by Talend.

the class InputBusinessItemNameEditPart method createDefaultEditPolicies.

/**
     * @generated
     */
protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {

        protected List createSelectionHandles() {
            List handles = new ArrayList();
            NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
            return handles;
        }

        public Command getCommand(Request request) {
            return null;
        }

        public boolean understandsRequest(Request request) {
            return false;
        }
    });
}
Also used : LabelDirectEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy) Command(org.eclipse.gef.commands.Command) ArrayList(java.util.ArrayList) Request(org.eclipse.gef.Request) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) List(java.util.List) ArrayList(java.util.ArrayList) NonResizableEditPolicy(org.eclipse.gef.editpolicies.NonResizableEditPolicy) GraphicalEditPart(org.eclipse.gef.GraphicalEditPart) IGraphicalEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)

Example 3 with LabelDirectEditPolicy

use of org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy in project tdi-studio-se by Talend.

the class DirectionalBusinessItemRelationshipNameEditPart method createDefaultEditPolicies.

/**
     * @generated
     */
protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
}
Also used : LabelDirectEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy)

Example 4 with LabelDirectEditPolicy

use of org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy in project tdi-studio-se by Talend.

the class ActionBusinessItemNameEditPart method createDefaultEditPolicies.

/**
     * @generated
     */
protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {

        protected List createSelectionHandles() {
            List handles = new ArrayList();
            NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
            return handles;
        }

        public Command getCommand(Request request) {
            return null;
        }

        public boolean understandsRequest(Request request) {
            return false;
        }
    });
}
Also used : LabelDirectEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy) Command(org.eclipse.gef.commands.Command) ArrayList(java.util.ArrayList) Request(org.eclipse.gef.Request) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) List(java.util.List) ArrayList(java.util.ArrayList) NonResizableEditPolicy(org.eclipse.gef.editpolicies.NonResizableEditPolicy) GraphicalEditPart(org.eclipse.gef.GraphicalEditPart) IGraphicalEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)

Example 5 with LabelDirectEditPolicy

use of org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy in project tdi-studio-se by Talend.

the class DatabaseBusinessItemNameEditPart method createDefaultEditPolicies.

/**
     * @generated
     */
protected void createDefaultEditPolicies() {
    super.createDefaultEditPolicies();
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
    installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicy() {

        protected List createSelectionHandles() {
            List handles = new ArrayList();
            NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), handles);
            return handles;
        }

        public Command getCommand(Request request) {
            return null;
        }

        public boolean understandsRequest(Request request) {
            return false;
        }
    });
}
Also used : LabelDirectEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy) Command(org.eclipse.gef.commands.Command) ArrayList(java.util.ArrayList) Request(org.eclipse.gef.Request) DirectEditRequest(org.eclipse.gef.requests.DirectEditRequest) List(java.util.List) ArrayList(java.util.ArrayList) NonResizableEditPolicy(org.eclipse.gef.editpolicies.NonResizableEditPolicy) GraphicalEditPart(org.eclipse.gef.GraphicalEditPart) IGraphicalEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)

Aggregations

LabelDirectEditPolicy (org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy)16 ArrayList (java.util.ArrayList)11 List (java.util.List)11 GraphicalEditPart (org.eclipse.gef.GraphicalEditPart)11 Request (org.eclipse.gef.Request)11 Command (org.eclipse.gef.commands.Command)11 NonResizableEditPolicy (org.eclipse.gef.editpolicies.NonResizableEditPolicy)11 DirectEditRequest (org.eclipse.gef.requests.DirectEditRequest)11 IGraphicalEditPart (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)11