com.tensegrity.skeleton.commands
Class LookAndFeelCommand

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

public final class LookAndFeelCommand
extends CommonBaseCommand

This Command allows users to change the application LookAndFeel.

Version:
$Id: LookAndFeelCommand.java,v 1.25 2005/09/13 13:50:04 BurkhardWick Exp $
Author:
MichaelKegel, Gilles Iachelini, Stepan RUtz

Constructor Summary
LookAndFeelCommand(ApplicationFrame applicationFrame, java.lang.String command, java.lang.String classname)
          Creates a new LookAndFeelCommand.
 
Method Summary
 java.lang.String getTitle()
          If the internal id is not null, this method returns a String holding the id from UIManager, otherwise the perform description of the superclass is returned.
 boolean isEnabled()
          Checks whether the current lookandfeel is not equal to this.
 void perform(java.lang.Object args)
          Updates the StatusBar with this commands title string.
 
Methods inherited from class com.tensegrity.skeleton.commands.CommonBaseCommand
getApplicationFrame
 
Methods inherited from class com.tensegrity.generic.command.BaseCommand
getDescription, getId, getPerformDescription, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookAndFeelCommand

public LookAndFeelCommand(ApplicationFrame applicationFrame,
                          java.lang.String command,
                          java.lang.String classname)
Creates a new LookAndFeelCommand. Such a command switches the LookAndFeel of the given ApplicationFrame based on the parameter classname which is the class name of a LookAndFeel.

Parameters:
applicationFrame - Application context for this command.
command - the ID of this command.
classname - name of the LookAndFeel class to switch to.
See Also:
WindowsLookAndFeel, MetalLookAndFeel, com.sun.java.swing.plaf.motif.MotifLookAndFeel
Method Detail

isEnabled

public boolean isEnabled()
Checks whether the current lookandfeel is not equal to this. Returns false if the class name of the current lookandfeel equals the internal member classname.

Specified by:
isEnabled in interface Command
Overrides:
isEnabled in class BaseCommand
See Also:
Command.isEnabled()

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)

getTitle

public java.lang.String getTitle()
Description copied from class: CommonBaseCommand
If the internal id is not null, this method returns a String holding the id from UIManager, otherwise the perform description of the superclass is returned.

Overrides:
getTitle in class CommonBaseCommand
Returns:
the unique id of this command.
See Also:
CommonBaseCommand.getTitle()


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