Java Doc for Application.java in  » Web-Framework » Millstone » org » millstone » base » 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 » Web Framework » Millstone » org.millstone.base 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.millstone.base.Application

All known Subclasses:   org.millstone.examples.Chat,  org.millstone.examples.stoneplayer.StonePlayer,  org.millstone.examples.Login,  org.millstone.examples.gogame.Go,  org.millstone.examples.features.FeaturesApplication,  org.millstone.examples.HelloWorld,  org.millstone.webadapter.WebAdapterServlet,  org.millstone.examples.Calc,
Application
abstract public class Application implements URIHandler,Terminal.ErrorListener(Code)

Abstract base class required for all MillStone applications. This class provides all the basic services required by the MillStone framework. These services allow external discovery and manipulation of the user, org.millstone.base.ui.Window windows and themes, and starting and stopping the application.

As mentioned, all MillStone applications must inherit this class. However, this is almost all of what one needs to do to create a fully functional MillStone application. The only thing a class inheriting the Application needs to do is implement the init() where it creates the windows it needs to perform its function. Note that all MillStone applications must have at least one window: the main window. The first unnamed window constructed by an application automatically becomes the main window which behaves just like other windows with one exception: when accessing windows using URLs the main window corresponds to the application URL whereas other windows correspond to a URL gotten by catenating the window's name to the application URL.

See the class org.millstone.examples.HelloWorld for a simple example of a fully working MillStone Application.

Window access. Application provides methods to list, add and remove the windows it contains.

Execution control. This class includes method to start and finish the execution of the application. Being finished means basically that no windows will be available from the application anymore.

Theme selection. The MillStone theme selection process allows a theme to be specified at three different levels. When a window's theme needs to be found out, the window itself is queried for a preferred theme. If the window does not prefer a specific theme, the application containing the window is queried. If neither the application prefers a theme, the default theme for the org.millstone.base.terminal.Terminal terminal is used. The terminal always defines a default theme.


author:
   IT Mill Ltd.
version:
   3.1.1
since:
   3.0

Inner Class :public class UserChangeEvent extends java.util.EventObject
Inner Class :public interface UserChangeListener extends EventListener
Inner Class :public class WindowDetachEvent extends EventObject
Inner Class :public class WindowAttachEvent extends EventObject
Inner Class :public interface WindowAttachListener
Inner Class :public interface WindowDetachListener



Method Summary
public  voidaddListener(UserChangeListener listener)
    
public  voidaddListener(WindowAttachListener listener)
    
public  voidaddListener(WindowDetachListener listener)
    
public  voidaddResource(ApplicationResource resource)
     Add new resource to the application.
public  voidaddWindow(Window window)
     Adds a new window to the application.
public  voidclose()
     Ends the Application.
public  ApplicationContextgetContext()
     Get application context.
public  LocalegetLocale()
    
public  StringgetLogoutURL()
     Returns the URL user is redirected to on application close.
public  WindowgetMainWindow()
     Returns the mainWindow of the application.
public  StringgetProperty(String name)
     Searches for the property with the specified name in this application.
public  EnumerationgetPropertyNames()
     Returns an enumeration of all the names in this application.
public  StringgetRelativeLocation(ApplicationResource resource)
    
public  StringgetTheme()
     Gets the application's theme.
public  URLgetURL()
     Gets the URL of the application.
public  ObjectgetUser()
     Gets the user of the application.
public  WindowgetWindow(String name)
     Gets a window by name.
public  CollectiongetWindows()
     Gets the set of windows contained by the application.
public  DownloadStreamhandleURI(URL context, String relativeUri)
    
abstract public  voidinit()
     Main initializer of the application.
public  booleanisRunning()
     Tests if the application is running or if it has it been finished.
public  voidremoveListener(UserChangeListener listener)
    
public  voidremoveListener(WindowAttachListener listener)
    
public  voidremoveListener(WindowDetachListener listener)
    
public  voidremoveResource(ApplicationResource resource)
     Remove resource from the application.
public  voidremoveWindow(Window window)
     Removes the specified window from the application.
public  voidsetLocale(Locale locale)
    
public  voidsetLogoutURL(String logoutURL)
     Sets the URL user is redirected to on application close.
public  voidsetMainWindow(Window mainWindow)
     Sets the mainWindow.
public  voidsetTheme(String theme)
     Sets the application's theme.
public  voidsetUser(Object user)
     Sets the user of the application instance.
public  voidstart(URL applicationUrl, Properties applicationProperties, ApplicationContext context)
     Starts the application on the given URL.
public  voidterminalError(Terminal.ErrorEvent event)
    



Method Detail
addListener
public void addListener(UserChangeListener listener)(Code)
Add user change listener



addListener
public void addListener(WindowAttachListener listener)(Code)
Add window attach listener



addListener
public void addListener(WindowDetachListener listener)(Code)
Add window detach listener



addResource
public void addResource(ApplicationResource resource)(Code)
Add new resource to the application. The resource can be accessed by the user of the application.



addWindow
public void addWindow(Window window) throws IllegalArgumentException, NullPointerException(Code)
Adds a new window to the application.

This implicitly invokes the org.millstone.base.ui.Window.setApplication(Application) method.


Parameters:
  window - the new Window to add
throws:
  IllegalArgumentException - if a window with the same nameas the new window already exists in the application
throws:
  NullPointerException - if the given Window orits name is null



close
public void close()(Code)
Ends the Application. In effect this will cause the application stop returning any windows when asked.



getContext
public ApplicationContext getContext()(Code)
Get application context. The application context is the environment where the application is running in.



getLocale
public Locale getLocale()(Code)
Get thed default locale for this application



getLogoutURL
public String getLogoutURL()(Code)
Returns the URL user is redirected to on application close. If the URL is null, the application is closed normally as defined by the application running environment: Desctop application just closes the application window and web-application redirects the browser to application main URL. URL



getMainWindow
public Window getMainWindow()(Code)
Returns the mainWindow of the application. Window



getProperty
public String getProperty(String name)(Code)
Searches for the property with the specified name in this application. The method returns null if the property is not found.
Parameters:
  name - The name of the property. The value in this property list with the specified key value.



getPropertyNames
public Enumeration getPropertyNames()(Code)
Returns an enumeration of all the names in this application. an enumeration of all the keys in this property list, including the keys in the default property list.



getRelativeLocation
public String getRelativeLocation(ApplicationResource resource)(Code)
Get relative uri of the resource



getTheme
public String getTheme()(Code)
Gets the application's theme. The application's theme is the default theme used by all the windows in it that do not explicitly specify a theme. If the application theme is not explicitly set, the null is returned. the name of the application's theme



getURL
public URL getURL()(Code)
Gets the URL of the application. the application's URL.



getUser
public Object getUser()(Code)
Gets the user of the application. User of the application.



getWindow
public Window getWindow(String name)(Code)
Gets a window by name. Returns null if the application is not running or it does not contain a window corresponding to name.
Parameters:
  name - The name of the window. The window associated with the given URI or null



getWindows
public Collection getWindows()(Code)
Gets the set of windows contained by the application. Unmodifiable collection of windows



handleURI
public DownloadStream handleURI(URL context, String relativeUri)(Code)



init
abstract public void init()(Code)
Main initializer of the application. This method is called by the framework when the application is started, and it should perform whatever initialization operations the application needs, such as creating windows and adding components to them.



isRunning
public boolean isRunning()(Code)
Tests if the application is running or if it has it been finished. true if the application is running,false if not



removeListener
public void removeListener(UserChangeListener listener)(Code)
Remove user change listener



removeListener
public void removeListener(WindowAttachListener listener)(Code)
Remove window attach listener



removeListener
public void removeListener(WindowDetachListener listener)(Code)
Remove window detach listener



removeResource
public void removeResource(ApplicationResource resource)(Code)
Remove resource from the application.



removeWindow
public void removeWindow(Window window)(Code)
Removes the specified window from the application.
Parameters:
  window - The window to be removed



setLocale
public void setLocale(Locale locale)(Code)
Set the default locale for this application



setLogoutURL
public void setLogoutURL(String logoutURL)(Code)
Sets the URL user is redirected to on application close. If the URL is null, the application is closed normally as defined by the application running environment: Desctop application just closes the application window and web-application redirects the browser to application main URL.
Parameters:
  logoutURL - The logoutURL to set



setMainWindow
public void setMainWindow(Window mainWindow)(Code)
Sets the mainWindow. If the main window is not explicitly set, the main window defaults to first created window. Setting window as a main window of this application also adds the window to this application.
Parameters:
  mainWindow - The mainWindow to set



setTheme
public void setTheme(String theme)(Code)
Sets the application's theme. Note that this theme can be overridden by the windows. null implies the default terminal theme.
Parameters:
  theme - The new theme for this application



setUser
public void setUser(Object user)(Code)
Sets the user of the application instance. An application instance may have a user associated to it. This can be set in login procedure or application initialization. A component performing the user login procedure can assign the user property of the application and make the user object available to other components of the application.
Parameters:
  user - the new user.



start
public void start(URL applicationUrl, Properties applicationProperties, ApplicationContext context)(Code)
Starts the application on the given URL. After this call the application corresponds to the given URL and it will return windows when asked for them.
Parameters:
  applicationUrl - The URL the application should respond to
Parameters:
  applicationProperties - Application properties as specified by the adapter.
Parameters:
  context - The context application will be running in



terminalError
public void terminalError(Terminal.ErrorEvent event)(Code)

See Also:   org.millstone.base.terminal.Terminal.ErrorListener.terminalError(org.millstone.base.terminal.Terminal.ErrorEvent)



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.