Ignore:
Timestamp:
05/01/08 17:02:40 (16 years ago)
Author:
ra33
Message:

Added Interactive Widget Items

File:
1 edited

Legend:

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

    r8 r10  
    11package org.expeditee.gui;
    22
     3import java.awt.Color;
    34import java.awt.Dimension;
    45import java.awt.Graphics;
     
    1516import javax.swing.JFrame;
    1617
     18import org.expeditee.AbsoluteLayout;
    1719import org.expeditee.actions.Actions;
    1820import org.expeditee.actions.Misc;
     
    3032public class Browser extends JFrame implements ComponentListener,
    3133                WindowListener, WindowStateListener {
     34       
    3235        /**
    3336         * Default version - just to stop eclipse from complaining about it.
     
    3841
    3942        public static Browser _theBrowser;
    40 
     43       
    4144        /**
    4245         * Constructs a new Browser object, then launches it
     
    5154                // FrameGraphics.ForceRepaint();
    5255        }
    53 
     56       
    5457        public void setSizes(Dimension size) {
    5558                setSize(size);
     
    9194                                UserSettings.InitialHeight));
    9295
     96                //set the layout to absolute layout for widgets
     97                this.getContentPane().setLayout(new AbsoluteLayout());
     98                //enable the glasspane-for capturing all mouse events
     99                this.setGlassPane(new MouseEventRouter(getJMenuBar(), getContentPane()));
     100                this.getGlassPane().setVisible(true);
     101                this.getContentPane().setBackground(Color.white);
     102               
    93103                setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    94104
     
    127137                DisplayIO.setCurrentFrame(firstFrame);
    128138
    129                 // Create the action handler for the
    130                 FrameMouseActions mouse = new FrameMouseActions();
    131 
    132                 this.getContentPane().addMouseListener(mouse);
    133                 this.getContentPane().addMouseMotionListener(mouse);
    134                 this.addKeyListener(new FrameKeyboardActions());
    135                 this.getContentPane().addMouseWheelListener(mouse);
     139                FrameKeyboardActions keyboardListner = new FrameKeyboardActions();
     140                this.getContentPane().addKeyListener(keyboardListner);
     141                this.addKeyListener(keyboardListner);
    136142        }
    137143
     
    145151        }
    146152
    147         /*
    148          * public void loadedMenu(String menu) { if (g == null) return;
    149          *
    150          * g.setColor(this.getBackground()); g.fillRect(0, 0, this.getWidth(),
    151          * this.getHeight()); g.setColor(Color.BLACK); g.drawString("Loading Menu... " +
    152          * menu, this.getWidth() / 2 - 200, this .getHeight() / 2); }
    153          */
    154 
    155153        @Override
    156154        public void paint(Graphics g) {
    157155                super.paint(g);
    158156                FrameGraphics.Repaint();
    159                 // System.out.print('p');
    160157        }
    161158
     
    167164                setupGraphics();
    168165                repaint();
    169                 // System.out.println("Resize");
    170166        }
    171167
     
    218214         */
    219215        public void windowStateChanged(WindowEvent e) {
    220                 // FrameGraphics.Repaint();
    221                 // System.out.println('C');
     216                //FrameGraphics.Repaint();
     217                //System.out.println('C');
    222218        }
    223219
Note: See TracChangeset for help on using the changeset viewer.