Changeset 133 for trunk/src/org/expeditee/items/Item.java
- Timestamp:
- 07/10/08 15:50:20 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Item.java
r131 r133 1890 1890 } 1891 1891 1892 public boolean hasAction() { 1893 return _actions != null && _actions.size() > 0; 1894 } 1895 1892 1896 public void setAction(String action) { 1893 1897 // Want to resize the highlight box for text items if actions are been … … 1922 1926 */ 1923 1927 protected void paintLink(Graphics2D g) { 1924 if (getLink() != null || getAction() != null) { 1928 boolean hasLink = getLink() != null; 1929 boolean hasAction = hasAction(); 1930 1931 if (hasLink || hasAction) { 1925 1932 g.setStroke(HIGHLIGHT_STROKE); 1926 if ( getLink() != null && getAction() != null) {1933 if (hasLink && hasAction) { 1927 1934 g.setColor(LINK_ACTION_COLOR); 1928 } else if ( getLink() != null) {1935 } else if (hasLink) { 1929 1936 g.setColor(LINK_COLOR); 1930 } else if ( getAction() != null) {1937 } else if (hasAction) { 1931 1938 g.setColor(ACTION_COLOR); 1932 1939 } … … 1945 1952 } 1946 1953 1947 if (getActionMark() && getAction() != null) {1954 if (getActionMark() && hasAction()) { 1948 1955 g.drawPolygon(getLinkPoly()); 1949 1956 g.fillPolygon(getLinkPoly()); … … 2084 2091 return box.getWidth() * box.getHeight(); 2085 2092 } 2086 2087 public int getEnclosureID() {2088 return _enclosure .hashCode();2093 2094 public int getEnclosureID() { 2095 return _enclosure == null ? 0 : _enclosure.hashCode(); 2089 2096 } 2090 2097
Note:
See TracChangeset
for help on using the changeset viewer.