Package org.eclipse.nebula.widgets.nattable.extension.builder.model

Examples of org.eclipse.nebula.widgets.nattable.extension.builder.model.TableColumn


        StandaloneNatExampleRunner.run(800, 600, new NatTableBuilderExample());
    }

    public Control createExampleControl(Composite parent) {
        TableColumn[] columns = new TableColumn[] {
                new TableColumn(0, "securityId", "ISIN").setWidth(200)
                        .setEditor(Editors.getTextEditor()).setCategory("C1"),
                new TableColumn(1, "securityDescription", "Name")
                        .setStyle(new ColumnStyle()).setGroupName("A1")
                        .setCategory("C1"),
                new TableColumn(2, "rating", "Rating")
                        .setComparator(getIgnoreCaseComparator())
                        .setGroupName("A1").setCategory("C1"),
                new TableColumn(3, "issueDate", "issueDate").setCategory("C1"),
                new TableColumn(4, "pricingType", "Pricing type")
                        .setEditor(
                                Editors.getComboboxEditor(getPricingComboDataProvider()))
                        .setFilterRowEditor(
                                Editors.getComboboxEditor(getPricingComboDataProvider()))
                        .setCategory("C1"),

                new TableColumn(5, "bidPrice", "Bid price")
                        .setEditor(Editors.getTextEditor())
                        .setDisplayConverter(
                                new DefaultDoubleDisplayConverter())
                        .setGroupName("Pricing").setCategory("C1"),

                new TableColumn(6, "askPrice", "Ask price")
                        .setGroupName("Pricing")
                        .setDisplayConverter(
                                DisplayConverters
                                        .getDoubleDisplayConverter("##.00"))
                        .setCategory("C1"),

                new TableColumn(7, "lotSize", "Lot size").setCategory("C1"),
                new TableColumn(8, "publishFlag", "Published").setEditor(
                        Editors.getCheckBoxEditor()).setCategory("C1"),
                new TableColumn(9, "high52Week", "52 Week high")
                        .setCategory("C3"),
                new TableColumn(10, "low52Week", "52 week low")
                        .setCategory("C3"),
                new TableColumn(11, "eps", "EPS").setCategory("C2"),
                new TableColumn(12, "volume", "Volume").setCategory("C2"),
                new TableColumn(13, "marketCap", "Market cap.")
                        .setCategory("C2"),
                new TableColumn(14, "institutionOwned", "Institution owned")
                        .setCategory("C2"), };
        TableModel table = new TableModel(columns);

        builder = new NatTableBuilder<TableRowFixture>(parent, table,
                GlazedLists.eventList(TableRowFixture.getList()),
View Full Code Here


        }
        for (int colIndex = 0; colIndex < columns.length; colIndex++) {

            String filterRowLabel = FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX
                    + colIndex;
            TableColumn column = columns[colIndex];

            configRegistry.registerConfigAttribute(
                    FilterRowConfigAttributes.FILTER_COMPARATOR,
                    column.comparator, DisplayMode.NORMAL, filterRowLabel);
            configRegistry.registerConfigAttribute(
View Full Code Here

                style, DisplayMode.NORMAL, GridRegion.FILTER_ROW);
    }

    protected void configureEditing() {
        for (int colIndex = 0; colIndex < columns.length; colIndex++) {
            TableColumn column = columns[colIndex];

            if (column.isEditable) {
                IEditor editor = column.editor;

                // Column label has been registered already
View Full Code Here

public class ColumnCategoriesModelAssemblerTest {

    @Test
    public void assembleModel() throws Exception {
        TableColumn[] columnProps = new TableColumn[] {
                new TableColumn(0, "a"),
                new TableColumn(1, "b").setCategory("C1"),
                new TableColumn(2, "c").setCategory("C1"),
                new TableColumn(3, "d").setCategory("C2"),
                new TableColumn(4, "e").setCategory("C3"),
                new TableColumn(5, "f") };

        ColumnCategoriesModel model = ColumnCategoriesModelAssembler
                .setupColumnCategories(columnProps);

        Node rootCategory = model.getRootCategory().getChildren().get(0);
View Full Code Here

    }

    @Test
    public void assembleModelAddingAllToRoot() throws Exception {
        TableColumn[] columnProps = new TableColumn[] {
                new TableColumn(0, "a"), new TableColumn(1, "b"),
                new TableColumn(2, "c"), new TableColumn(3, "d"),
                new TableColumn(4, "e"), new TableColumn(5, "f") };

        ColumnCategoriesModel model = ColumnCategoriesModelAssembler
                .setupColumnCategories(columnProps);

        Node rootCategory = model.getRootCategory().getChildren().get(0);
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.extension.builder.model.TableColumn

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.