Package java.awt.event

Examples of java.awt.event.AdjustmentListener


      public void componentShown(ComponentEvent e) {
      }});

    // whenever the vertical scroll bar is moved, reset the current time
    getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {

      @Override
      public void adjustmentValueChanged(AdjustmentEvent e) {
        resetScrolledTime();
      }
View Full Code Here


        jp.add(vbar, BorderLayout.CENTER);
        // jp.setBorder(BorderFactory.createEmptyBorder(2,1,2,0));
        // jp.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
        jp.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
        jp.setVisible(false);
        vbar.addAdjustmentListener(new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent e) {
                if (table.getSize().getHeight() - 20 < e.getAdjustable()
                        .getMaximum())
                    jp.setVisible(true);
                else
View Full Code Here

        vbar = treetable.getVerticalScrollBar();
        final JPanel jp = new JPanel(new BorderLayout());
        jp.add(vbar, BorderLayout.CENTER);
        jp.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
        jp.setVisible(false);
        vbar.addAdjustmentListener(new AdjustmentListener() {
            public void adjustmentValueChanged(AdjustmentEvent e) {
                if (treetable.getSize().getHeight() - 20 < e.getAdjustable()
                        .getMaximum())
                    jp.setVisible(true);
                else
View Full Code Here

    if (groupNames.size() > GROUPS_VISIBLE) {
      final JScrollBar scroll = new JScrollBar(JScrollBar.VERTICAL);
      scroll.setMinimum(0);
      scroll.setMaximum(groupNames.size());
      scroll.addAdjustmentListener(new AdjustmentListener() {

        @Override
        public void adjustmentValueChanged(AdjustmentEvent e) {
          int value = e.getAdjustable().getValue();
          slidingDataset.setFirstCategoryIndex(value);
View Full Code Here

   
    initStylesForTextPane(textPane);
    setLayout(new BorderLayout());
   
    scrollPane = new JScrollPane(textPane);
    scrollPane.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {
      public void adjustmentValueChanged(final AdjustmentEvent ev) {
        JScrollBar bar = (JScrollBar) ev.getAdjustable();
        // Try to avoid turning the new message indicator off
        // while the player keeps adjusting the scroll bar to
        // avoid missleading results
View Full Code Here

            JScrollPane.VERTICAL_SCROLLBAR_ALWAYS
        );
        images.getViewport().setBackground(Color.gray);
       
        images.getHorizontalScrollBar().addAdjustmentListener(
            new AdjustmentListener() {
                public void adjustmentValueChanged(AdjustmentEvent e) {
                    if (! e.getValueIsAdjusting()) {
                        // This is a trick to reorder the thumbnail tasks
                        // so refreshes happen in order in the viewport.
                        EventQueue.invokeLater(
View Full Code Here

            }
        );
        // This is a trick to reorder the thumbnail tasks
        // so refreshes happen in order in the viewport.
        getVerticalScrollBar().addAdjustmentListener(
            new AdjustmentListener() {
                public void adjustmentValueChanged(AdjustmentEvent e) {
                    if (! e.getValueIsAdjusting()) {
                        EventQueue.invokeLater(
                            new Runnable() {
                                public void run() {
                                    // May be run after dispose().
                                    if (browser != null)
                                        browser.repaint();
                                }
                            }
                        );
                    }
                }
            }
        );
        // When scrolling ceases, bump the scroll position so that browser
        // features align with the viewport:
        getVerticalScrollBar().addAdjustmentListener(
            new AdjustmentListener() {
                boolean isSnapping;
                public void adjustmentValueChanged(AdjustmentEvent e) {
                    if ((! e.getValueIsAdjusting()) && (browser != null)) {
                        // Don't recurse.
                        if (! isSnapping) {
View Full Code Here

   */
  public void setScrollbar(JScrollBar scrollBar) {
    if (scrollBar == null) return;
    this.scrollBar = scrollBar;
    this.scrollBar.setValues(buffer.windowBase, buffer.height, 0, buffer.bufSize - buffer.height);
    this.scrollBar.addAdjustmentListener(new AdjustmentListener() {
      public void adjustmentValueChanged(AdjustmentEvent evt) {
        buffer.setWindowBase(evt.getValue());
      }
    });
  }
View Full Code Here

    mainPanel.add(panel, c);
   
    c.weighty = 0.0;
    mainPanel.add(scrollBar, c);
       
    AdjustmentListener listener = new AdjustmentListener() {
      public void adjustmentValueChanged(AdjustmentEvent e) {
        indexPanel[0].repaint();
        indexPanel[1].repaint();
      }
    };
View Full Code Here

    mainPanel.add(resultPanel, c);
    c.weightx = 0.0;
    mainPanel.add(zoomYBar, c);
    mainPanel.add(shiftYBar, c);
   
    AdjustmentListener listener = new AdjustmentListener() {
      public void adjustmentValueChanged(AdjustmentEvent e) {
        resultPanel.repaint();
      }
    };
    zoomXBar.addAdjustmentListener(listener);
View Full Code Here

TOP

Related Classes of java.awt.event.AdjustmentListener

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.