Package javax.swing

Examples of javax.swing.JScrollBar


* @author Yvonne Wang
*/
public class JScrollPaneDriver_horizontalScrollBarIn_Test extends JScrollPaneDriver_TestCase {
  @Test
  public void should_return_horizontal_JScrollBar() {
    JScrollBar scrollBar = driver.horizontalScrollBarIn(window.scrollPane);
    assertThat(scrollBar).isSameAs(window.horizontalScrollBar);
  }
View Full Code Here


* @author Yvonne Wang
*/
public class JScrollPaneDriver_verticalScrollBarIn_Test extends JScrollPaneDriver_TestCase {
  @Test
  public void should_return_vertical_JScrollBar() {
    JScrollBar scrollBar = driver.verticalScrollBarIn(window.scrollPane);
    assertThat(scrollBar).isSameAs(window.verticalScrollBar);
  }
View Full Code Here

    @RunsInEDT
    public JScrollBar createNew() {
      return execute(new GuiQuery<JScrollBar>() {
        @Override
        protected JScrollBar executeInEDT() {
          JScrollBar scrollBar = new JScrollBar();
          scrollBar.setBlockIncrement(blockIncrement);
          scrollBar.setOrientation(orientation);
          scrollBar.setMaximum(maximum);
          scrollBar.setMinimum(minimum);
          scrollBar.setName(name);
          scrollBar.setValue(value);
          return scrollBar;
        }
      });
    }
View Full Code Here

 
  private void initGUI() {
    indexPanel = new JPanel[2];
    mainPanel = new JPanel();
    ratingField = new JTextField();
    scrollBar = new JScrollBar(JScrollBar.HORIZONTAL);
    zoomYBar = new JScrollBar(JScrollBar.VERTICAL, -120, 1, -150, -40);
    activeButton = new JToggleButton("Active");
   
    for (int i = 0; i < 2; i++) {
      indexPanel[i] = new IndexPanel(i);
      indexPanel[i].setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
View Full Code Here

        {
            int index = list.getSelectedIndex();
            if (e.getKeyCode() == KeyEvent.VK_DOWN && index < list.getModel().getSize() - 1)
            {
                //list.setSelectedIndex(index+1);
                JScrollBar vBar = scroll.getVerticalScrollBar();
                vBar.setValue(vBar.getValue() + vBar.getUnitIncrement() * 5);
            }
            else if (e.getKeyCode() == KeyEvent.VK_UP && index >= 0)
            {
                JScrollBar vBar = scroll.getVerticalScrollBar();
                vBar.setValue(vBar.getValue() - vBar.getUnitIncrement() * 5);
                //list.setSelectedIndex(index-1);
            }
        }
View Full Code Here

        public void run() {
          disableRedraw = true;
          jep.setText(head + html + foot);
          validate();
         
          JScrollBar vsb = getVerticalScrollBar();
          vsb.setValue(vsb.getMaximum());
         
          disableRedraw = false;
          validate();
        }
      };
View Full Code Here

          disableRedraw = true;
          jep.setText(head + html + foot);
          validate();

          try {
            JScrollBar vsb = getVerticalScrollBar();
            vsb.setValue(vsb.getMaximum());
          } catch(Exception e) {}

          disableRedraw = false;
          validate();
        }
View Full Code Here

    public void updateInfoText() {
        ProductInformation.setText(infoText);
    }
   
    public void setTabOrder() {
        JScrollBar ScrollBar = ProductPane.getVerticalScrollBar();
        if ( ScrollBar.isShowing() ) {
            ProductInformation.setFocusable(true);           
        } else {
            ProductInformation.setFocusable(false);
        }
    }
View Full Code Here

    public void updateInfoText() {
        ProductInformation.setText(infoText);
    }
   
    public void setTabOrder() {
        JScrollBar ScrollBar = ProductPane.getVerticalScrollBar();
        if ( ScrollBar.isShowing() ) {
            ProductInformation.setFocusable(true);
        } else {
            ProductInformation.setFocusable(false);
        }   
    }
View Full Code Here

            insertTopPanel(jPnlCenter);
            jScrollPane1.setViewportView(jTree);
            jScrollPane1.setPreferredSize(new java.awt.Dimension(600, 600));
            jScrollPane1.getAccessibleContext().setAccessibleName("API view scroll pane");
           
            JScrollBar jHScrollBar = jScrollPane1.createHorizontalScrollBar();
            jHScrollBar.getAccessibleContext().setAccessibleName("API view horizontal scroll bar");
            jScrollPane1.setHorizontalScrollBar(jHScrollBar);
           
            JScrollBar jVScrollBar = jScrollPane1.createVerticalScrollBar();
            jVScrollBar.getAccessibleContext().setAccessibleName("API view vertical scroll bar");
            jScrollPane1.setVerticalScrollBar(jVScrollBar);
           
            JSplitPane jSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
            jSplitPane.setTopComponent(jScrollPane1);
            jPnlCenter.add(jSplitPane, java.awt.BorderLayout.CENTER);
View Full Code Here

TOP

Related Classes of javax.swing.JScrollBar

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.