Class orion.widgets.Section
Generates a section
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.ui/web/orion/section.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
orion.widgets.Section(parent, sibling)
Generates a section
|
Method Attributes | Method Name and Description |
---|---|
addEventListener(type, listener, useCapture)
Adds an event listener to this event target.
|
|
destroy()
Destroy the section by removing the title and content from the parent.
|
|
dispatchEvent(evt)
Dispatches the given event to the listeners added to this event target.
|
|
embedExplorer(explorer, parent, noSelection)
|
|
Get the action DOM node
|
|
Get the header DOM node
|
|
Get the title DOM node
|
|
removeEventListener(type, listener, useCapture)
Removes an event listener from the event target.
|
|
setContent(content)
Changes the contents of the section.
|
|
setHidden(hidden)
|
|
setOnExpandCollapse(func)
|
|
setTitle(title)
Changes the title of section
|
Class Detail
orion.widgets.Section(parent, sibling)
Generates a section
- Parameters:
- {DomNode} parent
- parent node
- {DomNode} sibling
- if specified, the section will be inserted before the sibling
- {String} options.id
- id of the section header
- {String} options.title
- title (in HTML) of the section
- {orion.preferences.PreferencesService} options.preferenceService Optional
- used to store the hidden/shown state of the section if specified
- {String|Array} options.headerClass Optional
- a class or array of classes to use in the section header, in addition to the default header classes
- {String|Array} options.iconClass Optional
- a class or array of classes to use in the icon decorating section, no icon displayed if not provided
- {Function} options.getItemCount Optional
- function to return the count of items in the section. If not provided, no count is shown.
- {String|DomNode} options.content Optional
- HTML or DOM node giving the Section's initial contents. May be set later using #setContent()
- {Boolean} options.slideout Optional
- if true section will contain generated slideout
- {Boolean} options.canHide Optional
- if true section may be hidden
- {Boolean} options.hidden Optional
- if true section will be hidden at first display
- {Boolean} options.useAuxStyle Optional
- if true the section will be styled for an auxiliary pane
- {Boolean} options.keepHeader Optional
- if true the embedded explorer will keep its header
- {Boolean} options.noTwistie Optional
- if true the twisties will not be displayed
- {Boolean} options.dropdown Optional
- if true the section is dropdown
- {Boolean} options.noArrow Optional
- if true no dropdown arrow
- {Function} options.onExpandCollapse Optional
- a function that will be called when the expanded/collapsed state changes
Method Detail
addEventListener(type, listener, useCapture)
Adds an event listener to this event target.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.
- Parameters:
- {String} type
- The event type.
- {Function|EventListener} listener
- The function or the EventListener that will be executed when the event happens.
- {Boolean} useCapture Optional, Default: false
true
if the listener should be trigged in the capture phase.
createProgressMonitor()
destroy()
Destroy the section by removing the title and content from the parent.
dispatchEvent(evt)
Dispatches the given event to the listeners added to this event target.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.
- Parameters:
- {Event} evt
- The event to dispatch.
embedExplorer(explorer, parent, noSelection)
- Parameters:
- explorer
- parent
- noSelection
{DomNode}
getActionElement()
Get the action DOM node
- Returns:
- {DomNode} The dom node that holds the section actions.
{DomNode}
getContentElement()
- Returns:
- {DomNode} The dom node that holds the section contents.
{DomNode}
getHeaderElement()
Get the header DOM node
- Returns:
- {DomNode} The dom node that holds the section header.
{DomNode}
getTitleElement()
Get the title DOM node
- Returns:
- {DomNode} The dom node that holds the section title.
removeEventListener(type, listener, useCapture)
Removes an event listener from the event target.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.
All the parameters must be the same ones used to add the listener.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js>.
- Parameters:
- {String} type
- The event type
- {Function|EventListener} listener
- The function or the EventListener that will be executed when the event happens.
- {Boolean} useCapture Optional, Default: false
true
if the listener should be trigged in the capture phase.
setContent(content)
Changes the contents of the section.
- Parameters:
- {String|DomNode} content
setHidden(hidden)
- Parameters:
- hidden
setOnExpandCollapse(func)
- Parameters:
- {Function} func
setTitle(title)
Changes the title of section
- Parameters:
- title