use of org.whole.lang.ui.editpolicies.WholeContainerEditPolicy in project whole by wholeplatform.
the class AbstractConnectedFreeformRootPart method createEditPolicies.
// public IFigure getContentPane() {
// return pane;
// }
protected void createEditPolicies() {
installEditPolicy(EditPolicy.CONTAINER_ROLE, new WholeContainerEditPolicy(getCommandFactory()));
installEditPolicy(EditPolicy.COMPONENT_ROLE, new WholeComponentEditPolicy(getCommandFactory()));
installEditPolicy(EditPolicy.LAYOUT_ROLE, new WholeFreeformLayoutEditPolicy((XYLayout) getContentPane().getLayoutManager(), getCommandFactory()) {
protected DnDOverCompositeRequest createDnDOverCompositeRequest(IEntity entity) {
return new DnDOverCompositeRequest(PartRequest.MOVE_ADD_CHILD, (IEntityPart) getHost(), entity, null) {
@Override
public IEntity getModelEntity() {
// FIXME workaround to get nodes composite
IEntity modelEntity = super.getModelEntity().wGet(0);
return modelEntity;
}
};
}
});
installEditPolicy("Snap Feedback", new SnapFeedbackPolicy());
}
use of org.whole.lang.ui.editpolicies.WholeContainerEditPolicy in project whole by wholeplatform.
the class AbstractPart method createEditPolicies.
protected void createEditPolicies() {
installEditPolicy(EditPolicy.CONTAINER_ROLE, new WholeContainerEditPolicy(getCommandFactory()));
installEditPolicy(EditPolicy.COMPONENT_ROLE, new WholeComponentEditPolicy(getCommandFactory()));
installEditPolicy(EditPolicy.LAYOUT_ROLE, new WholeLayoutEditPolicy(getCommandFactory()));
// installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new WholeHilightEditPolicy());
}
use of org.whole.lang.ui.editpolicies.WholeContainerEditPolicy in project whole by wholeplatform.
the class FreeformRootPart method createEditPolicies.
protected void createEditPolicies() {
installEditPolicy(EditPolicy.CONTAINER_ROLE, new WholeContainerEditPolicy(getCommandFactory()));
installEditPolicy(EditPolicy.COMPONENT_ROLE, new WholeComponentEditPolicy(getCommandFactory()));
installEditPolicy(EditPolicy.LAYOUT_ROLE, new WholeFreeformLayoutEditPolicy((XYLayout) getContentPane().getLayoutManager(), getCommandFactory()) {
@Override
protected EditPolicy createChildEditPolicy(EditPart child) {
return new WholeNonResizableEditPolicy();
}
@Override
protected Command getCreateCommand(CreateRequest request) {
// FIXME
return super.getCreateCommand(request);
}
});
installEditPolicy("Snap Feedback", new SnapFeedbackPolicy());
}
Aggregations