Changeset 8046
- Timestamp:
- 2004-08-24T16:51:36+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/checklist/Entry.java
r5593 r8046 2 2 3 3 import javax.swing.JCheckBox; 4 import org.greenstone.gatherer.Dictionary;5 import org.greenstone.gatherer.Gatherer;6 import org.greenstone.gatherer.msm.MetadataSet;7 import org.greenstone.gatherer.msm.MSMUtils;8 import org.greenstone.gatherer.util.Utility;9 import org.w3c.dom.Element;10 4 11 5 /** An Entry encapsulates a single row of the list, both its check box and the object the row represents. */ … … 24 18 super(object.toString()); 25 19 this.object = object; 26 // We also build a special tool tip for metadata sets.27 if(object instanceof MetadataSet) {28 MetadataSet set = (MetadataSet) object;29 // Build tooltip30 StringBuffer tip = new StringBuffer(Dictionary.get("NewCollectionPrompt.Set_Contains"));31 tip.append(":\n");32 for(int i = 0; i < set.size(); i++) {33 Element element = set.getElement(i);34 tip.append(MSMUtils.getIdentifier(element));35 if(i < set.size() - 1) {36 tip.append(", ");37 }38 }39 setToolTipText(Utility.formatHTMLWidth(tip.toString(), 60));40 }41 20 } 42 21 … … 66 45 */ 67 46 public Object getObject() { 68 //Gatherer.println("Retrieving the object for " + toString());69 47 if(object == null) { 70 48 return getText();
Note:
See TracChangeset
for help on using the changeset viewer.