org.xwiki.gwt.wysiwyg.client.widget
Class SpaceSelector

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.FocusWidget
              extended by com.google.gwt.user.client.ui.ListBox
                  extended by org.xwiki.gwt.wysiwyg.client.widget.SpaceSelector
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasAllFocusHandlers, com.google.gwt.event.dom.client.HasAllKeyHandlers, com.google.gwt.event.dom.client.HasAllMouseHandlers, com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasChangeHandlers, com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasKeyPressHandlers, com.google.gwt.event.dom.client.HasKeyUpHandlers, com.google.gwt.event.dom.client.HasMouseDownHandlers, com.google.gwt.event.dom.client.HasMouseMoveHandlers, com.google.gwt.event.dom.client.HasMouseOutHandlers, com.google.gwt.event.dom.client.HasMouseOverHandlers, com.google.gwt.event.dom.client.HasMouseUpHandlers, com.google.gwt.event.dom.client.HasMouseWheelHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.Focusable, com.google.gwt.user.client.ui.HasFocus, com.google.gwt.user.client.ui.HasName, com.google.gwt.user.client.ui.SourcesChangeEvents, com.google.gwt.user.client.ui.SourcesClickEvents, com.google.gwt.user.client.ui.SourcesFocusEvents, com.google.gwt.user.client.ui.SourcesKeyboardEvents, com.google.gwt.user.client.ui.SourcesMouseEvents

public class SpaceSelector
extends com.google.gwt.user.client.ui.ListBox

Selector for the spaces in a wiki.

Version:
$Id: SpaceSelector.java 28844 2010-05-12 13:22:39Z mflorea $

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
SpaceSelector(WikiServiceAsync wikiService)
          Creates a new space selector that uses the given service to retrieve the list of space names.
 
Method Summary
 java.lang.String getSelectedSpace()
           
 java.lang.String getWiki()
           
 void refreshList(java.lang.String currentSpace)
           
 void refreshList(java.lang.String currentSpace, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<java.lang.String>> cb)
          Refreshes the list of spaces for the current wiki.
 void setSelectedSpace(java.lang.String space)
          Sets this selector on the specified space.
 void setWiki(java.lang.String wiki)
          Sets the wiki for which this space selector fetches the spaces.
 
Methods inherited from class com.google.gwt.user.client.ui.ListBox
addChangeHandler, addChangeListener, addItem, addItem, clear, getItemCount, getItemText, getName, getSelectedIndex, getValue, getVisibleItemCount, insertItem, insertItem, isItemSelected, isMultipleSelect, onEnsureDebugId, removeChangeListener, removeItem, setItemSelected, setItemText, setMultipleSelect, setName, setSelectedIndex, setValue, setVisibleItemCount, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addBlurHandler, addClickHandler, addClickListener, addFocusHandler, addFocusListener, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, getFocusImpl, getTabIndex, isEnabled, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setElement, setEnabled, setFocus, setTabIndex
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

SpaceSelector

public SpaceSelector(WikiServiceAsync wikiService)
Creates a new space selector that uses the given service to retrieve the list of space names.

Parameters:
wikiService - the service used to retrieve the list of space names
Method Detail

refreshList

public void refreshList(java.lang.String currentSpace,
                        com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<java.lang.String>> cb)
Refreshes the list of spaces for the current wiki.

Parameters:
currentSpace - the currently selected space.
cb - callback to be able to handle the asynchronous call in this function on the caller side

refreshList

public void refreshList(java.lang.String currentSpace)
Parameters:
currentSpace - the currently selected space.
See Also:
refreshList(String, AsyncCallback)

getSelectedSpace

public java.lang.String getSelectedSpace()
Returns:
the currently selected space

setSelectedSpace

public void setSelectedSpace(java.lang.String space)
Sets this selector on the specified space.

Parameters:
space - the space to set as selected in this selector.

getWiki

public java.lang.String getWiki()
Returns:
the wiki for this space selector.

setWiki

public void setWiki(java.lang.String wiki)
Sets the wiki for which this space selector fetches the spaces. This method onfly sets the value of the wiki, it does not refresh the spaces list.

Parameters:
wiki - the wiki from which this selector to fetch spaces options.


Copyright © 2004-2010 XWiki. All Rights Reserved.