save log only available if not applet mode

This commit is contained in:
fros4943 2008-04-02 16:42:39 +00:00
parent 8889712071
commit 26f339eea7

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: LogListener.java,v 1.8 2008/02/12 15:11:40 fros4943 Exp $ * $Id: LogListener.java,v 1.9 2008/04/02 16:42:39 fros4943 Exp $
*/ */
package se.sics.cooja.plugins; package se.sics.cooja.plugins;
@ -174,7 +174,6 @@ public class LogListener extends VisPlugin {
} }
if (!saveFile.exists() || saveFile.canWrite()) { if (!saveFile.exists() || saveFile.canWrite()) {
logger.debug("SAVING NOW!");
try { try {
BufferedWriter outStream = new BufferedWriter( BufferedWriter outStream = new BufferedWriter(
new OutputStreamWriter( new OutputStreamWriter(
@ -194,6 +193,11 @@ public class LogListener extends VisPlugin {
} }
}); });
if (gui.isVisualizedInApplet()) {
saveButton.setToolTipText("Not available in applet");
saveButton.setEnabled(false);
}
getContentPane().add(BorderLayout.CENTER, new JScrollPane(logTextArea)); getContentPane().add(BorderLayout.CENTER, new JScrollPane(logTextArea));
getContentPane().add(BorderLayout.SOUTH, new JScrollPane(filterPanel)); getContentPane().add(BorderLayout.SOUTH, new JScrollPane(filterPanel));