org.eclipse.gef.EditPolicy Java Examples
The following examples show how to use
org.eclipse.gef.EditPolicy.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StartEventLabelEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy() { @Override protected void eraseDirectEditFeedback(DirectEditRequest request) { super.eraseDirectEditFeedback(request); getRoot().refresh(); } }); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ProcessTextSelectionEditPolicy()); }
Example #2
Source File: CustomEventLabelEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#createDefaultEditPolicies() */ @Override protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy( EditPolicy.PRIMARY_DRAG_ROLE, new CustomNonResizableLabelEditPolicy()); }
Example #3
Source File: EndMessageEventLabel2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy() { @Override protected void eraseDirectEditFeedback(DirectEditRequest request) { super.eraseDirectEditFeedback(request); getRoot().refresh(); } }); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ProcessTextSelectionEditPolicy()); }
Example #4
Source File: SubProcessEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ public EditPolicy getPrimaryDragEditPolicy() { EditPolicy result = super.getPrimaryDragEditPolicy(); if (result instanceof ResizableEditPolicy) { ResizableEditPolicy ep = (ResizableEditPolicy) result; ep.setResizeDirections(PositionConstants.NONE); } return result; }
Example #5
Source File: StartErrorEventLabelEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy() { @Override protected void eraseDirectEditFeedback(DirectEditRequest request) { super.eraseDirectEditFeedback(request); getRoot().refresh(); } }); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ProcessTextSelectionEditPolicy()); }
Example #6
Source File: IntermediateCatchSignalEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ public EditPolicy getPrimaryDragEditPolicy() { EditPolicy result = super.getPrimaryDragEditPolicy(); if (result instanceof ResizableEditPolicy) { ResizableEditPolicy ep = (ResizableEditPolicy) result; ep.setResizeDirections(PositionConstants.NONE); } return result; }
Example #7
Source File: ServiceTaskLabel2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ProcessTextSelectionEditPolicy()); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy()); }
Example #8
Source File: FirstLevelHandleDataItemEditPart.java From birt with Eclipse Public License 1.0 | 5 votes |
protected void createEditPolicies( ) { installEditPolicy( EditPolicy.COMPONENT_ROLE, new ReportComponentEditPolicy( ) { protected org.eclipse.gef.commands.Command createDeleteCommand( GroupRequest deleteRequest ) { //Object model = ((EditPart) parts.get( i ) ).getModel( ) ; Object parent = this.getHost( ).getParent( ).getModel( ) ; if (parent instanceof CrosstabCellAdapter) { if (ICrosstabCellAdapterFactory.CELL_FIRST_LEVEL_HANDLE.equals( ((CrosstabCellAdapter)parent).getPositionType( )) ||ICrosstabCellAdapterFactory.CELL_MEASURE.equals( ((CrosstabCellAdapter)parent).getPositionType( )) ) { return new Command(){}; } } DeleteCommand command = new DeleteCommand( this.getHost( ).getModel( ) ); return command; } }); installEditPolicy( EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy( ) ); }
Example #9
Source File: IntermediateThrowSignalEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new IntermediateThrowSignalEventItemSemanticEditPolicy()); installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); }
Example #10
Source File: BoundaryTimerEventLabelEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy() { @Override protected void eraseDirectEditFeedback(DirectEditRequest request) { super.eraseDirectEditFeedback(request); getRoot().refresh(); } }); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ProcessTextSelectionEditPolicy()); }
Example #11
Source File: BoundarySignalEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy()); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new BoundarySignalEvent2ItemSemanticEditPolicy()); installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); }
Example #12
Source File: ExtendedEditPart.java From birt with Eclipse Public License 1.0 | 5 votes |
@Override public EditPolicy getResizePolice( EditPolicy parentPolice ) { if ( canResize( ) ) { return super.getResizePolice( parentPolice ); } else { return new ReportElementNonResizablePolicy( ); } }
Example #13
Source File: StartEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new StartEventItemSemanticEditPolicy()); installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); }
Example #14
Source File: IntermediateCatchTimerEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ public EditPolicy getPrimaryDragEditPolicy() { EditPolicy result = super.getPrimaryDragEditPolicy(); if (result instanceof ResizableEditPolicy) { ResizableEditPolicy ep = (ResizableEditPolicy) result; ep.setResizeDirections(PositionConstants.NONE); } return result; }
Example #15
Source File: SendTask2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ public EditPolicy getPrimaryDragEditPolicy() { EditPolicy result = super.getPrimaryDragEditPolicy(); if (result instanceof ResizableEditPolicy) { ResizableEditPolicy ep = (ResizableEditPolicy) result; ep.setResizeDirections(PositionConstants.NONE); } return result; }
Example #16
Source File: ServiceTaskLabelEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ProcessTextSelectionEditPolicy()); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy()); }
Example #17
Source File: OpinionatedTaskNameEditPart.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new CrossflowTextSelectionEditPolicy()); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy()); }
Example #18
Source File: MultipleEditPart.java From birt with Eclipse Public License 1.0 | 5 votes |
public EditPolicy getResizePolice( EditPolicy parentPolice ) { ReportElementResizablePolicy policy = new MultipleResizePolicy( ); policy.setResizeDirections( PositionConstants.SOUTH | PositionConstants.EAST | PositionConstants.SOUTH_EAST ); return policy; //return super.getResizePolice( parentPolice ); }
Example #19
Source File: CatchLinkEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ public EditPolicy getPrimaryDragEditPolicy() { EditPolicy result = super.getPrimaryDragEditPolicy(); if (result instanceof ResizableEditPolicy) { ResizableEditPolicy ep = (ResizableEditPolicy) result; ep.setResizeDirections(PositionConstants.NONE); } return result; }
Example #20
Source File: WrappingLabel2EditPart.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new CrossflowTextSelectionEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultLinkLabelDragPolicy()); }
Example #21
Source File: InclusiveGateway2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ public EditPolicy getPrimaryDragEditPolicy() { EditPolicy result = super.getPrimaryDragEditPolicy(); if (result instanceof ResizableEditPolicy) { ResizableEditPolicy ep = (ResizableEditPolicy) result; ep.setResizeDirections(PositionConstants.NONE); } return result; }
Example #22
Source File: EndErrorEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ public EditPolicy getPrimaryDragEditPolicy() { EditPolicy result = super.getPrimaryDragEditPolicy(); if (result instanceof ResizableEditPolicy) { ResizableEditPolicy ep = (ResizableEditPolicy) result; ep.setResizeDirections(PositionConstants.NONE); } return result; }
Example #23
Source File: SendTask2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SendTask2ItemSemanticEditPolicy()); installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); }
Example #24
Source File: QueueNameEditPart.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new CrossflowTextSelectionEditPolicy()); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy()); }
Example #25
Source File: SendTaskLabel2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ProcessTextSelectionEditPolicy()); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy()); }
Example #26
Source File: ParameterNameValueEditPart.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new CrossflowTextSelectionEditPolicy()); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy()); }
Example #27
Source File: EndSignalEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EndSignalEventItemSemanticEditPolicy()); installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); }
Example #28
Source File: TopicEditPart.java From scava with Eclipse Public License 2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new TopicItemSemanticEditPolicy()); installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); }
Example #29
Source File: IntermediateCatchTimerEventLabel2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy() { @Override protected void eraseDirectEditFeedback(DirectEditRequest request) { super.eraseDirectEditFeedback(request); getRoot().refresh(); } }); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ProcessTextSelectionEditPolicy()); }
Example #30
Source File: EventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EventItemSemanticEditPolicy()); installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy()); // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE); }