Ignore:
Timestamp:
07/10/08 15:50:20 (16 years ago)
Author:
ra33
Message:

Turned search actions into search agents so they are run on a different thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/Item.java

    r131 r133  
    18901890        }
    18911891
     1892        public boolean hasAction() {
     1893                return _actions != null && _actions.size() > 0;
     1894        }
     1895       
    18921896        public void setAction(String action) {
    18931897                // Want to resize the highlight box for text items if actions are been
     
    19221926         */
    19231927        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) {
    19251932                        g.setStroke(HIGHLIGHT_STROKE);
    1926                         if (getLink() != null && getAction() != null) {
     1933                        if (hasLink && hasAction) {
    19271934                                g.setColor(LINK_ACTION_COLOR);
    1928                         } else if (getLink() != null) {
     1935                        } else if (hasLink) {
    19291936                                g.setColor(LINK_COLOR);
    1930                         } else if (getAction() != null) {
     1937                        } else if (hasAction) {
    19311938                                g.setColor(ACTION_COLOR);
    19321939                        }
     
    19451952                        }
    19461953
    1947                         if (getActionMark() && getAction() != null) {
     1954                        if (getActionMark() && hasAction()) {
    19481955                                g.drawPolygon(getLinkPoly());
    19491956                                g.fillPolygon(getLinkPoly());
     
    20842091                return box.getWidth() * box.getHeight();
    20852092        }
    2086        
    2087         public int getEnclosureID(){
    2088                 return _enclosure.hashCode();
     2093
     2094        public int getEnclosureID() {
     2095                return _enclosure == null ? 0 : _enclosure.hashCode();
    20892096        }
    20902097
Note: See TracChangeset for help on using the changeset viewer.