Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.ScrollBar


        fSubjectControl.addMouseMoveListener(this);
        fSubjectControl.addControlListener(this);
        fSubjectControl.addKeyListener(this);
        if (fSubjectControl instanceof Scrollable) {
          Scrollable scrollable= (Scrollable) fSubjectControl;
          ScrollBar vBar= scrollable.getVerticalBar();
          if (vBar != null)
            vBar.addSelectionListener(this);
          ScrollBar hBar= scrollable.getHorizontalBar();
          if (hBar != null)
            hBar.addSelectionListener(this);
        }

        fDisplay= fSubjectControl.getDisplay();
        if (!fDisplay.isDisposed()) {
          fDisplay.addFilter(SWT.Activate, this);
View Full Code Here


        fSubjectControl.removeMouseMoveListener(this);
        fSubjectControl.removeControlListener(this);
        fSubjectControl.removeKeyListener(this);
        if (fSubjectControl instanceof Scrollable) {
          Scrollable scrollable= (Scrollable) fSubjectControl;
          ScrollBar vBar= scrollable.getVerticalBar();
          if (vBar != null)
            vBar.removeSelectionListener(this);
          ScrollBar hBar= scrollable.getHorizontalBar();
          if (hBar != null)
            hBar.removeSelectionListener(this);
        }
      }

      if (fDisplay != null && !fDisplay.isDisposed()) {
        fDisplay.removeFilter(SWT.Activate, this);
View Full Code Here

        }
    }
   
    private static void updatePageIncrement( final ScrolledComposite scomp )
    {
        final ScrollBar vbar = scomp.getVerticalBar();
       
        if( vbar != null )
        {
            vbar.setPageIncrement( scomp.getClientArea().height - 5 );
        }
       
        final ScrollBar hbar = scomp.getHorizontalBar();
       
        if( hbar != null )
        {
            hbar.setPageIncrement( scomp.getClientArea().width - 5 );
        }
    }
View Full Code Here

  private void onTableResize() {
    int totalWidth = fTable.getParent().getClientArea().width;
    totalWidth -= fTable.getBorderWidth() * 2;

    ScrollBar verticalBar = fTable.getVerticalBar();
    if (verticalBar != null) {
      int barWidth = verticalBar.getSize().x;
      if (Application.IS_MAC && barWidth == 0)
        barWidth= 16; //Can be 0 on Mac

      totalWidth -= barWidth;
    }
View Full Code Here

  private void onTreeResize() {
    int totalWidth = fTree.getParent().getClientArea().width;
    totalWidth -= fTree.getBorderWidth() * 2;

    ScrollBar verticalBar = fTree.getVerticalBar();
    if (verticalBar != null) {
      int barWidth = verticalBar.getSize().x;
      if (Application.IS_MAC && barWidth == 0)
        barWidth = 16; //Can be 0 on Mac

      totalWidth -= barWidth;
    }
View Full Code Here

      // Install the listeners for events that need to be monitored for
      // popup closure.
      void installListeners() {
        // Listeners on this popup's table and scroll bar
        proposalTable.addListener(SWT.FocusOut, this);
        ScrollBar scrollbar = proposalTable.getVerticalBar();
        if (scrollbar != null) {
          scrollbar.addListener(SWT.Selection, this);
        }

        // Listeners on this popup's shell
        getShell().addListener(SWT.Deactivate, this);
        getShell().addListener(SWT.Close, this);
View Full Code Here

      // Remove installed listeners
      void removeListeners() {
        if (isValid()) {
          proposalTable.removeListener(SWT.FocusOut, this);
          ScrollBar scrollbar = proposalTable.getVerticalBar();
          if (scrollbar != null) {
            scrollbar.removeListener(SWT.Selection, this);
          }

          getShell().removeListener(SWT.Deactivate, this);
          getShell().removeListener(SWT.Close, this);
        }
View Full Code Here

      // Install the listeners for events that need to be monitored for
      // popup closure.
      void installListeners() {
        // Listeners on this popup's table and scroll bar
        proposalTable.addListener(SWT.FocusOut, this);
        ScrollBar scrollbar = proposalTable.getVerticalBar();
        if (scrollbar != null) {
          scrollbar.addListener(SWT.Selection, this);
        }

        // Listeners on this popup's shell
        getShell().addListener(SWT.Deactivate, this);
        getShell().addListener(SWT.Close, this);
View Full Code Here

      // Remove installed listeners
      void removeListeners() {
        if (isValid()) {
          proposalTable.removeListener(SWT.FocusOut, this);
          ScrollBar scrollbar = proposalTable.getVerticalBar();
          if (scrollbar != null) {
            scrollbar.removeListener(SWT.Selection, this);
          }

          getShell().removeListener(SWT.Deactivate, this);
          getShell().removeListener(SWT.Close, this);
        }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.ScrollBar

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.