Java Doc for Model.java in  » Ajax » MyGWT » net » mygwt » ui » client » data » 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.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.mygwt.ui.client.data.Model

All known Subclasses:   net.mygwt.samples.resources.client.Music,  net.mygwt.samples.data.client.Post,  net.mygwt.samples.resources.client.Stock,  net.mygwt.samples.resources.client.Folder,  net.mygwt.samples.resources.client.MailItem,
Model
public class Model implements IsSerializable(Code)
Models are generic data structures that notify listeners when changed. The structure allows a form of 'introspection' as all property names and values can be queried and retrieved at runtime.

All events fired by the model will bubble to all parents.

Model objects implement Serializable and can therefore be used with GWT RPC. A model's children are not marked transient and will be passed in remote procedure calls.

Events:
Model.Add : (source, item)
Fires after the button is selected.
  • source : this
  • item : add item
Model.Insert : (source, item)
Fires after the button is selected.
  • source : this
  • item : insert item
  • index : insert index
Model.Update : (source, item)
Fires after the button is selected.
  • source : this
  • item : this

See Also:   ChangeListener
See Also:   IsSerializable


Field Summary
final public static  intAdd
     Fired when a child object is added to the model (value is 10).
final public static  intInsert
     Fired when a child object is inserted to the model (value is 20).
final public static  intRemove
     Fired when a child object is removed from the model (value is 30).
final public static  intUpdate
     Fired when the model has beed updated (value is 40).
protected  Listchildren
     The model's children.
protected  Modelparent
     The model's parent.
protected  Mapproperties
     The model's properties.

Constructor Summary
public  Model()
     Creates a new model instance.
public  Model(Map properties)
     Creates a new model instance with the specified properties.

Method Summary
public  voidadd(Model child)
     Adds a child to the model and fires an add event.
public  voidaddChangeListener(ChangeListener listener)
     Adds a listener to receive change events.
protected  voidfireEvent(int type)
    
protected  voidfireEvent(int type, Model item)
    
public  Objectget(String name)
     Returns a properties value.
public  StringgetAsString(String name)
     Returns a proprty value as a String by simplying calling toString on the value.
public  ModelgetChild(int index)
     Returns the child at the given index or null if the index is out of range.
public  intgetChildCount()
     Returns the number of children.
public  ListgetChildren()
     Returns the model's children.
public  ModelgetParent()
     Returns the model's parent or null if no parent.
public  IteratorgetPropertyNames()
     Returns an iterator for the model's property names.
public  voidinsert(Model child, int index)
     Inserts a child to the model and fires an insert event.
protected  voidnotify(ChangeEvent evt)
    
public  voidremove(int index)
     Removes the child at the given index.
public  voidremove(Model child)
     Removes the child from the model and fires a remove event.
public  voidremoveAll()
     Removes all the model's children.
public  voidremoveChangeListener(ChangeListener listener)
     Removes a previously added change listener.
public  voidset(String name, Object value)
     Sets the property and fires an update event.
public  voidsetChildren(List children)
     Sets the model's children.

Field Detail
Add
final public static int Add(Code)
Fired when a child object is added to the model (value is 10).



Insert
final public static int Insert(Code)
Fired when a child object is inserted to the model (value is 20).



Remove
final public static int Remove(Code)
Fired when a child object is removed from the model (value is 30).



Update
final public static int Update(Code)
Fired when the model has beed updated (value is 40).



children
protected List children(Code)
The model's children.



parent
protected Model parent(Code)
The model's parent.



properties
protected Map properties(Code)
The model's properties.




Constructor Detail
Model
public Model()(Code)
Creates a new model instance.



Model
public Model(Map properties)(Code)
Creates a new model instance with the specified properties.
Parameters:
  properties -




Method Detail
add
public void add(Model child)(Code)
Adds a child to the model and fires an add event.
Parameters:
  child - the child to be added



addChangeListener
public void addChangeListener(ChangeListener listener)(Code)
Adds a listener to receive change events.
Parameters:
  listener - the listener to be added



fireEvent
protected void fireEvent(int type)(Code)



fireEvent
protected void fireEvent(int type, Model item)(Code)



get
public Object get(String name)(Code)
Returns a properties value.
Parameters:
  name - the property name the value



getAsString
public String getAsString(String name)(Code)
Returns a proprty value as a String by simplying calling toString on the value. Subclasses should override to provide more specific behavior.
Parameters:
  name - the property name the String value



getChild
public Model getChild(int index)(Code)
Returns the child at the given index or null if the index is out of range.
Parameters:
  index - the index to be retrieved the model at the index



getChildCount
public int getChildCount()(Code)
Returns the number of children. the number of children



getChildren
public List getChildren()(Code)
Returns the model's children. the children



getParent
public Model getParent()(Code)
Returns the model's parent or null if no parent. the parent



getPropertyNames
public Iterator getPropertyNames()(Code)
Returns an iterator for the model's property names. a iterator



insert
public void insert(Model child, int index)(Code)
Inserts a child to the model and fires an insert event.
Parameters:
  child - the child to be inserted
Parameters:
  index - the location to insert the child



notify
protected void notify(ChangeEvent evt)(Code)



remove
public void remove(int index)(Code)
Removes the child at the given index.
Parameters:
  index - the child index



remove
public void remove(Model child)(Code)
Removes the child from the model and fires a remove event.
Parameters:
  child - the child to be removed



removeAll
public void removeAll()(Code)
Removes all the model's children.



removeChangeListener
public void removeChangeListener(ChangeListener listener)(Code)
Removes a previously added change listener.
Parameters:
  listener - the listener to be removed



set
public void set(String name, Object value)(Code)
Sets the property and fires an update event.
Parameters:
  name - the property name
Parameters:
  value - the property value



setChildren
public void setChildren(List children)(Code)
Sets the model's children. All existing children are first removed.
Parameters:
  children - the children to be set



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.