Java Code Examples for org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants#REQ_RESIZE

The following examples show how to use org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants#REQ_RESIZE . 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: UpdatePoolSizeCommand.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
private void decreaseHeight() {
	ChangeBoundsRequest setRequest1 = new ChangeBoundsRequest(RequestConstants.REQ_RESIZE) ; 
	List<EditPart> epToMove = new ArrayList<EditPart>();
	epToMove.add(gep);
	setRequest1.setEditParts(epToMove);
	setRequest1.setResizeDirection(PositionConstants.NORTH);
	setRequest1.setSizeDelta(new Dimension(0,-150));
	gep.getDiagramEditDomain().getDiagramCommandStack().execute(gep.getCommand(setRequest1));
	for(Object o : gep.getChildren()){
		if(o instanceof CustomPoolCompartmentEditPart){
			for(CustomLaneEditPart lane : ((CustomPoolCompartmentEditPart)o).getPoolLanes()){
				lane.refresh();
			}
		}
		
	}
	
}
 
Example 2
Source File: UpdatePoolSizeCommand.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
private void increaseHeight() {
	ChangeBoundsRequest setRequest1 = new ChangeBoundsRequest(RequestConstants.REQ_RESIZE) ; 
	List<EditPart> epToMove = new ArrayList<EditPart>();
	epToMove.add(gep);
	setRequest1.setEditParts(epToMove);
	setRequest1.setResizeDirection(PositionConstants.SOUTH);
	setRequest1.setSizeDelta(new Dimension(0,150));
	gep.getDiagramEditDomain().getDiagramCommandStack().execute(gep.getCommand(setRequest1));
	for(Object o : gep.getChildren()){
		if(o instanceof CustomPoolCompartmentEditPart){
			for(CustomLaneEditPart lane : ((CustomPoolCompartmentEditPart)o).getPoolLanes()){
				lane.refresh();
			}
		}
		
	}
}
 
Example 3
Source File: UpdatePoolSizeCommand.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
private void increaseWidth() {
	ChangeBoundsRequest setRequest1 = new ChangeBoundsRequest(RequestConstants.REQ_RESIZE) ; 
	List<EditPart> epToMove = new ArrayList<EditPart>();
	epToMove.add(gep);
	for(Object o : gep.getChildren()){
		if(o instanceof CustomPoolCompartmentEditPart){
			for(CustomLaneEditPart lane : ((CustomPoolCompartmentEditPart)o).getPoolLanes()){
				epToMove.add(lane);
			}
		}
		
	}
	setRequest1.setEditParts(epToMove);
	setRequest1.setResizeDirection(PositionConstants.EAST);
	setRequest1.setSizeDelta(new Dimension(150,0));
	gep.getDiagramEditDomain().getDiagramCommandStack().execute(gep.getCommand(setRequest1));
}