Search in sources :

Example 1 with AbstractMonitorFigure

use of com.cubrid.cubridmanager.ui.mondashboard.editor.figure.AbstractMonitorFigure in project cubrid-manager by CUBRID.

the class HANodePart method refreshVisuals.

/**
	 * Refreshes this EditPart's <i>visuals</i>. This method is called by
	 * {@link #refresh()}, and may also be called in response to notifications
	 * from the model.
	 */
protected void refreshVisuals() {
    HANode node = (HANode) getModel();
    Point loc = node.getLocation();
    ((AbstractMonitorFigure) getFigure()).setMinimized(isMinimized());
    //figure's size is stable
    Rectangle rectangle = new Rectangle(loc, figure.getSize());
    GraphicalEditPart graphicalEditPart = (GraphicalEditPart) getParent();
    graphicalEditPart.setLayoutConstraint(this, getFigure(), rectangle);
    getFigure().repaint();
}
Also used : AbstractMonitorFigure(com.cubrid.cubridmanager.ui.mondashboard.editor.figure.AbstractMonitorFigure) Rectangle(org.eclipse.draw2d.geometry.Rectangle) Point(org.eclipse.draw2d.geometry.Point) HANode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.HANode) GraphicalEditPart(org.eclipse.gef.GraphicalEditPart)

Aggregations

AbstractMonitorFigure (com.cubrid.cubridmanager.ui.mondashboard.editor.figure.AbstractMonitorFigure)1 HANode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.HANode)1 Point (org.eclipse.draw2d.geometry.Point)1 Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 GraphicalEditPart (org.eclipse.gef.GraphicalEditPart)1