public void actionPerformed(java.awt.event.ActionEvent arg0) { JPanel4.showCard("router"); // No Internationalisation Properties prop = (Properties) routerobject.elementAt(0); ((com.adventnet.nms.examples.routermap.RouterDetails) JPanel4.getCard("router")) .setValues((Properties) routerobject.elementAt(0)); // No Internationalisation JLabel1.setText( NmsClientUtil.GetString("Router details : ") + prop.getProperty("name")); // No Internationalisation }
void refresh() { JPanel4.showCard("router"); // No Internationalisation if (routerobject != null) { ((com.adventnet.nms.examples.routermap.RouterDetails) JPanel4.getCard("router")) .setValues((Properties) routerobject.elementAt(0)); // No Internationalisation Properties prop = (Properties) routerobject.elementAt(0); RouterBtn.setBackground( SeverityInfo.getInstance() .getColor(Integer.parseInt(prop.getProperty("status")))); // No Internationalisation RouterBtn.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation JLabel1.setText( NmsClientUtil.GetString("Router details : ") + prop.getProperty("name")); // No Internationalisation } if (routerobject.size() >= 2) { one.setVisible(true); Properties prop = (Properties) routerobject.elementAt(1); one.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation one.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 3) { two.setVisible(true); Properties prop = (Properties) routerobject.elementAt(2); two.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation two.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 4) { three.setVisible(true); Properties prop = (Properties) routerobject.elementAt(3); three.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation three.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 5) { four.setVisible(true); Properties prop = (Properties) routerobject.elementAt(4); four.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation four.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 6) { five.setVisible(true); Properties prop = (Properties) routerobject.elementAt(5); five.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation five.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 7) { six.setVisible(true); Properties prop = (Properties) routerobject.elementAt(6); six.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation six.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 8) { seven.setVisible(true); Properties prop = (Properties) routerobject.elementAt(7); seven.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation seven.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 9) { eight.setVisible(true); Properties prop = (Properties) routerobject.elementAt(8); eight.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation eight.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 10) { nine.setVisible(true); Properties prop = (Properties) routerobject.elementAt(9); nine.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation nine.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 11) { ten.setVisible(true); Properties prop = (Properties) routerobject.elementAt(10); ten.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation ten.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } }