Package java.awt

Examples of java.awt.ScrollPane


    if ( !e.getSource().equals( currentComponent ) ) {
      if ( model != null ) {
        int oldSelection = selectedRow;
        int numChildren = model.getNumChildren();
        int keyCode = e.getKeyCode();
        ScrollPane sp = ( ( ScrollPane )getParent().getParent() );
        int y = ( int )sp.getScrollPosition().y;
        if ( ( keyCode == e.VK_UP ) || ( keyCode == VK_KP_UP ) ) {
          selectedRow = Math.max( 0, selectedRow - 1 );
          sp.setScrollPosition( 0, y - rowHeight );
        }
        else if ( ( keyCode == e.VK_DOWN ) || ( keyCode == VK_KP_DOWN ) ) {
          selectedRow = Math.min( numChildren - 1, selectedRow + 1 );
          sp.setScrollPosition( 0,
                                Math.min( y + rowHeight, ( ( numChildren - 2 ) * rowHeight ) ) );
        }
        else
          return;

View Full Code Here


    public static void main(String[] args) {
        new java_awt_ScrollPane().test(true);
    }

    protected ScrollPane getObject() {
        return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
    }
View Full Code Here

    protected static Frame createVncClientMainWindow(BufferedImageCanvas canvas, String title, WindowListener windowListener) {
        // Create AWT windows
        Frame frame = new Frame(title + " - RDP");

        // Use scrolling pane to support screens, which are larger than ours
        scroller = new ScrollPane(ScrollPane.SCROLLBARS_AS_NEEDED);
        scroller.add(canvas);
        scroller.setSize(canvas.getWidth(), canvas.getHeight());

        frame.add(scroller);
        frame.pack();
View Full Code Here

      renderPanel = new RenderPanel(chemModel, this.getWidth(), this.getHeight(), fitToScreen, debug, true, applet);
    } catch (IOException e) {
      announceError(e);
    }
    if (!fitToScreen) {
          ScrollPane scroller = new ScrollPane();
          scroller.add(renderPanel);
          this.add(scroller, BorderLayout.CENTER);
    } else {
      this.add(renderPanel,BorderLayout.CENTER);
    }
  }
View Full Code Here

TOP

Related Classes of java.awt.ScrollPane

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.