edu.neu.ccs.gui
Class OptionsView

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byedu.neu.ccs.gui.RadioPanel
                      extended byedu.neu.ccs.gui.OptionsView
All Implemented Interfaces:
Accessible, Displayable, ImageObserver, JPTConstants, MenuContainer, Serializable, SwingConstants, TypedView

public class OptionsView
extends RadioPanel
implements TypedView

A TypedView for selection of one out of various indexed and labeled choices represented by JRadioButtons.

Since:
1.0
Version:
2.3.3
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String DEFAULT_INDEX
          Bound property name for the default index property.
protected  int defaultValue
          Default selection for this view.
protected  InputProperties properties
          Property list for this view object.
 
Fields inherited from class edu.neu.ccs.gui.RadioPanel
BACKGROUND, buttonGroup, commonactions, DEFAULT_SELECTION, defaultLayout, defaultViewState, labelButtonMap, labelIndexMap, modelButtonMap, OPTION_COUNT, SELECTED_BUTTON, SELECTED_INDEX, SELECTED_LABEL, SET_LABEL_TEXT
 
Fields inherited from class javax.swing.JPanel
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface edu.neu.ccs.gui.TypedView
DATA_TYPE
 
Fields inherited from interface edu.neu.ccs.gui.Displayable
DEFAULT_VIEW_STATE, VIEW_STATE
 
Fields inherited from interface edu.neu.ccs.util.JPTConstants
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT, VALUE
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
OptionsView()
          The default constructor.
OptionsView(LayoutManager layout)
          Constructs a panel with the given layout manager.
OptionsView(String[] strings)
          Constructs a panel containing radio buttons labeled with the given array of strings.
OptionsView(String[] strings, ActionListener action)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given action listener becomes a listener for all buttons.
OptionsView(String[] strings, ActionListener[] actions)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given action listeners become listeners for the corresponding buttons.
OptionsView(String[] strings, ActionListener[] actions, int selection)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given action listeners become listeners for the corresponding buttons; the given selection is the index of the button that is initially selected.
OptionsView(String[] strings, ActionListener[] actions, int selection, LayoutManager layout)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given action listeners become listeners for the corresponding buttons; the given selection is the index of the button that is initially selected; the given layout manager is used to layout the buttons.
OptionsView(String[] strings, ActionListener[] actions, LayoutManager layout)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given action listeners become listeners for the corresponding buttons; the given layout manager is used to layout the buttons.
OptionsView(String[] strings, ActionListener action, int selection)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given action listener becomes a listener for all buttons; the given selection is the index of the button that is initially selected.
OptionsView(String[] strings, ActionListener action, int selection, LayoutManager layout)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given action listener becomes a listener for all buttons; the given selection is the index of the button that is initially selected; the given layout manager is used to layout the buttons.
OptionsView(String[] strings, ActionListener action, LayoutManager layout)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given action listener becomes a listener for all buttons; the given layout manager is used to layout the buttons.
OptionsView(String[] strings, int selection)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given selection is the index of the button that is initially selected.
OptionsView(String[] strings, int selection, LayoutManager layout)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given selection is the index of the button that is initially selected; the given layout manager is used to layout the buttons.
OptionsView(String[] strings, LayoutManager layout)
          Constructs a panel containing radio buttons labeled with the given array of strings; the given layout manager is used to layout the buttons.
 
Method Summary
 Stringable demandObject()
          Returns an XInt object whose state is set to the index of the currently selected option.
 Class getDataType()
          Returns the XInt class object.
 int getDefaultIndex()
          Returns the default index.
 String getDefaultLabel()
          Returns the button label of the default index, or null if there are no options in this view.
 String getDefaultViewState()
          Returns a String representation of the default index.
 InputProperties getInputProperties()
          Returns the input properties for this view.
 String getViewState()
          Returns a String representation of the index of the currently selected option.
 Stringable requestObject()
          Returns an XInt object whose state is set to the index of the currently selected option.
 boolean setDefaultIndex(int index)
          Sets the default index.
 boolean setDefaultLabel(String label)
          Sets the default index to the index of the given button label.
 void setDefaultViewState(String state)
          Sets the default index to the index represented by the given String state.
 void setInputProperties(InputProperties p)
          Sets the input properties for this view to the provided input properties.
 void setViewState(String state)
          Sets the currently selected option to the option at the index represented by the given String state.
 
Methods inherited from class edu.neu.ccs.gui.RadioPanel
addActionListener, addActionListener, addActionListeners, addOption, addOption, addOption, addOption, addOptions, addOptions, addOptions, getButtonModel, getDefaultBackground, getDefaultFont, getIndex, getIndex, getLabel, getLabel, getLabelText, getOptionButton, getOptionButton, getOptionButton, getOptionButtons, getOptionCount, getSelectedButton, getSelectedIndex, getSelectedLabel, initializeRadioPanel, refreshComponent, removeActionListener, removeActionListener, removeActionListeners, reset, setBackground, setEnabled, setFont, setLabelText, setSelectedButton, setSelectedIndex, setSelectedLabel
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.neu.ccs.gui.Displayable
reset, setEnabled
 

Field Detail

DEFAULT_INDEX

public static final String DEFAULT_INDEX
Bound property name for the default index property.

See Also:
Constant Field Values

defaultValue

protected int defaultValue
Default selection for this view.


properties

protected InputProperties properties
Property list for this view object.

Constructor Detail

OptionsView

public OptionsView()

The default constructor.

Other constructors:


OptionsView

public OptionsView(LayoutManager layout)

Constructs a panel with the given layout manager.

If the given layout manager is null, then a TableLayout with WEST alignment and VERTICAL orientation will be used.

Parameters:
layout - the layout manager for the panel
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings)

Constructs a panel containing radio buttons labeled with the given array of strings.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

Parameters:
strings - the array of labels for the radio buttons
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   LayoutManager layout)

Constructs a panel containing radio buttons labeled with the given array of strings; the given layout manager is used to layout the buttons.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

Parameters:
strings - the array of labels for the radio buttons
layout - the layout manager for the panel
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   int selection)

Constructs a panel containing radio buttons labeled with the given array of strings; the given selection is the index of the button that is initially selected.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the initial selection index is invalid and if there are buttons in the panel then the selection index will be set to 0.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

Parameters:
strings - the array of labels for the radio buttons
selection - the index of the button selected by default
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   int selection,
                   LayoutManager layout)

Constructs a panel containing radio buttons labeled with the given array of strings; the given selection is the index of the button that is initially selected; the given layout manager is used to layout the buttons.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the initial selection index is invalid and if there are buttons in the panel then the selection index will be set to 0.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

Parameters:
strings - the array of labels for the radio buttons
selection - the index of the button selected by default
layout - the layout manager for the panel
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   ActionListener action)

Constructs a panel containing radio buttons labeled with the given array of strings; the given action listener becomes a listener for all buttons.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

Parameters:
strings - the array of labels for the radio buttons
action - the action listener that will listen for selection
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   ActionListener action,
                   LayoutManager layout)

Constructs a panel containing radio buttons labeled with the given array of strings; the given action listener becomes a listener for all buttons; the given layout manager is used to layout the buttons.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

If the given layout manager is null, then a TableLayout with WEST alignment and VERTICAL orientation will be used.

Parameters:
strings - the array of labels for the radio buttons
action - the action listener that will listen for selection
layout - the layout manager for the panel
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   ActionListener action,
                   int selection)

Constructs a panel containing radio buttons labeled with the given array of strings; the given action listener becomes a listener for all buttons; the given selection is the index of the button that is initially selected.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the initial selection index is invalid and if there are buttons in the panel then the selection index will be set to 0.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

Parameters:
strings - the array of labels for the radio buttons
action - the action listener that will listen for selection
selection - the index of the button selected by default
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   ActionListener action,
                   int selection,
                   LayoutManager layout)

Constructs a panel containing radio buttons labeled with the given array of strings; the given action listener becomes a listener for all buttons; the given selection is the index of the button that is initially selected; the given layout manager is used to layout the buttons.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the initial selection index is invalid and if there are buttons in the panel then the selection index will be set to 0.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

If the given layout manager is null, then a TableLayout with WEST alignment and VERTICAL orientation will be used.

Parameters:
strings - the array of labels for the radio buttons
action - the action listener that will listen for selection
selection - the index of the button selected by default
layout - the layout manager for the panel
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   ActionListener[] actions)

Constructs a panel containing radio buttons labeled with the given array of strings; the given action listeners become listeners for the corresponding buttons.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

Parameters:
strings - the array of labels for the radio buttons
actions - the action listeners that will listen for selection
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   ActionListener[] actions,
                   LayoutManager layout)

Constructs a panel containing radio buttons labeled with the given array of strings; the given action listeners become listeners for the corresponding buttons; the given layout manager is used to layout the buttons.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

If the given layout manager is null, then a TableLayout with WEST alignment and VERTICAL orientation will be used.

Parameters:
strings - the array of labels for the radio buttons
actions - the action listeners that will listen for selection
layout - the layout manager for the panel
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   ActionListener[] actions,
                   int selection)

Constructs a panel containing radio buttons labeled with the given array of strings; the given action listeners become listeners for the corresponding buttons; the given selection is the index of the button that is initially selected.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the initial selection index is invalid and if there are buttons in the panel then the selection index will be set to 0.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

Parameters:
strings - the array of labels for the radio buttons
actions - the action listeners that will listen for selection
selection - the index of the button selected by default
See Also:
OptionsView()

OptionsView

public OptionsView(String[] strings,
                   ActionListener[] actions,
                   int selection,
                   LayoutManager layout)

Constructs a panel containing radio buttons labeled with the given array of strings; the given action listeners become listeners for the corresponding buttons; the given selection is the index of the button that is initially selected; the given layout manager is used to layout the buttons.

The strings in the array of strings should be distinct as duplicate strings will be ignored.

If the initial selection index is invalid and if there are buttons in the panel then the selection index will be set to 0.

If the strings array is null or of length zero, the panel will be initialized with no buttons.

If the given layout manager is null, then a TableLayout with WEST alignment and VERTICAL orientation will be used.

Parameters:
strings - the array of labels for the radio buttons
actions - the action listeners that will listen for selection
selection - the index of the button selected by default
layout - the layout manager for the panel
See Also:
OptionsView()
Method Detail

demandObject

public Stringable demandObject()
Returns an XInt object whose state is set to the index of the currently selected option.

Specified by:
demandObject in interface TypedView
Returns:
a Stringable model object
See Also:
requestObject(), TypedView

requestObject

public Stringable requestObject()
Returns an XInt object whose state is set to the index of the currently selected option.

Specified by:
requestObject in interface TypedView
Returns:
a Stringable model object
See Also:
demandObject(), TypedView

setInputProperties

public void setInputProperties(InputProperties p)
Description copied from interface: TypedView

Sets the input properties for this view to the provided input properties.

If the given input properties list is null, the property list for this view is set to the base property list containing default property values.

Specified by:
setInputProperties in interface TypedView
Parameters:
p - the new input properties for the view
See Also:
TypedView.getInputProperties()

getInputProperties

public InputProperties getInputProperties()
Description copied from interface: TypedView
Returns the input properties for this view.

Specified by:
getInputProperties in interface TypedView
Returns:
the input properties
See Also:
TypedView.setInputProperties(InputProperties)

getDataType

public Class getDataType()
Returns the XInt class object.

Specified by:
getDataType in interface TypedView
Returns:
the current class of a model object
See Also:
TypedView

setViewState

public void setViewState(String state)

Sets the currently selected option to the option at the index represented by the given String state.

If the String state does not represent an integer or if it represents an integer that is not a valid index, then the currently selected option is not changed.

Overrides the inherited method that considers the view state as a String representing the button label rather than as a String representing the button index.

Specified by:
setViewState in interface Displayable
Overrides:
setViewState in class RadioPanel
Parameters:
state - a String representation of the index
See Also:
getViewState(), Displayable

getViewState

public String getViewState()

Returns a String representation of the index of the currently selected option.

Overrides the inherited method that considers the view state as a String representing the button label rather than as a String representing the button index.

Specified by:
getViewState in interface Displayable
Overrides:
getViewState in class RadioPanel
Returns:
the currently selected index as a String
See Also:
setViewState(String), Displayable

setDefaultViewState

public void setDefaultViewState(String state)

Sets the default index to the index represented by the given String state.

If the String state does not represent an integer or if it represents an integer that is not a valid index, then the default index is not changed.

Overrides the inherited method that considers the view state as a String representing the button label rather than as a String representing the button index.

Specified by:
setDefaultViewState in interface Displayable
Overrides:
setDefaultViewState in class RadioPanel
Parameters:
state - a String representation of the default index
See Also:
RadioPanel.reset(), Displayable

getDefaultViewState

public String getDefaultViewState()

Returns a String representation of the default index.

Overrides the inherited method that considers the view state as a String representing the button label rather than as a String representing the button index.

Specified by:
getDefaultViewState in interface Displayable
Overrides:
getDefaultViewState in class RadioPanel
Returns:
the default index as a String
See Also:
setDefaultViewState(String), RadioPanel.reset()

setDefaultIndex

public boolean setDefaultIndex(int index)

Sets the default index.

If the given index is invalid, the default index is not changed.

Parameters:
index - the default index
Returns:
whether or not the default index was changed
See Also:
getDefaultIndex(), setDefaultLabel(String)

getDefaultIndex

public int getDefaultIndex()

Returns the default index.

Returns:
the default index
See Also:
setDefaultIndex(int), getDefaultLabel()

setDefaultLabel

public boolean setDefaultLabel(String label)

Sets the default index to the index of the given button label.

If the given label is invalid, then does nothing.

Parameters:
label - the button label corresponding to the default index
Returns:
whether or not the default index was changed
See Also:
getDefaultLabel(), setDefaultIndex(int)

getDefaultLabel

public String getDefaultLabel()

Returns the button label of the default index, or null if there are no options in this view.

See Also:
setDefaultLabel(String), getDefaultIndex()