org.apertereports.ui
Class UiFactory

java.lang.Object
  extended by org.apertereports.ui.UiFactory

public abstract class UiFactory
extends Object

Class provides useful methods for creating UI components

Author:
Tomasz Serafin, BlueSoft sp. z o. o.

Nested Class Summary
static class UiFactory.FAction
          Defines available actions performed on created components
 
Constructor Summary
UiFactory()
           
 
Method Summary
static com.vaadin.ui.Button createButton(String captionId, com.vaadin.ui.ComponentContainer parent)
          Creates button
static com.vaadin.ui.Button createButton(String captionId, com.vaadin.ui.ComponentContainer parent, com.vaadin.ui.Button.ClickListener listener)
          Creates button
static com.vaadin.ui.Button createButton(String captionId, com.vaadin.ui.ComponentContainer parent, com.vaadin.ui.Button.ClickListener listener, UiFactory.FAction... actions)
          Creates button
static com.vaadin.ui.Button createButton(String captionId, com.vaadin.ui.ComponentContainer parent, String style)
          Create button
static com.vaadin.ui.Button createButton(String captionId, com.vaadin.ui.ComponentContainer parent, String style, com.vaadin.ui.Button.ClickListener listener)
          Creates button
static com.vaadin.ui.Button createButton(String captionId, com.vaadin.ui.ComponentContainer parent, String style, com.vaadin.ui.Button.ClickListener listener, UiFactory.FAction... actions)
          Creates button
static com.vaadin.ui.CheckBox createCheckBox(String captionId, com.vaadin.ui.ComponentContainer parent)
          Creates check box
static com.vaadin.ui.CheckBox createCheckBox(String captionId, com.vaadin.data.Item item, String propertyId, com.vaadin.ui.ComponentContainer parent)
          Creates check box
static com.vaadin.ui.HorizontalLayout createHLayout(com.vaadin.ui.ComponentContainer parent)
          Creates horizontal layout
static com.vaadin.ui.HorizontalLayout createHLayout(com.vaadin.ui.ComponentContainer parent, UiFactory.FAction... actions)
          Creates horizontal layout
static com.vaadin.ui.Label createLabel(com.vaadin.data.Item item, String propertyId, com.vaadin.ui.ComponentContainer parent)
          Creates label bound to property
static com.vaadin.ui.Label createLabel(com.vaadin.data.Item item, String propertyId, com.vaadin.ui.ComponentContainer parent, String style)
          Creates label bound to property
static com.vaadin.ui.Label createLabel(com.vaadin.data.Item item, String propertyId, com.vaadin.ui.ComponentContainer parent, String style, UiFactory.FAction... actions)
          Creates label bound to property
static com.vaadin.ui.Label createLabel(com.vaadin.data.Item item, String propertyId, com.vaadin.ui.ComponentContainer parent, UiFactory.FAction... actions)
          Creates label bound to property
static com.vaadin.ui.Label createLabel(String captionId, com.vaadin.ui.ComponentContainer parent)
          Creates label
static com.vaadin.ui.Label createLabel(String captionId, com.vaadin.ui.ComponentContainer parent, String style)
          Creates label
static com.vaadin.ui.Label createLabel(String captionId, com.vaadin.ui.ComponentContainer parent, String style, UiFactory.FAction... actions)
          Creates label
static com.vaadin.ui.Panel createPanel(String captionId)
          Creates panel
static com.vaadin.ui.TextField createSearchBox(String promptId, com.vaadin.ui.ComponentContainer parent, com.vaadin.event.FieldEvents.TextChangeListener listener)
          Creates text field with listener
static com.vaadin.ui.Label createSpacer(com.vaadin.ui.ComponentContainer parent)
          Creates simple label without caption and add it to the parent container
static com.vaadin.ui.Label createSpacer(com.vaadin.ui.ComponentContainer parent, String width, String height)
          Creates simple label without caption and add it to the parent container
static com.vaadin.ui.Label createSpacer(com.vaadin.ui.ComponentContainer parent, String width, String height, UiFactory.FAction... actions)
          Creates simple label without caption and add it to the parent container
static com.vaadin.ui.Label createSpacer(com.vaadin.ui.ComponentContainer parent, UiFactory.FAction... actions)
          Creates simple label without caption and add it to the parent container
static com.vaadin.ui.TextField createTextField(com.vaadin.data.Item item, String propertyId, com.vaadin.ui.ComponentContainer parent)
          Creates text field bound to property
static com.vaadin.ui.TextField createTextField(com.vaadin.data.Item item, String propertyId, com.vaadin.ui.ComponentContainer parent, String promptId)
          Creates text field bound to property
static com.vaadin.ui.TextField createTextField(com.vaadin.data.Item item, String propertyId, com.vaadin.ui.ComponentContainer parent, String promptId, UiFactory.FAction... actions)
          Creates text field bound to property
static com.vaadin.ui.VerticalLayout createVLayout(com.vaadin.ui.ComponentContainer parent)
          Creates vertical layout
static com.vaadin.ui.VerticalLayout createVLayout(com.vaadin.ui.ComponentContainer parent, UiFactory.FAction... actions)
          Creates vertical layout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UiFactory

public UiFactory()
Method Detail

createLabel

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

Parameters:
item - Bound object
propertyId - Property id
parent - Parent container to which the label is added, can be null
Returns:
Label

createLabel

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

Parameters:
item - Bound object
propertyId - Property id
parent - Parent container to which the label is added, can be null
actions - List of actions performed on created component
Returns:
Label

createLabel

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

Parameters:
item - Bound object
propertyId - Property id
parent - Parent container to which the label is added, can be null
style - Style name
Returns:
Label

createLabel

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

Parameters:
item - Bound object
propertyId - Property id
parent - Parent container to which the label is added, can be null
style - Style name
actions - List of actions performed on created component
Returns:
Label

createLabel

public static com.vaadin.ui.Label createLabel(String captionId,
                                              com.vaadin.ui.ComponentContainer parent)
Creates label

Parameters:
captionId - Id of the caption taken from the localized resources or caption
parent - Parent container to which the label is added, can be null
Returns:
Label

createLabel

public static com.vaadin.ui.Label createLabel(String captionId,
                                              com.vaadin.ui.ComponentContainer parent,
                                              String style)
Creates label

Parameters:
captionId - Id of the caption taken from the localized resources or caption
style - Style name
parent - Parent container to which the label is added, can be null
Returns:
Label

createLabel

public static com.vaadin.ui.Label createLabel(String captionId,
                                              com.vaadin.ui.ComponentContainer parent,
                                              String style,
                                              UiFactory.FAction... actions)
Creates label

Parameters:
captionId - Id of the caption taken from the localized resources or caption
style - Style name
parent - Parent container to which the label is added, can be null
actions - List of actions performed on created component label
Returns:
Label

createButton

public static com.vaadin.ui.Button createButton(String captionId,
                                                com.vaadin.ui.ComponentContainer parent)
Creates button

Parameters:
captionId - Id of the caption taken from the localized resources or caption
parent - Parent container to which the button is added, can be null
Returns:
Button

createButton

public static com.vaadin.ui.Button createButton(String captionId,
                                                com.vaadin.ui.ComponentContainer parent,
                                                String style)
Create button

Parameters:
captionId - Id of the caption taken from the localized resources or caption
parent - Parent container to which the button is added, can be null
style - Style name
Returns:
Button

createButton

public static com.vaadin.ui.Button createButton(String captionId,
                                                com.vaadin.ui.ComponentContainer parent,
                                                com.vaadin.ui.Button.ClickListener listener)
Creates button

Parameters:
captionId - Id of the caption taken from the localized resources or caption
parent - Parent container to which the button is added, can be null
listener - Event listener
Returns:
Button

createButton

public static com.vaadin.ui.Button createButton(String captionId,
                                                com.vaadin.ui.ComponentContainer parent,
                                                com.vaadin.ui.Button.ClickListener listener,
                                                UiFactory.FAction... actions)
Creates button

Parameters:
captionId - Id of the caption taken from the localized resources or caption
parent - Parent container to which the button is added, can be null
listener - Event listener
actions - List of actions performed on created component
Returns:
Button

createButton

public static com.vaadin.ui.Button createButton(String captionId,
                                                com.vaadin.ui.ComponentContainer parent,
                                                String style,
                                                com.vaadin.ui.Button.ClickListener listener)
Creates button

Parameters:
captionId - Id of the caption taken from the localized resources or caption
style - Style name
parent - Parent container to which the button is added, can be null
listener - Event listener
Returns:
Button

createButton

public static com.vaadin.ui.Button createButton(String captionId,
                                                com.vaadin.ui.ComponentContainer parent,
                                                String style,
                                                com.vaadin.ui.Button.ClickListener listener,
                                                UiFactory.FAction... actions)
Creates button

Parameters:
captionId - Id of the caption taken from the localized resources or caption
style - Style name
parent - Parent container to which the button is added, can be null
listener - Event listener
actions - List of actions performed on created component
Returns:
Button

createCheckBox

public static com.vaadin.ui.CheckBox createCheckBox(String captionId,
                                                    com.vaadin.data.Item item,
                                                    String propertyId,
                                                    com.vaadin.ui.ComponentContainer parent)
Creates check box

Parameters:
captionId - Id of the caption taken from the localized resources or caption
item - Bound Object
propertyId - Property id
parent - Parent container to which the component is added, can be null
Returns:
Check box

createCheckBox

public static com.vaadin.ui.CheckBox createCheckBox(String captionId,
                                                    com.vaadin.ui.ComponentContainer parent)
Creates check box

Parameters:
captionId - Id of the caption taken from the localized resources or caption
parent - Parent container to which the component is added, can be null
Returns:
Check box

createTextField

public static com.vaadin.ui.TextField createTextField(com.vaadin.data.Item item,
                                                      String propertyId,
                                                      com.vaadin.ui.ComponentContainer parent)
Creates text field bound to property

Parameters:
item - Bound object
propertyId - Property id
parent - Parent container to which the component is added, can be null
Returns:
Text field

createTextField

public static com.vaadin.ui.TextField createTextField(com.vaadin.data.Item item,
                                                      String propertyId,
                                                      com.vaadin.ui.ComponentContainer parent,
                                                      String promptId)
Creates text field bound to property

Parameters:
item - Bound object
propertyId - Property id
promptId - Id of the prompt taken from the localized resources or prompt
parent - Parent container to which the component is added, can be null
Returns:
Text field

createTextField

public static com.vaadin.ui.TextField createTextField(com.vaadin.data.Item item,
                                                      String propertyId,
                                                      com.vaadin.ui.ComponentContainer parent,
                                                      String promptId,
                                                      UiFactory.FAction... actions)
Creates text field bound to property

Parameters:
item - Bound object
propertyId - Property id
promptId - Id of the prompt taken from the localized resources or prompt
parent - Parent container to which the component is added, can be null
actions - List of actions performed on created component
Returns:
Text field

createSearchBox

public static com.vaadin.ui.TextField createSearchBox(String promptId,
                                                      com.vaadin.ui.ComponentContainer parent,
                                                      com.vaadin.event.FieldEvents.TextChangeListener listener)
Creates text field with listener

Parameters:
promptId - Id of the prompt taken from the localized resources or prompt
parent - Parent container to which the component is added, can be null
listener - Event listener
Returns:

createHLayout

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

Parameters:
parent - Parent container to which the layout is added, can be null
Returns:
horizontal layout

createHLayout

public static com.vaadin.ui.HorizontalLayout createHLayout(com.vaadin.ui.ComponentContainer parent,
                                                           UiFactory.FAction... actions)
Creates horizontal layout

Parameters:
parent - Parent container to which the layout is added, can be null
actions - List of actions performed on created component
Returns:
Horizontal layout

createVLayout

public static com.vaadin.ui.VerticalLayout createVLayout(com.vaadin.ui.ComponentContainer parent)
Creates vertical layout

Parameters:
parent - Parent container to which the layout is added, can be null
Returns:
Vertical layout

createVLayout

public static com.vaadin.ui.VerticalLayout createVLayout(com.vaadin.ui.ComponentContainer parent,
                                                         UiFactory.FAction... actions)
Creates vertical layout

Parameters:
parent - Parent container to which the layout is added, can be null
actions - List of actions performed on created component
Returns:
Vertical layout

createPanel

public static com.vaadin.ui.Panel createPanel(String captionId)
Creates panel

Parameters:
captionId - Id of the caption taken from the localized resources or caption
Returns:
Panel

createSpacer

public static com.vaadin.ui.Label createSpacer(com.vaadin.ui.ComponentContainer parent)
Creates simple label without caption and add it to the parent container

Parameters:
parent - Parent container to which the spacer is added, can be null
Returns:
Spacer

createSpacer

public static com.vaadin.ui.Label createSpacer(com.vaadin.ui.ComponentContainer parent,
                                               UiFactory.FAction... actions)
Creates simple label without caption and add it to the parent container

Parameters:
parent - Parent container to which the spacer is added, can be null
actions - List of actions performed on created component
Returns:
Spacer

createSpacer

public static com.vaadin.ui.Label createSpacer(com.vaadin.ui.ComponentContainer parent,
                                               String width,
                                               String height)
Creates simple label without caption and add it to the parent container

Parameters:
parent - Parent container to which the spacer is added, can be null
width - Width of the component, can be null
height - Height of the component, can be null
Returns:
Spacer

createSpacer

public static com.vaadin.ui.Label createSpacer(com.vaadin.ui.ComponentContainer parent,
                                               String width,
                                               String height,
                                               UiFactory.FAction... actions)
Creates simple label without caption and add it to the parent container

Parameters:
parent - Parent container to which the spacer is added, can be null
width - Width of the component, can be null
height - Height of the component, can be null
actions - List of actions performed on created component
Returns:
Spacer


Copyright © 2011-2013. All Rights Reserved.