Changeset 676


Ignore:
Timestamp:
01/10/14 14:25:42 (10 years ago)
Author:
jts21
Message:

Switch to using a link instead of an action for navigation buttons, also add a setting for whether a link should be added to history (to enable navigation buttons that don't generate history)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/AttributeUtils.java

    r671 r676  
    203203                        _Attrib.put("Link",                 Item.class.getMethod("getLink"),
    204204                                                            Item.class.getMethod("setLink", pString));
     205                        _Attrib.put("AddToHistory",         Item.class.getMethod("getLinkHistory"),
     206                                                            Item.class.getMethod("setLinkHistory", pBool));
    205207                        _Attrib.put("Action",               Item.class.getMethod("getAction"),
    206208                                                            Item.class.getMethod("setActions", pList));
  • trunk/src/org/expeditee/gui/FrameCreator.java

    r670 r676  
    276276                Item previousButton = template.copy();
    277277                previousButton.setID(current.getNextItemID());
    278                 // don't store button navigation in history,
    279                 // since it's annoying to have to click back through all of it to get back to the profile frame
    280                 previousButton.setAction("gotoQuiet " + link);
     278                previousButton.setLink(link);
     279                previousButton.setLinkHistory(false);
     280                previousButton.setLinkMark(false);
    281281                current.addItem(previousButton);
    282282
  • trunk/src/org/expeditee/gui/FrameMouseActions.java

    r673 r676  
    824824
    825825                                Navigation.setLastNavigationItem(clickedOn);
    826                                 load(clickedOn.getAbsoluteLink());
     826                                load(clickedOn.getAbsoluteLink(), clickedOn.getLinkHistory());
    827827                                // DisplayIO.UpdateTitle();
    828828                                return;
     
    22642264        }
    22652265
    2266         private static void load(String toLoad) {
     2266        private static void load(String toLoad, boolean addToHistory) {
    22672267                if (FrameIO.isValidFrameName(toLoad)) {
    22682268                        DisplayIO.clearBackedUpFrames();
    2269                         FrameUtils.DisplayFrame(toLoad);
     2269                        FrameUtils.DisplayFrame(toLoad, addToHistory, true);
    22702270                } else {
    22712271                        MessageBay.errorMessage(toLoad + " is not a valid frame name.");
  • trunk/src/org/expeditee/io/DefaultFrameReader.java

    r659 r676  
    129129                       
    130130                        _ItemTags.put('A', Item.class.getMethod("setTooltip", pString));
     131                        _ItemTags.put('B', Item.class.getMethod("setLinkHistory", pBool));
    131132                       
    132133                        // Lines and constraints are created differently
  • trunk/src/org/expeditee/io/DefaultFrameWriter.java

    r656 r676  
    125125                       
    126126                        _ItemTags.put("A", Item.class.getMethod("getTooltip", param));
     127                        _ItemTags.put("B", Item.class.getMethod("getLinkHistory", param));
    127128
    128129                } catch (Exception e) {
  • trunk/src/org/expeditee/items/Item.java

    r665 r676  
    303303
    304304        private String _link = null;
     305       
     306        private boolean _linkHistory = true;
    305307
    306308        private StringBuffer _tag = new StringBuffer();
     
    16831685                invalidateCommonTrait(ItemAppearence.LinkChanged);
    16841686        }
     1687       
     1688        public void setLinkHistory(boolean value) {
     1689                _linkHistory = value;
     1690        }
     1691       
     1692        public boolean getLinkHistory() {
     1693                return _linkHistory;
     1694        }
    16851695
    16861696        public void setLinkFrameset(String frameset) {
Note: See TracChangeset for help on using the changeset viewer.