예제 #1
0
파일: ToolBar.java 프로젝트: giampy/PNSC
 public void updateLabel() {
   // TODO Auto-generated method stub
   if (Properties.isCheckRealTimeOn())
     if (checkBar.whatIsActive().equals("BSNNI")) {
       if (parent.getNet() != null && Check.BSNNI(parent.getNet())) prop.setText("Net is BSNNI");
       else prop.setText("Net is not BSNNI");
     } else if (parent.getNet() != null && checkBar.whatIsActive().equals("SBNDC")) {
       if (Check.SBNDC(parent.getNet())) prop.setText("Net is SBNDC");
       else prop.setText("Net is not SBNDC");
     } else if (parent.getNet() != null && checkBar.whatIsActive().equals("PBNI+")) {
       if (Check.PositivePBNI(parent.getNet())) prop.setText("Net is PBNI+");
       else prop.setText("Net is not PBNI+");
       parent.getNet().updateNodesProperties();
     }
 }
예제 #2
0
파일: ToolBar.java 프로젝트: giampy/PNSC
  public void createUpdateCheckBar() {
    // TODO Auto-generated method stub

    if (checkBar != null) {
      checkBar.removeAll(this);
      this.remove(help);
      this.remove(prop);
      this.remove(filler);
    } else addSeparator();

    checkBar = new PropertyCheckForRealTimeBar(parent);
    checkBar.addTo(this);
    prop = new JLabel();
    prop.setEnabled(false);
    updateLabel();
    add(prop);
    filler = new JPanel();
    filler.setLayout(new BoxLayout(filler, BoxLayout.X_AXIS));
    filler.add(Box.createHorizontalGlue());
    add(filler);
    help = helpButton();

    add(help);
  }