- Timestamp:
- 2006-06-20T09:44:47+12:00 (18 years ago)
- Location:
- trunk/gli
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/classes/dictionary.properties
r11882 r11939 784 784 NewCollectionPrompt.Collection_Name:Collection folder: 785 785 #NewCollectionPrompt.Collection_Name_Tooltip:Short collection name, used internally (must be 8 characters or less) 786 NewCollectionPrompt.Collection_Scope_Personal:This is a personal collection 787 NewCollectionPrompt.Collection_Scope_Shared:This is not a personal collection 786 788 NewCollectionPrompt.Error:Error in new collection. 787 789 NewCollectionPrompt.Instructions:To create a new collection fill out the fields below. -
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
r11791 r11939 38 38 import org.greenstone.gatherer.Gatherer; 39 39 import org.greenstone.gatherer.collection.BasicCollectionConfiguration; 40 import org.greenstone.gatherer.remote.RemoteGreenstoneServer; 40 41 import org.greenstone.gatherer.util.StaticStrings; 41 42 import org.greenstone.gatherer.util.Utility; … … 72 73 private JComboBox base_collection; 73 74 private JDialog self; 75 private JRadioButton personal_collection_button = null; 74 76 private JTextArea description; 75 77 private JTextField title; … … 148 150 Dictionary.setTooltip(base_collection, "NewCollectionPrompt.Base_Collection_Tooltip"); 149 151 152 JPanel collection_scope_pane = new JPanel(); 153 personal_collection_button = new JRadioButton(); 154 personal_collection_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 155 personal_collection_button.setOpaque(false); 156 Dictionary.setText(personal_collection_button, "NewCollectionPrompt.Collection_Scope_Personal"); 157 JRadioButton shared_collection_button = new JRadioButton(); 158 shared_collection_button.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 159 shared_collection_button.setOpaque(false); 160 Dictionary.setText(shared_collection_button, "NewCollectionPrompt.Collection_Scope_Shared"); 161 ButtonGroup collection_scope_group = new ButtonGroup(); 162 collection_scope_group.add(personal_collection_button); 163 collection_scope_group.add(shared_collection_button); 164 personal_collection_button.setSelected(true); 165 150 166 JPanel button_pane = new JPanel(); 151 167 create_button = new GLIButton(); … … 177 193 base_collection_pane.add(base_collection, BorderLayout.CENTER); 178 194 195 collection_scope_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); 196 collection_scope_pane.setLayout(new GridLayout(1,2)); 197 collection_scope_pane.add(personal_collection_button); 198 collection_scope_pane.add(shared_collection_button); 199 179 200 center_pane.setBorder(BorderFactory.createEmptyBorder(5,0,5,0)); 180 201 center_pane.setLayout(new BorderLayout()); … … 182 203 183 204 bottom_pane.setLayout(new BorderLayout()); 184 bottom_pane.add(base_collection_pane, BorderLayout.CENTER); 185 bottom_pane.add(button_pane, BorderLayout.SOUTH); 205 bottom_pane.add(base_collection_pane, BorderLayout.NORTH); 206 if (Gatherer.isGsdlRemote) { 207 bottom_pane.add(collection_scope_pane, BorderLayout.CENTER); 208 bottom_pane.add(button_pane, BorderLayout.SOUTH); 209 } 210 else { 211 bottom_pane.add(button_pane, BorderLayout.CENTER); 212 } 186 213 187 214 button_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); … … 234 261 } 235 262 263 // Remote collections that aren't shared have the user's username prefixed to the collection name 264 if (Gatherer.isGsdlRemote && personal_collection_button.isSelected()) { 265 name_buffer = new StringBuffer(RemoteGreenstoneServer.getUsername() + "-" + name_buffer.toString()); 266 } 267 236 268 // We need to ensure the filename is unique 237 269 int counter = 0; … … 249 281 new_name_buffer.append(suffix); 250 282 } 251 252 } 283 } 284 253 285 // All done 254 286 return new_name_buffer.toString();
Note:
See TracChangeset
for help on using the changeset viewer.