Changeset 707
- Timestamp:
- 01/16/14 15:31:50 (10 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/AttributeUtils.java
r676 r707 266 266 Item.class.getMethod("setY", pFloat)); 267 267 _Attrib.put("Tooltip", Item.class.getMethod("getTooltip"), 268 Item.class.getMethod("setTooltip ", pString));268 Item.class.getMethod("setTooltips", pList)); 269 269 270 270 // Text Items … … 285 285 _Attrib.alias("d", "data"); 286 286 _Attrib.alias("f", "formula"); 287 _Attrib.alias("font", "family"); 287 288 _Attrib.alias("s", "size"); 288 289 _Attrib.alias("l", "link"); … … 363 364 try { 364 365 String s = getValue(prop, a, toExtract, true); 365 366 366 if (s == null) 367 367 continue; … … 573 573 if (nextAvp.getAttribute().equals(avp.getAttribute())) { 574 574 // strip the attribute from next 575 avp.appendValue(nextAvp.getValue() );575 avp.appendValue(nextAvp.getValue() + "\n"); 576 576 577 577 // if the attribute is not the same, then it may be a -
trunk/src/org/expeditee/gui/AttributeValuePair.java
r376 r707 9 9 10 10 public static final char VALUE_SEPARATOR_CHAR = ' '; 11 12 public static final char VALUE_DELIM_CHAR = '\n'; 11 13 12 14 public static final String SEPARATOR_STRING = "" + SEPARATOR_CHAR … … 165 167 _value = new SString(value.trim()); 166 168 else 167 _value.parse(_value.stringValue() + VALUE_ SEPARATOR_CHAR169 _value.parse(_value.stringValue() + VALUE_DELIM_CHAR 168 170 + value.trim()); 169 171 } -
trunk/src/org/expeditee/io/DefaultFrameWriter.java
r676 r707 69 69 _ItemTags.put("s", Item.class.getMethod("getDateCreated", param)); 70 70 _ItemTags.put("d", Item.class.getMethod("getColor", param)); 71 _ItemTags.put("G", Item.class 72 .getMethod("getBackgroundColor", param)); 71 _ItemTags.put("G", Item.class.getMethod("getBackgroundColor", param)); 73 72 _ItemTags.put("K", Item.class.getMethod("getBorderColor", param)); 74 73 _ItemTags.put("H", Item.class.getMethod("getAnchorRight", param)); … … 114 113 _ItemTags.put("a", Text.class.getMethod("getWordSpacing", param)); 115 114 _ItemTags.put("b", Text.class.getMethod("getLetterSpacing", param)); 116 _ItemTags 117 .put("m", Text.class.getMethod("getInitialSpacing", param)); 115 _ItemTags.put("m", Text.class.getMethod("getInitialSpacing", param)); 118 116 _ItemTags.put("w", Text.class.getMethod("getWidthToSave", param)); 119 117 _ItemTags.put("k", Text.class.getMethod("getJustification", param)); -
trunk/src/org/expeditee/items/Item.java
r676 r707 16 16 import java.awt.geom.Rectangle2D; 17 17 import java.util.ArrayList; 18 import java.util.Arrays; 18 19 import java.util.Collection; 19 20 import java.util.ConcurrentModificationException; … … 28 29 import org.expeditee.actions.Misc; 29 30 import org.expeditee.actions.Simple; 31 import org.expeditee.gui.AttributeUtils; 30 32 import org.expeditee.gui.AttributeValuePair; 31 33 import org.expeditee.gui.DisplayIO; … … 158 160 protected boolean _filled = true; 159 161 160 private String_tooltip = null;162 private List<String> _tooltip = null; 161 163 private static Text _tooltipItem = null; 162 164 private static Item _tooltipOwner = null; … … 178 180 dest.setBorderColor(source.getBorderColor()); 179 181 180 dest.setTooltip (source.getTooltip());182 dest.setTooltips(source.getTooltip()); 181 183 dest.setData(source.getData()); 182 184 dest.setTag(source.getTag()); … … 1130 1132 public abstract void paint(Graphics2D g); 1131 1133 1134 public void setTooltips(List<String> tooltips) { 1135 if (tooltips == null || tooltips.size() == 0) { 1136 _tooltip = null; 1137 } else { 1138 _tooltip = new LinkedList<String>(tooltips); 1139 } 1140 } 1141 1132 1142 public void setTooltip(String tooltip) { 1133 _tooltip = tooltip; 1143 if(_tooltip == null || _tooltip.size() == 0) { 1144 _tooltip = new LinkedList<String>(); 1145 } 1146 if(tooltip != null && tooltip.trim().length() > 0) { 1147 _tooltip.add(tooltip); 1148 } 1134 1149 } 1135 1150 1136 public StringgetTooltip() {1151 public List<String> getTooltip() { 1137 1152 return _tooltip; 1138 1153 } … … 1149 1164 // generate tooltip item 1150 1165 if(_tooltipItem == null) { 1151 String tooltip = getTooltip(); 1152 if(tooltip != null && tooltip.trim().length() != 0) { 1153 _tooltipItem = (Text) getParentOrCurrentFrame().getTooltipTextItem(tooltip); 1154 _tooltipItem.setWidth(300); 1166 if(_tooltip != null && _tooltip.size() > 0) { 1167 StringBuffer tooltip = new StringBuffer(); 1168 for(String t : _tooltip) { 1169 tooltip.append(t).append("\n"); 1170 } 1171 if(tooltip.length() > 0) { 1172 tooltip.deleteCharAt(tooltip.length() - 1); 1173 } 1174 _tooltipItem = (Text) getParentOrCurrentFrame().getTooltipTextItem(""); 1175 for(String s : _tooltip) { 1176 // set text 1177 if(s.trim().toLowerCase().startsWith("text") && s.contains(":")) { 1178 _tooltipItem.appendLine(s.substring(s.indexOf(':') + 1).trim()); 1179 } else { 1180 AttributeUtils.setAttribute(_tooltipItem, new Text(s)); 1181 } 1182 } 1155 1183 } else { 1156 1184 return; -
trunk/src/org/expeditee/items/XRayable.java
r697 r707 115 115 116 116 @Override 117 public void setTooltips(List<String> tooltips) { 118 _source.setTooltips(tooltips); 119 } 120 121 @Override 117 122 public void setTooltip(String tooltip) { 118 123 _source.setTooltip(tooltip); … … 120 125 121 126 @Override 122 public StringgetTooltip() {127 public List<String> getTooltip() { 123 128 return _source.getTooltip(); 124 129 }
Note:
See TracChangeset
for help on using the changeset viewer.