org.apertereports.util
Class ComponentFactory

java.lang.Object
  extended by org.apertereports.util.ComponentFactory

public abstract class ComponentFactory
extends Object

Factory class providing components in frequently used form.

Author:
Zbigniew Malinowski

Nested Class Summary
static class ComponentFactory.AperteIcons
           
 
Field Summary
static String ICON_PATH
           
 
Constructor Summary
ComponentFactory()
           
 
Method Summary
static com.vaadin.ui.Button createButton(String captionCode, String style, com.vaadin.ui.ComponentContainer parent)
          Creates button with caption code (for localization) and adds it to parent.
static com.vaadin.ui.Button createButton(String captionCode, String style, com.vaadin.ui.ComponentContainer container, com.vaadin.ui.Button.ClickListener listener)
          Creates button with caption code (for localization), registers listener and adds it to parent.
static com.vaadin.ui.Label createCalendarLabel(com.vaadin.data.Item item, String propertyName, String style, com.vaadin.ui.ComponentContainer parent)
           
static com.vaadin.ui.CheckBox createCheckBox(String captionCode, com.vaadin.data.Item item, String propertyId, com.vaadin.ui.ComponentContainer parent)
          Creates check box bound to item's boolean property.
static com.vaadin.ui.Label createDateLabel(com.vaadin.data.Item item, String propertyName, String style, com.vaadin.ui.ComponentContainer parent)
          Creates label bound to date property.
static com.vaadin.ui.ComboBox createFormatCombo(ReportConstants.ReportType selectedValue, String captionKey)
           
static com.vaadin.ui.HorizontalLayout createHLayout(com.vaadin.ui.ComponentContainer parent)
          Creates horizontal layout with spacing.
static com.vaadin.ui.HorizontalLayout createHLayoutFull(com.vaadin.ui.ComponentContainer parent)
          Creates horizontal layout with width set to 100%.
static com.vaadin.ui.Embedded createIcon(com.vaadin.data.Item item, String proprtyId, com.vaadin.ui.ComponentContainer parent)
           
static com.vaadin.ui.Label createLabel(com.vaadin.data.Item item, String propertyId, String style, com.vaadin.ui.ComponentContainer parent)
          Creates label bound to property,
static com.vaadin.ui.ComboBox createReportTemplateCombo(ReportTemplate selectedValue, String captionKey)
           
static com.vaadin.ui.TextField createSearchBox(com.vaadin.event.FieldEvents.TextChangeListener listener, com.vaadin.ui.ComponentContainer parent)
          Creates search box in LAZY text change mode.
static com.vaadin.ui.Label createSimpleLabel(String valueKey, String style, com.vaadin.ui.ComponentContainer parent)
          Label displaying not bound value.
static com.vaadin.ui.TextArea createTextArea(com.vaadin.data.Item item, String propertyId, String promptKey, com.vaadin.ui.ComponentContainer parent)
          Creates text area bound to item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ICON_PATH

public static final String ICON_PATH
See Also:
Constant Field Values
Constructor Detail

ComponentFactory

public ComponentFactory()
Method Detail

createLabel

public static com.vaadin.ui.Label createLabel(com.vaadin.data.Item item,
                                              String propertyId,
                                              String style,
                                              com.vaadin.ui.ComponentContainer parent)
Creates label bound to property,

Parameters:
item - bound object
propertyId - object's property
style - style name to apply
parent - container of the component
Returns:

createSimpleLabel

public static com.vaadin.ui.Label createSimpleLabel(String valueKey,
                                                    String style,
                                                    com.vaadin.ui.ComponentContainer parent)
Label displaying not bound value.

Parameters:
valueKey - text to display
style - style name to apply
parent - container of the component
Returns:

createButton

public static com.vaadin.ui.Button createButton(String captionCode,
                                                String style,
                                                com.vaadin.ui.ComponentContainer parent)
Creates button with caption code (for localization) and adds it to parent.

Parameters:
captionCode - localization code of button's caption
style - style name to apply
container - container of the component
Returns:

createButton

public static com.vaadin.ui.Button createButton(String captionCode,
                                                String style,
                                                com.vaadin.ui.ComponentContainer container,
                                                com.vaadin.ui.Button.ClickListener listener)
Creates button with caption code (for localization), registers listener and adds it to parent.

Parameters:
captionCode - localization code of button's caption
style - style name to apply
container - container of the component
listener - listener to register on click
Returns:

createDateLabel

public static com.vaadin.ui.Label createDateLabel(com.vaadin.data.Item item,
                                                  String propertyName,
                                                  String style,
                                                  com.vaadin.ui.ComponentContainer parent)
Creates label bound to date property.

Parameters:
beanItem - bound object
propertyName - date property name
style - style name to apply
parent - container of the component
Returns:

createCalendarLabel

public static com.vaadin.ui.Label createCalendarLabel(com.vaadin.data.Item item,
                                                      String propertyName,
                                                      String style,
                                                      com.vaadin.ui.ComponentContainer parent)

createCheckBox

public static com.vaadin.ui.CheckBox createCheckBox(String captionCode,
                                                    com.vaadin.data.Item item,
                                                    String propertyId,
                                                    com.vaadin.ui.ComponentContainer parent)
Creates check box bound to item's boolean property.

Parameters:
captionCode - caption's localization code
item - bound object
propertyId - object's property name
parent - container of the component
Returns:

createTextArea

public static com.vaadin.ui.TextArea createTextArea(com.vaadin.data.Item item,
                                                    String propertyId,
                                                    String promptKey,
                                                    com.vaadin.ui.ComponentContainer parent)
Creates text area bound to item.

Parameters:
item - bound object
propertyId - object's property name
promptKey - input prompt's localization code
parent - container of the component
Returns:

createHLayoutFull

public static com.vaadin.ui.HorizontalLayout createHLayoutFull(com.vaadin.ui.ComponentContainer parent)
Creates horizontal layout with width set to 100%.

Parameters:
parent - container of the component
Returns:

createHLayout

public static com.vaadin.ui.HorizontalLayout createHLayout(com.vaadin.ui.ComponentContainer parent)
Creates horizontal layout with spacing.

Parameters:
parent -
Returns:

createSearchBox

public static com.vaadin.ui.TextField createSearchBox(com.vaadin.event.FieldEvents.TextChangeListener listener,
                                                      com.vaadin.ui.ComponentContainer parent)
Creates search box in LAZY text change mode.

Parameters:
listener - text change event handler
container - container of the component
Returns:

createFormatCombo

public static com.vaadin.ui.ComboBox createFormatCombo(ReportConstants.ReportType selectedValue,
                                                       String captionKey)

createReportTemplateCombo

public static com.vaadin.ui.ComboBox createReportTemplateCombo(ReportTemplate selectedValue,
                                                               String captionKey)

createIcon

public static com.vaadin.ui.Embedded createIcon(com.vaadin.data.Item item,
                                                String proprtyId,
                                                com.vaadin.ui.ComponentContainer parent)


Copyright © 2011-2012. All Rights Reserved.