Changeset 774


Ignore:
Timestamp:
01/28/14 22:04:27 (10 years ago)
Author:
davidb
Message:

Mouse panning action updated to take into account the status of any items that are anchored, and therefore shouldn't move

Location:
trunk/src/org/expeditee
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/actions/Misc.java

    r766 r774  
    12261226                                continue;
    12271227                        } else if(i instanceof XRayable) {
     1228                            if (!i.isAnchored()) {
    12281229                                i.setPosition(i.getX() + x, i.getY() + y);
     1230                            }
    12291231                        } else {
     1232                            if (!i.isAnchored()) {
    12301233                                i.setXY(i.getX() + x, i.getY() + y);
     1234                            }
    12311235                        }
    12321236                        // update the polygon, otherwise stuff moves but leaves it's outline behind
     
    12341238                }
    12351239                for(InteractiveWidget iw : frame.getInteractiveWidgets()) {
     1240                    if (!iw.isAnchored()) {
    12361241                        iw.setPosition(iw.getX() + x, iw.getY() + y);
     1242                    }
    12371243                }
    12381244                // make sure we save the panning of the frame
  • trunk/src/org/expeditee/items/Item.java

    r741 r774  
    28732873
    28742874
     2875        public boolean isAnchored() {
     2876            return ((_anchorLeft != null) || (_anchorRight != null)
     2877                    || (_anchorTop != null) || (_anchorBottom != null));
     2878        }
     2879
    28752880        public Float getAnchorLeft() {
    28762881                return _anchorLeft;
  • trunk/src/org/expeditee/items/XRayable.java

    r737 r774  
    246246       
    247247        @Override
     248        public boolean isAnchored() {
     249                return _source.isAnchored();
     250        }
     251
     252        @Override
    248253        public void setAnchorTop(Float anchor) {
    249254                _source.setAnchorTop(anchor);
  • trunk/src/org/expeditee/items/widgets/InteractiveWidget.java

    r733 r774  
    17401740                            getY());
    17411741                getSource().setAnchorRight(anchor);
     1742        }
     1743
     1744        public boolean isAnchored() {
     1745                return getSource().isAnchored();
    17421746        }
    17431747       
  • trunk/src/org/expeditee/items/widgets/WidgetCorner.java

    r720 r774  
    147147        public String getLink() {
    148148                return _widgetSource.getSource().getLink();
     149        }
     150
     151        @Override
     152        public boolean isAnchored() {
     153                return _widgetSource.isAnchored();
    149154        }
    150155
  • trunk/src/org/expeditee/items/widgets/WidgetEdge.java

    r720 r774  
    120120        public void setAnchorRight(Float anchor) {
    121121                _widgetSource.setAnchorRight(anchor);
     122        }
     123
     124        @Override
     125        public boolean isAnchored() {
     126                return _widgetSource.isAnchored();
    122127        }
    123128       
Note: See TracChangeset for help on using the changeset viewer.