Changeset 664 for trunk/src/org/expeditee/items/Item.java
- Timestamp:
- 01/08/14 10:37:24 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Item.java
r656 r664 159 159 160 160 private String _tooltip = null; 161 private Text _tooltipItem = null; 161 private static Text _tooltipItem = null; 162 private static Item _tooltipOwner = null; 162 163 163 164 public static void DuplicateItem(Item source, Item dest) { … … 1129 1130 public void setTooltip(String tooltip) { 1130 1131 _tooltip = tooltip; 1131 _tooltipItem = null;1132 1132 } 1133 1133 … … 1136 1136 } 1137 1137 1138 public static void clearTooltipOwner() { 1139 _tooltipOwner = null; 1140 } 1141 1138 1142 public void paintTooltip(Graphics2D g) { 1139 // don't try to show an empty tooltip 1143 if(_tooltipOwner != this) { 1144 _tooltipItem = null; 1145 _tooltipOwner = this; 1146 } 1147 // generate tooltip item 1140 1148 if(_tooltipItem == null) { 1141 1149 if(_tooltip != null && _tooltip.trim().length() != 0) { 1142 _tooltipItem = (Text) getParentOrCurrentFrame().get StatsTextItem(_tooltip);1150 _tooltipItem = (Text) getParentOrCurrentFrame().getTooltipTextItem(_tooltip); 1143 1151 _tooltipItem.setWidth(300); 1144 1152 } else {
Note:
See TracChangeset
for help on using the changeset viewer.