Changeset 4559
- Timestamp:
- 2003-06-11T13:44:33+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/ArgumentConfiguration.java
r4415 r4559 222 222 boolean cont = true; 223 223 if(event.getSource() == ok) { 224 224 // Update the details stored in the data objects arguments. 225 225 if(custom.getText().length() > 0) { 226 226 data.setCustom(custom.getText()); 227 227 } 228 228 // Loop through each of the controls in the central pane, updating the matching argument as necessary. 229 229 for(int i = 0; i < central_pane.getComponentCount(); i++) { 230 230 Component component = central_pane.getComponent(i); … … 506 506 } 507 507 break; 508 } 509 508 } // end of switch 509 // Enable or disable as necessary. 510 510 if(argument.isRequired() || argument.isAssigned()) { 511 511 enabled.setSelected(true); … … 524 524 } 525 525 } 526 526 // Listener 527 527 if(value != null && !argument.isRequired()) { 528 528 enabled.addActionListener(new EnabledListener(one, two, list, value)); 529 529 } 530 530 // Layout 531 531 if(list == null) { 532 532 enabled.setBorder(BorderFactory.createEmptyBorder(0,0,5,0)); … … 563 563 } 564 564 setLayout(new BorderLayout()); 565 565 //add(owner_label, BorderLayout.NORTH); 566 566 add(inner_pane, BorderLayout.CENTER); 567 567 } … … 576 576 } 577 577 /** Identifies this control by returning the name of the Argument it is based on. 578 579 580 578 * @return The name of the Argument as a <strong>String</strong>. 579 * @see org.greenstone.gatherer.cdm.Argument 580 */ 581 581 public String toString() { 582 582 return argument.getName(); 583 583 } 584 584 /** Updates the enwrapped Argument using the values provided by the controls. 585 586 587 588 589 585 * @return <i>true</i> if the update was successful, <i>false</i> otherwise. 586 * @see org.greenstone.gatherer.cdm.ArgumentConfiguration.ArgumentControl.ListOption 587 * @see org.greenstone.gatherer.cdm.Language 588 * @see org.greenstone.gatherer.msm.ElementWrapper 589 */ 590 590 public boolean updateArgument() { 591 591 if(enabled.isSelected() || argument.isRequired()) {
Note:
See TracChangeset
for help on using the changeset viewer.