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.Float>
              extended by com.vaadin.ui.ProgressIndicator
All Implemented Interfaces:
Buffered, BufferedValidatable, Property<java.lang.Float>, Property.Editor, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Validatable, Action.ShortcutNotifier, MethodEventSource, ClientConnector, Sizeable, com.vaadin.shared.Connector, Component, Component.Focusable, Field<java.lang.Float>, java.io.Serializable

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

ProgressIndicator is component that shows user state of a process (like long computing or file upload) ProgressIndicator has two main modes. 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 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
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
 
Field Summary
 
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(float value)
          Creates a new instance of ProgressIndicator with given state.
ProgressIndicator(Property contentSource)
          Creates a new instance of ProgressIndicator with state read from the given datasource.
 
Method Summary
 void beforeClientResponse(boolean initial)
          Called before the shared state and RPC invocations are sent to the client.
 int getPollingInterval()
          Gets the interval that component checks for progress.
protected  com.vaadin.shared.ui.progressindicator.ProgressIndicatorState getState()
          Returns the shared state bean with information to be sent from the server to the client.
 java.lang.Class<java.lang.Float> getType()
          Returns the type of the Field.
 java.lang.Float getValue()
          Gets the value of the ProgressIndicator.
 boolean isIndeterminate()
          Gets whether or not the ProgressIndicator is indeterminate.
 void setIndeterminate(boolean indeterminate)
          Sets whether or not the ProgressIndicator is indeterminate.
protected  void setInternalValue(java.lang.Float newValue)
          Sets the internal field value.
 void setPollingInterval(int pollingInterval)
          Sets the interval that component checks for progress.
 void setValue(java.lang.Float newValue)
          Sets the value of the ProgressIndicator.
 
Methods inherited from class com.vaadin.ui.AbstractField
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, attach, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, isBuffered, isEmpty, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, shouldHideErrors, toString, validate, validate, valueChange
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getState, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeight, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, 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.Viewer
getPropertyDataSource, setPropertyDataSource
 
Methods inherited from interface com.vaadin.data.Property.ValueChangeListener
valueChange
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setPrimaryStyleName, setStyleName, setVisible
 
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setParent
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
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
 

Constructor Detail

ProgressIndicator

public ProgressIndicator()
Creates an a new ProgressIndicator.


ProgressIndicator

public ProgressIndicator(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 state read from the given datasource.

Parameters:
contentSource -
Method Detail

beforeClientResponse

public void beforeClientResponse(boolean initial)
Description copied from interface: ClientConnector
Called before the shared state and RPC invocations are sent to the client. Gives the connector an opportunity to set computed/dynamic state values or to invoke last minute RPC methods depending on other component features.

This method must not alter the component hierarchy in any way. Calling ClientConnector.markAsDirty() from this method will have no effect.

Specified by:
beforeClientResponse in interface ClientConnector
Overrides:
beforeClientResponse in class AbstractField<java.lang.Float>
Parameters:
initial - true if the client-side connector will be created and initialized after this method has been invoked. false if there is already an initialized client-side connector.

getValue

public java.lang.Float 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.Float>
Overrides:
getValue in class AbstractField<java.lang.Float>
Returns:
the Value of the ProgressIndicator.
See Also:
AbstractField.getValue()

setValue

public void setValue(java.lang.Float 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.Float>
Overrides:
setValue in class AbstractField<java.lang.Float>
Parameters:
newValue - the New value of the ProgressIndicator.
See Also:
com.vaadin.ui.AbstractField#setValue()

getType

public java.lang.Class<java.lang.Float> 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.Float>
Specified by:
getType in class AbstractField<java.lang.Float>
Returns:
the type of the Field

getState

protected com.vaadin.shared.ui.progressindicator.ProgressIndicatorState getState()
Description copied from class: AbstractComponent
Returns the shared state bean with information to be sent from the server to the client. Subclasses should override this method and set any relevant fields of the state returned by super.getState().

Overrides:
getState in class AbstractField<java.lang.Float>
Returns:
updated component shared state

setIndeterminate

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

Parameters:
indeterminate - 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 pollingInterval)
Sets the interval that component checks for progress.

Parameters:
pollingInterval - the interval in milliseconds.

getPollingInterval

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

Returns:
the interval in milliseconds.

setInternalValue

protected void setInternalValue(java.lang.Float newValue)
Description copied from class: AbstractField
Sets the internal field value. This is purely used by AbstractField to change the internal Field value. It does not trigger valuechange events. It can be overridden by the inheriting classes to update all dependent variables. Subclasses can also override AbstractField.getInternalValue() if necessary.

Overrides:
setInternalValue in class AbstractField<java.lang.Float>
Parameters:
newValue - the new value to be set.


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