Class Index | File Index

Classes


Class zwt.ui.stack.StackPanel


Extends zwt.ui.container.MultipleContainer.

A stack panel container.

Widgets are displayed in stacks. A stack is composed of a zwt.ui.stack.StackItem and a widget. This implementation allows the selection of one or multiple stacks at a time.

A zwt.ui.panel.VerticalPanel is used as the underlying container for stacks so it benefits from all the features supported in the vertical panel (scroll, elastic...).

CSS rules

.zwt_stackPanel {}

Defined in: StackPanel.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Construct a stack panel.
Field Summary
Field Attributes Field Name and Description
<static>  
zwt.ui.stack.StackPanel.ANIMATION_DESELECT_DURATION
Constant indicating the stack item deselect animation duration in milliseconds
<static>  
zwt.ui.stack.StackPanel.ANIMATION_SELECT_DURATION
Constant indicating the stack item select animation duration in milliseconds
Method Summary
Method Attributes Method Name and Description
 
add(zwt_ui_Widget_widget, zwt_ui_stack_StackItem_item, int_weight)
Add a widget to the panel and linked it to the specified stack item.
 
Deselect the current selected stacks.
 
Return the list of currently selected stacks.
 
getStackAt(int_index)
Return the stack item at the specified index.
 
Return the stack event manager attached to the stack panel.
 
insert(zwt_ui_Widget_widget, int_index, zwt_ui_stack_StackItem_item, int_weight)
Insert a widget in the panel linked to the specified stack item at the specified location.
 
Determine whether multiple selection is enabled.
 
Determine whether the panel is scrollable.
 
Determine whether animation is enabled.
 
processContentEvent(zwt_ui_container_ContentEvent_event)
Process the specified content event.
 
processFocusEvent(zwt_event_FocusEvent_event)
Delegate the processing of focus event to the underlying panel.
 
processStackEvent(zwt_ui_stack_StackEvent_event)
Process the specified stack event.
 
removeAt(int_index)
Remove the stack at the specified index.
 
select(zwt_ui_stack_StackItem_item)
Select the specified stack.
 
selectAt(int_index)
Select the stack at the specified index.
 
setMultiple(boolean_multiple)
Disable or enable the multiple selection mode.
 
setScrollable(boolean_scrollable)
Make this panel scrollable.
 
setUseAnimation(boolean_flag)
Disable or enable the animation when a stack is selected.
Methods borrowed from class zwt.ui.container.MultipleContainer:
clear, get, getLength, indexOf, isFocusable, remove
Methods borrowed from class zwt.ui.container.Container:
getContentEventManager, isFocusContainer, setFocusContainer
Methods borrowed from class zwt.ui.Widget:
addStyle, draw, getContextFill, getDimension, getElement, getElementDimension, getFill, getFocusEventManager, getId, getKeyboardEventManager, getParent, getRelativeLeft, getRelativeTop, getStyle, getWheelEventManager, hasFocus, hasStyle, isVisible, onEvent, processEvent, processKeyboardEvent, processWheelEvent, redraw, removeStyle, replaceStyle, setFill, setFocusable, setId, setStyle, setVisible
Class Detail
zwt.ui.stack.StackPanel()
Construct a stack panel.
Author: Jeremy KUHN.
See:
zwt.ui.stack.StackItem
zwt.ui.panel.VerticalPanel
Field Detail
<static> {Integer} zwt.ui.stack.StackPanel.ANIMATION_DESELECT_DURATION
Constant indicating the stack item deselect animation duration in milliseconds

<static> {Integer} zwt.ui.stack.StackPanel.ANIMATION_SELECT_DURATION
Constant indicating the stack item select animation duration in milliseconds
Method Detail
add(zwt_ui_Widget_widget, zwt_ui_stack_StackItem_item, int_weight)
Add a widget to the panel and linked it to the specified stack item.

The weight is only used when the multiple selection is enabled.

Parameters:
{zwt.ui.Widget} zwt_ui_Widget_widget
The widget to add
{zwt.ui.stack.StackItem} zwt_ui_stack_StackItem_item
The item to add
{Integer} int_weight
The weight of the Widget in the underlying vertical panel

deselect()
Deselect the current selected stacks.

{zwt.ui.stack.StackItem[]} getSelectedStacks()
Return the list of currently selected stacks.
Returns:
The list of the selected stacks

{zwt.ui.stack.StackItem} getStackAt(int_index)
Return the stack item at the specified index.
Parameters:
{Integer} int_index
The index of the stack item
Returns:
The stack item or null if there's no item at the specified index

{zwt.ui.stack.StackEventManager} getStackEventManager()
Return the stack event manager attached to the stack panel.
Returns:
The stack event manager

insert(zwt_ui_Widget_widget, int_index, zwt_ui_stack_StackItem_item, int_weight)
Insert a widget in the panel linked to the specified stack item at the specified location.
Parameters:
{zwt.ui.Widget} zwt_ui_Widget_widget
The widget to insert
{Integer} int_index
The index where to insert the Stack item
{zwt.ui.stack.StackItem} zwt_ui_stack_StackItem_item
The stack item to link to the widget
{Integer} int_weight
The weight of the Widget in the underlying vertical panel

{Boolean} isMultiple()
Determine whether multiple selection is enabled.

In multiple selection mode it is possible to select more than one stack item at a time.

Returns:
true if selection mode is enabled, false otherwise

{Boolean} isScrollable()
Determine whether the panel is scrollable.
Returns:
true if the panel is scrollable, false otherwise

{Boolean} isUseAnimation()
Determine whether animation is enabled.
Returns:
true if animation is enabled, false otherwise

processContentEvent(zwt_ui_container_ContentEvent_event)
Process the specified content event.

This implementation simply notifies the content event manager.

Parameters:
{zwt.ui.container.ContentEvent} zwt_ui_container_ContentEvent_event
The content event to process

processFocusEvent(zwt_event_FocusEvent_event)
Delegate the processing of focus event to the underlying panel.
Parameters:
{zwt.event.FocusEvent} zwt_event_FocusEvent_event
The focus event to process

processStackEvent(zwt_ui_stack_StackEvent_event)
Process the specified stack event.
Parameters:
{zwt.ui.stack.StackEvent} zwt_ui_stack_StackEvent_event
The stack event to process

removeAt(int_index)
Remove the stack at the specified index.
Parameters:
{Integer} int_index
The index of the stack item to remove

select(zwt_ui_stack_StackItem_item)
Select the specified stack.
Parameters:
{zwt.ui.stack.StackItem} zwt_ui_stack_StackItem_item
the stack item to select

selectAt(int_index)
Select the stack at the specified index.
Parameters:
{Integer} int_index
the index of the stack item to select

setMultiple(boolean_multiple)
Disable or enable the multiple selection mode.
Parameters:
{Boolean} boolean_multiple
true to enable multiple selection mode, false otherwise

setScrollable(boolean_scrollable)
Make this panel scrollable.
Parameters:
{Boolean} boolean_scrollable
true to make this panel scrollable, false otherwise

setUseAnimation(boolean_flag)
Disable or enable the animation when a stack is selected.
Parameters:
{Boolean} boolean_flag
true to enable animation, false otherwise

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jan 12 2012 02:07:53 GMT+0100 (CET)