Java Doc for List.java in  » Ajax » MyGWT » net » mygwt » ui » client » widget » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » MyGWT » net.mygwt.ui.client.widget 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.mygwt.ui.client.widget.Component
   net.mygwt.ui.client.widget.Container
      net.mygwt.ui.client.widget.ScrollContainer
         net.mygwt.ui.client.widget.List

List
public class List extends ScrollContainer (Code)
Displays a list of list items.

Important: This component MUST be sized in pixels to render properly. This can be done directly or by a layout. Percentage based sizes will not work.

Styles:
NONE, SINGLE, MULTI, CHECK, FLAT
Events:
BeforeAdd : (widget, item, index)
Fires before an item is added or inserted. Listeners can set the doit field to false to cancel the action.
  • widget : this
  • item : the item being added
  • index : the index at which the item will be added
BeforeRemove : (widget, item)
Fires before an item is removed. Listeners can set the doit field to false to cancel the action.
  • widget : this
  • item : the item being removed
Add : (widget, item, index)
Fires after an item has been added or inserted.
  • widget : this
  • item : the item that was added
  • index : the index at which the item will be added
Remove : (widget, item)
Fires after an item has been removed.
  • widget : this
  • item : the item that was removed
SelectionChange : (widget, item)
Fires after the selection changes.
  • widget : this
  • item : the item that is selected (single select)
ContextMenu : (widget)
Fires before the list's context menu is shown. Listeners can set the doit field to false to cancel the action.
  • widget : this
CheckChange : (widget, item)
Fires after an item is selected.
  • widget : this
  • item : the item that is selected (single select)
CSS:
.my-list (the list itself)
.my-listitem (list item)
.my-listitem .my-listitem-text (list item text)


Field Summary
 booleancheck
    
protected  ListItemhoverItem
    
protected  ListItemlastSelected
    
protected  intmaxDepth
     maxDepth specifies the max number of parent nodes to search in List.findItem(Element) .

Constructor Summary
public  List()
     Creates a new single select list.
public  List(int style)
     Creates a new list with the given style.

Method Summary
public  voidadd(ListItem item)
     Adds an item to the list.
public  voidadd(String text)
     Adds an item to the list.
public  voiddeselect(int index)
     Deselects the item at the given index.
public  voiddeselect(int start, int end)
     Deselects the items at the given indices.
public  voiddeselect(ListItem item)
     Deselects the item at the given index.
public  voiddeselectAll()
     Deselects all selected items.
public  ListItemfindItem(Element element)
     Returns the item using the specified target.
public  ListItem[]getChecked()
     Returns an array of checked items.
public  MenugetContextMenu()
    
public  ListItemgetItem(int index)
     Returns the item at the specified index.
public  intgetItemCount()
     Returns the number of child items.
public  java.util.ListgetItems()
     Returns the child items.
public  ElementgetLayoutTarget()
    
public  ListItemgetSelectedItem()
     Returns the selected item.
public  ListItem[]getSelection()
     Returns the selected items.
public  intgetSelectionMode()
     Returns the selection mode.
public  intindexOf(ListItem item)
     Returns the index of the item or -1 if not found.
public  voidinsert(ListItem item, int index)
     Inserts an item into the list at the given index.
public  booleanisSelected(ListItem item)
     Returns true if the item is selected.
public  voidmoveSelectedDown()
     Moves the current selections down one level.
public  voidmoveSelectedUp()
     Moves the current selections up one level.
public  voidonBaseEvent(BaseEvent be)
    
protected  voidonHideContextMenu()
    
protected  voidonItemClick(BaseEvent be, ListItem item)
    
protected  voidonRender()
    
protected  voidonResize(int width, int height)
    
protected  voidonRightClick(BaseEvent be)
    
public  voidremove(ListItem item)
     Removes the item from the list.
public  voidremoveAll()
     Removes all the items from the list.
public  voidscrollIntoView(ListItem item)
     Scrolls the item into view.
public  voidselect(int index)
     Selects the item at the index.
public  voidselect(int start, int end)
     Selects the items in the range specified by the given indices.
public  voidselect(ListItem item)
     Selects the specified item.
public  voidselectAll()
     Selects all of the items in the list.
public  voidsetContextMenu(Menu menu)
    
public  voidsetSelection(ListItem item)
     Selects the item.
public  voidsetSelection(ListItem[] items)
     Selects the items.
public  voidsetSelectionMode(int mode)
     Sets the selection mode.
public  voidsetStyle(int style)
     Sets the list's style.

Field Detail
check
boolean check(Code)



hoverItem
protected ListItem hoverItem(Code)



lastSelected
protected ListItem lastSelected(Code)



maxDepth
protected int maxDepth(Code)
maxDepth specifies the max number of parent nodes to search in List.findItem(Element) . Default value is 15.




Constructor Detail
List
public List()(Code)
Creates a new single select list.



List
public List(int style)(Code)
Creates a new list with the given style.
Parameters:
  style - the style information.




Method Detail
add
public void add(ListItem item)(Code)
Adds an item to the list.
Parameters:
  item - the item to add



add
public void add(String text)(Code)
Adds an item to the list.
Parameters:
  text - the item's text



deselect
public void deselect(int index)(Code)
Deselects the item at the given index.
Parameters:
  index - the index of the item to deselect



deselect
public void deselect(int start, int end)(Code)
Deselects the items at the given indices.
Parameters:
  start - the start index of the items to deselect
Parameters:
  end - the start index of the items to deselect



deselect
public void deselect(ListItem item)(Code)
Deselects the item at the given index.
Parameters:
  item - the item to deselect



deselectAll
public void deselectAll()(Code)
Deselects all selected items.



findItem
public ListItem findItem(Element element)(Code)
Returns the item using the specified target.
Parameters:
  element - the element or child element the item



getChecked
public ListItem[] getChecked()(Code)
Returns an array of checked items. the checked items



getContextMenu
public Menu getContextMenu()(Code)



getItem
public ListItem getItem(int index)(Code)
Returns the item at the specified index.
Parameters:
  index - the index the item



getItemCount
public int getItemCount()(Code)
Returns the number of child items. the item count



getItems
public java.util.List getItems()(Code)
Returns the child items. the child items



getLayoutTarget
public Element getLayoutTarget()(Code)



getSelectedItem
public ListItem getSelectedItem()(Code)
Returns the selected item. If the list is multi-select, returns the first selected item. the item or null if no selections



getSelection
public ListItem[] getSelection()(Code)
Returns the selected items. the selected items



getSelectionMode
public int getSelectionMode()(Code)
Returns the selection mode. the selection mode



indexOf
public int indexOf(ListItem item)(Code)
Returns the index of the item or -1 if not found.
Parameters:
  item - the item the index



insert
public void insert(ListItem item, int index)(Code)
Inserts an item into the list at the given index.
Parameters:
  item - the item
Parameters:
  index - the insert location



isSelected
public boolean isSelected(ListItem item)(Code)
Returns true if the item is selected.
Parameters:
  item - the item the select state



moveSelectedDown
public void moveSelectedDown()(Code)
Moves the current selections down one level.



moveSelectedUp
public void moveSelectedUp()(Code)
Moves the current selections up one level.



onBaseEvent
public void onBaseEvent(BaseEvent be)(Code)



onHideContextMenu
protected void onHideContextMenu()(Code)



onItemClick
protected void onItemClick(BaseEvent be, ListItem item)(Code)



onRender
protected void onRender()(Code)



onResize
protected void onResize(int width, int height)(Code)



onRightClick
protected void onRightClick(BaseEvent be)(Code)



remove
public void remove(ListItem item)(Code)
Removes the item from the list.
Parameters:
  item - the item to be removed



removeAll
public void removeAll()(Code)
Removes all the items from the list.



scrollIntoView
public void scrollIntoView(ListItem item)(Code)
Scrolls the item into view.
Parameters:
  item - the item



select
public void select(int index)(Code)
Selects the item at the index. If the item at the index was already selected, it remains selected.
Parameters:
  index - the index of the item to select



select
public void select(int start, int end)(Code)
Selects the items in the range specified by the given indices. The current selection is not cleared before the new items are selected.
Parameters:
  start - the start of the range
Parameters:
  end - the end of the range



select
public void select(ListItem item)(Code)
Selects the specified item.
Parameters:
  item - the item to be selected



selectAll
public void selectAll()(Code)
Selects all of the items in the list. If the list is single-select, do nothing.



setContextMenu
public void setContextMenu(Menu menu)(Code)



setSelection
public void setSelection(ListItem item)(Code)
Selects the item. The current selection is cleared.
Parameters:
  item - the item to select



setSelection
public void setSelection(ListItem[] items)(Code)
Selects the items. The current selection is cleared.
Parameters:
  items - the items to select



setSelectionMode
public void setSelectionMode(int mode)(Code)
Sets the selection mode. Valids values are SINGLE and MULTI. Has no effect if called after the list is rendered.
Parameters:
  mode - the selection mode



setStyle
public void setStyle(int style)(Code)
Sets the list's style. Has no effect if called after the list is rendered. See the class documentation for valid styles.
Parameters:
  style - the list style



Methods inherited from net.mygwt.ui.client.widget.ScrollContainer
public void addScrollListener(ScrollListener listener)(Code)(Java Doc)
protected void afterRender()(Code)(Java Doc)
public void ensureVisible(Widget child)(Code)(Java Doc)
public int getHScrollPosition()(Code)(Java Doc)
protected Element getLayoutTarget()(Code)(Java Doc)
public boolean getScrollEnabled()(Code)(Java Doc)
public int getVScrollPosition()(Code)(Java Doc)
public void removeScrollListener(ScrollListener listener)(Code)(Java Doc)
public void setAlwaysShowScrollBars(boolean alwaysShow)(Code)(Java Doc)
public void setHScrollPosition(int position)(Code)(Java Doc)
public void setScrollEnabled(boolean scroll)(Code)(Java Doc)
public void setVScrollPosition(int position)(Code)(Java Doc)

Fields inherited from net.mygwt.ui.client.widget.Container
protected boolean attachChildren(Code)(Java Doc)
protected List items(Code)(Java Doc)

Methods inherited from net.mygwt.ui.client.widget.Container
final protected void adopt(Widget child)(Code)(Java Doc)
public void dispose()(Code)(Java Doc)
protected void doAttachChildren()(Code)(Java Doc)
protected void doDetachChildren()(Code)(Java Doc)
public Widget findWidget(Element elem)(Code)(Java Doc)
public boolean getAutoDispose()(Code)(Java Doc)
public Widget getWidget(int index)(Code)(Java Doc)
public int getWidgetCount()(Code)(Java Doc)
public Iterator iterator()(Code)(Java Doc)
final protected void orphan(Widget child)(Code)(Java Doc)
public boolean remove(Widget widget)(Code)(Java Doc)
public void setAutoDispose(boolean autoDispose)(Code)(Java Doc)

Fields inherited from net.mygwt.ui.client.widget.Component
protected Rectangle attachBounds(Code)(Java Doc)
protected String baseStyle(Code)(Java Doc)
protected Menu contextMenu(Code)(Java Doc)
protected String disabledStyle(Code)(Java Doc)
protected Element focusElem(Code)(Java Doc)
protected boolean rendereddisposed(Code)(Java Doc)
protected int style(Code)(Java Doc)

Methods inherited from net.mygwt.ui.client.widget.Component
public void addListener(int eventType, Listener listener)(Code)(Java Doc)
public void addStyleName(String style)(Code)(Java Doc)
public void addWidgetListener(WidgetListener listener)(Code)(Java Doc)
protected void afterRender()(Code)(Java Doc)
protected Component blur()(Code)(Java Doc)
public void disable()(Code)(Java Doc)
protected void disableContextMenu(boolean disable)(Code)(Java Doc)
public void disableTextSelection(boolean disable)(Code)(Java Doc)
public void dispose()(Code)(Java Doc)
public void enable()(Code)(Java Doc)
public void enableEvents(boolean enable)(Code)(Java Doc)
public boolean fireEvent(int type)(Code)(Java Doc)
public boolean fireEvent(int type, BaseEvent be)(Code)(Java Doc)
public boolean fireEvent(int eventType, Widget widget, Widget item)(Code)(Java Doc)
public boolean fireEvent(int eventType, Widget widget, Widget item, int index)(Code)(Java Doc)
public Component focus()(Code)(Java Doc)
public Rectangle getBounds()(Code)(Java Doc)
public Rectangle getBounds(boolean content)(Code)(Java Doc)
protected Menu getContextMenu()(Code)(Java Doc)
public Object getData()(Code)(Java Doc)
public Object getData(String key)(Code)(Java Doc)
public String getDisabledStyle()(Code)(Java Doc)
public Element getElement()(Code)(Java Doc)
protected Element getFocusElement()(Code)(Java Doc)
public int getHeight()(Code)(Java Doc)
public int getHeight(boolean content)(Code)(Java Doc)
public String getId()(Code)(Java Doc)
public int getStyle()(Code)(Java Doc)
public ToolTip getToolTip()(Code)(Java Doc)
public int getWidth()(Code)(Java Doc)
public int getWidth(boolean content)(Code)(Java Doc)
public void hide()(Code)(Java Doc)
public boolean isDisposed()(Code)(Java Doc)
public boolean isEnabled()(Code)(Java Doc)
public boolean isRendered()(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
protected void onAttach()(Code)(Java Doc)
public void onBaseEvent(BaseEvent be)(Code)(Java Doc)
public void onBrowserEvent(Event event)(Code)(Java Doc)
protected void onDestroy()(Code)(Java Doc)
protected void onDetach()(Code)(Java Doc)
protected void onDisable()(Code)(Java Doc)
protected void onEnable()(Code)(Java Doc)
protected void onHide()(Code)(Java Doc)
protected void onHideContextMenu()(Code)(Java Doc)
protected void onLoad()(Code)(Java Doc)
protected void onRender()(Code)(Java Doc)
protected void onResize(int width, int height)(Code)(Java Doc)
protected void onRightClick(BaseEvent be)(Code)(Java Doc)
protected void onShow()(Code)(Java Doc)
protected void onShowContextMenu(int x, int y)(Code)(Java Doc)
public void recalculate()(Code)(Java Doc)
public void removeAllListeners()(Code)(Java Doc)
public void removeFromParent()(Code)(Java Doc)
public void removeListener(int eventType, Listener listener)(Code)(Java Doc)
public void removeStyleName(String style)(Code)(Java Doc)
public void removeWidgetListener(WidgetListener listener)(Code)(Java Doc)
protected void render()(Code)(Java Doc)
public void setBorders(boolean show)(Code)(Java Doc)
public void setBounds(int x, int y, int width, int height)(Code)(Java Doc)
public void setBounds(Rectangle rect)(Code)(Java Doc)
protected void setContextMenu(Menu menu)(Code)(Java Doc)
public void setData(Object data)(Code)(Java Doc)
public void setData(String key, Object data)(Code)(Java Doc)
public void setDisabledStyle(String style)(Code)(Java Doc)
public void setElement(Element elem)(Code)(Java Doc)
public void setEnabled(boolean enabled)(Code)(Java Doc)
public void setHeight(int height)(Code)(Java Doc)
public void setHeight(String height)(Code)(Java Doc)
public void setId(String id)(Code)(Java Doc)
public void setIntStyleAttribute(String attr, int value)(Code)(Java Doc)
public void setPagePosition(int x, int y)(Code)(Java Doc)
public void setPixelSize(int width, int height)(Code)(Java Doc)
public void setSize(int width, int height)(Code)(Java Doc)
public void setSize(String width, String height)(Code)(Java Doc)
public void setStyleAttribute(String attr, String value)(Code)(Java Doc)
public void setStyleName(String style)(Code)(Java Doc)
public void setTitle(String title)(Code)(Java Doc)
public void setToolTip(String text)(Code)(Java Doc)
public void setToolTip(String title, String text)(Code)(Java Doc)
public void setVisible(boolean visible)(Code)(Java Doc)
public void setWidth(int width)(Code)(Java Doc)
public void setWidth(String width)(Code)(Java Doc)
public void show()(Code)(Java Doc)
public void unhook(int type, EventListener listener)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.