Class WEditableImage
- java.lang.Object
-
- com.github.bordertech.wcomponents.AbstractWComponent
-
- com.github.bordertech.wcomponents.WBeanComponent
-
- com.github.bordertech.wcomponents.WImage
-
- com.github.bordertech.wcomponents.WEditableImage
-
- All Implemented Interfaces:
AjaxTarget,BeanAware,BeanBound,BeanProviderBound,DataBound,Targetable,WComponent,WebComponent,Serializable
public class WEditableImage extends WImage
The WEditableImage component provides a way for the user to edit and upload modifications to an image. Uploads are sent to the server by means of the associated file upload widget.
- Since:
- 1.0.3
- Author:
- Rick Brown
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWEditableImage.EditableImageModelHolds the extrinsic state information of a WEditableImage.-
Nested classes/interfaces inherited from class com.github.bordertech.wcomponents.WImage
WImage.ImageModel
-
Nested classes/interfaces inherited from class com.github.bordertech.wcomponents.AbstractWComponent
AbstractWComponent.WComponentRef
-
-
Field Summary
-
Fields inherited from interface com.github.bordertech.wcomponents.WComponent
DEFAULT_APPLICATION_ID, DEFAULT_INTERNAL_ID, DEFAULT_NO_ID, ID_CONTEXT_SEPERATOR, ID_FRAMEWORK_ASSIGNED_SEPERATOR, ID_VALIDATION_PATTERN
-
-
Constructor Summary
Constructors Constructor Description WEditableImage(WMultiFileWidget editUploader)Creates a WEditableImage associated with the file widget used to upload edited results.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WEditableImage.EditableImageModelgetComponentModel()Returns the effective component model for this component.WMultiFileWidgetgetEditUploader()Return the WMultiFileWidget associated with this editable image.protected WEditableImage.EditableImageModelgetOrCreateComponentModel()Retrieves the model for this component so that it can be modified.protected WEditableImage.EditableImageModelnewComponentModel()Creates a new component model appropriate for this component.-
Methods inherited from class com.github.bordertech.wcomponents.WImage
getAlternativeText, getCacheKey, getImage, getImageUrl, getSize, getTargetId, getTargetUrl, handleRequest, setAlternativeText, setCacheKey, setImage, setImageUrl, setSize, toString
-
Methods inherited from class com.github.bordertech.wcomponents.WBeanComponent
addBeanToScratchMap, doUpdateBeanValue, getBean, getBeanFromScratchMap, getBeanId, getBeanProperty, getBeanProvider, getBeanScratchMap, getBeanValue, getData, isBeanInScratchMap, isChanged, isSearchAncestors, isUseRequestScopeScratchMap, removeBeanFromScratchMap, resetData, setBean, setBeanId, setBeanProperty, setBeanProvider, setData, setSearchAncestors, updateBeanValue
-
Methods inherited from class com.github.bordertech.wcomponents.AbstractWComponent
addHtmlClass, addHtmlClass, addNotify, afterPaint, assertAddSupported, beforePaint, createErrorDiagnostic, createErrorDiagnostic, forward, getAccessibleText, getAttribute, getBaseUrl, getDefaultModel, getEnvironment, getHeaders, getHtmlClass, getHtmlClasses, getId, getIdName, getInternalId, getLabel, getName, getParent, getScratchMap, getTabIndex, getTag, getTemplate, getTemplateMarkUp, getToolTip, hasNoComponentModel, hasTabIndex, initialiseComponentModel, invokeLater, invokeLaters, isDebugStructure, isDefaultState, isFlagSet, isHidden, isInitialised, isLocked, isTracking, isTrackingEnabled, isValidate, isVisible, paint, paintComponent, preparePaint, preparePaintComponent, removeAttribute, removeComponentModel, removeHtmlClass, removeHtmlClass, removeNotify, replaceWComponent, reset, serviceRequest, setAccessibleText, setAttribute, setEnvironment, setFlag, setFocussed, setHidden, setHtmlClass, setHtmlClass, setIdName, setInitialised, setLocked, setTag, setToolTip, setTrackingEnabled, setValidate, setVisible, showErrorIndicators, showErrorIndicatorsForComponent, showWarningIndicators, showWarningIndicatorsForComponent, tidyUpUIContext, tidyUpUIContextForTree, validate, validateComponent, writeReplace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.bordertech.wcomponents.WComponent
addHtmlClass, addHtmlClass, forward, getAccessibleText, getAttribute, getBaseUrl, getEnvironment, getHeaders, getHtmlClass, getHtmlClasses, getId, getIdName, getInternalId, getLabel, getName, getParent, getTabIndex, getTag, getToolTip, hasTabIndex, invokeLater, isDefaultState, isHidden, isInitialised, isLocked, isTracking, isTrackingEnabled, isValidate, isVisible, paint, preparePaint, removeAttribute, removeHtmlClass, removeHtmlClass, reset, serviceRequest, setAccessibleText, setAttribute, setEnvironment, setFocussed, setHtmlClass, setHtmlClass, setIdName, setInitialised, setLocked, setTag, setToolTip, setTrackingEnabled, setValidate, setVisible, showErrorIndicators, showWarningIndicators, tidyUpUIContextForTree, validate
-
-
-
-
Constructor Detail
-
WEditableImage
public WEditableImage(WMultiFileWidget editUploader)
Creates a WEditableImage associated with the file widget used to upload edited results. The filename of the uploaded image will be the ID of the WImage.- Parameters:
editUploader- The file upload widget that will receive edited images.
-
-
Method Detail
-
getEditUploader
public WMultiFileWidget getEditUploader()
Return the WMultiFileWidget associated with this editable image.- Returns:
- The file upload widget.
-
newComponentModel
protected WEditableImage.EditableImageModel newComponentModel()
Creates a new component model appropriate for this component.- Overrides:
newComponentModelin classWImage- Returns:
- a new ImageModel.
-
getComponentModel
protected WEditableImage.EditableImageModel getComponentModel()
Returns the effective component model for this component. Subclass may override this method to narrow the return type to their specific model type.- Overrides:
getComponentModelin classWImage- Returns:
- the effective component model
-
getOrCreateComponentModel
protected WEditableImage.EditableImageModel getOrCreateComponentModel()
Retrieves the model for this component so that it can be modified. If this method is called during request processing, and a session specific model does not yet exist, then a new model is created. Subclasses may override this method to narrow the return type to their specific model type.- Overrides:
getOrCreateComponentModelin classWImage- Returns:
- the model for this component
-
-