Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Layout


        nonDisposedImages.toArray(array);
        newShell.setImages(array);
      }
    }

    Layout layout = getLayout();
    if (layout != null) {
      newShell.setLayout(layout);
    }
  }
View Full Code Here


        });
       
        // provide a layout that provides enough extra space to
        // draw the border and to place the child conrol in the
        // correct location
        canvas.setLayout(new Layout() {

      protected Point computeSize(Composite composite, int wHint,
                    int hHint, boolean changed) {
                Control[] children = composite.getChildren();
               
View Full Code Here

            Scrollable scrollable = (Scrollable) control;

            if (scrollable instanceof Composite) {
                Composite composite = (Composite) control;

                Layout theLayout = composite.getLayout();
                if (theLayout instanceof GridLayout) {
                    boolean growsHorizontally = false;
                    boolean growsVertically = false;

                    Control[] children = composite.getChildren();
View Full Code Here

     * @param changedControl
     */
    public static void resize(Control changedControl) {
        Composite parent = changedControl.getParent();

        Layout parentLayout = parent.getLayout();

        if (parentLayout instanceof ICachingLayout) {
            ((ICachingLayout) parentLayout).flush(changedControl);
        }

View Full Code Here

      fBrowse.setEnabled(editable);
    }

  private void fillIntoGrid(Composite parent, int indent, int tcolspan)
    {
    Layout layout = parent.getLayout();
    int tspan;
    if (layout instanceof GridLayout)
      {
      int span = ((GridLayout) layout).numColumns;
      if (tcolspan > 0)
View Full Code Here

    Label labelSignature = new Label(this, SWT.NONE);
    signature = new Text(this, swtTextStyle);
    Label labelContainer = new Label(this, SWT.NONE);
    container = new TypeEditor(this, SWT.NONE, swtTextStyle);

    Layout layout = new GridLayout(2, false);
    this.setLayout(layout);

    GridData iconGridData = new GridData(SWT.FILL, SWT.FILL, false, false);
    iconGridData.minimumHeight = 16;
    iconGridData.minimumWidth = 16;
View Full Code Here

    type = new TypeEditor(this, SWT.NONE, swtTextStyle);
    Label labelContainer = new Label(this, SWT.NONE);
    container = new TypeEditor(this, SWT.NONE, swtTextStyle);

    // layout
    Layout layout = new GridLayout(2, false);
    this.setLayout(layout);

    GridData iconGridData = new GridData(SWT.FILL, SWT.FILL, false, false);
    iconGridData.minimumHeight = 16;
    iconGridData.minimumWidth = 16;
View Full Code Here

    icon = new Label(this, SWT.NONE);
    Label labelName = new Label(this, SWT.NONE);
    path = new Text(this, swtTextStyle);

    // layout
    Layout layout = new GridLayout(3, false);
    this.setLayout(layout);

    GridData iconGridData = new GridData(SWT.FILL, SWT.FILL, false, false);
    iconGridData.minimumHeight = 16;
    iconGridData.minimumWidth = 16;
View Full Code Here

      getClientArea().setBackgroundImage(shell.getBackgroundImage());
      getClientArea().setForeground(shell.getForeground());
      getClientArea().setFont(shell.getFont());
      try
      {
        Layout layout = getClientArea().getLayout();
        if (layout != null)
        {
          Field field = layout.getClass().getDeclaredField("marginWidth");
          field.setAccessible(true);
          field.setInt(layout, 0);
          field = layout.getClass().getDeclaredField("marginHeight");
          field.setAccessible(true);
          field.setInt(layout, 0);
        }
      } catch (Exception e)
      {
View Full Code Here

   * @since 3.3
   */
  public static void createVerticalSpacer(Composite parent, int numlines) {
    Label lbl = new Label(parent, SWT.NONE);
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    Layout layout = parent.getLayout();
    if (layout instanceof GridLayout) {
      gd.horizontalSpan = ((GridLayout) parent.getLayout()).numColumns;
    }
    gd.heightHint = numlines;
    lbl.setLayoutData(gd);
View Full Code Here

TOP

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

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.