org.openbp.cockpit.generator.type
Class TypeCustomizer

java.lang.Object
  extended by org.openbp.cockpit.generator.GeneratorCustomizer
      extended by org.openbp.cockpit.generator.type.TypeCustomizer

public class TypeCustomizer
extends GeneratorCustomizer

Customizer class for visual item generation.

Author:
Heiko Erhardt

Field Summary
static java.lang.String DEFAULT_MEMBER_TYPE
          Default member data type
static java.lang.String MEMBER_PAGE
          Data member page
 
Constructor Summary
TypeCustomizer()
          Default constructor.
 
Method Summary
 void afterPageSequenceUpdate(GeneratorContext context, GeneratorWizard wizard)
          Template method that is called after the page sequence has been updated.
static void clearPropertyBrowser(JaspiraWizardObjectPage page)
          Clears the property browser.
protected  javax.swing.JButton createAddButton(GeneratorContext context, JaspiraWizardObjectPage page)
          Creates the 'Add member' button.
static javax.swing.JButton createButton(ResourceCollection res, java.lang.String resourceId)
          Creates a button, retrieving the button text from the resource file.
static javax.swing.JPanel createButtonPanel()
          Creates the button panel.
protected  javax.swing.JButton createRemoveButton(GeneratorContext context, JaspiraWizardObjectPage page)
          Creates the 'Remove member' button.
 java.lang.Class getSettingsClass()
          Returns the class of the generator settings used by this generator.
 java.lang.String getTemplateName(GeneratorContext context)
          Gets template name.
 boolean hasResultPage(GeneratorContext context)
          Determines if the generator should display a result page.
 void processWizardEvent(GeneratorContext context, WizardEvent event)
          Processes a wizard event caused by a wizard page.
 
Methods inherited from class org.openbp.cockpit.generator.GeneratorCustomizer
beforePageSequenceUpdate, checkRequirements, createSettings, determineUniqueSuffix, evaluateFormat, getDependentSettingsClasses, getGenerator, loadSettings, performProcess, postProcess, preProcess, saveSettings, setGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MEMBER_PAGE

public static final java.lang.String MEMBER_PAGE
Data member page

See Also:
Constant Field Values

DEFAULT_MEMBER_TYPE

public static final java.lang.String DEFAULT_MEMBER_TYPE
Default member data type

See Also:
Constant Field Values
Constructor Detail

TypeCustomizer

public TypeCustomizer()
Default constructor.

Method Detail

getSettingsClass

public java.lang.Class getSettingsClass()
Returns the class of the generator settings used by this generator.

Overrides:
getSettingsClass in class GeneratorCustomizer
Returns:
The class or null if the generator does not require a settings object

afterPageSequenceUpdate

public void afterPageSequenceUpdate(GeneratorContext context,
                                    GeneratorWizard wizard)
Template method that is called after the page sequence has been updated.

Overrides:
afterPageSequenceUpdate in class GeneratorCustomizer
Parameters:
context - Context
wizard - Generator wizard

getTemplateName

public java.lang.String getTemplateName(GeneratorContext context)
Gets template name.

Overrides:
getTemplateName in class GeneratorCustomizer
Parameters:
context - Generator context
Returns:
By default, the method returns the template name read from the generator XML file

hasResultPage

public boolean hasResultPage(GeneratorContext context)
Determines if the generator should display a result page.

Overrides:
hasResultPage in class GeneratorCustomizer
Parameters:
context - Generator context
Returns:
true: If an implementation class name was specified.
false: Otherwise

processWizardEvent

public void processWizardEvent(GeneratorContext context,
                               WizardEvent event)
Processes a wizard event caused by a wizard page.

Overrides:
processWizardEvent in class GeneratorCustomizer
Parameters:
context - Generator context
event - Event to handle

clearPropertyBrowser

public static void clearPropertyBrowser(JaspiraWizardObjectPage page)
Clears the property browser.

Parameters:
page - Page that contains the property browser

createAddButton

protected javax.swing.JButton createAddButton(GeneratorContext context,
                                              JaspiraWizardObjectPage page)
Creates the 'Add member' button.

Parameters:
page - Wizard page to add the button to
Returns:
The button

createRemoveButton

protected javax.swing.JButton createRemoveButton(GeneratorContext context,
                                                 JaspiraWizardObjectPage page)
Creates the 'Remove member' button.

Parameters:
page - Wizard page to add the button to
Returns:
The button

createButton

public static javax.swing.JButton createButton(ResourceCollection res,
                                               java.lang.String resourceId)
Creates a button, retrieving the button text from the resource file.

Parameters:
res - Resource
resourceId - Id of the button text resource
Returns:
The button

createButtonPanel

public static javax.swing.JPanel createButtonPanel()
Creates the button panel.

Returns:
the panel


Copyright © 2011. All Rights Reserved.