use of com.cubrid.cubridmanager.ui.mondashboard.editor.figure.HostMonitorFigure in project cubrid-manager by CUBRID.
the class HostMonitorPart method createFigure.
/**
* create a host figure
*
* @return a host figure
*/
protected IFigure createFigure() {
HostMonitorFigure hostMonFigure = new HostMonitorFigure();
HostNode hn = (HostNode) getModel();
hostMonFigure.setStatus(true, hn.isConnected(), hn.getErrorMsg(), hn.hasNewErrorMsg());
hostMonFigure.setTitle(hn.getName());
hostMonFigure.setHint(new StringBuffer(" ").append(hn.getUserName()).append("@").append(hn.getIp()).append(":").append(hn.getPort()).append(" ").toString());
return hostMonFigure;
}
use of com.cubrid.cubridmanager.ui.mondashboard.editor.figure.HostMonitorFigure in project cubrid-manager by CUBRID.
the class HostMonitorPart 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() {
HostMonitorFigure fg = (HostMonitorFigure) this.getFigure();
HostNode model = (HostNode) getModel();
HAHostStatusInfo hostStatusInfo = model.getHostStatusInfo();
fg.setTitle(model.getName());
fg.setStatus(true, model.isConnected(), model.getErrorMsg(), model.hasNewErrorMsg());
if (hostStatusInfo != null) {
fg.setHostCpuUsage(hostStatusInfo.getCpuUsage());
fg.setHostMemUsage(hostStatusInfo.getMemUsage());
fg.setHostIO(hostStatusInfo.getIoWait());
}
super.refreshVisuals();
}
Aggregations