Пример #1
0
  public void setUpProperties() throws Exception {

    // <Begin_setUpProperties>

    try {
      Top.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + Top, ex);
    }
    setResizable(false);
    try {
      JPanel1.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel1, ex);
    }

    try {
      RouterBtn.setFocusPainted(false);

      RouterBtn.setIcon(
          NmsClientUtil.getImageIcon(
              applet.getDocumentBase() + "../images/router_new1.png")); // No Internationalisation
      RouterBtn.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + RouterBtn, ex);
    }

    try {
      eight.setOpaque(true);
      eight.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + eight, ex);
    }
    eight.setVisible(false);
    try {
      one.setOpaque(true);
      one.setToolTipText(""); // No Internationalisation
      one.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + one, ex);
    }
    one.setVisible(false);
    try {
      six.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + six, ex);
    }
    six.setVisible(false);
    try {
      three.setOpaque(true);
      three.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + three, ex);
    }
    three.setVisible(false);
    try {
      four.setOpaque(true);
      four.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + four, ex);
    }
    four.setVisible(false);
    try {
      seven.setOpaque(true);
      seven.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + seven, ex);
    }
    seven.setVisible(false);
    try {
      two.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + two, ex);
    }
    two.setVisible(false);
    try {
      ten.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + ten, ex);
    }
    ten.setVisible(false);
    try {
      five.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + five, ex);
    }
    five.setVisible(false);
    try {
      nine.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + nine, ex);
    }
    nine.setVisible(false);
    try {
      JPanel2.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel2, ex);
    }

    try {
      JPanel3.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel3, ex);
    }

    try {
      JLabel1.setBackground(new Color(-1));
      JLabel1.setHorizontalTextPosition(0);
      JLabel1.setHorizontalAlignment(0);
      JLabel1.setText(NmsClientUtil.GetString("Router details"));
      JLabel1.setFont(new Font("Dialog", 1, 14)); // No Internationalisation
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + JLabel1, ex);
    }

    try {
      JPanel4.setBackground(new Color(-1));
      java.lang.String[] JPanel4cardAndClassNames_array = new java.lang.String[2];
      JPanel4cardAndClassNames_array[0] =
          "router=com.adventnet.nms.examples.routermap.RouterDetails"; // No Internationalisation
      JPanel4cardAndClassNames_array[1] =
          "inter=com.adventnet.nms.examples.routermap.IFDetails"; // No Internationalisation
      JPanel4.setCardAndClassNames(JPanel4cardAndClassNames_array);
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel4, ex);
    }

    try {
      JPanel5.setBackground(new Color(-1));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel5, ex);
    }

    try {
      RefreshBtn.setText(NmsClientUtil.GetString("Refresh"));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + RefreshBtn, ex);
    }

    try {
      CloseBtn.setText(NmsClientUtil.GetString("Close"));
    } catch (Exception ex) {
      showStatus(
          NmsClientUtil.GetString("Exception while setting properties for bean ") + CloseBtn, ex);
    }
    CloseBtn.setPreferredSize(
        new Dimension(
            CloseBtn.getPreferredSize().width + 12, CloseBtn.getPreferredSize().height + 0));
    JPanel5.setPreferredSize(
        new Dimension(
            JPanel5.getPreferredSize().width + 229, JPanel5.getPreferredSize().height + 4));
    JPanel4.setPreferredSize(
        new Dimension(
            JPanel4.getPreferredSize().width + 507, JPanel4.getPreferredSize().height + 293));
    JLabel1.setPreferredSize(
        new Dimension(
            JLabel1.getPreferredSize().width + 132, JLabel1.getPreferredSize().height + 8));
    JPanel3.setPreferredSize(
        new Dimension(
            JPanel3.getPreferredSize().width + 168, JPanel3.getPreferredSize().height + 6));

    // <End_setUpProperties>
  }
Пример #2
0
  public void setUpGUI(Container container) throws Exception {

    // <Begin_setUpGUI_Container>
    container.add(Top, BorderLayout.CENTER);
    Top.setLayout(null);
    JPanel1.setBounds(0, 0, 225, 415);
    Top.add(JPanel1);
    JPanel1.setLayout(null);
    RouterBtn.setBounds(60, 95, 110, 165);
    JPanel1.add(RouterBtn);
    eight.setBounds(170, 155, 45, 45);
    JPanel1.add(eight);
    one.setBounds(170, 105, 45, 45);
    JPanel1.add(one);
    six.setBounds(65, 40, 45, 55);
    JPanel1.add(six);
    three.setBounds(15, 105, 45, 45);
    JPanel1.add(three);
    four.setBounds(15, 205, 45, 45);
    JPanel1.add(four);
    seven.setBounds(15, 155, 45, 45);
    JPanel1.add(seven);
    two.setBounds(170, 205, 45, 45);
    JPanel1.add(two);
    ten.setBounds(120, 260, 45, 55);
    JPanel1.add(ten);
    five.setBounds(65, 260, 45, 55);
    JPanel1.add(five);
    nine.setBounds(120, 40, 45, 55);
    JPanel1.add(nine);
    JPanel2.setBounds(220, 0, 455, 415);
    Top.add(JPanel2);
    JPanel2.setLayout(new BorderLayout(5, 5));
    JPanel2.add(JPanel3, BorderLayout.NORTH);
    JPanel3.setLayout(new FlowLayout(1, 5, 5));
    JPanel3.add(JLabel1);
    JPanel2.add(JPanel4, BorderLayout.CENTER);
    JPanel4.setLayout(new CardLayout(5, 5));
    JPanel2.add(JPanel5, BorderLayout.SOUTH);
    JPanel5.setLayout(new FlowLayout(2, 5, 5));
    JPanel5.add(RefreshBtn);
    JPanel5.add(CloseBtn);

    // <End_setUpGUI_Container>
  }