Package javax.swing

Examples of javax.swing.Timer


    label.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.YELLOW),
        BorderFactory.createEmptyBorder(8, 8, 8, 8)));
    label.setBackground(new Color(255, 255, 0, 125));
    label.setOpaque(true);

    final Timer t = new Timer(5000, new ClearWarningMessageAction(label));
    t.setRepeats(false);
    t.start();
    return label;
  }
View Full Code Here


        private Stroke ticks;
        public ClockFace(Dimension size) {
            setPreferredSize(size);
            setSize(size);
            setOpaque(false);
            Timer timer = new Timer(1000, new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    repaint();
                    Window w = SwingUtilities.getWindowAncestor(ClockFace.this);
                    while (!(w instanceof Frame)) {
                        w = w.getOwner();
                    }
                    if (w instanceof Frame) {
                        ((Frame)w).setIconImage(getIconImage());
                    }
                }
            });
            timer.setRepeats(true);
            timer.start();
        }
View Full Code Here

      /*
       * (non-Javadoc)
       * @see javax.swing.Popup#show()
       */
      public void show () {
        hidePopupTimer = new Timer(timerDuration, new TimerAction());
        bt = new BalloonTip(parent, text, origin, bordercolor,
          backgroundcolor, textcolor);
        bt.pack();
        Point pt = new Point(origin);
        pt.translate(10, owner.getHeight());
View Full Code Here

  public boolean isUnitBlinkOn() {
    return unitBlinkOn;
  }

  public void startUnitBlinkTimer(int interval, ActionListener listener) {
    unitBlinkTimer = new Timer(interval, listener);
    unitBlinkTimer.start();
  }
View Full Code Here

                    else
                        blinkon = true;
                    //        map.repaintField(unit.getField());
                }
            };
        timer = new Timer(blinkinterval,blinklistener);
        timer.stop();
    }
View Full Code Here

    background = new SEAAnimationBackground(w, h);
    objectVector = new Vector();
    actionVector = new Vector();
    currentStep = 0;
    numSteps = 0;
    timer = new Timer(100,this);
  }
View Full Code Here

    background = new SEAAnimationBackground(w, h);
    objectVector = new Vector();
    actionVector = new Vector();
    currentStep = 0;
    numSteps = 0;
    timer = new Timer(100,this);
  }
View Full Code Here

    removeTrayIcon();
      }
  });

  initComponents();
  timer = new Timer(500, this);
  timer.start();
  autoupdate = conf.getBoolean("picturehandler.doautoupdate");
  autoupdateVal = conf.getInt("picturehandler.autoupdate");
  hideTraySaved = hideTray = conf.getBoolean("mainframe.hidetray");
View Full Code Here

    public int getProcess() {
  return process;
    }

    public void run() {
  timer = new Timer(autoupdateVal, this);
  this.imageFile = new File(conf.getString("picturehandler.image"));
  try {
      init();
  } catch (IOException ex) {
      logger.error(ex);
View Full Code Here

                    if ( e.getKeyCode() == KeyEvent.VK_ENTER ) {
                        okButt.doClick();
                        return;
                    }

                    javax.swing.Timer timer = new Timer( 50,
                                                         new ActionListener() {
                                                             public void actionPerformed(ActionEvent e)
                                                             {
                                                                 String constr = tf.getText();
                                                                 try {
                                                                     if ( tf == layoutConstrTF ) {
                                                                         ConstraintParser.parseLayoutConstraint( constr );
                                                                     } else if ( tf == rowsConstrTF ) {
                                                                         ConstraintParser.parseRowConstraints( constr );
                                                                     } else if ( tf == colsConstrTF ) {
                                                                         ConstraintParser.parseColumnConstraints( constr );
                                                                     } else if ( tf == componentConstrTF ) {
                                                                         ConstraintParser.parseComponentConstraint( constr );
                                                                     }

                                                                     tf.setBackground( Color.WHITE );
                                                                     okButt.setEnabled( true );
                                                                 } catch ( Exception ex ) {
                                                                     tf.setBackground( ERROR_COLOR );
                                                                     okButt.setEnabled( false );
                                                                 }
                                                             }
                                                         } );
                    timer.setRepeats( false );
                    timer.start();
                }
            } );

            return tf;
        }
View Full Code Here

TOP

Related Classes of javax.swing.Timer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.