protected boolean setDir(JTextField txf, String strValue) {
    String strTxt = txf.getText();
    String strName = txf.getName();
    boolean bSet = false;

    if ((strTxt == null || strTxt.trim().length() == 0 || strTxt.equals(INFOSTR))
        && strName.equalsIgnoreCase("value")) {
      if (timer != null) {
        timer.cancel();
        txf.setForeground(Color.black);
      }

      bSet = true;
      txf.setText(strValue);
      txf.grabFocus();
    }
    return bSet;
  }
Beispiel #2
0
  protected void doBlink() {
    if (timer != null) timer.cancel();

    timer = new java.util.Timer();
    timer.schedule(
        new TimerTask() {
          public void run() {
            WUtil.blink(validateButton);
          }
        },
        delay,
        delay);
  }
Beispiel #3
0
 public void actionPerformed(ActionEvent e) {
   String cmd = e.getActionCommand();
   if (cmd.equals("close")) {
     if (m_nType == CONFIG) saveData();
     else if (m_nType == DEFAULT && m_pnlAccPolicy != null) m_pnlAccPolicy.saveData();
     setVisible(false);
     dispose();
   } else if (cmd.equals("validate")) {
     if (timer != null) timer.cancel();
     if (m_nType == CHECKSUM && m_pnlChecksum != null) m_pnlChecksum.checksumValidation();
     else doSysValidation();
     validateButton.setBackground(closeButton.getBackground());
   } else if (cmd.equals("checksum")) {
     String strValue = m_pnlChecksum.getChecksum();
     m_pnlChecksum.setData(strValue);
   } else if (cmd.equals("checksumdir")) {
     m_pnlChecksum.setData("");
   } else if (cmd.equals("cancel")) {
     // build(m_bAccPolicy);
     setVisible(false);
     dispose();
   } else if (cmd.equals("help")) displayHelp();
 }