org.pietschy.command
Class FaceManager

java.lang.Object
  extended by org.pietschy.command.FaceManager

public class FaceManager
extends java.lang.Object

This class is responsible for the management of the faces for a given CommandManager. It is used by faces to locate their parents. Construction of Face instances is delegated to an instance of AbstractFaceBuilder.

See Also:
CommandManager.getFaceManager(), setFaceBuilder(org.pietschy.command.AbstractFaceBuilder)

Constructor Summary
protected FaceManager(CommandManager manager)
           
 
Method Summary
 Face createFace(Command command, java.lang.String name)
           
protected  void extractFaces(org.w3c.dom.Element parent)
          This is invoked for every element that contains face information in a newly loaded configuration file.
 Face get(FaceId faceId)
           
 AbstractFaceBuilder getFaceBuilder()
          Gets the AbstractFaceBuilder currently in use by the manager.
 Face[] getFacesFor(Command parent)
          Retreives the faces that are registered for the specified parent id.
 boolean isMenuTooltipsEnabled()
          Checks if tooltip are globally enabled on menus.
 void put(Face face)
           
 void setFaceBuilder(AbstractFaceBuilder faceBuilder)
          Sets the AbstractFaceBuilder that the manager is to use for constructing faces.
 void setMenuTooltipsEnabled(boolean menuTooltipsEnabled)
          Configures the current menu tooltip state and notifies all faces that the state has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FaceManager

protected FaceManager(CommandManager manager)
Method Detail

setFaceBuilder

public void setFaceBuilder(AbstractFaceBuilder faceBuilder)
Sets the AbstractFaceBuilder that the manager is to use for constructing faces.

Parameters:
faceBuilder - the new builder to use.

getFaceBuilder

public AbstractFaceBuilder getFaceBuilder()
Gets the AbstractFaceBuilder currently in use by the manager.

Returns:
the AbstractFaceBuilder currently in use by the manager.

createFace

public Face createFace(Command command,
                       java.lang.String name)

isMenuTooltipsEnabled

public boolean isMenuTooltipsEnabled()
Checks if tooltip are globally enabled on menus. This setting will only be used by faces that haven't been explicitly configured to enable or disable tooltips on menus.

Returns:
true if tooltips are enabled on menus, false otherwise.

setMenuTooltipsEnabled

public void setMenuTooltipsEnabled(boolean menuTooltipsEnabled)
Configures the current menu tooltip state and notifies all faces that the state has changed. This setting will be used by all faces that haven't been explicitly configured to enable or disable tooltips on menus.

Parameters:
menuTooltipsEnabled - true to enable tooltips on menus, false to disable them.

extractFaces

protected void extractFaces(org.w3c.dom.Element parent)
This is invoked for every element that contains face information in a newly loaded configuration file.

Parameters:
parent - the element that contains one or more face elements.

getFacesFor

public Face[] getFacesFor(Command parent)
Retreives the faces that are registered for the specified parent id.


get

public Face get(FaceId faceId)

put

public void put(Face face)