Ignore:
Timestamp:
2013-01-16T20:07:37+13:00 (11 years ago)
Author:
davidb
Message:

General refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/GlamED/trunk/src/org/honours/gui/Interfaces.java

    r26717 r26734  
    44import java.util.List;
    55
     6import org.expeditee.actions.Misc;
    67import org.expeditee.gui.*;
    78import org.expeditee.items.Item;
     
    2021    //various frame names for the different interface overlays.
    2122    public static final String MAIN_INTERFACE_OVERLAY = "interface-overlays1";
    22     public static final String NAVIGATION_OVERLAY = "interface-overlays2";
     23   
    2324    public static final String LAYERS_BACK_BTN_OVERLAY = "interface-overlays3";
    2425    public static final String TOGGLE_TOOLS_OVERLAY = "interface-overlays4";
     26
     27    public static final String BLANK_TOOLBAR_OVERLAY = "interface-overlays6";
     28   
     29    //overlay displaying toolbar with "View Notes" option DISABLED.
     30    public static final String NAVIGATION_OVERLAY_VIEW_NOTES_UNCLICKABLE = "interface-overlays2";
     31   
     32    //overlay displaying toolbar with "View Notes" option ENABLED.
     33    public static final String NAVIGATION_OVERLAY_VIEW_NOTES_CLICKABLE = "interface-overlays11";
     34   
    2535    //public static final String DISPLAY_LAYERS_OVERLAY = "interface-overlays5";
    26     public static final String BLANK_TOOLBAR_OVERLAY = "interface-overlays6";
    2736    //public static final String BLANK_DISPLAY_LAYERS_OVERLAY = "interface-overlays7";
    2837   
     
    4857    private static int _notesAoY = 58;
    4958   
    50     private static String _overlayAnnotationData = "overlay-annotation";
     59    public static final String OVERLAY_TOOLBAR_DATA = "overlayToolbar";
    5160   
    5261    /**
     
    137146               
    138147                if(t.hasLink()){
    139                     if(t.getLink().equals(NAVIGATION_OVERLAY)){
     148                    if(t.getLink().equals(NAVIGATION_OVERLAY_VIEW_NOTES_UNCLICKABLE)){
    140149                        found = true;
    141150                    }
     
    149158           
    150159            Text newText = ciFrame.addText(_toolbarAoX,_toolbarAoY,AO_TEXT3,null);
    151             newText.setData("overlayToolbar");
    152             newText.setLink(NAVIGATION_OVERLAY);
     160            newText.setData(OVERLAY_TOOLBAR_DATA);
     161            newText.setLink(NAVIGATION_OVERLAY_VIEW_NOTES_UNCLICKABLE);
    153162        }
    154163   
     
    216225                    }
    217226                   
    218                 }
    219             }
    220            
    221             i++;
    222         }
    223        
    224         if(!found){
     227                   
     228                }
     229            }
     230           
     231            i++;
     232        }
     233       
     234        if(!found){
     235           
     236               
    225237           
    226238            //check for an overlay frame in notes frameset associated with this collection item.
     
    259271            newText.setData("overlayNotes");
    260272            newText.setLink(getNotesOverlayFrame.getName());
     273        }else{
     274           
     275            //Obtain link to toolbar and change it.
     276            Item getToolbarLinkItem = Misc.getItemContainingData(OVERLAY_TOOLBAR_DATA, ciFrame);
     277           
     278            if(getToolbarLinkItem.getLink().equals(NAVIGATION_OVERLAY_VIEW_NOTES_UNCLICKABLE))
     279                getToolbarLinkItem.setLink(NAVIGATION_OVERLAY_VIEW_NOTES_CLICKABLE);
     280           
    261281        }
    262282    }
Note: See TracChangeset for help on using the changeset viewer.