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

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.PageSelector
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 PageSelector
extends com.google.gwt.user.client.ui.ListBox

Selector for the pages from a space in a wiki.

Version:
$Id: PageSelector.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
PageSelector(WikiServiceAsync wikiService)
          Creates a new page selector that uses the given service to get the list of page names.
 
Method Summary
 java.lang.String getSelectedPage()
           
 java.lang.String getSpace()
          Sets the space for this selector.
 java.lang.String getWiki()
           
 void refreshList(java.lang.String currentPage)
           
 void refreshList(java.lang.String currentPage, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<java.lang.String>> cb)
          Refreshes the list of pages for this selector.
 void setSelectedPage(java.lang.String page)
          Sets this selector on the specified page.
 void setSpace(java.lang.String space)
           
 void setWiki(java.lang.String wiki)
          Sets the current wiki for this selector.
 
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

PageSelector

public PageSelector(WikiServiceAsync wikiService)
Creates a new page selector that uses the given service to get the list of page names.

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

refreshList

public void refreshList(java.lang.String currentPage,
                        com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<java.lang.String>> cb)
Refreshes the list of pages for this selector.

Parameters:
currentPage - the currently selected page, to restore selection after update.
cb - callback to be able to handle the asynchronous call in this function on the caller side

refreshList

public void refreshList(java.lang.String currentPage)
Parameters:
currentPage - the currently selected page, to restore selection after update.

getSelectedPage

public java.lang.String getSelectedPage()
Returns:
the currently selected page in this selector.

setSelectedPage

public void setSelectedPage(java.lang.String page)
Sets this selector on the specified page.

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

getWiki

public java.lang.String getWiki()
Returns:
the wiki

setWiki

public void setWiki(java.lang.String wiki)
Sets the current wiki for this selector. Note that this function does not update the list of pages, you must explicitly call refreshList(String) after setting this value.

Parameters:
wiki - the wiki to set

getSpace

public java.lang.String getSpace()
Sets the space for this selector. Note that this function does not update the list of pages, you must explicitly call refreshList(String) after setting this value.

Returns:
the space

setSpace

public void setSpace(java.lang.String space)
Parameters:
space - the space to set


Copyright © 2004-2011 XWiki. All Rights Reserved.