com.arsdigita.cms.ui
Class ImageChooser

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.TextStylable
              extended bycom.arsdigita.bebop.BlockStylable
                  extended bycom.arsdigita.bebop.SimpleContainer
                      extended bycom.arsdigita.bebop.BoxPanel
                          extended bycom.arsdigita.cms.ui.ImageChooser
All Implemented Interfaces:
com.arsdigita.bebop.util.BebopConstants, Cloneable, com.arsdigita.bebop.Component, com.arsdigita.bebop.Container, com.arsdigita.util.Lockable

public class ImageChooser
extends com.arsdigita.bebop.BoxPanel

Sticks a form at the top of an ImageBrowser in order to search images by keyword

Version:
$Id: //cms/dev/src/com/arsdigita/cms/ui/ImageChooser.java#9 $
Author:
Stanislav Freidin (sfreidin@arsdigita.com)

Nested Class Summary
static class ImageChooser.ImageKeywordForm
          The form which specifies a keyword for the image browser.
 
Field Summary
static String KEYWORD
           
static int LIST_SIZE
           
static String versionId
           
 
Fields inherited from class com.arsdigita.bebop.BoxPanel
HORIZONTAL, VERTICAL
 
Fields inherited from class com.arsdigita.bebop.BlockStylable
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.util.BebopConstants
BEBOP_BORDER, BEBOP_BOXPANEL, BEBOP_CELL, BEBOP_CHECKBOX, BEBOP_CHECKBOXGROUP, BEBOP_COLUMNPANEL, BEBOP_DATE, BEBOP_DATETIME, BEBOP_DHTMLEDITOR, BEBOP_FORMERRORS, BEBOP_FORMWIDGET, BEBOP_GRIDPANEL, BEBOP_LIST, BEBOP_MULTISELECT, BEBOP_OPTION, BEBOP_PAD, BEBOP_PADFRAME, BEBOP_PANELROW, BEBOP_PORTAL, BEBOP_PORTLET, BEBOP_RADIO, BEBOP_RADIOGROUP, BEBOP_SEG_BODY, BEBOP_SEG_HEADER, BEBOP_SEG_PANEL, BEBOP_SEGMENT, BEBOP_SELECT, BEBOP_TABLE, BEBOP_TABLEBODY, BEBOP_TABLEROW, BEBOP_TEXTAREA
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
ImageChooser()
          Construct a new ImageChooser
ImageChooser(String context)
          Construct a new ImageChooser
 
Method Summary
 void addFormSubmissionListener(com.arsdigita.bebop.event.FormSubmissionListener l)
          Add a submission listener to the form.
 void addImageActionListener(com.arsdigita.bebop.event.TableActionListener l)
          Add an action listener to the browser.
 void clearKeyword(com.arsdigita.bebop.PageState s)
          Clear the keyword used in the keyword form
 void clearSelection(com.arsdigita.bebop.PageState state)
          Clear the selection in the browser
 ImageChooser.ImageKeywordForm getForm()
           
 com.arsdigita.bebop.form.Submit getFormCancelButton()
           
 ImageBrowser getImageBrowser()
           
 String getKeyword(com.arsdigita.bebop.PageState state)
           
 com.arsdigita.bebop.SingleSelectionModel getKeywordModel()
           
 void register(com.arsdigita.bebop.Page p)
          Add the "keyword" parameter to the page state
 void setKeyword(com.arsdigita.bebop.PageState state, String word)
          Set the specified keyword.
 
Methods inherited from class com.arsdigita.bebop.BoxPanel
generateXML, setBorder, setBorder, setWidth
 
Methods inherited from class com.arsdigita.bebop.SimpleContainer
add, add, children, contains, generateChildrenXML, generateParent, get, getNamespace, getTag, indexOf, isEmpty, setNamespace, setTag, size
 
Methods inherited from class com.arsdigita.bebop.BlockStylable
setBorder, setBorder, setBorderColor, setHorizontalAlignment, setMargin, setMargin, setPadding, setPadding, setVerticalAlignment
 
Methods inherited from class com.arsdigita.bebop.TextStylable
setBackgroundColor, setColor
 
Methods inherited from class com.arsdigita.bebop.SimpleComponent
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, respond, 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, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked, lock
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

KEYWORD

public static final String KEYWORD
See Also:
Constant Field Values

LIST_SIZE

public static int LIST_SIZE
Constructor Detail

ImageChooser

public ImageChooser(String context)
Construct a new ImageChooser

Parameters:
context - the context for the retrieved items. Should be ContentItem.DRAFT or ContentItem.LIVE

ImageChooser

public ImageChooser()
Construct a new ImageChooser

Method Detail

register

public void register(com.arsdigita.bebop.Page p)
Add the "keyword" parameter to the page state


addImageActionListener

public void addImageActionListener(com.arsdigita.bebop.event.TableActionListener l)
Add an action listener to the browser. The inner class ImageBrowser.LinkActionListener will probably be used here.

Parameters:
l - the action listener.

addFormSubmissionListener

public void addFormSubmissionListener(com.arsdigita.bebop.event.FormSubmissionListener l)
Add a submission listener to the form. The listener will fire whenever a button on the form is clicked.

Parameters:
l - the action listener.

getFormCancelButton

public com.arsdigita.bebop.form.Submit getFormCancelButton()
Returns:
the "Cancel" button in the form

getKeywordModel

public com.arsdigita.bebop.SingleSelectionModel getKeywordModel()
Returns:
the keyword selection model

setKeyword

public void setKeyword(com.arsdigita.bebop.PageState state,
                       String word)
Set the specified keyword. All images matching the keyword will be displayed in the browser.

Parameters:
state - The page state
word - The new keyword

clearSelection

public void clearSelection(com.arsdigita.bebop.PageState state)
Clear the selection in the browser

Parameters:
state - The page state

getKeyword

public String getKeyword(com.arsdigita.bebop.PageState state)
Parameters:
state - The page state
Returns:
the current keyword

getForm

public ImageChooser.ImageKeywordForm getForm()
Returns:
the form

getImageBrowser

public ImageBrowser getImageBrowser()
Returns:
the image browser

clearKeyword

public void clearKeyword(com.arsdigita.bebop.PageState s)
Clear the keyword used in the keyword form

Parameters:
s - The page state


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