com.vaadin.ui
Class ProgressIndicator

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractField<java.lang.Number>
              extended by com.vaadin.ui.ProgressIndicator
All Implemented Interfaces:
Buffered, BufferedValidatable, Property<java.lang.Number>, Property.Editor, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, Action.ShortcutNotifier, MethodEventSource, ClientConnector, LegacyComponent, RpcTarget, Sizeable, VariableOwner, com.vaadin.shared.Connector, Component, Component.Focusable, Field<java.lang.Number>, java.io.Serializable, java.util.EventListener

public class ProgressIndicator
extends AbstractField<java.lang.Number>
implements Property.Viewer, Property.ValueChangeListener, LegacyComponent

ProgressIndicator is component that shows user state of a process (like long computing or file upload) ProgressIndicator has two mainmodes. One for indeterminate processes and other (default) for processes which progress can be measured May view an other property that indicates progress 0...1

Since:
4
Author:
Vaadin Ltd.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler
 
Nested classes/interfaces inherited from interface com.vaadin.server.VariableOwner
VariableOwner.ErrorEvent
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Field
Field.ValueChangeEvent
 
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered
Buffered.SourceException
 
Nested classes/interfaces inherited from interface com.vaadin.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
 
Field Summary
static int CONTENT_PREFORMATTED
          Content mode, where the label contains preformatted text.
static int CONTENT_TEXT
          Content mode, where the label contains only plain text.
 
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
ProgressIndicator()
          Creates an a new ProgressIndicator.
ProgressIndicator(java.lang.Float value)
          Creates a new instance of ProgressIndicator with given state.
ProgressIndicator(Property contentSource)
          Creates a new instance of ProgressIndicator with stae read from given datasource.
 
Method Summary
 void changeVariables(java.lang.Object source, java.util.Map<java.lang.String,java.lang.Object> variables)
          Called when one or more variables handled by the implementing class are changed.
 boolean getContentMode()
          Gets the mode of ProgressIndicator.
 int getPollingInterval()
          Gets the interval that component checks for progress.
 Property getPropertyDataSource()
          Gets the viewing data-source property.
 java.lang.Class<? extends java.lang.Number> getType()
          Returns the type of the Field.
 java.lang.Number getValue()
          Gets the value of the ProgressIndicator.
 boolean isIndeterminate()
          Gets whether or not the ProgressIndicator is indeterminate.
 boolean isReadOnly()
          Is the component read-only ? Readonly is not used in ProgressIndicator - this returns allways false.
 void paintContent(PaintTarget target)
          Paints the content of this component.
 void setIndeterminate(boolean newValue)
          Sets wheter or not the ProgressIndicator is indeterminate.
 void setPollingInterval(int newValue)
          Sets the interval that component checks for progress.
 void setPropertyDataSource(Property newDataSource)
          Sets the property as data-source for viewing.
 void setReadOnly(boolean readOnly)
          Sets the component to read-only.
 void setValue(java.lang.Object newValue)
          Sets the value of the ProgressIndicator.
 
Methods inherited from class com.vaadin.ui.AbstractField
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, attach, beforeClientResponse, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getRequiredError, getState, getTabIndex, getValidators, isBuffered, isEmpty, isInvalidAllowed, isInvalidCommitted, isModified, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, shouldHideErrors, toString, validate, validate, valueChange
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addListener, addListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getHeight, getHeightUnits, getIcon, getId, getListeners, getLocale, getParent, getStyleName, getWidth, getWidthUnits, handleError, hasListeners, isConnectorEnabled, isEnabled, isImmediate, isVisible, removeListener, removeListener, removeListener, removeListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeight, setIcon, setId, setImmediate, setLocale, setParent, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addExtension, addMethodInvocationToQueue, createState, encodeState, getAllChildrenIterable, getConnectorId, getExtensions, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.vaadin.data.Property.ValueChangeListener
valueChange
 
Methods inherited from interface com.vaadin.server.LegacyComponent
markAsDirty
 
Methods inherited from interface com.vaadin.server.VariableOwner
isEnabled, isImmediate
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getCaption, getIcon, getId, getLocale, getParent, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setStyleName, setVisible
 
Methods inherited from interface com.vaadin.server.ClientConnector
beforeClientResponse, detach, encodeState, getExtensions, getStateType, handleConnectorRequest, isConnectorEnabled, markAsDirtyRecursive, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setParent
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.RpcTarget
getRpcManager
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth
 
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListener
 

Field Detail

CONTENT_TEXT

public static final int CONTENT_TEXT
Content mode, where the label contains only plain text. The getValue() result is coded to XML when painting.

See Also:
Constant Field Values

CONTENT_PREFORMATTED

public static final int CONTENT_PREFORMATTED
Content mode, where the label contains preformatted text.

See Also:
Constant Field Values
Constructor Detail

ProgressIndicator

public ProgressIndicator()
Creates an a new ProgressIndicator.


ProgressIndicator

public ProgressIndicator(java.lang.Float value)
Creates a new instance of ProgressIndicator with given state.

Parameters:
value -

ProgressIndicator

public ProgressIndicator(Property contentSource)
Creates a new instance of ProgressIndicator with stae read from given datasource.

Parameters:
contentSource -
Method Detail

setReadOnly

public void setReadOnly(boolean readOnly)
Sets the component to read-only. Readonly is not used in ProgressIndicator.

Specified by:
setReadOnly in interface Property<java.lang.Number>
Specified by:
setReadOnly in interface Component
Overrides:
setReadOnly in class AbstractField<java.lang.Number>
Parameters:
readOnly - True to enable read-only mode, False to disable it.
See Also:
Component.setReadOnly(boolean)

isReadOnly

public boolean isReadOnly()
Is the component read-only ? Readonly is not used in ProgressIndicator - this returns allways false.

Specified by:
isReadOnly in interface Property<java.lang.Number>
Specified by:
isReadOnly in interface Component
Overrides:
isReadOnly in class AbstractField<java.lang.Number>
Returns:
True if the component is in read only mode.
See Also:
Component.setReadOnly(boolean)

paintContent

public void paintContent(PaintTarget target)
                  throws PaintException
Paints the content of this component.

Specified by:
paintContent in interface LegacyComponent
Parameters:
target - the Paint Event.
Throws:
PaintException - if the Paint Operation fails.

getValue

public java.lang.Number getValue()
Gets the value of the ProgressIndicator. Value of the ProgressIndicator is Float between 0 and 1.

Specified by:
getValue in interface Property<java.lang.Number>
Overrides:
getValue in class AbstractField<java.lang.Number>
Returns:
the Value of the ProgressIndicator.
See Also:
AbstractField.getValue()

setValue

public void setValue(java.lang.Object newValue)
Sets the value of the ProgressIndicator. Value of the ProgressIndicator is the Float between 0 and 1.

Specified by:
setValue in interface Property<java.lang.Number>
Overrides:
setValue in class AbstractField<java.lang.Number>
Parameters:
newValue - the New value of the ProgressIndicator.
See Also:
com.vaadin.ui.AbstractField#setValue()

getType

public java.lang.Class<? extends java.lang.Number> getType()
Description copied from class: AbstractField
Returns the type of the Field. The methods getValue and setValue must be compatible with this type: one must be able to safely cast the value returned from getValue to the given type and pass any variable assignable to this type as an argument to setValue.

Specified by:
getType in interface Property<java.lang.Number>
Specified by:
getType in class AbstractField<java.lang.Number>
Returns:
the type of the Field
See Also:
AbstractField.getType()

getPropertyDataSource

public Property getPropertyDataSource()
Gets the viewing data-source property.

Specified by:
getPropertyDataSource in interface Property.Viewer
Overrides:
getPropertyDataSource in class AbstractField<java.lang.Number>
Returns:
the datasource.
See Also:
AbstractField.getPropertyDataSource()

setPropertyDataSource

public void setPropertyDataSource(Property newDataSource)
Sets the property as data-source for viewing.

Specified by:
setPropertyDataSource in interface Property.Viewer
Overrides:
setPropertyDataSource in class AbstractField<java.lang.Number>
Parameters:
newDataSource - the new data source.
See Also:
AbstractField.setPropertyDataSource(com.vaadin.data.Property)

getContentMode

public boolean getContentMode()
Gets the mode of ProgressIndicator.

Returns:
true if in indeterminate mode.

setIndeterminate

public void setIndeterminate(boolean newValue)
Sets wheter or not the ProgressIndicator is indeterminate.

Parameters:
newValue - true to set to indeterminate mode.

isIndeterminate

public boolean isIndeterminate()
Gets whether or not the ProgressIndicator is indeterminate.

Returns:
true to set to indeterminate mode.

setPollingInterval

public void setPollingInterval(int newValue)
Sets the interval that component checks for progress.

Parameters:
newValue - the interval in milliseconds.

getPollingInterval

public int getPollingInterval()
Gets the interval that component checks for progress.

Returns:
the interval in milliseconds.

changeVariables

public void changeVariables(java.lang.Object source,
                            java.util.Map<java.lang.String,java.lang.Object> variables)
Description copied from interface: VariableOwner
Called when one or more variables handled by the implementing class are changed.

Specified by:
changeVariables in interface VariableOwner
Parameters:
source - the Source of the variable change. This is the origin of the event. For example in Web Adapter this is the request.
variables - the Mapping from variable names to new variable values.


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.