Examples of GCFactory


Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

        Point clickPoint = new Point(event.x, event.y);
        int row = CellEdgeDetectUtil.getRowPositionToResize(natTable,
                clickPoint);

        InitializeAutoResizeRowsCommand command = new InitializeAutoResizeRowsCommand(
                natTable, row, natTable.getConfigRegistry(), new GCFactory(
                        natTable));
        natTable.doCommand(command);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

        Point clickPoint = new Point(event.x, event.y);
        int column = CellEdgeDetectUtil.getColumnPositionToResize(natTable,
                clickPoint);

        InitializeAutoResizeColumnsCommand command = new InitializeAutoResizeColumnsCommand(
                natTable, column, natTable.getConfigRegistry(), new GCFactory(
                        natTable));
        natTable.doCommand(command);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

                    public void widgetSelected(SelectionEvent event) {
                        int columnPosition = getNatEventData(event)
                                .getColumnPosition();
                        natTable.doCommand(new InitializeAutoResizeColumnsCommand(
                                natTable, columnPosition, natTable
                                        .getConfigRegistry(), new GCFactory(
                                        natTable)));
                    }
                });
            }
        };
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

                    public void widgetSelected(SelectionEvent event) {
                        int rowPosition = getNatEventData(event)
                                .getRowPosition();
                        natTable.doCommand(new InitializeAutoResizeRowsCommand(
                                natTable, rowPosition, natTable
                                        .getConfigRegistry(), new GCFactory(
                                        natTable)));
                    }
                });
            }
        };
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

                    public void widgetSelected(SelectionEvent event) {
                        int columnPosition = getNatEventData(event)
                                .getColumnPosition();
                        natTable.doCommand(new InitializeAutoResizeColumnsCommand(
                                natTable, columnPosition, natTable
                                        .getConfigRegistry(), new GCFactory(
                                        natTable)));
                    }
                });
            }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

public class AutoResizeColumnCommandFixture extends
        InitializeAutoResizeColumnsCommand {

    public AutoResizeColumnCommandFixture() {
        super(new DataLayerFixture(), 2, new ConfigRegistry(), new GCFactory(
                new Image(Display.getDefault(), new Rectangle(0, 0, 100, 100))));

        ConfigRegistry configRegistry = (ConfigRegistry) getConfigRegistry();
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                new Style());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

public class AutoResizeRowCommandFixture extends
        InitializeAutoResizeRowsCommand {

    public AutoResizeRowCommandFixture() {
        super(new DataLayerFixture(), 2, new ConfigRegistry(), new GCFactory(
                new Image(Display.getDefault(), new Rectangle(0, 0, 100, 100))));

        ConfigRegistry configRegistry = (ConfigRegistry) getConfigRegistry();
        configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,
                new Style());
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

        configRegistry = new ConfigRegistry();
        new DefaultNatTableStyleConfiguration()
                .configureRegistry(configRegistry);

        img = new Image(Display.getDefault(), new Rectangle(0, 0, 200, 150));
        gcFactory = new GCFactory(img);

        // Use a common, foxed width font to avoid failing the test on a
        // different platform
        Font normalFont = GUIHelper.getFont(new FontData("Courier", 8,
                SWT.NORMAL));
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

        dataProvider.setDataValue(1, 0, "Elephant");
        dataProvider.setDataValue(1, 1, "Cat");
        dataProvider.setDataValue(1, 2, "Rat");

        AutoResizeColumnCommandFixture command = new AutoResizeColumnCommandFixture();
        GCFactory gcFactory = command.getGCFactory();
        IConfigRegistry registry = command.getConfigRegistry();
        GC gc = gcFactory.createGC();
        int col0MaxTextWidth = new TextPainter().getPreferredWidth(
                new CellFixture("Longest Text"), gc, registry);
        int col1MaxTextWidth = new TextPainter().getPreferredWidth(
                new CellFixture("Elephant"), gc, registry);
        gc.dispose();
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.util.GCFactory

        dataProvider.setDataValue(0, 1, "Elephant");
        dataProvider.setDataValue(1, 1, "Cat");
        dataProvider.setDataValue(2, 1, "Rat");

        AutoResizeRowCommandFixture command = new AutoResizeRowCommandFixture();
        GCFactory gcFactory = command.getGCFactory();
        IConfigRegistry registry = command.getConfigRegistry();
        GC gc = gcFactory.createGC();
        int row0MaxTextHeight = new TextPainter().getPreferredHeight(
                new CellFixture(".."), gc, registry);
        int row1MaxTextHeight = new TextPainter().getPreferredHeight(
                new CellFixture("Elephant"), gc, registry);
        gc.dispose();
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.