[TeamTalk 133]: [670] TeamTalk/Agents/PenDecoder: 1) Now undocked windows are always on top
bfrisch@edam.speech.cs.cmu.edu
bfrisch at edam.speech.cs.cmu.edu
Thu Jul 26 21:59:41 EDT 2007
An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/teamtalk-developers/attachments/20070726/490547a4/attachment.html
-------------- next part --------------
Modified: TeamTalk/Agents/PenDecoder/nbproject/genfiles.properties
===================================================================
--- TeamTalk/Agents/PenDecoder/nbproject/genfiles.properties 2007-07-26 23:48:20 UTC (rev 669)
+++ TeamTalk/Agents/PenDecoder/nbproject/genfiles.properties 2007-07-27 01:59:41 UTC (rev 670)
@@ -5,4 +5,4 @@
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=6ba8dec9
nbproject/build-impl.xml.script.CRC32=714dbfa4
-nbproject/build-impl.xml.stylesheet.CRC32=20b9345e
+nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21
Modified: TeamTalk/Agents/PenDecoder/src/edu/cmu/ravenclaw/pendecoder/PenDecoderDisplay.java
===================================================================
--- TeamTalk/Agents/PenDecoder/src/edu/cmu/ravenclaw/pendecoder/PenDecoderDisplay.java 2007-07-26 23:48:20 UTC (rev 669)
+++ TeamTalk/Agents/PenDecoder/src/edu/cmu/ravenclaw/pendecoder/PenDecoderDisplay.java 2007-07-27 01:59:41 UTC (rev 670)
@@ -134,6 +134,10 @@
mapCanvasFrame.setVisible(true);
consoleFrame.setVisible(true);
imagerFrame.setVisible(true);
+
+ mapCanvasFrame.setAlwaysOnTop(true);
+ consoleFrame.setAlwaysOnTop(true);
+ imagerFrame.setAlwaysOnTop(true);
}
/**
@@ -144,6 +148,10 @@
consoleFrame.setVisible(false);
imagerFrame.setVisible(false);
+ mapCanvasFrame.setAlwaysOnTop(false);
+ consoleFrame.setAlwaysOnTop(false);
+ imagerFrame.setAlwaysOnTop(false);
+
//clear components from undocked frame
mapCanvasFrame.setContentPane(new JPanel());
consoleFrame.setContentPane(new JPanel());
@@ -512,12 +520,20 @@
JMenuBar menuBar = new JMenuBar();
JMenu menu;
JMenuItem mi;
+
menu = new JMenu("File");
menuBar.add(menu);
exitAction = new ExitListener();
mi = new JMenuItem("Exit");
menu.add(mi);
mi.addActionListener(exitAction);
+
+ menu = new JMenu("Option");
+ menuBar.add(menu);
+ mi = new JCheckBoxMenuItem("Always On Top While Docked");
+ menu.add(mi);
+ mi.addActionListener(new AlwaysOnTopListener((JCheckBoxMenuItem) mi));
+
menu = new JMenu("Help");
menuBar.add(menu);
mi = new JMenuItem("About");
@@ -548,6 +564,24 @@
}
}
+ /**
+ * The listener for the about button.
+ */
+ class AlwaysOnTopListener implements ActionListener {
+ JCheckBoxMenuItem item = null;
+ void AlwaysOnTopLister(JCheckBoxMenuItem item) {this.item = item;}
+
+ public void actionPerformed(ActionEvent e) {
+ if (this.item.isSelected()) {
+ dockedFrame.setAlwaysOnTop(true);
+ }
+ else
+ {
+ dockedFrame.setAlwaysOnTop(false);
+ }
+ }
+ }
+
/**
* An entry point that displays everything but doesn't communicate with Olympus.
* This is just for debugging graphincs stuff.
Modified: TeamTalk/Agents/PenDecoder/src/tk/utils/Utils.java
===================================================================
--- TeamTalk/Agents/PenDecoder/src/tk/utils/Utils.java 2007-07-26 23:48:20 UTC (rev 669)
+++ TeamTalk/Agents/PenDecoder/src/tk/utils/Utils.java 2007-07-27 01:59:41 UTC (rev 670)
@@ -3,9 +3,6 @@
*
* Created on December 6, 2006, 2:11 PM
*
- * To change this template, choose Tools | Options and locate the template under
- * the Source Creation and Management node. Right-click the template and choose
- * Open. You can then make changes to the template in the Source Editor.
*/
package tk.utils;
More information about the TeamTalk-developers
mailing list