use of org.yakindu.sct.ui.editor.policies.PreferredSizeHandlerEditPolicy in project statecharts by Yakindu.
the class RegionEditPart method createDefaultEditPolicies.
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE);
installEditPolicy(EditPolicy.LAYOUT_ROLE, new ConstrainedToolbarLayoutEditPolicy() {
@Override
protected Command getAutoSizeCommand(Request request) {
return UnexecutableCommand.INSTANCE;
}
});
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PreferredSizeHandlerEditPolicy());
}
use of org.yakindu.sct.ui.editor.policies.PreferredSizeHandlerEditPolicy in project statecharts by Yakindu.
the class StatechartTextEditPart method createDefaultEditPolicies.
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
// Disables deletion of the text compartment view if additional elements
// are selected too
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new SemanticEditPolicy() {
@Override
protected boolean shouldProceed(DestroyRequest destroyRequest) {
return false;
}
});
// Disables deletion of the text compartment view via keyboard
installEditPolicy(EditPolicy.COMPONENT_ROLE, new RootComponentEditPolicy());
removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE);
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PreferredSizeHandlerEditPolicy() {
@Override
protected IFigure getPreferredSizeFigure() {
return getChildBySemanticHint(SemanticHints.STATECHART_NAME).getFigure();
}
});
}
use of org.yakindu.sct.ui.editor.policies.PreferredSizeHandlerEditPolicy in project statecharts by Yakindu.
the class StateEditPart method createDefaultEditPolicies.
@Override
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
removeEditPolicy(EditPolicyRoles.CREATION_ROLE);
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new PreferredSizeHandlerEditPolicy());
installEditPolicy(EnlargeContainerEditPolicy.ROLE, new EnlargeContainerEditPolicy());
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new FeedbackGraphicalNodeEditPolicy());
}
Aggregations