Revision 37584 branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackagesTablePanel.java
PackagesTablePanel.java | ||
---|---|---|
49 | 49 |
import org.gvsig.installer.lib.api.PackageInfo; |
50 | 50 |
import org.gvsig.installer.swing.api.SwingInstallerLocator; |
51 | 51 |
import org.gvsig.installer.swing.api.SwingInstallerManager; |
52 |
import org.gvsig.installer.swing.impl.execution.panel.filters.NameAndDescriptionFilter; |
|
52 | 53 |
import org.gvsig.installer.swing.impl.execution.panel.filters.PackageFilter; |
53 | 54 |
import org.gvsig.installer.swing.impl.execution.panel.model.PackagesTableModel; |
54 | 55 |
import org.gvsig.installer.swing.impl.execution.panel.model.PackagesTableModel.PackageOfficialRecommended; |
... | ... | |
75 | 76 |
private JTextPane descriptionTextPane; |
76 | 77 |
private JScrollPane pluginsScrollPane; |
77 | 78 |
private JTable pluginsTable; |
78 |
private CategoriesFilterPanel filterPanel;
|
|
79 |
private PackagePropertiesFilterPanel filterPanel;
|
|
79 | 80 |
private FastFilterButtonsPanel fastFilterPanel; |
80 | 81 |
private SelectPackagesPanel selectPackagesPanel; |
81 | 82 |
|
... | ... | |
121 | 122 |
|
122 | 123 |
descriptionScrollPane = new JScrollPane(descriptionTextArea); |
123 | 124 |
|
124 |
filterPanel = new CategoriesFilterPanel(this);
|
|
125 |
filterPanel.setVisible(false);
|
|
125 |
filterPanel = new PackagePropertiesFilterPanel(this);
|
|
126 |
filterPanel.setVisible(true);
|
|
126 | 127 |
|
127 | 128 |
fastFilterPanel = new FastFilterButtonsPanel(this); |
128 | 129 |
|
129 | 130 |
setLayout(new GridBagLayout()); |
130 | 131 |
|
131 |
// panel filter |
|
132 |
// left panel filter
|
|
132 | 133 |
gridBagConstraints = new GridBagConstraints(); |
133 | 134 |
gridBagConstraints.fill = GridBagConstraints.BOTH; |
134 | 135 |
gridBagConstraints.gridx = 0; |
135 |
gridBagConstraints.gridy = 0;
|
|
136 |
gridBagConstraints.gridy = 1;
|
|
136 | 137 |
gridBagConstraints.weightx = 0.13; |
137 | 138 |
gridBagConstraints.weighty = 1; |
138 |
gridBagConstraints.gridheight = 3;
|
|
139 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
139 |
gridBagConstraints.gridheight = 2;
|
|
140 |
gridBagConstraints.insets = new Insets(0, 2, 2, 2);
|
|
140 | 141 |
add(filterPanel, gridBagConstraints); |
141 | 142 |
|
142 |
// filters buttons panel |
|
143 |
// fast filters buttons panel
|
|
143 | 144 |
gridBagConstraints = new GridBagConstraints(); |
144 | 145 |
gridBagConstraints.fill = GridBagConstraints.BOTH; |
145 | 146 |
gridBagConstraints.gridx = 1; |
... | ... | |
186 | 187 |
pluginsTable.setModel(pluginsTableModel); |
187 | 188 |
pluginsTableModel.fireTableDataChanged(); |
188 | 189 |
TableColumnModel tableColumnModel = pluginsTable.getColumnModel(); |
190 |
// tableColumnModel.getColumn(0).setPreferredWidth(20); |
|
191 |
// tableColumnModel.getColumn(1).setPreferredWidth(20); |
|
192 |
// tableColumnModel.getColumn(2).setPreferredWidth(20); |
|
193 |
// tableColumnModel.getColumn(3).setPreferredWidth(340); |
|
194 |
// tableColumnModel.getColumn(4).setPreferredWidth(150); |
|
195 |
// tableColumnModel.getColumn(5).setPreferredWidth(55); |
|
189 | 196 |
tableColumnModel.getColumn(0).setPreferredWidth(20); |
190 | 197 |
tableColumnModel.getColumn(1).setPreferredWidth(20); |
191 | 198 |
tableColumnModel.getColumn(2).setPreferredWidth(20); |
192 |
tableColumnModel.getColumn(3).setPreferredWidth(325); |
|
193 |
tableColumnModel.getColumn(4).setPreferredWidth(150); |
|
194 |
tableColumnModel.getColumn(5).setPreferredWidth(55); |
|
195 |
// tableColumnModel.getColumn(0).setPreferredWidth(20); |
|
196 |
// tableColumnModel.getColumn(1).setPreferredWidth(20); |
|
197 |
// tableColumnModel.getColumn(2).setPreferredWidth(20); |
|
198 |
// tableColumnModel.getColumn(3).setPreferredWidth(225); |
|
199 |
// tableColumnModel.getColumn(4).setPreferredWidth(130); |
|
200 |
// tableColumnModel.getColumn(5).setPreferredWidth(53); |
|
199 |
tableColumnModel.getColumn(3).setPreferredWidth(225); |
|
200 |
tableColumnModel.getColumn(4).setPreferredWidth(130); |
|
201 |
tableColumnModel.getColumn(5).setPreferredWidth(53); |
|
201 | 202 |
|
202 | 203 |
} |
203 | 204 |
|
... | ... | |
289 | 290 |
selectPackagesPanel.updatePanel(); |
290 | 291 |
} |
291 | 292 |
|
293 |
public void setFilter(NameAndDescriptionFilter filter) { |
|
294 |
PackagesTableModel pluginsTableModel = (PackagesTableModel) pluginsTable |
|
295 |
.getModel(); |
|
296 |
pluginsTableModel.setFilter(filter); |
|
297 |
selectPackagesPanel.updatePanel(); |
|
298 |
} |
|
299 |
|
|
292 | 300 |
private class MyMouseListener implements MouseListener { |
293 | 301 |
|
294 | 302 |
public void mouseClicked(MouseEvent e) { |
Also available in: Unified diff