/** * Creates a memento instance suitable for the given JXTable. */ public static JXTableMemento create(JXTable table) { if (isSwingX16(table)) { return new JXTable16Memento(); } else { return new JXTable10Memento(); } }
/** * Use the given <code>renderer</code> as the new delegate renderer of the * {@link TreeTableCellRenderer} which is responsible for rendering the * data associated with each tree node in the hierarchy column. */ public void setDelegateRenderer(TableCellRenderer renderer) { checkAccessThread(); treeTableCellRenderer.setDelegate(renderer); }
/** * Use the given <code>editor</code> as the new delegate editor of the * {@link TreeTableCellEditor} which is responsible for editing the data * associated with each tree node in the hierarchy column. */ public void setDelegateEditor(TableCellEditor editor) { checkAccessThread(); treeTableCellEditor.setDelegate(editor); }
/** {@inheritDoc} */ @Override public void addLayoutComponent(Component component, Object constraints) { Constraints listLayoutConstraints = (Constraints)constraints; int index = listLayoutConstraints.getIndex(); int formConstraints = listLayoutConstraints.getFormConstraints(); CellComponents cellComponents = gridComponents.get(index); cellComponents.components.add(component); cellComponents.constraints.add(listLayoutConstraints); CellConstraints cellConstraints = deriveCellConstraints(formConstraints, logicalColumn(index), logicalRow(index)); super.addLayoutComponent(component, cellConstraints); }
/** * Creates a new list model that contains all objects located in the given * <code>source</code> and reacts to any changes in the given <code>source</code>. * * <p>The returned selection model is <strong>not thread-safe</strong>. Unless otherwise * noted, all methods are only safe to be called from the event dispatch thread. * </p> * * @param source the EventList that provides the elements */ public static <E> DefaultEventListModel<E> eventListModelWithThreadProxyList(EventList<E> source) { final EventList<E> proxySource = createSwingThreadProxyList(source); return new DefaultEventListModel<E>(proxySource, true); }
/** * {@inheritDoc} */ public void setTableFormat(TableFormat<? super E> tableFormat) { this.tableFormat = tableFormat; tableModelEvent.setStructureChanged(); fireTableChanged(tableModelEvent); }
/** * Add a listener to the list that's notified each time a change to * the selection occurs. * * Note that the change events fired by this class may include rows * that have been removed from the table. For this reason it is * advised not to <code>for()</code> through the changed range without * also verifying that each row is still in the table. */ public void addListSelectionListener(ListSelectionListener listener) { delegateSelectionModel.addListSelectionListener(listener); }
/** * Returns <tt>true</tt> if the tree node has child nodes; <tt>false</tt> * otherwise. */ protected boolean hasChildren() { return treeNodeData.hasChildren(); }
public TableCellComboBoxEditor() { // replace the super's editor with a JTextField of our own design editor = new TableCellTextField(); } }
/** * Returns whether the EventSelectionModel is editable or not. */ public boolean getEnabled() { return delegateSelectionModel.getEnabled(); }
/** * Gets the index of the first selected element. */ public int getMinSelectionIndex() { return delegateSelectionModel.getMinSelectionIndex(); }
/** * Inverts the current selection. */ public void invertSelection() { delegateSelectionModel.invertSelection(); }
/** {@inheritDoc} */ @Override public void addLayoutComponent(Component component, Object constraints) { Constraints listLayoutConstraints = (Constraints)constraints; int index = listLayoutConstraints.getIndex(); int formConstraints = listLayoutConstraints.getFormConstraints(); CellComponents cellComponents = gridComponents.get(index); cellComponents.components.add(component); cellComponents.constraints.add(listLayoutConstraints); CellConstraints cellConstraints = deriveCellConstraints(formConstraints, logicalColumn(index), logicalRow(index)); super.addLayoutComponent(component, cellConstraints); }
/** * Use the given <code>renderer</code> as the new delegate renderer of the * {@link TreeTableCellRenderer} which is responsible for rendering the * data associated with each tree node in the hierarchy column. */ public void setDelegateRenderer(TableCellRenderer renderer) { checkAccessThread(); treeTableCellRenderer.setDelegate(renderer); }
/** * Use the given <code>editor</code> as the new delegate editor of the * {@link TreeTableCellEditor} which is responsible for editing the data * associated with each tree node in the hierarchy column. */ public void setDelegateEditor(TableCellEditor editor) { checkAccessThread(); treeTableCellEditor.setDelegate(editor); }
/** * Creates a memento instance suitable for the given JXTable. */ public static JXTableMemento create(JXTable table) { if (isSwingX16(table)) { return new JXTable16Memento(); } else { return new JXTable10Memento(); } }
/** * {@inheritDoc} */ public void setTableFormat(TableFormat<? super E> tableFormat) { this.tableFormat = tableFormat; tableModelEvent.setStructureChanged(); fireTableChanged(tableModelEvent); }
/** {@inheritDoc} */ @Override public void addLayoutComponent(Component component, Object constraints) { Constraints listLayoutConstraints = (Constraints)constraints; int index = listLayoutConstraints.getIndex(); int formConstraints = listLayoutConstraints.getFormConstraints(); CellComponents cellComponents = gridComponents.get(index); cellComponents.components.add(component); cellComponents.constraints.add(listLayoutConstraints); CellConstraints cellConstraints = deriveCellConstraints(formConstraints, logicalColumn(index), logicalRow(index)); super.addLayoutComponent(component, cellConstraints); }
/** * Use the given <code>renderer</code> as the new delegate renderer of the * {@link TreeTableCellRenderer} which is responsible for rendering the * data associated with each tree node in the hierarchy column. */ public void setDelegateRenderer(TableCellRenderer renderer) { checkAccessThread(); treeTableCellRenderer.setDelegate(renderer); }
/** * Use the given <code>editor</code> as the new delegate editor of the * {@link TreeTableCellEditor} which is responsible for editing the data * associated with each tree node in the hierarchy column. */ public void setDelegateEditor(TableCellEditor editor) { checkAccessThread(); treeTableCellEditor.setDelegate(editor); }