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();
}
Aggregations