com.sap.tc.webdynpro.clientserver.uielib.standard.api

Interface IWDToolBarButtonChoice

All Superinterfaces:
IWDToolBarItem, IWDUIElement, IWDViewElement

public interface IWDToolBarButtonChoice
extends IWDUIElement, IWDToolBarItem

Web Dynpro ToolBarButtonChoice API. A toolbar button with the possibility to choose from a set of actions.

The toolbar button choice may operate in two modes which are controlled by the repeatSelectedAction property:

  1. repeatSelectedAction = true:
    The toolbar button choice is divided into two sections, a button and a menu trigger. Pressing the button executes the selected action, pressing the menu trigger opens the choice menu.
  2. repeatSelectedAction = false: The toolbar button choice is displayed as one button that opens the choices menu when pressed.

This type can be called by applications using Web Dynpro, but DO NOT EXTEND OR IMPLEMENT IT!

Type Classification Type Classification:

This interface is part of the Web Dynpro API, so applications may reference it or call any method of it, but they must not implement or extend it.

For a detailed explanation of API classification see the Web Dynpro Compatibility Guide

Field Summary
static boolean DEFAULT_COLLAPSIBLE
          Default value of the collapsible property is false.
static String DEFAULT_IMAGE_SOURCE
          Default value of the imageSource property is "".
static boolean DEFAULT_REPEAT_SELECTED_ACTION
          Default value of the repeatSelectedAction property is true.
static String DEFAULT_SELECTED_ACTION_ITEM
          Default value of the selectedActionItem property is "".
static String DEFAULT_TEXT
          Default value of the text property is "".
 
Fields inherited from interface com.sap.tc.webdynpro.progmodel.api.IWDUIElement
DEFAULT_ENABLED, DEFAULT_TOOLTIP, DEFAULT_VISIBLE
 
Method Summary
 void addChoice(IWDMenuActionItem choice)
          Adds the given Choice at the end of the Choices list.
 void addChoice(IWDMenuActionItem choice, int index)
          Inserts the given Choice at the specified (zero-based) index into the Choices list.
 void bindCollapsible(IWDAttributeInfo attributeInfo)
          Binds the collapsible property to the context attribute specified by the given attribute info.
 void bindCollapsible(String path)
          Binds the collapsible property to the context attribute specified by the given path.
 void bindImageSource(IWDAttributeInfo attributeInfo)
          Binds the imageSource property to the context attribute specified by the given attribute info.
 void bindImageSource(String path)
          Binds the imageSource property to the context attribute specified by the given path.
 String bindingOfCollapsible()
          Returns the binding path of the collapsible property.
 String bindingOfImageSource()
          Returns the binding path of the imageSource property.
 String bindingOfRepeatSelectedAction()
          Returns the binding path of the repeatSelectedAction property.
 String bindingOfSelectedActionItem()
          Returns the binding path of the selectedActionItem property.
 String bindingOfText()
          Returns the binding path of the text property.
 void bindRepeatSelectedAction(IWDAttributeInfo attributeInfo)
          Binds the repeatSelectedAction property to the context attribute specified by the given attribute info.
 void bindRepeatSelectedAction(String path)
          Binds the repeatSelectedAction property to the context attribute specified by the given path.
 void bindSelectedActionItem(IWDAttributeInfo attributeInfo)
          Binds the selectedActionItem property to the context attribute specified by the given attribute info.
 void bindSelectedActionItem(String path)
          Binds the selectedActionItem property to the context attribute specified by the given path.
 void bindText(IWDAttributeInfo attributeInfo)
          Binds the text property to the context attribute specified by the given attribute info.
 void bindText(String path)
          Binds the text property to the context attribute specified by the given path.
 void destroyAllChoices()
          Destroys all elements in the Choices list.
 IWDMenuActionItem getChoice(int index)
          Returns the Choice at the given index.
 IWDMenuActionItem[] getChoices()
          Returns the Choices list as an array.
 boolean getCollapsible()
          Returns the value of the collapsible property.
 String getImageSource()
          Returns the value of the imageSource property.
 boolean getRepeatSelectedAction()
          Returns the value of the repeatSelectedAction property.
 String getSelectedActionItem()
          Returns the value of the selectedActionItem property.
 String getText()
          Returns the value of the text property.
 boolean hasChoices()
          Returns true if there exists a Choice.
 int indexOfChoice(IWDMenuActionItem choice)
          Returns the index of the given element in the Choices list, returns -1 if the element is not in the list.
 Iterator iterateChoices()
          Returns an iterator over the Choices list.
 int numberOfChoices()
          Returns the number of Choices.
 void removeAllChoices()
          Removes all elements from the Choices list.
 IWDMenuActionItem removeChoice(int index)
          Removes the Choice at the given index from the Choices list.
 IWDMenuActionItem removeChoice(String id)
          Removes the Choice with the given ID from the Choices list.
 void setCollapsible(boolean value)
          Sets the collapsible property to the given value.
 void setImageSource(String value)
          Sets the imageSource property to the given value.
 void setRepeatSelectedAction(boolean value)
          Sets the repeatSelectedAction property to the given value.
 void setSelectedActionItem(String value)
          Sets the selectedActionItem property to the given value.
 void setText(String value)
          Sets the text property to the given value.
 void swapChoices(int i, int j)
          Swaps the Choices at the given indices.
 
Methods inherited from interface com.sap.tc.webdynpro.progmodel.api.IWDUIElement
bindEnabled, bindEnabled, bindingOfEnabled, bindingOfTooltip, bindingOfVisible, bindTooltip, bindTooltip, bindVisible, bindVisible, createLayoutData, getContainer, getEnabled, getLayoutData, getTooltip, getVisible, setEnabled, setTooltip, setVisible
 
Methods inherited from interface com.sap.tc.webdynpro.progmodel.api.IWDViewElement
destroy, getId, getView, requestFocus
 
Methods inherited from interface com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDToolBarItem
getVisible, setVisible
 

Field Detail

DEFAULT_COLLAPSIBLE

public static final boolean DEFAULT_COLLAPSIBLE
Default value of the collapsible property is false.

See Also:
Constant Field Values

DEFAULT_IMAGE_SOURCE

public static final String DEFAULT_IMAGE_SOURCE
Default value of the imageSource property is "".

See Also:
Constant Field Values

DEFAULT_REPEAT_SELECTED_ACTION

public static final boolean DEFAULT_REPEAT_SELECTED_ACTION
Default value of the repeatSelectedAction property is true.

See Also:
Constant Field Values

DEFAULT_SELECTED_ACTION_ITEM

public static final String DEFAULT_SELECTED_ACTION_ITEM
Default value of the selectedActionItem property is "".

See Also:
Constant Field Values

DEFAULT_TEXT

public static final String DEFAULT_TEXT
Default value of the text property is "".

See Also:
Constant Field Values
Method Detail

bindCollapsible

public void bindCollapsible(String path)
Binds the collapsible property to the context attribute specified by the given path.

Parameters:
path - the context path of the attribute to which the collapsible property will be bound

bindCollapsible

public void bindCollapsible(IWDAttributeInfo attributeInfo)
Binds the collapsible property to the context attribute specified by the given attribute info.

Parameters:
attributeInfo - the info of the context attribute to which the collapsible property will be bound

bindingOfCollapsible

public String bindingOfCollapsible()
Returns the binding path of the collapsible property.

Returns:
the path of the context attribute to which the collapsible property is currently bound

getCollapsible

public boolean getCollapsible()
Returns the value of the collapsible property.

The initial value is false.

Specifies whether the toolbar item is visible only on expansion of the toolbar (true), or always (false).

Specified by:
getCollapsible in interface IWDToolBarItem
Returns:
the current value of the collapsible property
See Also:
setCollapsible(boolean)

setCollapsible

public void setCollapsible(boolean value)
Sets the collapsible property to the given value.

Specified by:
setCollapsible in interface IWDToolBarItem
Parameters:
value - the new value of the collapsible property
See Also:
getCollapsible()

bindImageSource

public void bindImageSource(String path)
Binds the imageSource property to the context attribute specified by the given path.

Parameters:
path - the context path of the attribute to which the imageSource property will be bound

bindImageSource

public void bindImageSource(IWDAttributeInfo attributeInfo)
Binds the imageSource property to the context attribute specified by the given attribute info.

Parameters:
attributeInfo - the info of the context attribute to which the imageSource property will be bound

bindingOfImageSource

public String bindingOfImageSource()
Returns the binding path of the imageSource property.

Returns:
the path of the context attribute to which the imageSource property is currently bound

getImageSource

public String getImageSource()
Returns the value of the imageSource property.

The initial value is "".

The image of the toolbar button choice element. If repeatSelectedAction is set to true, the image of the selected action item is displayed. Otherwise, the image set on the toolbar button choice itself is displayed.

Returns:
the current value of the imageSource property
See Also:
setImageSource(String)

setImageSource

public void setImageSource(String value)
Sets the imageSource property to the given value.

Parameters:
value - the new value of the imageSource property
See Also:
getImageSource()

bindRepeatSelectedAction

public void bindRepeatSelectedAction(String path)
Binds the repeatSelectedAction property to the context attribute specified by the given path.

Parameters:
path - the context path of the attribute to which the repeatSelectedAction property will be bound

bindRepeatSelectedAction

public void bindRepeatSelectedAction(IWDAttributeInfo attributeInfo)
Binds the repeatSelectedAction property to the context attribute specified by the given attribute info.

Parameters:
attributeInfo - the info of the context attribute to which the repeatSelectedAction property will be bound

bindingOfRepeatSelectedAction

public String bindingOfRepeatSelectedAction()
Returns the binding path of the repeatSelectedAction property.

Returns:
the path of the context attribute to which the repeatSelectedAction property is currently bound

getRepeatSelectedAction

public boolean getRepeatSelectedAction()
Returns the value of the repeatSelectedAction property.

The initial value is true.

If repeatSelectedAction is set to true, the toolbar button choice remembers the last selected action and repeats this action when pressed again.

Returns:
the current value of the repeatSelectedAction property
See Also:
setRepeatSelectedAction(boolean)

setRepeatSelectedAction

public void setRepeatSelectedAction(boolean value)
Sets the repeatSelectedAction property to the given value.

Parameters:
value - the new value of the repeatSelectedAction property
See Also:
getRepeatSelectedAction()

bindSelectedActionItem

public void bindSelectedActionItem(String path)
Binds the selectedActionItem property to the context attribute specified by the given path.

Parameters:
path - the context path of the attribute to which the selectedActionItem property will be bound

bindSelectedActionItem

public void bindSelectedActionItem(IWDAttributeInfo attributeInfo)
Binds the selectedActionItem property to the context attribute specified by the given attribute info.

Parameters:
attributeInfo - the info of the context attribute to which the selectedActionItem property will be bound

bindingOfSelectedActionItem

public String bindingOfSelectedActionItem()
Returns the binding path of the selectedActionItem property.

Returns:
the path of the context attribute to which the selectedActionItem property is currently bound

getSelectedActionItem

public String getSelectedActionItem()
Returns the value of the selectedActionItem property.

The initial value is "".

The ID of the currently selected menu action item.

Returns:
the current value of the selectedActionItem property
See Also:
setSelectedActionItem(String)

setSelectedActionItem

public void setSelectedActionItem(String value)
Sets the selectedActionItem property to the given value.

Parameters:
value - the new value of the selectedActionItem property
See Also:
getSelectedActionItem()

bindText

public void bindText(String path)
Binds the text property to the context attribute specified by the given path.

Parameters:
path - the context path of the attribute to which the text property will be bound

bindText

public void bindText(IWDAttributeInfo attributeInfo)
Binds the text property to the context attribute specified by the given attribute info.

Parameters:
attributeInfo - the info of the context attribute to which the text property will be bound

bindingOfText

public String bindingOfText()
Returns the binding path of the text property.

Returns:
the path of the context attribute to which the text property is currently bound

getText

public String getText()
Returns the value of the text property.

The initial value is null.

The text of the toolbar button choice element. If repeatSelectedAction is set to true, the text of the selected action item is displayed. Otherwise, the text set on the toolbar button choice itself is displayed.

Returns:
the current value of the text property
See Also:
setText(String)

setText

public void setText(String value)
Sets the text property to the given value.

Parameters:
value - the new value of the text property
See Also:
getText()

addChoice

public void addChoice(IWDMenuActionItem choice)
Adds the given Choice at the end of the Choices list.

Parameters:
choice - the Choice to be added to the list
See Also:
getChoices()

addChoice

public void addChoice(IWDMenuActionItem choice,
                      int index)
Inserts the given Choice at the specified (zero-based) index into the Choices list.

Parameters:
choice - the Choice to be inserted into the list
index - (zero-based) insertion position in the list
See Also:
getChoices()

swapChoices

public void swapChoices(int i,
                        int j)
Swaps the Choices at the given indices.

Parameters:
i - index of the first Choice to swap
j - index of the second Choice to swap
Throws:
IndexOutOfBoundsException - If one of the indices is out of bounds

getChoices

public IWDMenuActionItem[] getChoices()
Returns the Choices list as an array. The list of action items that may be chosen.

Returns:
an array containing the current Choices list

getChoice

public IWDMenuActionItem getChoice(int index)
Returns the Choice at the given index.

Returns:
Choice at the given index

indexOfChoice

public int indexOfChoice(IWDMenuActionItem choice)
Returns the index of the given element in the Choices list, returns -1 if the element is not in the list.


numberOfChoices

public int numberOfChoices()
Returns the number of Choices.

Returns:
the number of Choices
See Also:
getChoices()

hasChoices

public boolean hasChoices()
Returns true if there exists a Choice.

Returns:
true if there exists a Choice, otherwise returns false
See Also:
getChoices()

iterateChoices

public Iterator iterateChoices()
Returns an iterator over the Choices list.

Returns:
an iterator over the Choices list
See Also:
getChoices()

removeChoice

public IWDMenuActionItem removeChoice(int index)
Removes the Choice at the given index from the Choices list. This does not destroy the removed element, i.e. it may be added again!

Parameters:
index - (zero-based) index of the removal position in the list
Returns:
the removed element
See Also:
addChoice(IWDMenuActionItem), getChoices()

removeChoice

public IWDMenuActionItem removeChoice(String id)
Removes the Choice with the given ID from the Choices list. This does not destroy the removed element, i.e. it may be added again!

Parameters:
id - unique ID of the element to be removed from the list
Returns:
the removed element
See Also:
addChoice(IWDMenuActionItem), getChoices()

removeAllChoices

public void removeAllChoices()
Removes all elements from the Choices list. This does not destroy the removed elements, i.e. they may be added again!

See Also:
addChoice(IWDMenuActionItem), getChoices()

destroyAllChoices

public void destroyAllChoices()
Destroys all elements in the Choices list. Destroyed view elements do not exist any longer in their view, i.e. new elements may be created with the same IDs.



Copyright 2006 SAP AG Complete Copyright Notice