use of org.eclipse.draw2d.geometry.Rectangle in project cubrid-manager by CUBRID.
the class BrokerDBListFigure method fillShape.
/**
* fill shapge
*
* @param graphics Graphics
*/
protected void fillShape(Graphics graphics) {
super.fillShape(graphics);
Rectangle r = getBounds();
graphics.drawLine(r.x, r.y + TITLE_HEIGHT, r.x + r.width, r.y + TITLE_HEIGHT);
}
use of org.eclipse.draw2d.geometry.Rectangle in project cubrid-manager by CUBRID.
the class ClientFigure method fillShape.
/**
* fill shapge
*
* @param graphics Graphics
*/
protected void fillShape(Graphics graphics) {
super.fillShape(graphics);
Rectangle r = getBounds();
graphics.drawLine(r.x, r.y + TITLE_HEIGHT, r.x + r.width, r.y + TITLE_HEIGHT);
}
use of org.eclipse.draw2d.geometry.Rectangle in project cubrid-manager by CUBRID.
the class DatabaseNodeAnchor method getLocation.
/**
* Return the point to connect.
*
* @param reference source point location
* @return target point.
*/
public Point getLocation(Point reference) {
Point result = super.getLocation(reference);
Rectangle rect = this.getOwner().getBounds();
if ((result.x - reference.x > rect.width / 2) && (Math.abs(rect.y - reference.y) > rect.height / 2)) {
result.y = rect.y + rect.height / 2;
result.x = rect.x;
} else if ((reference.x - result.x > rect.width / 2) && (Math.abs(rect.y - reference.y) > rect.height / 2)) {
result.y = rect.y + rect.height / 2;
result.x = rect.x + rect.width;
}
return result;
}
use of org.eclipse.draw2d.geometry.Rectangle in project cubrid-manager by CUBRID.
the class HostMonitorFigure method fillShape.
/**
* fill shapge
*
* @param graphics Graphics
*/
protected void fillShape(Graphics graphics) {
super.fillShape(graphics);
Rectangle r = getBounds();
graphics.drawLine(r.x + 1, r.y + TITLE_HEIGHT, r.x + r.width - 1, r.y + TITLE_HEIGHT);
}
use of org.eclipse.draw2d.geometry.Rectangle in project cubrid-manager by CUBRID.
the class ContainerNodeLayoutEditPolicy method getCreateCommand.
/**
* @see org.eclipse.gef.editpolicies.LayoutEditPolicy#getCreateCommand(org.eclipse.gef.requests.CreateRequest)
* @param request the CreateRequest
* @return a Command to perform a create
*
*/
protected Command getCreateCommand(CreateRequest request) {
if (!(request.getNewObject() instanceof LeafNode)) {
return null;
}
CreateLeafNodeCommand cmd = new CreateLeafNodeCommand();
cmd.setContainerNode((ContainerNode) getHost().getModel());
cmd.setLeafNode((LeafNode) request.getNewObject());
Rectangle constraint = (Rectangle) getConstraintFor(request);
cmd.setLocation(constraint.getLocation());
return cmd;
}
Aggregations