org.springframework.richclient.command
Class CommandGroupJComponentBuilder

java.lang.Object
  extended by org.springframework.richclient.command.CommandGroupModelBuilder
      extended by org.springframework.richclient.command.CommandGroupJComponentBuilder

public abstract class CommandGroupJComponentBuilder
extends CommandGroupModelBuilder

CommandGroupComponentBuilder is a s-pecial case of the CommandGroupModelBuilderthat is specifically designed to build swing GUI components based on the passed in command-group. Basically it wraps the buildXXXModel method hierarchy of the CommandGroupModelBuilderinto a buildXXXComponent structure that does the necessary typecasting allong the way.

See Also:
CommandGroupModelBuilder

Constructor Summary
CommandGroupJComponentBuilder()
           
 
Method Summary
protected abstract  JComponent buildChildComponent(JComponent parentComponent, AbstractCommand command, int level)
          JComponent-building variant of the CommandGroupModelBuilder.buildChildModel(Object, AbstractCommand, int)
protected  Object buildChildModel(Object parentModel, AbstractCommand command, int level)
          Implementation wrapping around the #buildChildComponent(JComponent, AbstractCommand, int)dModel(AbstractCommand)
 JComponent buildComponent(CommandGroup commandGroup)
          JComponent-building variant of the CommandGroupModelBuilder.buildModel(CommandGroup)
protected abstract  JComponent buildGroupComponent(JComponent parentComponent, CommandGroup command, int level)
          JComponent-building variant of the CommandGroupModelBuilder.buildGroupModel(Object, CommandGroup, int)
protected  Object buildGroupModel(Object parentModel, CommandGroup commandGroup, int level)
          Implementation wrapping around the buildGroupComponent(JComponent, CommandGroup, int)
protected abstract  JComponent buildRootComponent(AbstractCommand command)
          JComponent-building variant of the CommandGroupModelBuilder.buildRootModel(CommandGroup)
protected  Object buildRootModel(CommandGroup commandGroup)
          Implementation wrapping around the buildRootComponent(AbstractCommand)
 
Methods inherited from class org.springframework.richclient.command.CommandGroupModelBuilder
buildModel, continueDeeper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandGroupJComponentBuilder

public CommandGroupJComponentBuilder()
Method Detail

buildComponent

public JComponent buildComponent(CommandGroup commandGroup)
JComponent-building variant of the CommandGroupModelBuilder.buildModel(CommandGroup)


buildRootComponent

protected abstract JComponent buildRootComponent(AbstractCommand command)
JComponent-building variant of the CommandGroupModelBuilder.buildRootModel(CommandGroup)


buildChildComponent

protected abstract JComponent buildChildComponent(JComponent parentComponent,
                                                  AbstractCommand command,
                                                  int level)
JComponent-building variant of the CommandGroupModelBuilder.buildChildModel(Object, AbstractCommand, int)


buildGroupComponent

protected abstract JComponent buildGroupComponent(JComponent parentComponent,
                                                  CommandGroup command,
                                                  int level)
JComponent-building variant of the CommandGroupModelBuilder.buildGroupModel(Object, CommandGroup, int)


buildRootModel

protected final Object buildRootModel(CommandGroup commandGroup)
Implementation wrapping around the buildRootComponent(AbstractCommand)

Specified by:
buildRootModel in class CommandGroupModelBuilder
Parameters:
commandGroup - at the root of the structure
Returns:
the top level object model to build.

buildGroupModel

protected final Object buildGroupModel(Object parentModel,
                                       CommandGroup commandGroup,
                                       int level)
Implementation wrapping around the buildGroupComponent(JComponent, CommandGroup, int)

Specified by:
buildGroupModel in class CommandGroupModelBuilder
Parameters:
parentModel - the objectmodel that was created for the parent-command.
level - in the structure we are at ATM
Returns:
the top level object model to build.

buildChildModel

protected final Object buildChildModel(Object parentModel,
                                       AbstractCommand command,
                                       int level)
Implementation wrapping around the #buildChildComponent(JComponent, AbstractCommand, int)dModel(AbstractCommand)

Specified by:
buildChildModel in class CommandGroupModelBuilder
Parameters:
parentModel - the objectmodel that was created for the parent-command.
command - currently visited command in the structure.
level - in the structure we are at ATM
Returns:
the top level object model to build.


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.