org.pietschy.command
Class DefaultFaceBuilder

java.lang.Object
  extended by org.pietschy.command.AbstractBuilder
      extended by org.pietschy.command.AbstractFaceBuilder
          extended by org.pietschy.command.DefaultFaceBuilder

public class DefaultFaceBuilder
extends AbstractFaceBuilder

Provides the default implementation of AbstractFaceBuilder.


Constructor Summary
DefaultFaceBuilder()
          Creats a new builder.
 
Method Summary
protected  void buildAccelerator(Face face, org.w3c.dom.Element commandElement)
          Interprets the accelerator string for the specified command and returns a representative KeyStroke.
protected  void buildIcons(Face face, org.w3c.dom.Element faceElement)
          Scans the specified face element, extracts all the faces specified and adds them to the face.
protected  void buildText(Face face, org.w3c.dom.Element faceElement)
          Configures the text properties of the face from the specified face element.
 void configure(Face face, org.w3c.dom.Element faceElement)
          Implementers of this class are responsible for building a Face element for the specified configuration data.
 Face createFace(FaceId id, FaceManager faceManager)
          Creates a new empty face with the specified id and uses the specified CommandManager for locating its parent.
protected  javax.swing.Icon loadIcon(org.w3c.dom.Element iconElement)
          Loads the icon specified by the element.
protected  void populateClientProperties(Face face, org.w3c.dom.Element faceRoot)
           
 
Methods inherited from class org.pietschy.command.AbstractBuilder
getAttribute, getCommandManager, getElementPath, getElementText, isEmptyElement, isIncluded, populateProperties, setCommandManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFaceBuilder

public DefaultFaceBuilder()
Creats a new builder.

Method Detail

createFace

public Face createFace(FaceId id,
                       FaceManager faceManager)

Creates a new empty face with the specified id and uses the specified CommandManager for locating its parent.

Specified by:
createFace in class AbstractFaceBuilder
Parameters:
faceManager - the FaceManager the face belongs to.
id - the id of the face.
Returns:
a new empty Face.

configure

public void configure(Face face,
                      org.w3c.dom.Element faceElement)
Implementers of this class are responsible for building a Face element for the specified configuration data.

Specified by:
configure in class AbstractFaceBuilder
Parameters:
face - the Face to configureMenu.
faceElement - the element defining the faces properties.

buildText

protected void buildText(Face face,
                         org.w3c.dom.Element faceElement)
Configures the text properties of the face from the specified face element.

Parameters:
face - the Face to configureMenu.
faceElement - the element defining the faces properties.

buildIcons

protected void buildIcons(Face face,
                          org.w3c.dom.Element faceElement)
Scans the specified face element, extracts all the faces specified and adds them to the face.

Parameters:
face - the Face to configureMenu.
faceElement - the element defining the faces properties.

loadIcon

protected javax.swing.Icon loadIcon(org.w3c.dom.Element iconElement)
Loads the icon specified by the element.

Parameters:
iconElement -

buildAccelerator

protected void buildAccelerator(Face face,
                                org.w3c.dom.Element commandElement)
Interprets the accelerator string for the specified command and returns a representative KeyStroke.

The property form for the accelerator is as follows.
commandId.accel=alt-shift-ctrl-meta-c


populateClientProperties

protected void populateClientProperties(Face face,
                                        org.w3c.dom.Element faceRoot)