Package javax.swing

Examples of javax.swing.Timer


    if (isShowing()) {
      if (_datastore == null) {
        if (!_leftPanel.isCollapsed()) {
          _leftPanel.setCollapsed(true);
        }
        Timer timer = new Timer(500, new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            _leftPanel.setVisible(false);
          }
        });
        timer.setRepeats(false);
        timer.start();

        _sourceColumnsPanel.setVisible(false);
        _datastoreListPanelRef.get().setVisible(true);
        _datastoreListPanelRef.get().requestSearchFieldFocus();
      }
View Full Code Here


        // return if not all files have downloaded
        return;
      }
    }

    final Timer timer = new Timer(1500, null);
    final ActionListener listener = new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        DownloadProgressWindow.this.dispose();
        timer.stop();
      }
    };
    timer.addActionListener(listener);
    timer.start();

  }
View Full Code Here

  public AnimationRunner(final ImageViewerSwing ivs) {

    this.ivs = ivs;

    timer = new Timer(200, this);
  }
View Full Code Here

  public AnimatedIcon(Sprite baseSprite, int yOffset, int height, int frames, int delay) {
    setOpaque(false);

    this.sprite = new Sprite[frames];
    this.height = height;
    timer = new Timer(delay, timerTask);

    size = new Dimension(TILE_SIZE, height);
    setPreferredSize(size);
    setMinimumSize(size);
    setMaximumSize(size);
View Full Code Here

    this.text = text;
    this.font = font;
    this.lineSpacing = lineSpacing;
    this.textColor = textColor;
    this.backgroundColor = backgroundColor;
    this.t = new Timer((int) (1.0 / scrollSpeed * 1000.0),
        new ActionListener() {
          public void actionPerformed(final ActionEvent e) {
            moveText();
          }
        });
View Full Code Here

        m_imgView.setJpg(data);
    }
   
    public void doInitTimers()
    {
        m_imgDisplayTimer = new Timer(Main.m_settings.getImgDisplayTimer(), new ActionListener()
        {
            public void actionPerformed(ActionEvent ev)
            {
                doSetImg();
            }
        });
        m_imgDisplayTimer.setRepeats(false);
        m_imgDisplayTimer.stop();

        m_fillListTimer = new Timer(Main.m_settings.getFillListTimer(), new ActionListener()
        {
            public void actionPerformed(ActionEvent ev)
            {
                String path = getPathFromTreePath(m_tree.getLeadSelectionPath());
                if (path != null)
                    doFillList(path);
                m_imgView.clearCache();
            }
        });
        m_fillListTimer.setRepeats(false);
        m_fillListTimer.stop();

        m_slideshowTimer = new Timer(Main.m_settings.getSlideShowTimer(), new ActionListener()
        {
            @Override
            public void actionPerformed(ActionEvent ev)
            {
                if (!doSlideShowNext() && m_bImgFullSize)
View Full Code Here

            setVisible(true);

            requestFocus();
            m_table.requestFocus();

            Timer timer = new Timer(150, new ActionListener()
            {
                public void actionPerformed(ActionEvent ev)
                {
                    if (Main.m_settings.getExtendedState() == MAXIMIZED_BOTH)
                        setExtendedState(JFrame.MAXIMIZED_BOTH);
                    Timer timer = new Timer(150, new ActionListener()
                    {
                        public void actionPerformed(ActionEvent ev)
                        {
                            m_splitPaneVert.setDividerSize(m_dividerSizeVert);
                            m_splitPaneHor.setDividerSize(m_dividerSizeHor);
                            m_splitPaneVert.setDividerLocation(m_dividerLocationVert);
                            m_splitPaneHor.setDividerLocation(m_dividerLocationHor);
                        }
                    });
                    timer.setRepeats(false);
                    timer.start();
                }
            });
            timer.setRepeats(false);
            timer.start();

            int selRow = m_table.getSelectedRow();
            if (selRow >= 0)
            {
                Rectangle rect = m_table.getCellRect(selRow, 0, true);
View Full Code Here

    public synchronized double getTo() {
        return relativeSelectionEnd;
    }

    public synchronized void play() {
        timer = new Timer(100, this); // 0.1
        timer.setInitialDelay(1900); // 1.9 sec
        paused.set(false);
        timer.start();
    }
View Full Code Here

        //System.out.println("height: " + getHeight());
        setVisible(true);
        addMouseMotionListener(this);
        addMouseListener(this);
        // setEnabled(true);
        viewToModelSync = new Timer(150, updateModelAction);
        viewToModelSync.setRepeats(true);
        viewToModelSync.start();

        // setEnabled(true);
        // modelToViewSync = new Timer(2000, updateViewAction);
View Full Code Here

    public void attributesChanged(AttributeEvent event) {
        if (event.getEventType().equals(AttributeEvent.EventType.ADD_COLUMN) || event.getEventType().equals(AttributeEvent.EventType.REMOVE_COLUMN)) {
            if (refreshTimer != null) {
                refreshTimer.restart();
            } else {
                refreshTimer = new Timer(1000, new ActionListener() {

                    public void actionPerformed(ActionEvent e) {
                        fireChangeEvent();
                    }
                });
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.