Java Doc for ApplicationInstance.java in  » Ajax » NextApp-Echo2 » nextapp » echo2 » app » 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 » NextApp Echo2 » nextapp.echo2.app 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   nextapp.echo2.app.ApplicationInstance

All known Subclasses:   nextapp.echo2.app.test.HelloWorldApp,  nextapp.echo2.app.test.ColumnApp,  nextapp.echo2.testapp.interactive.InteractiveApp,  echo2tutorial.numberguess.NumberGuessApp,  nextapp.echo2.testapp.serial.SerialApp,  nextapp.echo2.testapp.thousandmonkeys.ThousandMonkeysApp,  echo2example.chatclient.ChatApp,  echo2example.helloworld.HelloWorldApp,  echo2example.email.EmailApp,  nextapp.echo2.testapp.auth.AuthApp,
ApplicationInstance
abstract public class ApplicationInstance implements Serializable(Code)
A single user-instance of an Echo application.


Field Summary
final public static  StringFOCUSED_COMPONENT_CHANGED_PROPERTY
    
final public static  StringID_STRING
     The name and version of the Echo API in use.
final public static  StringLOCALE_CHANGED_PROPERTY
    
final public static  StringMODAL_COMPONENTS_CHANGED_PROPERTY
    
final public static  StringWINDOWS_CHANGED_PROPERTY
    

Constructor Summary
public  ApplicationInstance()
     Creates an ApplicationInstance.

Method Summary
public  voidaddPropertyChangeListener(PropertyChangeListener l)
     Adds a PropertyChangeListener to receive notification of application-level property changes.
public  TaskQueueHandlecreateTaskQueue()
     Creates a new task queue.
final public  WindowdoInit()
     Initializes the ApplicationInstance.
final public  voiddoValidation()
     Validates all components registered with the application.
public  voidenqueueCommand(Command command)
     Queues the given stateless Command for execution on the current client/server synchronization.
public  voidenqueueTask(TaskQueueHandle taskQueue, Runnable task)
     Enqueues a task to be run during the next client/server synchronization.
protected  voidfirePropertyChange(String propertyName, Object oldValue, Object newValue)
     Reports a bound property change.
public  StringgenerateId()
     Generates an identifier which is unique within this ApplicationInstance.
final public static  StringgenerateSystemId()
     Generates a system-level identifier (an identifier which is unique to all ApplicationInstances).
final public static  ApplicationInstancegetActive()
     Returns a reference to the ApplicationInstance that is relevant to the current thread, or null if no instance is relevant.
public  ComponentgetComponentByRenderId(String renderId)
     Retrieves the component currently registered with the application with the specified render id.
public  ObjectgetContextProperty(String propertyName)
     Returns the value of a contextual property. Contextual properties are typically set by an application container, e.g., the Web Container, in order to provide container-specific information.
public  WindowgetDefaultWindow()
     Returns the default window of the application.
public  ComponentgetFocusedComponent()
     Returns the presently focused component, if known.
public  LayoutDirectiongetLayoutDirection()
     Returns the application instance's default LayoutDirection.
public  LocalegetLocale()
     Returns the application instance's default Locale.
public  ComponentgetModalContextRoot()
     Retrieves the root component of the current modal context, or null if no modal context exists.
public  StylegetStyle(Class componentClass, String styleName)
     Retrieves the style for the specified specified class of component / style name.
public  UpdateManagergetUpdateManager()
    
public  booleanhasQueuedTasks()
     Determines if there are any queued tasks in any of the task queues associated with this ApplicationInstance.

This method may be overridden by an application in order to check on the status of long-running operations and enqueue tasks just-in-time.

final public  booleanhasTaskQueues()
     Determines if this ApplicationInstance currently has any active tasks queues, which might be monitoring external events.
abstract public  Windowinit()
     Invoked to initialize the application, returning the default window.
 voidnotifyComponentPropertyChange(Component parent, String propertyName, Object oldValue, Object newValue)
     Notifies the UpdateManager in response to a component property change or child addition/removal.

This method is invoked directly from Components (rather than using a PropertyChangeListener) in the interest of memory efficiency.

public  voidprocessInput(String propertyName, Object propertyValue)
     Processes client input specific to the ApplicationInstance received from the UpdateManager.
public  voidprocessQueuedTasks()
     Processes all queued tasks.
 voidregisterComponent(Component component)
     Registers a component with the ApplicationInstance.
public  voidremovePropertyChangeListener(PropertyChangeListener l)
     Removes a PropertyChangeListener from receiving notification of application-level property changes.
public  voidremoveTaskQueue(TaskQueueHandle taskQueueHandle)
     Removes the task queue described the specified TaskQueueHandle.
final public static  voidsetActive(ApplicationInstance applicationInstance)
     Sets the ApplicationInstance that is relevant to the current thread.
public  voidsetContextProperty(String propertyName, Object propertyValue)
     Sets a contextual property.
public  voidsetFocusedComponent(Component newValue)
     Sets the presently focused component.
public  voidsetLocale(Locale newValue)
     Sets the default locale of the application.
public  voidsetStyleSheet(StyleSheet styleSheet)
     Sets the StyleSheet of this ApplicationInstance.
 voidunregisterComponent(Component component)
     Unregisters a component from the ApplicationInstance.
 booleanverifyModalContext(Component component)
     Verifies that a Component is within the modal context, i.e., that if a modal Component is present, that it either is or is a child of that Component.

Field Detail
FOCUSED_COMPONENT_CHANGED_PROPERTY
final public static String FOCUSED_COMPONENT_CHANGED_PROPERTY(Code)



ID_STRING
final public static String ID_STRING(Code)
The name and version of the Echo API in use.



LOCALE_CHANGED_PROPERTY
final public static String LOCALE_CHANGED_PROPERTY(Code)



MODAL_COMPONENTS_CHANGED_PROPERTY
final public static String MODAL_COMPONENTS_CHANGED_PROPERTY(Code)



WINDOWS_CHANGED_PROPERTY
final public static String WINDOWS_CHANGED_PROPERTY(Code)




Constructor Detail
ApplicationInstance
public ApplicationInstance()(Code)
Creates an ApplicationInstance.




Method Detail
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)(Code)
Adds a PropertyChangeListener to receive notification of application-level property changes.
Parameters:
  l - the listener to add



createTaskQueue
public TaskQueueHandle createTaskQueue()(Code)
Creates a new task queue. A handle object representing the created task queue is returned. The created task queue will remain active until it is provided to the removeTaskQueue() method. Developers must take care to invoke removeTaskQueue() on any created task queues. a TaskQueueHandler representing the created task queue
See Also:   ApplicationInstance.removeTaskQueue(TaskQueueHandle)



doInit
final public Window doInit()(Code)
Initializes the ApplicationInstance. This method is invoked by the application container. the default Window of the application
throws:
  IllegalStateException - in the event that the current thread is notpermitted to update the state of the user interface



doValidation
final public void doValidation()(Code)
Validates all components registered with the application.



enqueueCommand
public void enqueueCommand(Command command)(Code)
Queues the given stateless Command for execution on the current client/server synchronization.
Parameters:
  command - the Command to execute



enqueueTask
public void enqueueTask(TaskQueueHandle taskQueue, Runnable task)(Code)
Enqueues a task to be run during the next client/server synchronization. The task will be run synchronously in the user interface update thread. Enqueuing a task in response to an external event will result in changes being pushed to the client.
Parameters:
  taskQueue - the TaskQueueHandle representing thequeue into which this task should be placed
Parameters:
  task - the task to run on client/server synchronization



firePropertyChange
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code)
Reports a bound property change.
Parameters:
  propertyName - the name of the changed property
Parameters:
  oldValue - the previous value of the property
Parameters:
  newValue - the present value of the property



generateId
public String generateId()(Code)
Generates an identifier which is unique within this ApplicationInstance. This identifier should not be used outside of the context of this ApplicationInstance. the unique identifier
See Also:   ApplicationInstance.generateSystemId()



generateSystemId
final public static String generateSystemId()(Code)
Generates a system-level identifier (an identifier which is unique to all ApplicationInstances). the generated identifier
See Also:   ApplicationInstance.generateId()



getActive
final public static ApplicationInstance getActive()(Code)
Returns a reference to the ApplicationInstance that is relevant to the current thread, or null if no instance is relevant. the relevant ApplicationInstance



getComponentByRenderId
public Component getComponentByRenderId(String renderId)(Code)
Retrieves the component currently registered with the application with the specified render id.
Parameters:
  renderId - the render id of the component the component (or null if no component with the specifiedrender id is registered)



getContextProperty
public Object getContextProperty(String propertyName)(Code)
Returns the value of a contextual property. Contextual properties are typically set by an application container, e.g., the Web Container, in order to provide container-specific information. The property names of contextual properties are provided within the application container documentation when their use is required.
Parameters:
  propertyName - the name of the object the object



getDefaultWindow
public Window getDefaultWindow()(Code)
Returns the default window of the application. the default Window



getFocusedComponent
public Component getFocusedComponent()(Code)
Returns the presently focused component, if known. the focused component



getLayoutDirection
public LayoutDirection getLayoutDirection()(Code)
Returns the application instance's default LayoutDirection. the Locale



getLocale
public Locale getLocale()(Code)
Returns the application instance's default Locale. the Locale



getModalContextRoot
public Component getModalContextRoot()(Code)
Retrieves the root component of the current modal context, or null if no modal context exists. Components which are not within the descendant hierarchy of the modal context are barred from receiving user input. the root component of the modal context



getStyle
public Style getStyle(Class componentClass, String styleName)(Code)
Retrieves the style for the specified specified class of component / style name.
Parameters:
  componentClass - the component Class
Parameters:
  styleName - the component's specified style name the appropriate application-wide style, or nullif none exists



getUpdateManager
public UpdateManager getUpdateManager()(Code)
Retrieves the UpdateManager being used to manage the client/server synchronization of this ApplicationInstance the UpdateManager



hasQueuedTasks
public boolean hasQueuedTasks()(Code)
Determines if there are any queued tasks in any of the task queues associated with this ApplicationInstance.

This method may be overridden by an application in order to check on the status of long-running operations and enqueue tasks just-in-time. In such cases tasks should be enqueued and the value of super.hasQueuedTasks() should be returned. This method is not invoked by a user-interface thread and thus the component hierarchy may not be modified in overriding implementations. true if any tasks are queued




hasTaskQueues
final public boolean hasTaskQueues()(Code)
Determines if this ApplicationInstance currently has any active tasks queues, which might be monitoring external events. true if the instance has any task queues



init
abstract public Window init()(Code)
Invoked to initialize the application, returning the default window. The returned window must be visible. the default window of the application



notifyComponentPropertyChange
void notifyComponentPropertyChange(Component parent, String propertyName, Object oldValue, Object newValue)(Code)
Notifies the UpdateManager in response to a component property change or child addition/removal.

This method is invoked directly from Components (rather than using a PropertyChangeListener) in the interest of memory efficiency.
Parameters:
  parent - the parent/updated component
Parameters:
  propertyName - the name of the property changed
Parameters:
  oldValue - the previous value of the property (or the removed component in the case of aCHILDREN_CHANGED_PROPERTY)
Parameters:
  newValue - the new value of the property (or the added component in the case of aCHILDREN_CHANGED_PROPERTY)
throws:
  IllegalStateException - in the event that the current thread is notpermitted to update the state of the user interface




processInput
public void processInput(String propertyName, Object propertyValue)(Code)
Processes client input specific to the ApplicationInstance received from the UpdateManager. Derivative implementations should take care to invoke super.processInput().



processQueuedTasks
public void processQueuedTasks()(Code)
Processes all queued tasks. This method may only be invoked from within a UI thread by the UpdateManager. Tasks are removed from queues once they have been processed.



registerComponent
void registerComponent(Component component)(Code)
Registers a component with the ApplicationInstance. The component will be assigned a unique render id in the event that it does not currently have one.

This method is invoked by Component.setApplicationInstance()
Parameters:
  component - the component to register
See Also:   Component.register(ApplicationInstance)




removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)(Code)
Removes a PropertyChangeListener from receiving notification of application-level property changes.
Parameters:
  l - the listener to remove



removeTaskQueue
public void removeTaskQueue(TaskQueueHandle taskQueueHandle)(Code)
Removes the task queue described the specified TaskQueueHandle.
Parameters:
  taskQueueHandle - the TaskQueueHandle specifying thetask queue to remove
See Also:   ApplicationInstance.createTaskQueue()



setActive
final public static void setActive(ApplicationInstance applicationInstance)(Code)
Sets the ApplicationInstance that is relevant to the current thread. This method should be invoked with a null argument when the previously set ApplicationInstance is no longer relevant.

This method should only be invoked by the application container.
Parameters:
  applicationInstance - the relevant ApplicationInstance




setContextProperty
public void setContextProperty(String propertyName, Object propertyValue)(Code)
Sets a contextual property.
Parameters:
  propertyName - the property name
Parameters:
  propertyValue - the property value
See Also:   ApplicationInstance.getContextProperty(java.lang.String)



setFocusedComponent
public void setFocusedComponent(Component newValue)(Code)
Sets the presently focused component.
Parameters:
  newValue - the component to be focused



setLocale
public void setLocale(Locale newValue)(Code)
Sets the default locale of the application.
Parameters:
  newValue - the new locale



setStyleSheet
public void setStyleSheet(StyleSheet styleSheet)(Code)
Sets the StyleSheet of this ApplicationInstance. Components registered with this instance will retrieve properties from the StyleSheet when property values are not specified directly in a Component or in its specified Style.

Note that setting the style sheet should be done sparingly, given that doing so forces the entire client state to be updated. Generally style sheets should only be reconfigured at application initialization and/or when the user changes the visual theme of a theme-capable application.
Parameters:
  styleSheet - the new style sheet




unregisterComponent
void unregisterComponent(Component component)(Code)
Unregisters a component from the ApplicationInstance.

This method is invoked by Component.setApplicationInstance().
Parameters:
  component - the component to unregister
See Also:   Component.register(ApplicationInstance)




verifyModalContext
boolean verifyModalContext(Component component)(Code)
Verifies that a Component is within the modal context, i.e., that if a modal Component is present, that it either is or is a child of that Component.
Parameters:
  component - the Component to evaluate true if the Component is within the current modal context
See Also:   Component.verifyInput(java.lang.Stringjava.lang.Object)



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.