/** * Restores the previously stored state to the given JXTable. */ public void restoreStateTo(JXTable table) { table.setModel(oldTableModel); table.setSelectionModel(oldSelectionModel); table.setSortable(oldSortable); }
/** * Restores the previously stored state to the given JXTable. */ public void restoreStateTo(JXTable table) { table.setModel(oldTableModel); table.setSelectionModel(oldSelectionModel); table.setSortable(oldSortable); table.getTableHeader().setDefaultRenderer(oldDefaultRenderer); }
protected void $initialize_05_setProperties() { if (log.isDebugEnabled()) { log.debug(this); } // apply 14 property setters categoryLabelPanel.setBackground(Color.WHITE); tablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); tablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); table.setSelectionModel(selectionModel); table.setAutoResizeMode(JXTable.AUTO_RESIZE_ALL_COLUMNS); descriptionPane.setColumnHeaderView(new JLabel(t("config.description"), SwingUtil.getUIManagerActionIcon("info"), 10)); SwingUtil.setText(description, t("config.no.option.selected")); reset.setIcon(SwingUtil.getUIManagerActionIcon("config-reset")); save.setIcon(SwingUtil.getUIManagerActionIcon("config-save")); copyCellValue.setIcon(SwingUtil.getUIManagerActionIcon("config-copy")); resetOptionValue.setIcon(SwingUtil.getUIManagerActionIcon("config-reset-option")); }
protected void $initialize_05_setProperties() { if (log.isDebugEnabled()) { log.debug(this); } // apply 14 property setters categoryLabelPanel.setBackground(Color.WHITE); tablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); tablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); table.setSelectionModel(selectionModel); table.setAutoResizeMode(JXTable.AUTO_RESIZE_ALL_COLUMNS); descriptionPane.setColumnHeaderView(new JLabel(t("config.description"), SwingUtil.getUIManagerActionIcon("information"), 10)); SwingUtil.setText(description, t("config.no.option.selected")); reset.setIcon(SwingUtil.getUIManagerActionIcon("config-reset")); save.setIcon(SwingUtil.getUIManagerActionIcon("config-save")); copyCellValue.setIcon(SwingUtil.getUIManagerActionIcon("config-copy")); resetOptionValue.setIcon(SwingUtil.getUIManagerActionIcon("config-reset-option")); }
/** * Restores the previously stored state to the given JXTable. */ public void restoreStateTo(JXTable table) { table.setModel(oldTableModel); table.setSelectionModel(oldSelectionModel); table.setSortable(oldSortable); table.getTableHeader().setDefaultRenderer(oldDefaultRenderer); }
table.setSelectionModel(selectionModel); table.setColumnControlVisible(true); table.getColumnExt(3).setComparator(new IssueStateComparator());
table.setSelectionModel(selectionModel); table.setColumnControlVisible(true); table.getColumnExt(3).setComparator(new IssueStateComparator());
table.getTableHeader().setDefaultRenderer(new JTableHeader().getDefaultRenderer()); table.getSelectionMapper().setEnabled(false); table.setSelectionModel(selectionModel); table.setColumnControlVisible(true);
table.getTableHeader().setDefaultRenderer(new JTableHeader().getDefaultRenderer()); table.getSelectionMapper().setEnabled(false); table.setSelectionModel(selectionModel); table.setColumnControlVisible(true);
tablePane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); tablePane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); table.setSelectionModel(selectionModel); table.setAutoResizeMode(JXTable.AUTO_RESIZE_ALL_COLUMNS); descriptionPane.setColumnHeaderView(new JLabel(t("config.description"), SwingUtil.getUIManagerActionIcon("information"), 10));
/** Installs the GlazedLists integration on the given JXTable. */ private JXTableSupport(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy) { this.table = table; this.tableFormat = tableFormat; // remember table state for restore on uninstall tableMemento = JXTableMemento.create(table); tableMemento.storeStateFrom(table); // set state needed to integrate with Glazed Lists tableMemento.configureStateForGlazedLists(table); // prepare and set TableModel und SelectionModel tableModel = GlazedListsSwing.eventTableModelWithThreadProxyList(eventList, tableFormat); table.setModel(tableModel); selectionModel = GlazedListsSwing.eventSelectionModelWithThreadProxyList(eventList); table.setSelectionModel(selectionModel); // finally install TableComparatorChooser tableComparatorChooser = TableComparatorChooser.<E>install(table, sortedList, sortingStrategy, tableFormat); }
/** Installs the GlazedLists integration on the given JXTable. */ private JXTableSupport(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy) { this.table = table; this.tableFormat = tableFormat; // remember table state for restore on uninstall tableMemento = JXTableMemento.create(table); tableMemento.storeStateFrom(table); // set state needed to integrate with Glazed Lists tableMemento.configureStateForGlazedLists(table); // prepare and set TableModel und SelectionModel tableModel = GlazedListsSwing.eventTableModelWithThreadProxyList(eventList, tableFormat); table.setModel(tableModel); selectionModel = GlazedListsSwing.eventSelectionModelWithThreadProxyList(eventList); table.setSelectionModel(selectionModel); // finally install TableComparatorChooser tableComparatorChooser = TableComparatorChooser.<E>install(table, sortedList, sortingStrategy, tableFormat); }
/** Installs the GlazedLists integration on the given JXTable. */ private JXTableSupport(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy) { this.table = table; this.tableFormat = tableFormat; // remember table state for restore on uninstall tableMemento = JXTableMemento.create(table); tableMemento.storeStateFrom(table); // set state needed to integrate with Glazed Lists tableMemento.configureStateForGlazedLists(table); // prepare and set TableModel und SelectionModel if (table.getFillsViewportHeight()) { // workaround the problem of repainting issues when this property is // set, because of the known mismatch between ListEvents and TableModelEvents // use another event conversion strategy in this case final Factory<E> eventAdapterFactory = GlazedListsSwing.manyToOneEventAdapterFactory(); tableModel = GlazedListsSwing.eventTableModelWithThreadProxyList(eventList, tableFormat, eventAdapterFactory); } else { // use default event conversion strategy tableModel = GlazedListsSwing.eventTableModelWithThreadProxyList(eventList, tableFormat); } table.setModel(tableModel); selectionModel = GlazedListsSwing.eventSelectionModelWithThreadProxyList(eventList); table.setSelectionModel(selectionModel); // finally install TableComparatorChooser tableComparatorChooser = TableComparatorChooser.<E>install(table, sortedList, sortingStrategy, tableFormat); }
rowHeader.removeColumn(rowHeader.getColumn(1)); rowHeader.setRowSorter(new RowSorterWrapper<TableModel>(rowSorter)); rowHeader.setSelectionModel(master.getSelectionModel());