Java Doc for ItsNatList.java in  » Ajax » ItsNat » org » itsnat » comp » 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 » ItsNat » org.itsnat.comp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.itsnat.comp.ItsNatList

ItsNatList
public interface ItsNatList extends ItsNatElementComponent(Code)
Is the base interface of list based components.

A generic list component manages a javax.swing.ListModel data list, item values are rendered as markup using a special object, the renderer, and may be optionally edited "in place" using a user defined editor.

Any change to the data model is notified to the component and the markup is rendered again. The data model ever mandates over the markup, any initial markup content (initial child elements) is removed.

This component family is the "componentized" version of org.itsnat.core.domutil.ElementList and follows a similar philosophy.


author:
   Jose Maria Arranz Santamaria




Method Summary
public  ListModelcreateDefaultListModel()
     Creates a data model instance appropriated to this component.
public  intgetEditingIndex()
     Returns the index of the list item being edited. the index of the list item being edited.
public  StringgetEditorActivatorEvent()
     Returns the event type used to activate the list item edition process by the user. the event type used to activate the edition.
public  ItsNatListCellEditorgetItsNatListCellEditor()
     Returns the current list item editor.
public  ItsNatListCellRenderergetItsNatListCellRenderer()
     Returns the current component renderer.
public  ItsNatListStructuregetItsNatListStructure()
     Returns the component structure.
public  ItsNatListUIgetItsNatListUI()
     Returns the user interface manager of this component.
public  ListModelgetListModel()
     Returns the current data model of this component.
public  intgetSelectedIndex()
     Returns the index of the first selected list item.
public  intindexOf(Object obj)
     Returns the zero based position in the list of the specified value. If the value is repeated returns the first position.
Parameters:
  obj - the object value to search.
public  booleanisEditing()
     Informs whether a list item value is being edited.
public  voidsetEditorActivatorEvent(String eventType)
     Sets the event type used to activate the list item edition process by the user.
public  voidsetItsNatListCellEditor(ItsNatListCellEditor editor)
     Sets the list item editor.

List item edition works very much the same as label edition (see ItsNatLabel.setItsNatLabelEditor(ItsNatLabelEditor) ).

Some differences:

The edition process starts programmatically by calling ItsNatList.startEditingAt(int) .

The edition takes place inside the list item content element as returned by ItsNatListStructure.getContentElement(ItsNatListintorg.w3c.dom.Element) .

The new item value is set to the data model calling javax.swing.DefaultListModel.setElementAt(Object,int), if the data model is not DefaultListModel is the programmer responsibility to set the new value to the data model (detecting when the editor stops editing, see javax.swing.CellEditor.addCellEditorListener(javax.swing.event.CellEditorListener)).


Parameters:
  editor - the new editor.
public  voidsetItsNatListCellRenderer(ItsNatListCellRenderer renderer)
     Sets the component renderer.
public  voidsetListModel(ListModel dataModel)
     Changes the data model of this component.

Current data model is disconnected from this component, and the new data model is bound to this component, every change is tracked and updates the user interfaces accordingly.

If the specified data model is the same instance as the current data model, then is reset, component listener is removed and added again.

public  voidsetSelectedIndex(int index)
     Selects the specified list item.
public  voidstartEditingAt(int index)
     Used to start programmatically a list item edition process "in place".



Method Detail
createDefaultListModel
public ListModel createDefaultListModel()(Code)
Creates a data model instance appropriated to this component. This instance is not bound to the component. a new data model instance.



getEditingIndex
public int getEditingIndex()(Code)
Returns the index of the list item being edited. the index of the list item being edited. -1 if none is being edited.



getEditorActivatorEvent
public String getEditorActivatorEvent()(Code)
Returns the event type used to activate the list item edition process by the user. the event type used to activate the edition. By default is "dblclick".
See Also:   ItsNatList.setEditorActivatorEvent(String)



getItsNatListCellEditor
public ItsNatListCellEditor getItsNatListCellEditor()(Code)
Returns the current list item editor. This object is used to edit in place a list item value. the current editor. By default uses the default editor calling (ItsNatComponentManager.createDefaultItsNatListCellEditor(ItsNatComponent)) with a null parameter.
See Also:   ItsNatList.setItsNatListCellEditor(ItsNatListCellEditor)



getItsNatListCellRenderer
public ItsNatListCellRenderer getItsNatListCellRenderer()(Code)
Returns the current component renderer. This renderer converts a list item value to markup. the current renderer. By default uses the default renderer (ItsNatComponentManager.createDefaultItsNatListCellRenderer)
See Also:   ItsNatList.setItsNatListCellRenderer(ItsNatListCellRenderer)



getItsNatListStructure
public ItsNatListStructure getItsNatListStructure()(Code)
Returns the component structure. the component structure.



getItsNatListUI
public ItsNatListUI getItsNatListUI()(Code)
Returns the user interface manager of this component. the user interface manager.



getListModel
public ListModel getListModel()(Code)
Returns the current data model of this component. the current data model
See Also:   ItsNatList.setListModel(javax.swing.ListModel)



getSelectedIndex
public int getSelectedIndex()(Code)
Returns the index of the first selected list item. If the component allows multiple selection returns the first one. index of the first selected list item. -1 if none is selected.



indexOf
public int indexOf(Object obj)(Code)
Returns the zero based position in the list of the specified value. If the value is repeated returns the first position.
Parameters:
  obj - the object value to search. the zero based position of the value, -1 if not in the list.



isEditing
public boolean isEditing()(Code)
Informs whether a list item value is being edited. true if a list item value is being edited.
See Also:   ItsNatList.startEditingAt(int)



setEditorActivatorEvent
public void setEditorActivatorEvent(String eventType)(Code)
Sets the event type used to activate the list item edition process by the user.
Parameters:
  eventType - the event type used to activate the edition.
See Also:   ItsNatList.getEditorActivatorEvent()
See Also:   



setItsNatListCellEditor
public void setItsNatListCellEditor(ItsNatListCellEditor editor)(Code)
Sets the list item editor.

List item edition works very much the same as label edition (see ItsNatLabel.setItsNatLabelEditor(ItsNatLabelEditor) ).

Some differences:

The edition process starts programmatically by calling ItsNatList.startEditingAt(int) .

The edition takes place inside the list item content element as returned by ItsNatListStructure.getContentElement(ItsNatListintorg.w3c.dom.Element) .

The new item value is set to the data model calling javax.swing.DefaultListModel.setElementAt(Object,int), if the data model is not DefaultListModel is the programmer responsibility to set the new value to the data model (detecting when the editor stops editing, see javax.swing.CellEditor.addCellEditorListener(javax.swing.event.CellEditorListener)).


Parameters:
  editor - the new editor. May be null (edition disabled).
See Also:   ItsNatList.getItsNatListCellEditor()



setItsNatListCellRenderer
public void setItsNatListCellRenderer(ItsNatListCellRenderer renderer)(Code)
Sets the component renderer.
Parameters:
  renderer - the new renderer.
See Also:   ItsNatList.getItsNatListCellRenderer()
See Also:   



setListModel
public void setListModel(ListModel dataModel)(Code)
Changes the data model of this component.

Current data model is disconnected from this component, and the new data model is bound to this component, every change is tracked and updates the user interfaces accordingly.

If the specified data model is the same instance as the current data model, then is reset, component listener is removed and added again. Use this technique if you want to add a data model listener to be executed before the default component listener.
Parameters:
  dataModel - the new data model.
See Also:   ItsNatList.getListModel()




setSelectedIndex
public void setSelectedIndex(int index)(Code)
Selects the specified list item. If this component allows multiple selection, the current selection is cleared before.
Parameters:
  index - the index of the item to select



startEditingAt
public void startEditingAt(int index)(Code)
Used to start programmatically a list item edition process "in place".
See Also:   ItsNatList.isEditing()



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