Search in sources :

Example 1 with HANodeConnection

use of com.cubrid.cubridmanager.ui.mondashboard.editor.model.HANodeConnection in project cubrid-manager by CUBRID.

the class BrokerConnectionPart method refreshVisuals.

/**
	 * refresh Visuals
	 */
protected void refreshVisuals() {
    PolylineConnection conn = (PolylineConnection) getFigure();
    HANodeConnection model = (HANodeConnection) getModel();
    //BrokerDBListNode linewith should be 1.
    if (model.getTarget() instanceof BrokerDBListNode) {
        conn.setLineWidth(1);
    }
    BrokerNode broker = null;
    if (model.getSource() instanceof BrokerNode) {
        broker = (BrokerNode) model.getSource();
    } else if (model.getTarget() instanceof BrokerNode) {
        broker = (BrokerNode) model.getTarget();
    }
    if (broker != null) {
        if (broker.getParent().isConnected()) {
            conn.setForegroundColor(CONNECTION_DEFAULT_COLOR);
        } else {
            conn.setForegroundColor(AbstractMonitorFigure.DISABLED_COLOR);
        }
    }
    super.refreshVisuals();
}
Also used : BrokerNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerNode) BrokerDBListNode(com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerDBListNode) HANodeConnection(com.cubrid.cubridmanager.ui.mondashboard.editor.model.HANodeConnection) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Aggregations

BrokerDBListNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerDBListNode)1 BrokerNode (com.cubrid.cubridmanager.ui.mondashboard.editor.model.BrokerNode)1 HANodeConnection (com.cubrid.cubridmanager.ui.mondashboard.editor.model.HANodeConnection)1 PolylineConnection (org.eclipse.draw2d.PolylineConnection)1