Package org.jitterbit.ui.widget.table

Examples of org.jitterbit.ui.widget.table.TableColumnMetaData


        @Override
        public void actionPerformed(ActionEvent e) {
            model.addNewRow();
            int row = model.getRowCount() - 1;
            TableColumnMetaData col = PropertiesDescriptorTableModel.NAME;
            table.getAdaptee().editCellAt(row, col);
            TableCellEditor editor = table.getAdaptee().getCellEditor(row, col);
            if (editor instanceof TableStringEditor) {
                ((TableStringEditor) editor).makeSelected();
            }
View Full Code Here


            this.updateKeys = updateKeys;
            addRows(table.getAllColumns());
        }

        private static TableColumnMetaData[] createColumnDescriptors() {
            TableColumnMetaData name = new TableColumnMetaData("Column", String.class, false, 300);
            TableColumnMetaData type = new TableColumnMetaData("Type", String.class, false, 100);
            TableColumnMetaData value = new TableColumnMetaData("Update Value", String.class, true, 200);
            return new TableColumnMetaData[] { name, type, value };
        }
View Full Code Here

        KongaTable table = new KongaTable(tableModel) {

            @Override
            public String getToolTipText(MouseEvent event) {
                Point p = event.getPoint();
                TableColumnMetaData col = columnDescriptorAtPoint(p);
                if (col == DataElementTableModel.NAME) {
                    int row = rowAtPoint(p);
                    if (row >= 0) {
                        row = convertRowIndexToModel(row);
                        return tableModel.getRowObjectAt(row).getName();
                    }
                }
                return super.getToolTipText(event);
            }

            @Override
            protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) {
                // F8 is by default bound to a "focusHeader" action. We want to use it for
                // Resume Debugging. Just removing that KeyBinding from the InputMap does not seem
                // to work (I don't know why).
                if (KeyUtils.F8.equals(ks)) {
                    return false;
                }
                return super.processKeyBinding(ks, e, condition, pressed);
            }

            @Override
            public boolean isCellEditable(int row, int column) {
                TableColumnMetaData md = tableModel.getColumnDescriptor(column);
                if (md == DataElementTableModel.NAME) {
                    return false;
                }
                DataElement de = tableModel.getRowObjectAt(row);
                return de.getScope() == DataElementScope.GLOBAL || sourceDataElementValuesEditable;
View Full Code Here

    }

    private static TableColumnMetaData[] createColumnDescriptors(boolean includeDate) {
        List<TableColumnMetaData> cols = Lists.newArrayList(ENTITY);
        if (includeDate) {
            cols.add(new TableColumnMetaData("Date", DateCell.class, false, 150));
        }
        Collections.addAll(cols, new TableColumnMetaData("Result", Outcome.class, false, 80), new TableColumnMetaData(
                        "Details", String.class, false, 300));
        return cols.toArray(new TableColumnMetaData[cols.size()]);
    }
View Full Code Here

            return (Integer) getValueAt(row, USE_COUNT);
        }

        @Override
        public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
            TableColumnMetaData column = getColumnDescriptor(columnIndex);
            if (column == USE_COUNT && aValue instanceof Integer) {
                int count = (Integer) aValue;
                if (count <= 0) {
                    if (askAboutRemoval()) {
                        deleteRow(rowIndex);
View Full Code Here

            super(DatabaseColumn.class, createColumnDescriptors());
            addRows(table.getAllColumns());
        }

        private static TableColumnMetaData[] createColumnDescriptors() {
            TableColumnMetaData column = new TableColumnMetaData("Column", String.class, false, 300);
            TableColumnMetaData type = new TableColumnMetaData("Type", String.class, false, 100);
            TableColumnMetaData key = new TableColumnMetaData("Update Key", Boolean.class, true, 100);
            return new TableColumnMetaData[] { column, type, key };
        }
View Full Code Here

        @Override
        public Component prepare(JTable table, TableCellRenderer renderer, Component fromDefaultPreparation,
                        int row, int column) {
            boolean enabled = true;
            fromDefaultPreparation.setForeground(table.getForeground());
            TableColumnMetaData md = ((KongaTable) table).getColumnDescriptor(column);
            if (md == DataElementTableModel.VALUE) {
                DataElementTableModel model = (DataElementTableModel) table.getModel();
                enabled = !model.isNull(row);
                fromDefaultPreparation.setFont(valueFont);
            } else {
View Full Code Here

        return new Object[] { de.getDisplayName(), de.getValue(), de.getValue() == null };
    }

    @Override
    public boolean isCellEditable(int row, int column) {
        TableColumnMetaData md = getColumnDescriptor(column);
        if (md == VALUE) {
            return !getRowObjectAt(row).isArray();
        }
        return super.isCellEditable(row, column);
    }
View Full Code Here

    }

    @Override
    public void setValueAt(Object value, int row, int column) {
        super.setValueAt(value, row, column);
        TableColumnMetaData md = getColumnDescriptor(column);
        if (md == VALUE && value != null) {
            uncheckNullBox(row);
        } else if (md == IS_NULL) {
            if (Boolean.TRUE.equals(value)) {
                blankOutValue(row);
View Full Code Here

        return new Object[] { o.getName(), o.getType(), o.getDefaultValue(), };
    }

    @Override
    public boolean isCellEditable(int rowIndex, int columnIndex) {
        TableColumnMetaData column = getColumnDescriptor(columnIndex);
        MessagePropertyTableRow item = getRowObjectAt(rowIndex);
        if (column == NAME) {
            return item.isNameEditable();
        } else if (column == TYPE) {
            return item.isTypeEditable();
View Full Code Here

TOP

Related Classes of org.jitterbit.ui.widget.table.TableColumnMetaData

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.