Search in sources :

Example 1 with ClientFigure

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

the class ClientMonitorPart 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() {
    ClientFigure figure = (ClientFigure) this.getFigure();
    ClientNode clientNode = (ClientNode) this.getModel();
    figure.setName(clientNode.getName());
    figure.setClients(clientNode.getClientList());
    BrokerNode broker = clientNode.getBrokerNode();
    if (broker != null) {
        figure.setHostConnected(broker.getParent().isConnected());
    }
    super.refreshVisuals();
}
Also used : BrokerNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerNode) ClientFigure(com.cubrid.cubridmanager.ui.mondashboard.editor.figure.ClientFigure) ClientNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.ClientNode)

Example 2 with ClientFigure

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

the class ClientMonitorPart method createFigure.

/**
	 * get a database monitor figure.
	 * 
	 * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
	 * @return a database figure
	 */
protected IFigure createFigure() {
    ClientFigure figure = new ClientFigure();
    ClientNode modelNode = (ClientNode) getModel();
    figure.setName(modelNode.getName());
    return figure;
}
Also used : ClientFigure(com.cubrid.cubridmanager.ui.mondashboard.editor.figure.ClientFigure) ClientNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.ClientNode)

Aggregations

ClientFigure (com.cubrid.cubridmanager.ui.mondashboard.editor.figure.ClientFigure)2 ClientNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.ClientNode)2 BrokerNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerNode)1