Package org.eclipse.swt.layout

Examples of org.eclipse.swt.layout.FormAttachment


    formLayout.marginWidth = formLayout.marginHeight = 0;
    shell.setLayout(formLayout);
    FormData fd;

    fd = Utils.getFilledFormData();
    fd.bottom = new FormAttachment(checkITunes, -5);
    fd.top = new FormAttachment(0, 8);
    fd.left = new FormAttachment(0, 8);
    fd.right = new FormAttachment(100, -8);
    lblInfo.setLayoutData(fd);

    fd = Utils.getFilledFormData();
    fd.bottom = new FormAttachment(checkITunes, -5);
    fd.width = 550;
    fd.height = 490;
    browser.setLayoutData(fd);
   
    fd = new FormData();
    fd.bottom = new FormAttachment(100, -10);
    fd.right = new FormAttachment(100, -10);
    btnCancel.setLayoutData(fd);

    fd = new FormData();
    fd.bottom = new FormAttachment(100, -10);
    fd.right = new FormAttachment(btnCancel, -12);
    btnInstall.setLayoutData(fd);

    fd = new FormData();
    fd.bottom = new FormAttachment(checkQOS, -3);
    fd.left = new FormAttachment(0, 10);
    fd.right = new FormAttachment(btnInstall, -12);
    checkITunes.setLayoutData(fd);

    fd = new FormData();
    fd.bottom = new FormAttachment(100, -5);
    fd.left = new FormAttachment(0, 10);
    checkQOS.setLayoutData(fd);
   
    fd = new FormData();
    fd.top = new FormAttachment(checkQOS, 0, SWT.CENTER);
    fd.left = new FormAttachment(checkQOS, 5);
    lblLearnMore.setLayoutData(fd);
   
    fd = new FormData();
    fd.top = new FormAttachment(browser, 0);
    fd.bottom = new FormAttachment(100, 0);
    fd.left = new FormAttachment(0, 0);
    fd.right = new FormAttachment(100, 0);
    install_area_parent.setLayoutData(fd);

    fd = new FormData();
    fd.height = btnInstall.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
    fd.bottom = new FormAttachment(100, -5);
    fd.left = new FormAttachment(0, 5);
    fd.right = new FormAttachment(100, -12);
    install_area.setLayoutData(fd);

    String url = ConstantsVuze.getDefaultContentNetwork().getSiteRelativeURL(
        URL_DEVICES_INFO, true);
    browser.setUrl(url);
View Full Code Here


      Composite area = new Composite(parent, SWT.NONE);
      RowLayout rowLayout = new RowLayout(SWT.VERTICAL);
      rowLayout.fill = true;
      area.setLayout(rowLayout);
      fd = Utils.getFilledFormData();
      fd.left = new FormAttachment(centerCanvas, 50, SWT.CENTER);
      fd.right = null;
      area.setLayoutData(fd);
     
      Listener btnListener = new Listener() {
        public void handleEvent(Event event) {
View Full Code Here

    FormData fdInfoBar = (FormData) soInfoBar.getControl().getLayoutData();
    if (fdInfoBar == null) {
      fdInfoBar = Utils.getFilledFormData();
    }
    if (top) {
      fdInfoBar.top = new FormAttachment(fdForSO.top.control, fdForSO.top.offset,
          fdForSO.top.alignment);
      fdInfoBar.bottom = null;
      soInfoBar.getControl().setLayoutData(fdInfoBar);
      fdForSO.top = new FormAttachment(soInfoBar.getControl(), 0, SWT.BOTTOM);
      forSO.getControl().setLayoutData(fdForSO);
    } else {
      if (fdForSO.bottom.control == null) {
        fdInfoBar.bottom = new FormAttachment(fdForSO.bottom.numerator, fdForSO.bottom.denominator,
            fdForSO.bottom.offset);
      } else {
        fdInfoBar.bottom = new FormAttachment(fdForSO.bottom.control, fdForSO.bottom.offset,
            fdForSO.bottom.alignment);
      }
      fdInfoBar.top = null;
      soInfoBar.getControl().setLayoutData(fdInfoBar);
      fdForSO.bottom = new FormAttachment(soInfoBar.getControl(), 0, SWT.TOP);
      forSO.getControl().setLayoutData(fdForSO);
    }

    ((SWTSkinObjectContainer) parent).getComposite().layout(true);
View Full Code Here

      layout.marginBottom  = 4;
     
      composite.setLayout( layout );

      FormData data = new FormData();
      data.left = new FormAttachment(0,0);
      data.right = new FormAttachment(100,0);
      data.top = new FormAttachment(composite,0);
      data.bottom = new FormAttachment(100,0);


      Label label = new Label( composite, SWT.NULL );
     
      label.setText( "Nothing to show for " + getTitle());
View Full Code Here

     
      composite.setLayout( layout );
     
      FormData data = new FormData();
     
      data.left   = new FormAttachment(0,0);
      data.right   = new FormAttachment(100,0);
      data.top   = new FormAttachment(composite,0);
      data.bottom = new FormAttachment(100,0);


      Label label = new Label( composite, SWT.NULL );
     
      label.setText( "Nothing to show for " + device.getName());
View Full Code Here

  protected void layout() {
    Label label = new Label(shell,SWT.NULL);
    ImageLoader.getInstance().setLabelImage(label, "popup");
   
    FormData formData = new FormData();
    formData.left = new FormAttachment(0,0);
    formData.top = new FormAttachment(0,0);
   
    label.setLayoutData(formData);
   
    shell.layout();
  }
View Full Code Here

  }
   
    FormData formData;
   
    formData = new FormData();   
    formData.right = new FormAttachment(btnHide,-5);
    formData.bottom = new FormAttachment(100,-5);
    btnDetails.setLayoutData(formData);
   
    formData = new FormData();
    formData.right = new FormAttachment(100,-5);
    formData.bottom = new FormAttachment(100,-5);
    btnHide.setLayoutData(formData);
   
    formData = new FormData();
    formData.left = new FormAttachment(0,0);
    formData.top = new FormAttachment(0,0);
    lblImage.setLayoutData(formData);
   
    Button btnHideAll = null;
    if (viewStack.size() > 0) {
      btnHideAll = new Button(shell, SWT.PUSH);
      btnHideAll.moveAbove(btnDetails);
      Messages.setLanguageText(btnHideAll, "popup.error.hideall");
     
      formData = new FormData();
      formData.right = new FormAttachment(btnDetails, -5);
      formData.bottom  = new FormAttachment(100,-5);
      btnHideAll.setLayoutData(formData);
     
      btnHideAll.addListener(SWT.MouseUp, new Listener() {
        public void handleEvent(Event event) {
          btnHide.setEnabled(false);
View Full Code Here

  public static void createVerticalSash(final int limit,int init_percent, final Composite parent,final Composite composite1,final Composite composite2) {
   
    final Sash sash = new Sash (parent, SWT.VERTICAL | SWT.BORDER);
   
    FormData composite1_data = new FormData ();
    composite1_data.left = new FormAttachment (0,0);
    composite1_data.right = new FormAttachment (sash,0);
    composite1_data.top = new FormAttachment (0,0);
    composite1_data.bottom = new FormAttachment (100,0);
   
    composite1.setLayoutData(composite1_data);
   
    FormData composite2_data = new FormData ();
    composite2_data.left = new FormAttachment (sash, 0);
    composite2_data.right = new FormAttachment (100, 0);
    composite2_data.top = new FormAttachment (0, 0);
    composite2_data.bottom = new FormAttachment (100, 0);
   
    composite2.setLayoutData (composite2_data);
   
    final FormData sash_data = new FormData ();
    sash_data.left = new FormAttachment (init_percent,0);
    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);
        if (e.x != sashRect.x)  {
          sash_data.left = new FormAttachment (0, e.x);
          //sashData_messages.right = new FormAttachment (0, e.x+4);
//          parent.layout();
//          composite1.layout();
//          composite2.layout();
        }
View Full Code Here

  public static void createHorizontalSash(final int limit,int init_percent, final Composite parent,final Composite composite1,final Composite composite2) {
 
    final Sash sash = new Sash (parent, SWT.HORIZONTAL | SWT.BORDER);
   
    FormData composite1_data = new FormData ();
    composite1_data.left = new FormAttachment (0);
    composite1_data.right = new FormAttachment (100);
    composite1_data.top = new FormAttachment (0);
    composite1_data.bottom = new FormAttachment (sash);
    composite1.setLayoutData (composite1_data);
   
    FormData composite2_data = new FormData ();
    composite2_data.left = new FormAttachment (0, 0);
    composite2_data.right = new FormAttachment (100, 0);
    composite2_data.top = new FormAttachment (sash, 0);
    composite2_data.bottom = new FormAttachment (100, 0);
    composite2.setLayoutData (composite2_data);
   
    final FormData sash_data = new FormData ();
    sash_data.left = new FormAttachment (0);
    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);
        if (e.y != sashRect.y)  {
          sash_data.top = new FormAttachment (0,e.y);
          //sash_data.bottom = new FormAttachment (0,e.y+4);
          //parent.layout();
          //composite1.layout();
          //composite2.layout();
        }
View Full Code Here

 
  FormLayout layout = new FormLayout();
  splash.setLayout(layout);
 
  FormData labelData = new FormData();
  labelData.right = new FormAttachment(100, 0);
  labelData.bottom = new FormAttachment(100, 0);
  label.setLayoutData(labelData);
 
  FormData progressData = new FormData();
  progressData.left = new FormAttachment(0, 5);
  progressData.right = new FormAttachment(100, -5);
  progressData.bottom = new FormAttachment(100, -5);
  bar.setLayoutData(progressData);
 
  splash.pack();
  Rectangle splashRect = splash.getBounds();
  Rectangle displayRect = display.getBounds();
View Full Code Here

TOP

Related Classes of org.eclipse.swt.layout.FormAttachment

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.