Package net.miginfocom.swt

Examples of net.miginfocom.swt.MigLayout


        setDescription(factory.getDescription());

        // do the layout thing
        //
        setControl(new Composite(parent, SWT.NONE));
        getControl().setLayout(new MigLayout("", "[right,pref!]para[grow]rel[pref!]", ""));

        for( Param param : getParameterInfo() ) {
            if (!"user".equals(param.getLevel())) {
                continue;
            }
View Full Code Here


        Label hexLabel = new Label(control, SWT.SINGLE);
        hexLabel.setText("Color");

       
        if (multiLine) {
            MigLayout layout = new MigLayout("insets 0", "[][][grow]", "[]");
            control.setLayout(layout);
           
            redLabel.setLayoutData("cell 0 0, alignx trailing, gapx related");
            redSpinner.setLayoutData("cell 1 0, wmin 60,alignx left, gapx related");
            redScale.setLayoutData("cell 2 0, grow, width 200:100%:100%");
           
            greenLabel.setLayoutData("cell 0 1, alignx trailing, gapx related");
            greenSpinner.setLayoutData("cell 1 1, wmin 60,alignx left, gapx related");
            greenScale.setLayoutData("cell 2 1,grow, width 200:100%:100%");
           
            blueLabel.setLayoutData("cell 0 2, alignx trailing, gapx related");
            blueSpinner.setLayoutData("cell 1 2, wmin 60,alignx left, gapx related");
            blueScale.setLayoutData("cell 2 2,grow, width 200:100%:100%");
           
            hexLabel.setLayoutData("cell 0 3, alignx trailing, gapx related");
            colorText.setLayoutData("cell 2 3 2 1,grow, width 200:100%:100%");

        }
        else {
            control.setLayout( new MigLayout("insets 0, flowx", "", ""));
           
            redLabel.setLayoutData("gap related");
            redSpinner.setLayoutData("gap unrelated");
           
            greenLabel.setLayoutData("gap related");
View Full Code Here

        }
        text = new Text(control,SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER | SWT.NO_SCROLL );
        text.setEditable(false);
       
        if( multiLine ){
            control.setLayout(new MigLayout("insets 0","[][][grow]","[]"));
           
            comboLabel.setLayoutData("cell 0 0, alignx trailing");
            combo.getControl().setLayoutData("cell 1 0, width 200:30%:100%,gap related");
           
            spinnerLabel.setLayoutData("cell 0 1, alignx trailing");
            spinner.setLayoutData("cell 1 1, width 200:30%:300%,gap related");
           
            textLabel.setLayoutData("cell 0 2, alignx trailing");
            text.setLayoutData("cell 1 2, grow,width 200:pref:100%,gap related");
        }
        else {
            control.setLayout(new MigLayout("insets 0","flowx",""));
            combo.getControl().setLayoutData("width 200:30%:100%");
            spinner.setLayoutData("width 200:30%:300%,gap unrelated");
            text.setLayoutData("grow,width 200:pref:100%,gap unrelated");
        }
        listen(true);
View Full Code Here

                        feedbackLabel.setForeground(display.getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND));
                    }
                }
            }
        };
        control.setLayout(new MigLayout("insets 0", "[fill][]", "[fill]"));
       
        pageBook = new PageBook(control, SWT.NO_SCROLL);
        pageBook.setLayoutData("cell 0 0,grow,width 200:100%:100%,height 18:75%:100%");
       
        placeholder = new Label( pageBook, SWT.SINGLE );
View Full Code Here

       
        final Composite page = new Composite(parent, SWT.NONE);
        final String layoutConst = "fillx, insets 0"; //$NON-NLS-1$
        final String colConst = "[right]rel[grow,fill]"; //$NON-NLS-1$
        final String rowConst = ""; //$NON-NLS-1$
        page.setLayout(new MigLayout(layoutConst, colConst, rowConst));
       
        Label label = new Label(page, SWT.NONE);
        label.setText("ID:");
       
        Text text = new Text( page, SWT.SINGLE | SWT.BORDER );
View Full Code Here

    @Override
    public void createPageContent( Composite parent ) {
        // leave enough room for feedback decoration on fields!
        int required = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
        parent.setLayout( new MigLayout("","[right]"+required+"[left,grow]") );
     
        Label label = new Label(parent, SWT.LEFT );
        label.setText("Size");

        size = new ExpressionViewer( parent, SWT.SINGLE | SWT.BORDER );
View Full Code Here

       
        final Composite page = new Composite(parent, SWT.NONE);
        final String layoutConst = "fillx, insets 0"; //$NON-NLS-1$
        final String colConst = "[right]rel[grow,fill]"; //$NON-NLS-1$
        final String rowConst = ""; //$NON-NLS-1$
        page.setLayout(new MigLayout(layoutConst, colConst, rowConst));
       
        Label label = new Label(page, SWT.NONE);
        label.setText("ID:");
       
        Text text = new Text( page, SWT.SINGLE | SWT.BORDER );
View Full Code Here

        super.init(site, memento);
    }

    @Override
    public void createPartControl( Composite parent ) {
        parent.setLayout(new MigLayout("", "[right]10[left, grow][min!][min!]", "30"));

        // SWT Widgets
        Label label = new Label(parent, SWT.NONE);
        label.setText("Country:");
View Full Code Here

  @Override
  protected void createPages() {
    final Composite composite = new Composite(getContainer(), SWT.FILL);
    ImageRegistry reg = MeclipsePlugin.getDefault().getImageRegistry();

    composite.setLayout(new MigLayout("wrap 9",
        "[][][][40px!][][40px!][][][]", "[30px!][]"));
    Label find = new Label(composite, SWT.FILL);
    find.setLayoutData("w 30!");
    find.setText(getCaption("collectionEditor.find"));
View Full Code Here

  public SwtDemo()
  {
    display = new Display();
    final Shell shell = new Shell();

    shell.setLayout(new MigLayout("wrap", "[]u[grow,fill]", "[grow,fill][pref!]"));
    shell.setText("MigLayout SWT Demo v2.5 - Mig Layout v" + LayoutUtil.getVersion());

    TabFolder layoutPickerTabPane = new TabFolder(shell, DOUBLE_BUFFER);
    layoutPickerTabPane.setLayoutData("spany,grow");
      pickerList = new List(layoutPickerTabPane, SWT.SINGLE | DOUBLE_BUFFER);
      pickerList.setBackground(layoutPickerTabPane.getBackground());
      deriveFont(pickerList, SWT.BOLD, -1);
      TabItem tab = new TabItem(layoutPickerTabPane, DOUBLE_BUFFER);
      tab.setControl(pickerList);
      tab.setText("Example Browser");
      for (int i = 0; i < panels.length; i++)
        pickerList.add(panels[i][0]);

    layoutDisplayPanel = new Composite(shell, DOUBLE_BUFFER);
    layoutDisplayPanel.setLayout(new MigLayout("fill, insets 0"));

    TabFolder descriptionTabPane = new TabFolder(shell, DOUBLE_BUFFER);
    descriptionTabPane.setLayoutData("growx,hmin 120,w 500:500");
      descrTextArea = createTextArea(descriptionTabPane, "", "", SWT.MULTI | SWT.WRAP);
      descrTextArea.setBackground(descriptionTabPane.getBackground());
View Full Code Here

TOP

Related Classes of net.miginfocom.swt.MigLayout

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.