Package org.asem.eclipse.mii.model.shapes

Examples of org.asem.eclipse.mii.model.shapes.COLUMN


        col.getColumn().setWidth(200);
        col.getColumn().setText("Name");
        col.setLabelProvider(new ColumnLabelProvider() {
            @Override
            public String getText(Object element) {
                COLUMN col = (COLUMN) element;
                return col.name;
            }
        });

        col = new TableViewerColumn(viewer, SWT.NONE);
        col.getColumn().setWidth(200);
        col.getColumn().setText("Type");
        col.setLabelProvider(new ColumnLabelProvider() {
            @Override
            public String getText(Object element) {
                COLUMN col = (COLUMN) element;
                return col.type;
            }
        });

        viewer.setInput(columns);
View Full Code Here


            public void handleEvent(Event event) {
                if (event.widget.equals(set)) {
                    String name = columnName.getText();
                    String type = columnType.getText();
                    Set<COLUMN> cols = (Set<COLUMN>) viewer.getInput();
                    COLUMN col = new COLUMN(name, type);
                    cols.remove(col);
                    cols.add(col);
                    viewer.setInput(cols);
                }
                else if (event.widget.equals(delete)) {
                    TableItem[] items = viewer.getTable().getSelection();
                    if (items.length > 0) {
                        Set<COLUMN> cols = (Set<COLUMN>) viewer.getInput();
                        COLUMN col = (COLUMN)items[0].getData();
                        cols.remove(col);
                        viewer.setInput(cols);
                    }
                }
                else if (event.widget instanceof Table) {
                    TableItem[] items = ((Table)event.widget).getSelection();
                    if (items.length > 0) {
                        COLUMN col = (COLUMN)items[0].getData();
                        columnName.setText(col.name);
                        columnType.setText(col.type);
                    }
                }
            }
View Full Code Here

                NodeList nlist = doc.getElementsByTagName("Column");
                for (int i=0;i<nlist.getLength();i++) {
                    String name = ((Element)nlist.item(i)).getAttribute("Name");
                    String type = ((Element)nlist.item(i)).getAttribute("SQLDataType");
                    COLUMN col = new COLUMN(name, type);
                    columns.add(col);
                }

                in.close();
               
View Full Code Here

TOP

Related Classes of org.asem.eclipse.mii.model.shapes.COLUMN

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.