List of usage examples for javax.swing RowSorter setSortKeys
public abstract void setSortKeys(List<? extends SortKey> keys);
From source file:pcgen.gui2.tabs.EquipInfoTab.java
public EquipInfoTab() { super("Equip"); //TODO: remove this when optimized sorting is implemented this.equipmentTable = new JDynamicTable() { @Override//from w w w. j av a2 s .c o m public void setModel(TableModel dataModel) { RowSorter<? extends TableModel> oldRowSorter = getRowSorter(); super.setModel(dataModel); RowSorter<? extends TableModel> newRowSorter = getRowSorter(); if (newRowSorter != null && oldRowSorter != null) { newRowSorter.setSortKeys(oldRowSorter.getSortKeys()); } } }; this.equipViewBox = new JComboBox<>(EquipView.values()); this.infoPane = new InfoPane(); this.equipmentSetTable = new JTreeTable() { @Override protected void configureEnclosingScrollPane() { //We do nothing so the table is displayed without a header } }; this.equipButton = new JButton(); this.unequipButton = new JButton(); this.unequipAllButton = new JButton(); this.moveUpButton = new JButton(); this.moveDownButton = new JButton(); this.equipSetBox = new JComboBox<>(); this.newSetButton = new JButton(); this.removeSetButton = new JButton(); this.exportTemplateButton = new JButton(); this.viewBrowserButton = new JButton(); this.exportFileButton = new JButton(); this.setNoteButton = new JButton(); this.expandAllButton = new JButton(); this.collapseAllButton = new JButton(); this.weightLabel = new JLabel(); this.loadLabel = new JLabel(); this.limitLabel = new JLabel(); initComponents(); }