Changeset 6154
- Timestamp:
- 2003-12-08T14:31:04+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/FileAssociationDialog.java
r6034 r6154 52 52 import org.greenstone.gatherer.gui.OpenCollectionDialog; 53 53 import org.greenstone.gatherer.gui.SimpleMenuBar; 54 import org.greenstone.gatherer.util.TableUtils; 54 55 import org.greenstone.gatherer.util.Utility; 55 56 import org.outerj.pollo.util.*; … … 105 106 JLabel existing_associations_label = new JLabel(); 106 107 existing_associations_table = new JTable(file_association_manager); 108 existing_associations_table.setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN); 107 109 existing_associations_table.setColumnSelectionAllowed(false); 108 110 existing_associations_table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 109 TableColumnModel column_model = existing_associations_table.getColumnModel();110 TableColumn column = column_model.getColumn(0);111 column.setWidth(75);112 111 JPanel lower_pane = new JPanel(); 113 112 JPanel details_pane = new JPanel(); … … 223 222 } 224 223 224 protected void processWindowEvent(WindowEvent event) { 225 if(event.getID() == WindowEvent.WINDOW_ACTIVATED) { 226 TableUtils.fixColumnToPreferredWidth(existing_associations_table, 0); 227 } 228 else { 229 super.processWindowEvent(event); 230 } 231 } 232 225 233 private class AddButtonListener 226 234 implements ActionListener { … … 303 311 if(extension_str.equals(current_extension_str)) { 304 312 // If the extensions are the same then remove is enabled 305 add_button.setEnabled(false);306 313 remove_button.setEnabled(true); 307 314 // But if the command is different, then enable replace 308 if(!command_str.equals(current_command_str)) { 315 if(current_command_str.length() == 0) { 316 add_button.setEnabled(true); 317 replace_button.setEnabled(false); 318 } 319 else if(!command_str.equals(current_command_str)) { 320 add_button.setEnabled(false); 309 321 replace_button.setEnabled(true); 310 322 } 311 323 else { 324 add_button.setEnabled(false); 312 325 replace_button.setEnabled(false); 313 326 }
Note:
See TracChangeset
for help on using the changeset viewer.