Changeset 6642
- Timestamp:
- 2004-01-28T14:51:16+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java
r6622 r6642 51 51 public class Preferences 52 52 extends ModalDialog { 53 54 static final public String CONNECTION_PREFS = "connection"; 55 static final public String GENERAL_PREFS = "general"; 56 57 58 static final private Dimension LABEL_SIZE = new Dimension(240, 25); 59 static final private Dimension ROW_SIZE = new Dimension(640, 25); 60 static final private Dimension SIZE = new Dimension(640, 345); 61 static final private String TRUE = "true"; 53 62 54 63 private CheckList warning_preferences_check_list; … … 92 101 private Preferences self; 93 102 94 static final Dimension LABEL_SIZE = new Dimension(240, 25);95 static final Dimension ROW_SIZE = new Dimension(640, 25);96 static final Dimension SIZE = new Dimension(640, 345);97 static final String TRUE = "true";98 99 103 public Preferences() { 104 this(GENERAL_PREFS); 105 } 106 107 public Preferences(String initial_view) { 100 108 // Initialize 101 109 super(Gatherer.g_man, true); … … 112 120 tab_pane.add("Preferences.Mode", createModePreferences()); 113 121 tab_pane.add("Preferences.Workflow", createWorkflowPreferences()); 114 tab_pane.add("Preferences.Connection", createConnectionPreferences()); 122 JPanel connection_preferences = createConnectionPreferences(); 123 tab_pane.add("Preferences.Connection", connection_preferences); 115 124 tab_pane.add("Preferences.Warnings", createWarningPreferences()); 116 125 Dictionary.register(tab_pane); … … 148 157 setLocation(((frame_size.width - SIZE.width) / 2), ((frame_size.height - SIZE.height))); 149 158 159 // Bring the desired pane to the fore 160 if(initial_view.equals(CONNECTION_PREFS)) { 161 tab_pane.setSelectedComponent(connection_preferences); 162 } 163 else { 164 tab_pane.setSelectedComponent(general_preferences); 165 } 166 167 150 168 // Clean up 169 general_preferences = null; 170 connection_preferences = null; 151 171 frame_location = null; 152 172 frame_size = null; … … 156 176 tab_pane = null; 157 177 content_pane = null; 178 158 179 setVisible(true); 159 180 }
Note:
See TracChangeset
for help on using the changeset viewer.