com.sap.ui.commons.client
Class Accordion

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.Accordion

public class Accordion
extends com.sap.ui.core.client.Control

The class Accordion is the GWT wrapper for the Phoenix control: sap.ui.commons.Accordion.

Contains N sections which act as containers for any library control.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.commons.Accordion)

Constructor Summary
protected Accordion()
          constructs the class Accordion
hidden due to JavaScriptObject restriction
 
Method Summary
 Accordion addSection(AccordionSection section)
          Appends a section to the aggregation sections.
 Accordion attachSectionCloseEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Triggered when user closes a section.
 Accordion attachSectionOpenEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Triggered when user opens a section.
 Accordion attachSectionsReorderEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Triggered when user changes the position of a section.
 void closeSection(String sectionId)
          Closes a given section and opens the default section.
static Accordion create()
          creates a new instance of the class Accordion
static Accordion create(String idOrConfig)
          creates a new instance of the class Accordion
static Accordion create(String id, String config)
          creates a new instance of the class Accordion
 Accordion destroySections()
          Destroys all the sections in the Sections-aggregation.
 Accordion detachSectionCloseEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Triggered when user closes a section.
 Accordion detachSectionOpenEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Triggered when user opens a section.
 Accordion detachSectionsReorderEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Triggered when user changes the position of a section.
 String getOpenedSectionsId()
          Getter for property openedSectionsId IDs of the opened sections by default and on first rendering.
 com.sap.ui.core.client.js.JsArray<AccordionSection> getSections()
          Getter for aggregation sections Empty container used to display any library controls.
 String getWidth()
          Getter for property width When the width specified is smaller than a section content, a horizontal scrollbar is provided.
 int indexOfSection(AccordionSection section)
          Checks for the provided com.sap.ui.commons.client.AccordionSection in the sections-aggregation and returns its index if found or -1 otherwise.
 Accordion insertSection(AccordionSection section, int index)
          Inserts some section into the aggregation named sections.
 void openSection(String sectionId)
          Opens a given section.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<AccordionSection>> removeAllSections()
          Removes all the items in the sections-aggregation.
 com.sap.ui.core.client.js.JsArray<AccordionSection> removeSection(int index)
          Removes a section from the aggregation named sections.
 Accordion setOpenedSectionsId(String value)
          Setter for property openedSectionsId
 Accordion setWidth(String value)
          Setter for property width
Default value is: 200px
 
Methods inherited from class com.sap.ui.core.client.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Accordion

protected Accordion()
constructs the class Accordion
hidden due to JavaScriptObject restriction

Method Detail

create

public static Accordion create()
creates a new instance of the class Accordion


create

public static Accordion create(String idOrConfig)
creates a new instance of the class Accordion

Parameters:
id - id of the Accordion or configuration JSON string

create

public static Accordion create(String id,
                               String config)
creates a new instance of the class Accordion

Parameters:
id - id of the Accordion
config - configuration JSON string

getWidth

public final String getWidth()
Getter for property width When the width specified is smaller than a section content, a horizontal scrollbar is provided.

Returns:
the value of property width

setWidth

public final Accordion setWidth(String value)
Setter for property width
Default value is: 200px

Parameters:
value - String
Returns:
this to allow method chaining

getOpenedSectionsId

public final String getOpenedSectionsId()
Getter for property openedSectionsId IDs of the opened sections by default and on first rendering.

Returns:
the value of property openedSectionsId

setOpenedSectionsId

public final Accordion setOpenedSectionsId(String value)
Setter for property openedSectionsId

Parameters:
value - String
Returns:
this to allow method chaining

getSections

public final com.sap.ui.core.client.js.JsArray<AccordionSection> getSections()
Getter for aggregation sections Empty container used to display any library controls.

Returns:
com.sap.ui.commons.client.AccordionSection[]

insertSection

public final Accordion insertSection(AccordionSection section,
                                     int index)
Inserts some section into the aggregation named sections.

Parameters:
section - the section to insert
index - int the 0-based index the section should be inserted at.
Returns:
this to allow method chaining

addSection

public final Accordion addSection(AccordionSection section)
Appends a section to the aggregation sections.

Parameters:
section - com.sap.ui.commons.client.AccordionSection the section to add
Returns:
this to allow method chaining

removeSection

public final com.sap.ui.core.client.js.JsArray<AccordionSection> removeSection(int index)
Removes a section from the aggregation named sections.

Parameters:
index - int the position of the section to remove.
Returns:
reference to this instance

removeAllSections

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<AccordionSection>> removeAllSections()
Removes all the items in the sections-aggregation.

Returns:
an array of the removed elements (might be empty)

indexOfSection

public final int indexOfSection(AccordionSection section)
Checks for the provided com.sap.ui.commons.client.AccordionSection in the sections-aggregation and returns its index if found or -1 otherwise.

Parameters:
section - the section whose index is looked for.
Returns:
the index of the provided control in the aggregation.

destroySections

public final Accordion destroySections()
Destroys all the sections in the Sections-aggregation.

Returns:
this to allow method chaining

attachSectionOpenEvent

public final Accordion attachSectionOpenEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Triggered when user opens a section.
Event Parameters:
{sap.ui.core/string} openSectionId ID of the section opened.
{string[]} closeSectionIds Index of the sections to close. It can be initial if no section were previously open.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachSectionOpenEvent

public final Accordion detachSectionOpenEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Triggered when user opens a section.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

attachSectionCloseEvent

public final Accordion attachSectionCloseEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Triggered when user closes a section.
Event Parameters:
{sap.ui.core/string} closeSectionId ID of the section closed.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachSectionCloseEvent

public final Accordion detachSectionCloseEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Triggered when user closes a section.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

attachSectionsReorderEvent

public final Accordion attachSectionsReorderEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Triggered when user changes the position of a section.
Event Parameters:
{sap.ui.core/string} movedSectionId ID of the moved section.
{sap.ui.core/int} newIndex New index of the moved section.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachSectionsReorderEvent

public final Accordion detachSectionsReorderEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Triggered when user changes the position of a section.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

openSection

public final void openSection(String sectionId)
Opens a given section.

Parameters:
sectionId - Section to open.

closeSection

public final void closeSection(String sectionId)
Closes a given section and opens the default section.

Parameters:
sectionId - Section to close.


Copyright © 2011 SAP. All Rights Reserved.