com.arsdigita.cms.contenttypes.ui.mparticle
Class ImageUploadSection

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.FormSection
              extended bycom.arsdigita.cms.contenttypes.ui.mparticle.ImageUploadSection
All Implemented Interfaces:
Cloneable, com.arsdigita.bebop.Component, com.arsdigita.bebop.Container, com.arsdigita.util.Lockable

public class ImageUploadSection
extends com.arsdigita.bebop.FormSection

A form section with one widget to upload an image.

Author:
Dave Turner

Field Summary
static String CAPTION
           
static String IMAGE
           
 
Fields inherited from class com.arsdigita.bebop.FormSection
m_formModel, m_panel, versionId
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
ImageUploadSection(String name, com.arsdigita.cms.ItemSelectionModel selImage)
           
ImageUploadSection(String name, com.arsdigita.cms.ItemSelectionModel selImage, com.arsdigita.bebop.Container panel)
          Constructor.
 
Method Summary
 File getImage(com.arsdigita.bebop.event.FormSectionEvent event)
          Return a File object from the file upload widget.
 String getImageFilename(com.arsdigita.bebop.event.FormSectionEvent event)
          Return the filname from the upload widget.
 void initImageUpload(com.arsdigita.bebop.event.FormSectionEvent event)
          Initialise the caption text field.
 com.arsdigita.cms.ImageAsset processImageUpload(com.arsdigita.bebop.event.FormSectionEvent event)
          Process the image upload.
 
Methods inherited from class com.arsdigita.bebop.FormSection
add, add, addCancelListener, addInitListener, addProcessListener, addSubmissionListener, addValidationListener, children, contains, createInitListener, createProcessListener, createSubmissionListener, createValidationListener, fireCancel, fireInit, fireProcess, fireSubmitted, fireValidate, forwardInit, forwardProcess, forwardSubmission, forwardValidation, generateXML, get, getModel, getPanel, indexOf, isEmpty, lock, process, register, removeCancelListener, removeInitListener, removeProcessListener, removeSubmissionListener, removeValidationListener, respond, size
 
Methods inherited from class com.arsdigita.bebop.SimpleComponent
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, register, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible
 
Methods inherited from class com.arsdigita.bebop.Completable
addCompletionListener, fireCompletionEvent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.arsdigita.bebop.Component
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked
 

Field Detail

IMAGE

public static final String IMAGE
See Also:
Constant Field Values

CAPTION

public static final String CAPTION
See Also:
Constant Field Values
Constructor Detail

ImageUploadSection

public ImageUploadSection(String name,
                          com.arsdigita.cms.ItemSelectionModel selImage,
                          com.arsdigita.bebop.Container panel)
Constructor.

Parameters:
panel - the panel used to lay out the components

ImageUploadSection

public ImageUploadSection(String name,
                          com.arsdigita.cms.ItemSelectionModel selImage)
Method Detail

initImageUpload

public void initImageUpload(com.arsdigita.bebop.event.FormSectionEvent event)
Initialise the caption text field. Should be called from the form init listener.


getImageFilename

public String getImageFilename(com.arsdigita.bebop.event.FormSectionEvent event)
Return the filname from the upload widget. Should be called from the form process listener.


getImage

public File getImage(com.arsdigita.bebop.event.FormSectionEvent event)
Return a File object from the file upload widget. Should be called from the form process listener.


processImageUpload

public com.arsdigita.cms.ImageAsset processImageUpload(com.arsdigita.bebop.event.FormSectionEvent event)
Process the image upload. Should be called form the form process listener.



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:0019 UTC