Changeset 10 for trunk/src/org/expeditee/gui/Browser.java
- Timestamp:
- 05/01/08 17:02:40 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Browser.java
r8 r10 1 1 package org.expeditee.gui; 2 2 3 import java.awt.Color; 3 4 import java.awt.Dimension; 4 5 import java.awt.Graphics; … … 15 16 import javax.swing.JFrame; 16 17 18 import org.expeditee.AbsoluteLayout; 17 19 import org.expeditee.actions.Actions; 18 20 import org.expeditee.actions.Misc; … … 30 32 public class Browser extends JFrame implements ComponentListener, 31 33 WindowListener, WindowStateListener { 34 32 35 /** 33 36 * Default version - just to stop eclipse from complaining about it. … … 38 41 39 42 public static Browser _theBrowser; 40 43 41 44 /** 42 45 * Constructs a new Browser object, then launches it … … 51 54 // FrameGraphics.ForceRepaint(); 52 55 } 53 56 54 57 public void setSizes(Dimension size) { 55 58 setSize(size); … … 91 94 UserSettings.InitialHeight)); 92 95 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 93 103 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 94 104 … … 127 137 DisplayIO.setCurrentFrame(firstFrame); 128 138 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); 136 142 } 137 143 … … 145 151 } 146 152 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 155 153 @Override 156 154 public void paint(Graphics g) { 157 155 super.paint(g); 158 156 FrameGraphics.Repaint(); 159 // System.out.print('p');160 157 } 161 158 … … 167 164 setupGraphics(); 168 165 repaint(); 169 // System.out.println("Resize");170 166 } 171 167 … … 218 214 */ 219 215 public void windowStateChanged(WindowEvent e) { 220 // 221 // 216 //FrameGraphics.Repaint(); 217 //System.out.println('C'); 222 218 } 223 219
Note:
See TracChangeset
for help on using the changeset viewer.