Examples of ColumnLayoutData


Examples of org.eclipse.jface.viewers.ColumnLayoutData

    int minWeightWidth= 0;
    int totalWeight= 0;

    // First calc space occupied by fixed columns
    for (int i= 0; i < size; i++) {
      ColumnLayoutData col= (ColumnLayoutData) columns.get(i);
      if (col instanceof ColumnPixelData) {
        ColumnPixelData cpd= (ColumnPixelData) col;
        int pixels= cpd.width;
        if (cpd.addTrim) {
          pixels += COLUMN_TRIM;
View Full Code Here

Examples of org.eclipse.jface.viewers.ColumnLayoutData

        Point result = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);

        int width = 0;
        int size = columns.size();
        for (int i = 0; i < size; ++i) {
            ColumnLayoutData layoutData = (ColumnLayoutData) columns
                    .get(i);
            if (layoutData instanceof  ColumnPixelData) {
                ColumnPixelData col = (ColumnPixelData) layoutData;
                width += col.width;
                if (col.addTrim) {
View Full Code Here

Examples of org.eclipse.jface.viewers.ColumnLayoutData

        int numberOfWeightColumns = 0;
        int totalWeight = 0;

        // First calc space occupied by fixed columns
        for (int i = 0; i < size; i++) {
            ColumnLayoutData col = (ColumnLayoutData) columns.get(i);
            if (col instanceof  ColumnPixelData) {
                ColumnPixelData cpd = (ColumnPixelData) col;
                int pixels = cpd.width;
                if (cpd.addTrim) {
                    pixels += COLUMN_TRIM;
                }
                widths[i] = pixels;
                fixedWidth += pixels;
            } else if (col instanceof  ColumnWeightData) {
                ColumnWeightData cw = (ColumnWeightData) col;
                numberOfWeightColumns++;
                // first time, use the weight specified by the column data, otherwise use the actual width as the weight
                // int weight = firstTime ? cw.weight : tableColumns[i].getWidth();
                int weight = cw.weight;
                totalWeight += weight;
            } else {
                Assert.isTrue(false, "Unknown column layout data"); //$NON-NLS-1$
            }
        }

        // Do we have columns that have a weight
        if (numberOfWeightColumns > 0) {
            // Now distribute the rest to the columns with weight.
            int rest = width - fixedWidth;
            int totalDistributed = 0;
            for (int i = 0; i < size; ++i) {
                ColumnLayoutData col = (ColumnLayoutData) columns
                        .get(i);
                if (col instanceof  ColumnWeightData) {
                    ColumnWeightData cw = (ColumnWeightData) col;
                    // calculate weight as above
                    // int weight = firstTime ? cw.weight : tableColumns[i].getWidth();
                    int weight = cw.weight;
                    int pixels = totalWeight == 0 ? 0 : weight * rest
                            / totalWeight;
                    if (pixels < cw.minimumWidth)
                        pixels = cw.minimumWidth;
                    totalDistributed += pixels;
                    widths[i] = pixels;
                }
            }

            // Distribute any remaining pixels to columns with weight.
            int diff = rest - totalDistributed;
            for (int i = 0; diff > 0; ++i) {
                if (i == size)
                    i = 0;
                ColumnLayoutData col = (ColumnLayoutData) columns
                        .get(i);
                if (col instanceof  ColumnWeightData) {
                    ++widths[i];
                    --diff;
                }
View Full Code Here

Examples of org.eclipse.jface.viewers.ColumnLayoutData

    Point result = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);

    int width = 0;
    int size = columns.size();
    for (int i = 0; i < size; ++i) {
      ColumnLayoutData layoutData = (ColumnLayoutData) columns.get(i);
      if (layoutData instanceof ColumnPixelData) {
        ColumnPixelData col = (ColumnPixelData) layoutData;
        width += col.width;
        if (col.addTrim) {
          width += COLUMN_TRIM;
View Full Code Here

Examples of org.eclipse.jface.viewers.ColumnLayoutData

    int numberOfWeightColumns = 0;
    int totalWeight = 0;

    // First calc space occupied by fixed columns
    for (int i = 0; i < size; i++) {
      ColumnLayoutData col = (ColumnLayoutData) columns.get(i);
      if (col instanceof ColumnPixelData) {
        ColumnPixelData cpd = (ColumnPixelData) col;
        int pixels = cpd.width;
        if (cpd.addTrim) {
          pixels += COLUMN_TRIM;
        }
        widths[i] = pixels;
        fixedWidth += pixels;
      } else if (col instanceof ColumnWeightData) {
        ColumnWeightData cw = (ColumnWeightData) col;
        numberOfWeightColumns++;
        // first time, use the weight specified by the column data,
        // otherwise use the actual width as the weight
        // int weight = firstTime ? cw.weight :
        // tableColumns[i].getWidth();
        int weight = cw.weight;
        totalWeight += weight;
      } else {
        Assert.isTrue(false, "Unknown column layout data"); //$NON-NLS-1$
      }
    }

    // Do we have columns that have a weight
    if (numberOfWeightColumns > 0) {
      // Now distribute the rest to the columns with weight.
      int rest = width - fixedWidth;
      int totalDistributed = 0;
      for (int i = 0; i < size; ++i) {
        ColumnLayoutData col = (ColumnLayoutData) columns.get(i);
        if (col instanceof ColumnWeightData) {
          ColumnWeightData cw = (ColumnWeightData) col;
          // calculate weight as above
          // int weight = firstTime ? cw.weight :
          // tableColumns[i].getWidth();
          int weight = cw.weight;
          int pixels = totalWeight == 0 ? 0 : weight * rest
              / totalWeight;
          if (pixels < cw.minimumWidth)
            pixels = cw.minimumWidth;
          totalDistributed += pixels;
          widths[i] = pixels;
        }
      }

      // Distribute any remaining pixels to columns with weight.
      int diff = rest - totalDistributed;
      for (int i = 0; diff > 0; ++i) {
        if (i == size)
          i = 0;
        ColumnLayoutData col = (ColumnLayoutData) columns.get(i);
        if (col instanceof ColumnWeightData) {
          ++widths[i];
          --diff;
        }
      }
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ColumnLayoutData

    ColumnLayout cl_composite = new ColumnLayout();
    cl_composite.maxNumColumns = 1;
    composite.setLayout(cl_composite);
   
    btnPrintAccessedParameters = new Button(composite, SWT.CHECK);
    btnPrintAccessedParameters.setLayoutData(new ColumnLayoutData());
    toolkit.adapt(btnPrintAccessedParameters, true, true);
    btnPrintAccessedParameters.setText("Print Accessed Parameters");
   
    btnPrintUsedParameters = new Button(composite, SWT.CHECK);
    btnPrintUsedParameters.setLayoutData(new ColumnLayoutData());
    btnPrintUsedParameters.setText("Print Used Parameters");
    toolkit.adapt(btnPrintUsedParameters, true, true);
   
    btnPrintUnaccessedParameters = new Button(composite, SWT.CHECK);
    btnPrintUnaccessedParameters.setLayoutData(new ColumnLayoutData());
    btnPrintUnaccessedParameters.setText("Print Unaccessed Parameters");
    toolkit.adapt(btnPrintUnaccessedParameters, true, true);
   
    btnPrintUnusedParameters = new Button(composite, SWT.CHECK);
    btnPrintUnusedParameters.setLayoutData(new ColumnLayoutData());
    btnPrintUnusedParameters.setText("Print Unused Parameters");
    toolkit.adapt(btnPrintUnusedParameters, true, true);
   
    btnPrintAllParameters = new Button(composite, SWT.CHECK);
    btnPrintAllParameters.setLayoutData(new ColumnLayoutData());
    btnPrintAllParameters.setText("Print All Parameters");
    toolkit.adapt(btnPrintAllParameters, true, true);

    section.pack();
  }
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ColumnLayoutData

    ColumnLayout cl_composite = new ColumnLayout();
    cl_composite.maxNumColumns = 1;
    composite.setLayout(cl_composite);
   
    btnNostore = new Button(composite, SWT.CHECK);
    btnNostore.setLayoutData(new ColumnLayoutData());
    toolkit.adapt(btnNostore, true, true);
    btnNostore.setText("Do Not Store Messages in Memory");
   
    btnFlush = new Button(composite, SWT.CHECK);
    btnFlush.setLayoutData(new ColumnLayoutData());
    toolkit.adapt(btnFlush, true, true);
    btnFlush.setText("Flush Output after Each Message");

    section.pack();
  }
View Full Code Here

Examples of org.gwt.mosaic.ui.client.layout.ColumnLayoutData

    definitionView.provideWidget(new ProvisioningCallback()
    {
      public void onSuccess(Widget instance)
      {
        splitPanel.add(instance, new ColumnLayoutData("250 px"));
      }

      public void onUnavailable()
      {
        ConsoleLog.error("Failed to load DefinitionListView.class");
View Full Code Here

Examples of org.gwt.mosaic.ui.client.layout.ColumnLayoutData

    setStyleName("bpm-toolbar-panel");

    toolPanel = new HorizontalPanel();
   
    this.add(new HTML("<b>"+title+"</b>"), new ColumnLayoutData("80%"));
    this.add(toolPanel, new ColumnLayoutData("20%"));
  }
View Full Code Here

Examples of org.gwt.mosaic.ui.client.layout.ColumnLayoutData

    final LayoutPanel layoutPanel = getLayoutPanel();
    layoutPanel.add(scrollPanel);

    scrollPanel.add(columnView, new BoxLayoutData(FillStyle.VERTICAL));
    columnView.add(resizeHotSpot, new ColumnLayoutData("20em"));

    // TODO move to CSS {
    Style style = scrollPanel.getElement().getStyle();
    style.setPaddingTop(0, Unit.PX);
    style.setPaddingRight(0, Unit.PX);
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.