Changeset 26717


Ignore:
Timestamp:
2013-01-14T17:43:14+13:00 (11 years ago)
Author:
davidb
Message:

Changed positioning of overlay link items.

Location:
other-projects/GlamED/trunk/src/org/honours
Files:
3 edited

Legend:

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

    r26606 r26717  
    8282       
    8383        //Set up main overlay display
     84        //Interfaces.setUpOverlayLocations();
    8485        Interfaces.setUpMainOverlay(_profile);
    8586       
     
    147148               
    148149                for(CollectionItem cItem : c.getItems()){
     150                   
     151                    Interfaces.setUpOverlayLocations(cItem);
    149152                    Interfaces.setUpToolbarOverlay(cItem);
    150153                    Interfaces.setUpToggleToolbarOverlay(cItem);
  • other-projects/GlamED/trunk/src/org/honours/gui/HonoursFrameIO.java

    r26699 r26717  
    160160            MessageBay.errorMessage("No notes to display");
    161161           
    162             //TODO: Create new note layer here?
    163162           
    164163            return;
  • other-projects/GlamED/trunk/src/org/honours/gui/Interfaces.java

    r26697 r26717  
    11package org.honours.gui;
    22
     3import java.awt.Dimension;
    34import java.util.List;
    45
    56import org.expeditee.gui.*;
     7import org.expeditee.items.Item;
    68import org.expeditee.items.Text;
    79
     
    4850    private static String _overlayAnnotationData = "overlay-annotation";
    4951   
    50    
    51     /** Method to set up overlay locations relative to the screen size. **/
    52     public static void setUpOverlayLocations(){
    53        
    54     }
    55    
    5652    /**
    5753     * This method sets up the main overlay on the profile
     
    6157    public static void setUpMainOverlay(Frame frame){
    6258       
     59       
     60       
    6361        List<Text> list = frame.getBodyTextItems(true);
    6462       
     
    9088       
    9189        FrameKeyboardActions.Refresh();
     90    }
     91   
     92   
     93    /** Method to set up overlay locations relative to the screen size. **/
     94    public static void setUpOverlayLocations(CollectionItem cItem){
     95       
     96        Frame frame = cItem.getFrame();
     97        //Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
     98       
     99        //Find the location of the frame name text item and use that for the overlay links.
     100        Item nameItem = frame.getNameItem();
     101       
     102        int x = nameItem.getX();
     103       
     104        _mainOverAoX = x;
     105        _toolbarAoX = x;
     106        _toggleAoX = x;
     107        _notesAoX = x;
     108       
     109    }
     110   
     111    public static void resetOverlayPosition(Text t) {
     112        Dimension maxSize = FrameGraphics.getMaxFrameSize();
     113        if (maxSize != null) {
     114            // setMaxWidth(maxSize.width);
     115            t.setPosition(maxSize.width - t.getBoundsWidth(), t.getBoundsHeight());
     116        }
    92117    }
    93118   
Note: See TracChangeset for help on using the changeset viewer.