Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Sash.addListener()


    sash_data.top = new FormAttachment (0,0);
    sash_data.bottom = new FormAttachment (100,0);
   
    sash.setLayoutData(sash_data);
   
    sash.addListener (SWT.Selection, new Listener () {
      public void handleEvent (Event e) {
        Rectangle sashRect = sash.getBounds ();
        Rectangle shellRect = parent.getClientArea ();
        int right = shellRect.width - sashRect.width - limit;
        e.x = Math.max (Math.min (e.x, right), limit);
View Full Code Here


//          composite2.layout();
        }
      }
    });
   
    sash.addListener(SWT.MouseUp, new Listener () {
      public void handleEvent (Event e) {
       
        parent.layout();
        composite1.layout();
        composite2.layout();
View Full Code Here

    sash_data.right = new FormAttachment (100);
    sash_data.top = new FormAttachment (init_percent, 0);
    //sash_data.bottom = new FormAttachment (init_percent+2, 0);
    sash.setLayoutData (sash_data);
   
    sash.addListener (SWT.Selection, new Listener () {
      public void handleEvent (Event e) {
        Rectangle sashRect = sash.getBounds ();
        Rectangle shellRect = parent.getClientArea ();
        int right = shellRect.height - sashRect.height - limit;
        e.y = Math.max (Math.min (e.y, right), limit);
View Full Code Here

          //composite2.layout();
        }
      }
    });
   
    sash.addListener(SWT.MouseUp, new Listener () {
      public void handleEvent (Event e) {
       
        parent.layout();
        composite1.layout();
        composite2.layout();
View Full Code Here

        for (int i = 0; i < children.length; i++) {
            if (children[i] instanceof Sash) {
                Sash sash = (Sash) children[i];
                if (sashes.contains(sash))
                    continue;
                sash.addListener(SWT.Paint, listener);
                sash.addListener(SWT.MouseEnter, listener);
                sash.addListener(SWT.MouseExit, listener);
                sashes.add(sash);
            }
        }
View Full Code Here

            if (children[i] instanceof Sash) {
                Sash sash = (Sash) children[i];
                if (sashes.contains(sash))
                    continue;
                sash.addListener(SWT.Paint, listener);
                sash.addListener(SWT.MouseEnter, listener);
                sash.addListener(SWT.MouseExit, listener);
                sashes.add(sash);
            }
        }
    }
View Full Code Here

                Sash sash = (Sash) children[i];
                if (sashes.contains(sash))
                    continue;
                sash.addListener(SWT.Paint, listener);
                sash.addListener(SWT.MouseEnter, listener);
                sash.addListener(SWT.MouseExit, listener);
                sashes.add(sash);
            }
        }
    }
View Full Code Here

    final Sash sash = new Sash(composite, SWT.VERTICAL);
    sash.setLayoutData(new GridData(GridData.FILL_VERTICAL));
    sash.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
    // the following listener resizes the tree control based on sash deltas.
    // If necessary, it will also grow/shrink the dialog.
    sash.addListener(SWT.Selection, new Listener() {
      /*
       * (non-Javadoc)
       *
       * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
       */
 
View Full Code Here

      final FormData sashData = new FormData();
      sashData.left = new FormAttachment(percent, 0);
      sashData.top = new FormAttachment(0, 0);
      sashData.bottom = new FormAttachment(100, 0);
      sash.setLayoutData(sashData);
      sash.addListener(SWT.Selection, new Listener() {
        @Override
    public void handleEvent(Event e) {
          Rectangle sashRect = sash.getBounds();
          Rectangle shellRect = parent.getClientArea();
          int right = shellRect.width - sashRect.width - limit;
View Full Code Here

    final Sash sash = new Sash(composite, SWT.VERTICAL);
    sash.setLayoutData(new GridData(GridData.FILL_VERTICAL));
    sash.setBackground(composite.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
    // the following listener resizes the tree control based on sash deltas.
    // If necessary, it will also grow/shrink the dialog.
    sash.addListener(SWT.Selection, new Listener() {
      /*
       * (non-Javadoc)
       *
       * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
       */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.