|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.event.GuiseBoundPropertyObject
com.guiseframework.model.ui.AbstractPresentationModel
com.guiseframework.component.AbstractComponent
com.guiseframework.component.AbstractControl
com.guiseframework.component.ResourceCollectControl
public class ResourceCollectControl
Control that allows resources to be collected and received at a given path.
The destination path should reference a registered ResourceWriteDestination of the application.
| Nested Class Summary | |
|---|---|
static interface |
ResourceCollectControl.Depictor<C extends ResourceCollectControl>
The custom depictor type for web collect controls. |
| Nested classes/interfaces inherited from class com.guiseframework.component.AbstractComponent |
|---|
AbstractComponent.AbstractFlyoverFrameStrategy<S extends Component>, AbstractComponent.AbstractFlyoverStrategy<S extends Component>, AbstractComponent.DefaultFlyoverStrategy<S extends Component> |
| Nested classes/interfaces inherited from interface com.guiseframework.component.Control |
|---|
Control.Status |
| Nested classes/interfaces inherited from interface com.guiseframework.component.Component |
|---|
Component.FlyoverStrategy<S extends Component> |
| Field Summary | |
|---|---|
static java.lang.String |
RESOURCE_PATHS_PROPERTY
The bound property of the paths of the collected resources. |
static java.lang.String |
STATE_PROPERTY
The bound property of the state of receiving collected resources. |
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.component.Control |
|---|
STATUS_PROPERTY |
| Fields inherited from interface com.guiseframework.component.Component |
|---|
BOOKMARK_ENABLED_PROPERTY, CONSTRAINTS_PROPERTY, DRAG_ENABLED_PROPERTY, DROP_ENABLED_PROPERTY, FLYOVER_ENABLED_PROPERTY, FLYOVER_STRATEGY_PROPERTY, INPUT_STRATEGY_PROPERTY, NAME_PROPERTY, NOTIFICATION_PROPERTY, ORIENTATION_PROPERTY, THEME_APPLIED_PROPERTY, VALID_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Displayable |
|---|
DISPLAYED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.InfoModel |
|---|
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY |
| Fields inherited from interface com.guiseframework.model.LabelModel |
|---|
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Fields inherited from interface com.guiseframework.model.Enableable |
|---|
ENABLED_PROPERTY |
| Constructor Summary | |
|---|---|
ResourceCollectControl()
Default constructor with a default models. |
|
ResourceCollectControl(InfoModel infoModel,
Enableable enableable)
Info model and enableable object constructor. |
|
| Method Summary | |
|---|---|
void |
addProgressListener(ProgressListener progressListener)
Adds a progress listener. |
void |
addResourcePath(java.lang.String resourcePath)
Adds a new resource path. |
void |
cancelReceive()
Cancels any currently occurring resource transfers. |
void |
clearResourcePaths()
Clears all resource paths. |
protected void |
fireProgressed(ProgressEvent progressEvent)
Fires a given progress event to all registered progress listeners. |
void |
fireProgressed(java.lang.String task,
com.globalmentor.model.TaskState taskState,
long value,
long maximumValue)
Fires a progress event to all registered progress listeners. |
ResourceCollectControl.Depictor<? extends ResourceCollectControl> |
getDepictor()
|
Bookmark |
getDestinationBookmark()
|
java.lang.String |
getDestinationPath()
Indicates the destination path relative to the application context path. |
java.util.List<java.lang.String> |
getResourcePaths()
Returns the paths of the currently collected resources. |
com.globalmentor.model.TaskState |
getState()
|
void |
receiveResources(java.lang.String destinationPath)
Receives collected resources at the given destination path with no bookmark. |
void |
receiveResources(java.lang.String destinationPath,
Bookmark destinationBookmark)
Receives collected resources at the given destination path using the given bookmark. |
void |
removeProgressListener(ProgressListener progressListener)
Removes an progress listener. |
void |
removeResourcePath(java.lang.String resourcePath)
Removes a resource path. |
void |
setState(com.globalmentor.model.TaskState newSendState)
Sets the state of receiving resources. |
| Methods inherited from class com.guiseframework.component.AbstractControl |
|---|
determineStatus, getEnableable, getStatus, isEnabled, reset, setEnabled, setNotification, setStatus, updateStatus, updateValid |
| Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject |
|---|
getSession |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.guiseframework.platform.DepictedObject |
|---|
depict, getDepictID, getSession, processEvent |
| Methods inherited from interface com.guiseframework.model.InfoModel |
|---|
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType |
| Methods inherited from interface com.guiseframework.model.LabelModel |
|---|
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Field Detail |
|---|
public static final java.lang.String RESOURCE_PATHS_PROPERTY
public static final java.lang.String STATE_PROPERTY
| Constructor Detail |
|---|
public ResourceCollectControl()
public ResourceCollectControl(InfoModel infoModel,
Enableable enableable)
infoModel - The component info model.enableable - The enableable object in which to store enabled status.
java.lang.NullPointerException - if the given info model and/or enableable object is null.| Method Detail |
|---|
public ResourceCollectControl.Depictor<? extends ResourceCollectControl> getDepictor()
getDepictor in interface ComponentgetDepictor in interface DepictedObjectgetDepictor in class AbstractComponentpublic com.globalmentor.model.TaskState getState()
null if receiving has not been initiated.public void setState(com.globalmentor.model.TaskState newSendState)
newSendState - The new state of receiving resources, or null if receiving has not been initiated.STATE_PROPERTYpublic java.util.List<java.lang.String> getResourcePaths()
public void addResourcePath(java.lang.String resourcePath)
List holding type String.
This method is called by the framework and normally this should not be called directly from applications.
Manually adding a new resource path, depending on the platform, may not actually result in another resource being collected absent user intervention.
resourcePath - The resource path to add.
java.lang.NullPointerException - if the given resource path is null.RESOURCE_PATHS_PROPERTYpublic void removeResourcePath(java.lang.String resourcePath)
List holding type String.
This method is called by the framework and normally this should not be called directly from applications.
//TODO fix to actually tell the browser control that the path has changed Manually adding a new resource path, depending on the platform, may not actually result in another resource being collected absent user intervention.
resourcePath - The resource path to remove.
java.lang.NullPointerException - if the given resource path is null.RESOURCE_PATHS_PROPERTYpublic void clearResourcePaths()
List holding type String.
This method is called by the framework and normally this should not be called directly from applications.
//TODO fix to actually tell the browser control that the path has changed Manually adding a new resource path, depending on the platform, may not actually result in another resource being collected absent user intervention.
RESOURCE_PATHS_PROPERTYpublic java.lang.String getDestinationPath()
null if no resources are currently being sent.public Bookmark getDestinationBookmark()
null if there is no bookmark specified and/or no resources are currently being sent.public void receiveResources(java.lang.String destinationPath)
destinationPath - The path representing the destination of the collected resources, relative to the application.
java.lang.NullPointerException - if the given path is null.
java.lang.IllegalArgumentException - if the provided path specifies a URI scheme (i.e. the URI is absolute) and/or authority.
public void receiveResources(java.lang.String destinationPath,
Bookmark destinationBookmark)
destinationPath - The path representing the destination of the collected resources, relative to the application.destinationBookmark - The bookmark to be used in receiving the resources at the destination path, or null if no bookmark should be used.
java.lang.NullPointerException - if the given path is null.
java.lang.IllegalArgumentException - if the provided path specifies a URI scheme (i.e. the URI is absolute) and/or authority.
java.lang.IllegalArgumentException - if the provided path is absolute.public void cancelReceive()
public void addProgressListener(ProgressListener progressListener)
progressListener - The progress listener to add.public void removeProgressListener(ProgressListener progressListener)
progressListener - The progress listener to remove.
public void fireProgressed(java.lang.String task,
com.globalmentor.model.TaskState taskState,
long value,
long maximumValue)
#fireProgessed(ProgressEvent).
task - The task being performed, or null if not indicated.taskState - The state of the task.value - The current progress, or -1 if not known.maximumValue - The goal, or -1 if not known.
java.lang.NullPointerException - if the given task state is null.ProgressListener,
ProgressEventprotected void fireProgressed(ProgressEvent progressEvent)
progressEvent - The progress event to fire.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||