org.uispec4j
Class ListBox

java.lang.Object
  extended by org.uispec4j.AbstractUIComponent
      extended by org.uispec4j.AbstractSwingUIComponent
          extended by org.uispec4j.ListBox
All Implemented Interfaces:
TooltipComponent, UIComponent

public class ListBox
extends AbstractSwingUIComponent

Wrapper for JList components.

This class provides means for checking the contents and selection of the list, changing the selection, etc. For all these methods, when using String values, the means of retrieving a String representation of the displayed values can be customized using the setCellValueConverter(ListBoxCellValueConverter) method and providing a new ListBoxCellValueConverter implementation. A DefaultListBoxCellValueConverter is set up by default.


Field Summary
static java.lang.Class[] SWING_CLASSES
           
static java.lang.String TYPE_NAME
           
 
Constructor Summary
ListBox(javax.swing.JList list)
           
 
Method Summary
 void clearSelection()
           
 Assertion contains(java.lang.String... items)
           
 Assertion contains(java.lang.String item)
           
 Assertion contentEquals(java.lang.String... displayedValues)
           
 void doubleClick()
           
 javax.swing.JList getAwtComponent()
          Returns the Java GUI component represented by this object.
 java.lang.String getDescriptionTypeName()
          Returns the name of the component as it will appear in the XML representation returned by UIComponent.getDescription().
 int getSize()
           
 Assertion isEmpty()
           
 void pressKey(Key key)
           
 void select(java.lang.String... values)
           
 void selectIndex(int index)
           
 void selectIndices(int... indices)
           
 Assertion selectionEquals(java.lang.String... items)
           
 Assertion selectionIsEmpty()
           
 void setCellValueConverter(ListBoxCellValueConverter cellValueConverter)
           
 
Methods inherited from class org.uispec4j.AbstractSwingUIComponent
tooltipContains, tooltipEquals
 
Methods inherited from class org.uispec4j.AbstractUIComponent
addAttributes, backgroundEquals, backgroundNear, foregroundEquals, foregroundNear, getContainer, getContainer, getDescription, getDescription, getLabel, getName, getSubDescription, isEnabled, isVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final java.lang.String TYPE_NAME
See Also:
Constant Field Values

SWING_CLASSES

public static final java.lang.Class[] SWING_CLASSES
Constructor Detail

ListBox

public ListBox(javax.swing.JList list)
Method Detail

getDescriptionTypeName

public java.lang.String getDescriptionTypeName()
Description copied from interface: UIComponent
Returns the name of the component as it will appear in the XML representation returned by UIComponent.getDescription().


getAwtComponent

public javax.swing.JList getAwtComponent()
Description copied from interface: UIComponent
Returns the Java GUI component represented by this object.

Specified by:
getAwtComponent in interface UIComponent
Specified by:
getAwtComponent in class AbstractSwingUIComponent

setCellValueConverter

public void setCellValueConverter(ListBoxCellValueConverter cellValueConverter)

isEmpty

public Assertion isEmpty()

contentEquals

public Assertion contentEquals(java.lang.String... displayedValues)

contains

public Assertion contains(java.lang.String item)

contains

public Assertion contains(java.lang.String... items)

selectIndex

public void selectIndex(int index)

selectIndices

public void selectIndices(int... indices)

select

public void select(java.lang.String... values)

clearSelection

public void clearSelection()

getSize

public int getSize()

doubleClick

public void doubleClick()

selectionIsEmpty

public Assertion selectionIsEmpty()

selectionEquals

public Assertion selectionEquals(java.lang.String... items)

pressKey

public void pressKey(Key key)


Copyright © 2004-2008. All Rights Reserved.