com.tensegrity.skeleton.commands
Class FloatCommand

java.lang.Object
  extended bycom.tensegrity.generic.command.BaseCommand
      extended bycom.tensegrity.skeleton.commands.CommonBaseCommand
          extended bycom.tensegrity.skeleton.commands.FloatCommand
All Implemented Interfaces:
Command

public class FloatCommand
extends CommonBaseCommand

This Command toggles the float mode of the ApplicationFrame, which means creating a new ExtendedJFrame instance and putting the RootPane of the current Application into it.

Version:
$Id: FloatCommand.java,v 1.8 2005/06/03 14:52:37 AndreasEbbert Exp $
Author:
MichaelKegel, Gilles Iachelini, Stepan RUtz

Constructor Summary
FloatCommand(ApplicationFrame applicationFrame, java.lang.String command)
          Creates the FloatCommand.
 
Method Summary
protected  void float_()
          Creates a new ExtendedJFrame instance and puts the RootPane of the current Application into it.
 void perform(java.lang.Object args)
          Updates the StatusBar with this commands title string.
protected  void unfloat()
          This method adds the RootPane of the application back into the Applet instance.
 
Methods inherited from class com.tensegrity.skeleton.commands.CommonBaseCommand
getApplicationFrame, getTitle
 
Methods inherited from class com.tensegrity.generic.command.BaseCommand
getDescription, getId, getPerformDescription, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatCommand

public FloatCommand(ApplicationFrame applicationFrame,
                    java.lang.String command)
Creates the FloatCommand.

Parameters:
applicationFrame - Application context for this command.
command - the ID of this command.
Method Detail

float_

protected void float_()
Creates a new ExtendedJFrame instance and puts the RootPane of the current Application into it. A WindowListener is added to this frame, which will invoke the unfloat() method, when the frame is closed. The icon of the floatbutton is toggled and the previous content of the application is filled with a label which contains a text that indicates the application is in float mode.


unfloat

protected void unfloat()
This method adds the RootPane of the application back into the Applet instance. The content of the FloatFrame is removed and the instance will be discharded. If the SwingApplicationFrame.getFloatFrame() method returns null, this method does nothing.


perform

public void perform(java.lang.Object args)
Description copied from class: CommonBaseCommand
Updates the StatusBar with this commands title string. (non-Javadoc)

Specified by:
perform in interface Command
Overrides:
perform in class CommonBaseCommand
See Also:
Command.perform(java.lang.Object)


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.