Examples of TableLayout


Examples of org.eclipse.jface.viewers.TableLayout

  public Table createTable(Composite parent) {

    commandstable = new Table(parent, SWT.MULTI | SWT.BORDER);
    commandstable.setLayoutData(new GridData(GridData.FILL_BOTH));
    TableLayout tableLayout = new TableLayout();
    commandstable.setLayout(tableLayout);
    commandstable.setHeaderVisible(true);
    commandstable.setLinesVisible(true);

    TableColumn column = new TableColumn(commandstable, SWT.CENTER
        | SWT.BORDER_SOLID, 0);
    column.setText("Alias");
    ColumnWeightData columnLayout = new ColumnWeightData(200);
    tableLayout.addColumnData(columnLayout);

    column = new TableColumn(commandstable, SWT.CENTER | SWT.BORDER_SOLID,
        1);
    column.setText("Active");
    columnLayout = new ColumnWeightData(50);
    tableLayout.addColumnData(columnLayout);

    return commandstable;

  }
View Full Code Here

Examples of org.eclipse.jface.viewers.TableLayout

        newColumnTableColumn.setWidth(740);
        newColumnTableColumn.setText("Resources for Generate Diff of Post-commit");

        table.setHeaderVisible(true);// 显示表头
        table.setLinesVisible(true);// 显示表格线
        TableLayout tLayOut = new TableLayout();// 专用于表格的布局
        table.setLayout(tLayOut);
        table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

        tLayOut.addColumnData(new ColumnWeightData(740));// ID列宽

        tableViewer.setContentProvider(new TableViewerContentProvider());
        tableViewer.setLabelProvider(new ResourceTableViewerLabelProvider());
        tableViewer.setInput(resourceList);
View Full Code Here

Examples of org.eclipse.jface.viewers.TableLayout

        });

        Tree tree = viewer.getTree();
        tree.setLayoutData(new GridData(GridData.FILL_BOTH));

        TableLayout layout = new TableLayout();
        layout.addColumnData(new ColumnWeightData(COLUMN_DEFAULT_WEIGHT, COLUMN_MIN_WITH, true));
        layout.addColumnData(new ColumnWeightData(COLUMN_DEFAULT_WEIGHT, COLUMN_MIN_WITH, true));
        layout.addColumnData(new ColumnWeightData(COLUMN_LIGHT_WEIGHT, COLUMN_MIN_WITH, true));
        layout.addColumnData(new ColumnWeightData(COLUMN_DEFAULT_WEIGHT, COLUMN_MIN_WITH, true));
        tree.setLayout(layout);

        new TreeColumn(tree, SWT.LEFT).setText("Organization");
        new TreeColumn(tree, SWT.LEFT).setText("Module");
        new TreeColumn(tree, SWT.LEFT).setText("Revision");
View Full Code Here

Examples of org.eclipse.jface.viewers.TableLayout

        if (tableViewer != null) {
            disposeTableViewer();
        }
        final Table table = new Table(parent, style);
        table.setLinesVisible(true);
        TableLayout layout = new TableLayout();
        table.setLayout(layout);

        FeatureTableContentProvider ftp = new FeatureTableContentProvider(this,
                this.progressMonitorProvider);
        FeatureTableLabelProvider flp = new FeatureTableLabelProvider(this);
View Full Code Here

Examples of org.eclipse.jface.viewers.TableLayout

                | SWT.H_SCROLL | SWT.V_SCROLL);
        viewerTree.setLayoutData("grow, h 100%!, w 85%!"); //$NON-NLS-1$
        viewerTree.setHeaderVisible(true);
        viewerTree.setLinesVisible(true);
       
        final TableLayout viewerTreeLayout = new TableLayout();
       
        final TreeColumn nameColumn = new TreeColumn(viewerTree, SWT.LEFT, DOCUMENT_INDEX);
        nameColumn.setText(Messages.docView_documentColumn);
        viewerTreeLayout.addColumnData(new ColumnWeightData(DOCUMENT_WEIGHT));

        final TreeColumn detailColumn = new TreeColumn(viewerTree, SWT.CENTER, TYPE_INDEX);
        detailColumn.setText(Messages.docView_typeColumn);
        viewerTreeLayout.addColumnData(new ColumnWeightData(TYPE_WEIGHT));
       
        final TreeColumn descColumn = new TreeColumn(viewerTree, SWT.LEFT, DESCRIPTION_INDEX);
        descColumn.setText(Messages.docView_descriptionColumn);
        viewerTreeLayout.addColumnData(new ColumnWeightData(DESCRIPTION_WEIGHT));
       
        viewerTree.setLayout(viewerTreeLayout);
       
        viewer = new TreeViewer(viewerTree);
        viewer.setContentProvider(new DocumentViewContentProvider());
View Full Code Here

Examples of org.eclipse.jface.viewers.TableLayout

      Tree tree = viewer.getTree();
        tree.setLinesVisible(true);
        tree.setHeaderVisible(true);
       
        tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,true));
        TableLayout tableLayout=new TableLayout();
        tableLayout.addColumnData(new ColumnWeightData(1,200));
        tableLayout.addColumnData(new ColumnWeightData(3,200));
        TreeColumn nameColumn=new TreeColumn(tree, SWT.LEFT);
        nameColumn.setWidth(200);
        TreeColumn infoColumn=new TreeColumn(tree, SWT.LEFT|SWT.H_SCROLL);
        viewer.setContentProvider(new SummaryDataProvider());
        viewer.setLabelProvider(new SummaryLabelProvider());
View Full Code Here

Examples of org.grouplens.lenskit.util.table.TableLayout

    /**
     * Prepare the evaluation by opening all outputs and initializing metrics.
     */
    ExperimentOutputs openExperimentOutputs(ExperimentOutputLayout layouts, MeasurementSuite measures, TableWriter results, Closer closer) throws IOException {
        TableLayout resultLayout = layouts.getResultsLayout();
        TableWriter allResults = results;
        if (outputFile != null) {
            TableWriter disk = closer.register(CSVWriter.open(outputFile, resultLayout));
            allResults = new MultiplexedTableWriter(resultLayout, allResults, disk);
        }
View Full Code Here

Examples of org.onemind.swingweb.component.layout.TableLayout

    }

    public Container getDemoArea()
    {
        JPanel pnl = new JPanel();
        TableLayout layout = new TableLayout(pnl);
        pnl.setLayout(layout);
        layout.getConstraint().fill = GridBagConstraints.BOTH;
        layout.getConstraint().insets = new Insets(5, 5, 5, 5);
        Icon icon = new ImageIcon(getClass().getResource("/org/onemind/swingweb/widgetdemo/icecream.jpg"));

        /** labels **/
        //just a label
        JLabel lbl = new JLabel("This is a yellow JLabel");
        lbl.setForeground(Color.YELLOW);
        layout.addNextRow(lbl);
       
        //label with colors
        lbl = new JLabel("<html>This is a <font color=\"blue\"><i>html</i></font> JLabel</html>");
        layout.addNextRow(lbl);
       
        //label with icon
        lbl = new JLabel("JLabel with icon");
        lbl.setIcon(icon);
        layout.addNextRow(lbl);

        //disabled label
        lbl = new JLabel("Disabled JLabel");
        layout.addNextRow(lbl);
       
        /** buttons **/
        //button
        JButton btn = new JButton("Button1");
        btn.setBackground(Color.YELLOW);
        layout.addNextRow(btn);
        layout.addNextCell(new JLabel("Just a JButton with yellow background"));
       
        //button with listener
        btn = new JButton("Button2");
        btn.addActionListener(this);
        layout.addNextRow(btn);
        layout.addNextCell(new JLabel("JButton with listener. Push will submit"));
       
        //button with no border
        btn = new JButton("Button3");
        btn.setBorder(null);
        layout.addNextRow(btn);
        layout.addNextCell(new JLabel("JButton with no border"));
       
        //button with icon
        btn = new JButton("Button4");
        btn.setIcon(icon);
        layout.addNextRow(btn);
        layout.addNextCell(new JLabel("JButton with icon"));
       
        /** checkboxes **/
        //button
        JCheckBox checkbox = new JCheckBox("Checkbox1");
        checkbox.setBackground(Color.YELLOW);
        layout.addNextRow(checkbox);
        layout.addNextCell(new JLabel("Just a JCheckbox with yellow background"));
       
        //button with listener
        checkbox = new JCheckBox("Checkbox2");
        checkbox.addChangeListener(this);
        layout.addNextRow(checkbox);
        layout.addNextCell(new JLabel("JCheckBox with change listener. Push will submit"));
       
        //button in a group
        JPanel subPanel = new JPanel();
        subPanel.setLayout(new GridLayout(1, 2));
        ButtonGroup group = new ButtonGroup();
        checkbox = new JCheckBox("Checkbox3");
        group.add(checkbox);
        subPanel.add(checkbox);
        checkbox = new JCheckBox("Checkbox4");
        group.add(checkbox);
        subPanel.add(checkbox);
        layout.addNextRow(subPanel);
        layout.addNextCell(new JLabel("JCheckBox in button group. Push always submit"));
       
        /** radio buttons **/
//      button in a group
        subPanel = new JPanel();
        subPanel.setLayout(new GridLayout(1, 2));
        group = new ButtonGroup();
        JRadioButton rbtn = new JRadioButton("RadioButton1");
        group.add(rbtn);
        subPanel.add(rbtn);
        rbtn = new JRadioButton("RadioButton2");
        group.add(rbtn);
        subPanel.add(rbtn);
        layout.addNextRow(subPanel);       
        layout.addNextCell(new JLabel("RadioButtons in button group"));
       
        //button in a group with listener
        subPanel = new JPanel();
        subPanel.setLayout(new GridLayout(1, 2));
        group = new ButtonGroup();
        rbtn = new JRadioButton("RadioButton1");
        group.add(rbtn);
        rbtn.addChangeListener(this);
        subPanel.add(rbtn);
        rbtn = new JRadioButton("RadioButton2");
        group.add(rbtn);
        rbtn.addActionListener(this);
        subPanel.add(rbtn);
        layout.addNextRow(subPanel);       
        layout.addNextCell(new JLabel("RadioButtons with change/action listener in button group. Push will submit"));
       
        /** text demo **/
        //Text field
        JTextField fld = new JTextField();
        fld.setColumns(10);
        fld.setText("Test");
        layout.addNextRow(fld);
        layout.addNextCell(new JLabel("Just a text field"));
       
        //Text field with TextListner
        fld = new JTextField();
        fld.setColumns(10);
        fld.setText("Test");
        layout.addNextRow(fld);
        layout.addNextCell(new JLabel("Texd field with text listener"));
       
        //Password field
        fld = new JPasswordField();
        fld.setColumns(10);
        layout.addNextRow(fld);
        layout.addNextCell(new JLabel("A password field"));
       
        //Text area
        JTextArea tfld = new JTextArea();
        tfld.setColumns(10);
        tfld.setRows(4);
        layout.addNextRow(tfld);
        layout.addNextCell(new JLabel("A text area"));
        return pnl;
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.TableLayout

    final String tableLayout = attrs.getValue(getUri(), "table-layout");
    if (tableLayout != null)
    {
      try
      {
        final TableLayout o = (TableLayout) ConverterRegistry.toPropertyValue(tableLayout, TableLayout.class);
        styleSheet.setStyleProperty(BandStyleKeys.TABLE_LAYOUT, o);
      }
      catch (BeanException e)
      {
        throw new ParseException("Attribute 'table-layout' is not of an expected value.", getLocator());
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.style.TableLayout

    }
    if (style.isLocalKey(BandStyleKeys.TABLE_LAYOUT))
    {
      try
      {
        final TableLayout value = (TableLayout) style.getStyleProperty(BandStyleKeys.TABLE_LAYOUT);
        final String valueAsString = ConverterRegistry.toAttributeValue(value);
        bandStyleAtts.setAttribute(BundleNamespaces.STYLE, "table-layout", valueAsString);
      }
      catch (BeanException e)
      {
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.