Ejemplo n.º 1
0
 /** Updates the tree selection. */
 protected void updateTreeSelection() {
   MibNode node = getSelectedNode();
   if (node == null) {
     descriptionArea.setText("");
   } else {
     descriptionArea.setText(node.getDescription());
     descriptionArea.setCaretPosition(0);
   }
   snmpPanel.updateOid();
 }
Ejemplo n.º 2
0
 /**
  * Sets the SNMP version to use.
  *
  * @param version the new version number
  */
 public void setSnmpVersion(int version) {
   snmpV1Item.setState(false);
   snmpV2Item.setState(false);
   snmpV3Item.setState(false);
   if (version == 1) {
     snmpV1Item.setState(true);
   } else if (version == 2) {
     snmpV2Item.setState(true);
   } else if (version == 3) {
     snmpV3Item.setState(true);
   }
   snmpPanel.setVersion(version);
 }
Ejemplo n.º 3
0
 /**
  * Sets the SNMP feedback flag.
  *
  * @param feedback the feedback flag
  */
 public void setSnmpFeedback(boolean feedback) {
   snmpPanel.setFeedback(feedback);
 }
Ejemplo n.º 4
0
 /**
  * Blocks or unblocks GUI operations in this frame. This method is used when performing
  * long-running operations to inactivate the user interface.
  *
  * @param blocked the blocked flag
  */
 public void setBlocked(boolean blocked) {
   for (int i = 0; i < menuBar.getMenuCount(); i++) {
     menuBar.getMenu(i).setEnabled(!blocked);
   }
   snmpPanel.setBlocked(blocked);
 }