Ignore:
Timestamp:
08/29/08 08:17:54 (16 years ago)
Author:
ra33
Message:
 
File:
1 edited

Legend:

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

    r284 r286  
    192192                dest._overlay = source._overlay;
    193193                dest._mode = source._mode;// SelectedMode.None;
     194                //dest._highlightColor = source._highlightColor;
     195                //dest.setHighlight(source.getHighlight());
     196               
    194197                dest._visible = source._visible;
    195198                Frame parent = source.getParentOrCurrentFrame();
     
    234237
    235238        private int _id;
     239
     240        private Item _editTarget = this;
    236241
    237242        private String _creationDate = null;
     
    18311836
    18321837        public int setHighlightColor(Color c) {
     1838                if (!this.isVisible() && this.hasVector()) {
     1839                        for (Item i : this.getParentOrCurrentFrame().getVectorItems()) {
     1840                                if (i.getEditTarget() == this) {
     1841                                        i.setHighlightColor(c);
     1842                                }
     1843                        }
     1844                }
    18331845
    18341846                _highlightThickness = DEFAULT_HIGHLIGHT_THICKNESS;
     
    18901902        public void setHighlightMode(HighlightMode mode, Color color) {
    18911903                setHighlightColor(color);
    1892                 if (hasPermission(Permission.followLinks)) {
     1904                if (hasPermission(Permission.followLinks)
     1905                                || getEditTarget().hasPermission(Permission.followLinks)) {
    18931906                        if (_mode != mode) {
    18941907                                _mode = mode;
     
    26662679                }
    26672680        }
     2681
     2682        /**
     2683         * Sets the item to be pickup when the user attempts to pick this item up.
     2684         * EditTarget has a value of 'this' by default but may be set to other
     2685         * values if this item is on a vector.
     2686         *
     2687         * @param target
     2688         *            the item to be copied or picked up when the user attempts to
     2689         *            edit this item.
     2690         */
     2691        public void setEditTarget(Item target) {
     2692                _editTarget = target;
     2693        }
     2694
     2695        public Item getEditTarget() {
     2696                return _editTarget;
     2697        }
    26682698}
Note: See TracChangeset for help on using the changeset viewer.