Ignore:
Timestamp:
05/19/08 12:03:18 (16 years ago)
Author:
ra33
Message:

Fixed a bunch of problems with rectangles and resizing the window, as well as adding some more unit tests etc.

File:
1 edited

Legend:

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

    r58 r67  
    1515import javax.swing.JOptionPane;
    1616
     17import org.expeditee.actions.NavigationActions;
    1718import org.expeditee.items.Item;
    1819import org.expeditee.items.ItemParentStateChangedEvent;
     
    5455        private static Robot _Robot;
    5556
    56         // public static JMenuBar _MenuBar = new JMenuBar();
    57 
    5857        private static boolean _TwinFrames = false;
    5958
     
    6160         * The title to display in the Title bar.
    6261         */
    63         public static final String TITLE = "Exp16May2008A";
     62        public static final String TITLE = "Exp17May2008A";
    6463
    6564        private DisplayIO() {
     
    114113                }
    115114
    116                 /*
    117                  * System.out.println("hs: " + hotspotPos + " start: " + start + " font: " +
    118                  * size + " cursor: " + (cursorSize - start));
    119                  */
    120 
    121115                int[] pixels = new int[cursorSize * cursorSize];
    122116
     
    229223
    230224        /**
    231          * Forces a complete repaint of the GUI and Frame
    232          */
    233         public static void repaint() {
    234                 _Browser.repaint();
    235         }
    236 
    237         /**
    238225         * Returns the top item (last added) of the Back-Stack (which is popped off)
    239226         *
     
    519506
    520507        /**
    521          * Adds the given JMenu to the JMenuBar of the GUI
    522          *
    523          * @param menu
    524          *            The menu to add
    525          */
    526         /*
    527          * public static void addMenu(JMenu menu) { if (menu.getItemCount() == 0)
    528          * return;
    529          *
    530          * _MenuBar.add(menu); // show progress _Browser.loadedMenu(menu.getText()); }
    531          */
    532 
    533         /**
    534          * Performs the same action as if the user had clicked on the MenuItem at
    535          * the given index in the Menu at the given index.
    536          *
    537          * @param menu
    538          *            The index of the menu (starts from 0)
    539          * @param index
    540          *            The index of the Item to simulate a click on (starts from 0)
    541          */
    542         /*
    543          * public static void activateMenuItem(int menu, int index) { if
    544          * (_MenuBar.getComponentCount() < menu) return;
    545          *
    546          * JMenu act = _MenuBar.getMenu(menu);
    547          *
    548          * if (act.getComponentCount() < index) return;
    549          *
    550          * act.getItem(index).doClick(); }
    551          *
    552          * public static int getMenuHeight() { if (_MenuBar.getHeight() < 5) return
    553          * 21;
    554          *
    555          * return _MenuBar.getHeight() - 5; }
    556          */
    557 
    558         /**
    559508         * Returns the current mouse X coordinate. This coordinate is relative to
    560509         * the left edge of the frame the mouse is in. It takes into account the
     
    589538
    590539        public static void Back() {
     540                NavigationActions.ResetLastAddToBack();
     541               
    591542                int side = getCurrentSide();
    592543
Note: See TracChangeset for help on using the changeset viewer.