Java Doc for Application.java in  » Web-Framework » ThinWire » thinwire » ui » 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 » ThinWire » thinwire.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   thinwire.ui.Application

All known Subclasses:   thinwire.render.web.WebApplication,
Application
abstract public class Application (Code)
The Application class represents an instance of a ThinWire application. Methods in this class are those that directly affect the system and it's environment.
author:
   Joshua J. Gertzen

Inner Class :public static class Local


Constructor Summary
protected  Application()
    

Method Summary
public  voidaddExceptionListener(ExceptionListener listener)
    
public  voidaddGlobalActionListener(String action, ActionListener listener)
     Adds a ActionListener that will be notified when the specified action occurs on any new component.
public  voidaddGlobalActionListener(String[] actions, ActionListener listener)
     Adds a ActionListener that will be notified when any of the specified actions occur on any new component.
public  voidaddGlobalDropListener(Component dragSource, DropListener listener)
    
public  voidaddGlobalDropListener(Component[] dragSources, DropListener listener)
    
public  voidaddGlobalItemChangeListener(ItemChangeListener listener)
    
public  voidaddGlobalKeyPressListener(String keyPressCombo, KeyPressListener listener)
    
public  voidaddGlobalKeyPressListener(String[] keyPressCombos, KeyPressListener listener)
    
public  voidaddGlobalPropertyChangeListener(String propertyName, PropertyChangeListener listener)
     Adds a PropertyChangeListener that will be notified when the specified property of any new component changes.
public  voidaddGlobalPropertyChangeListener(String[] propertyNames, PropertyChangeListener listener)
     Adds a PropertyChangeListener that will be notified when any of the specified properties of any new component changes.
abstract public  voidaddTimerTask(Runnable task, long milliseconds)
    
abstract public  voidaddTimerTask(Runnable task, long milliseconds, boolean repeat)
    
abstract protected  voidcaptureThread()
    
public static  Applicationcurrent()
    
abstract public  StringgetBaseFolder()
    
public static  StylegetDefaultStyle(Class<? extends Component> clazz)
    
protected  Map<Class<? extends Component>, Style>getDefaultStyles()
    
abstract protected  FileChooser.FileInfogetFileInfo()
    
public  FramegetFrame()
     Gets the Frame that represents the primary application window.
 EventListenerImpl<T>getGlobalListenerSet(Class<T> type, boolean createIfNull)
    
public static  Map<String, String>getPlatformVersionInfo()
     Returns the current version info details for the platform.
public  ComponentgetPriorFocus()
     Returns the Component that previously had focus in the Application.
abstract protected  StringgetQualifiedURL(String location)
    
public  FilegetRelativeFile(String pathname)
    
public  FilegetRelativeFile(String parent, String child)
    
public static  InputStreamgetResourceAsStream(String uri)
     Returns an InputStream representing the specified resource. The following URL's are supported:
  • Any valid resource filename.
public static  byte[]getResourceBytes(String uri)
    
protected  Map<String, Color>getSystemColors()
    
protected  StringgetSystemFile(String value)
    
protected  Map<String, String>getSystemImages()
    
abstract protected  voidhideWindow(Window w)
    
protected  voidloadStyleSheet(String styleSheet)
    
public static  voidmain(String[] args)
     Displays a version detail dialog.
abstract protected  voidreleaseThread()
    
public  voidremoveExceptionListener(ExceptionListener listener)
    
abstract protected  voidremoveFileFromMap(String location)
    
public  voidremoveGlobalActionListener(ActionListener listener)
     Unregister an ActionListener from all action event notifications from any component.
public  voidremoveGlobalDropListener(DropListener listener)
    
public  voidremoveGlobalItemChangeListener(ItemChangeListener listener)
    
public  voidremoveGlobalKeyPressListener(KeyPressListener listener)
    
public  voidremoveGlobalPropertyChangeListener(PropertyChangeListener listener)
     Removes the PropertyChangeListener from the list of global listeners that are added to all new Component's.
abstract public  voidremoveTimerTask(Runnable task)
    
public  voidreportException(Object source, Throwable exception)
    
abstract public  voidresetTimerTask(Runnable task)
    
protected  ObjectsetPackagePrivateMember(String memberName, Component comp, Object value)
    
 voidsetPriorFocus(Component comp)
    
abstract protected  voidshowWindow(Window w)
    
static  booleanvalidateURL(String url)
    
public static  voidwriteResourceToStream(String uri, OutputStream os)
    


Constructor Detail
Application
protected Application()(Code)




Method Detail
addExceptionListener
public void addExceptionListener(ExceptionListener listener)(Code)

Parameters:
  listener -



addGlobalActionListener
public void addGlobalActionListener(String action, ActionListener listener)(Code)
Adds a ActionListener that will be notified when the specified action occurs on any new component. To further clarify, a global action listener will receive an event notification for any component that is created after this global action listener is added, on which the specified action occurs. Therefore, establishing a global action listener is the same as invoking the Component.addActionListener(StringActionListener) method on every component after it's creation.
Parameters:
  action - the action to specficially be notified of.
Parameters:
  listener - the event listener that will receive notification.



addGlobalActionListener
public void addGlobalActionListener(String[] actions, ActionListener listener)(Code)
Adds a ActionListener that will be notified when any of the specified actions occur on any new component. This method is equivalent to calling Application.addGlobalActionListener(String,ActionListener) once for each action you want to receive notification for.
Parameters:
  actions - the actions to specficially be notified of.
Parameters:
  listener - the event listener that will receive notifications.



addGlobalDropListener
public void addGlobalDropListener(Component dragSource, DropListener listener)(Code)



addGlobalDropListener
public void addGlobalDropListener(Component[] dragSources, DropListener listener)(Code)



addGlobalItemChangeListener
public void addGlobalItemChangeListener(ItemChangeListener listener)(Code)



addGlobalKeyPressListener
public void addGlobalKeyPressListener(String keyPressCombo, KeyPressListener listener)(Code)



addGlobalKeyPressListener
public void addGlobalKeyPressListener(String[] keyPressCombos, KeyPressListener listener)(Code)



addGlobalPropertyChangeListener
public void addGlobalPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code)
Adds a PropertyChangeListener that will be notified when the specified property of any new component changes. To further clarify, a global property change listener will receive an event notification for any component that is created after this global property change listener is added, for which the specified property changes. Therefore, establishing a global property change listener is the same as invoking the Component.addPropertyChangeListener(StringPropertyChangeListener) method on every component after it's creation.

As a general rule, you should avoid using this feature because it can cause a large volume of events to be generated. This is especially true if you listen to a frequently updated property, such as PROPERTY_TEXT. However, there are cases where this can be quite useful. One such case is when you use the 'userObject' property to store a boolean state that indicates whether a value is required for the component. In such a case, you can establish a global property change listener for 'userObject' and then based on the property being set to true you could update the background color so it is apparent to the user that a value is required.

Example:
 Component.addGlobalPropertyChangeListener(Component.PROPERTY_USER_OBJECT, new PropertyChangeListener() {
 public void propertyChange(PropertyChangeEvent pce) {
 Component comp = (Component) pce.getSource();
 if (comp.getUserObject() == Boolean.TRUE) {
 comp.getStyle().getBackground().setColor(Color.PALEGOLDENROD);
 } else {
 comp.getStyle().getBackground().setColor(null); //restore the default background color
 }
 }
 });
 TextField tf = new TextField();
 tf.setUserObject(Boolean.TRUE); //Causes background color to be set to Color.PALEGOLDENROD
 tf.setUserObject(Boolean.FALSE); //Causes background color to be set to the default.
 

Parameters:
  propertyName - the name of the property that the listener will receive change events for.
Parameters:
  listener - the listener that will receive PropertyChangeEvent objects upon the property of any new component changing.
throws:
  IllegalArgumentException - if listener or propertyName is null or ifpropertyName is an empty string.
See Also:   Component.addPropertyChangeListener(StringPropertyChangeListener)
See Also:   thinwire.ui.event.PropertyChangeListener
See Also:   thinwire.ui.event.PropertyChangeEvent



addGlobalPropertyChangeListener
public void addGlobalPropertyChangeListener(String[] propertyNames, PropertyChangeListener listener)(Code)
Adds a PropertyChangeListener that will be notified when any of the specified properties of any new component changes. This method is equivalent to calling Application.addGlobalPropertyChangeListener(String,PropertyChangeListener) once for each property you want to listen to.
Parameters:
  propertyNames - a string array of property names that the listener will receive change events for.
Parameters:
  listener - the listerner that will receive PropertyChangeEvent objects anytime one of the specifiedpropertyNames of any new component change.
throws:
  IllegalArgumentException - if listener, propertyNames or any property name is the array is null or ifany property name is an empty string.
See Also:   Application.addGlobalPropertyChangeListener(String,PropertyChangeListener)
See Also:   Component.addPropertyChangeListener(String[]PropertyChangeListener)
See Also:   thinwire.ui.event.PropertyChangeListener
See Also:   thinwire.ui.event.PropertyChangeEvent



addTimerTask
abstract public void addTimerTask(Runnable task, long milliseconds)(Code)

Parameters:
  task -
Parameters:
  milliseconds -



addTimerTask
abstract public void addTimerTask(Runnable task, long milliseconds, boolean repeat)(Code)

Parameters:
  task -
Parameters:
  milliseconds -
Parameters:
  repeat -



captureThread
abstract protected void captureThread()(Code)



current
public static Application current()(Code)
the current instance of the application, or null if called from a thread other than the UI thread.



getBaseFolder
abstract public String getBaseFolder()(Code)
the base folder of the system



getDefaultStyle
public static Style getDefaultStyle(Class<? extends Component> clazz)(Code)



getDefaultStyles
protected Map<Class<? extends Component>, Style> getDefaultStyles()(Code)



getFileInfo
abstract protected FileChooser.FileInfo getFileInfo()(Code)



getFrame
public Frame getFrame()(Code)
Gets the Frame that represents the primary application window. the Frame that represents the primary application window.



getGlobalListenerSet
EventListenerImpl<T> getGlobalListenerSet(Class<T> type, boolean createIfNull)(Code)



getPlatformVersionInfo
public static Map<String, String> getPlatformVersionInfo()(Code)
Returns the current version info details for the platform. The returned Map is read-only and contains the following keys: companyName companyAddress1 companyAddress2 companyCity companyState companyZip companyPhone companyWebsite productDescription productVersion internalName legalCopyright originalFilename the current version info details for the platform.



getPriorFocus
public Component getPriorFocus()(Code)
Returns the Component that previously had focus in the Application. The Component that previously had focus is the last Component in ANY window that held the focus. This is different from the behavior of the focus property in which their is one Component with focus PER window. the Component that previously had focus in the Application, or null if no Component hashad prior focus.
See Also:   Component.isFocus
See Also:   Component.setFocus(boolean)



getQualifiedURL
abstract protected String getQualifiedURL(String location)(Code)



getRelativeFile
public File getRelativeFile(String pathname)(Code)

Parameters:
  pathname -



getRelativeFile
public File getRelativeFile(String parent, String child)(Code)

Parameters:
  parent -
Parameters:
  child -



getResourceAsStream
public static InputStream getResourceAsStream(String uri)(Code)
Returns an InputStream representing the specified resource. The following URL's are supported:
  • Any valid resource filename. If Application.current() returns non-null, which is the typical scenario, then relative paths are interpreted as relative to the application folder. Application.getRelativeFile
  • class:///com.mypackage.MyClass/resource.ext
  • http://www.mycompany.com/resource.ext
an InputStream representing the specified resource or null if the resource was not found.



getResourceBytes
public static byte[] getResourceBytes(String uri)(Code)



getSystemColors
protected Map<String, Color> getSystemColors()(Code)



getSystemFile
protected String getSystemFile(String value)(Code)



getSystemImages
protected Map<String, String> getSystemImages()(Code)



hideWindow
abstract protected void hideWindow(Window w)(Code)



loadStyleSheet
protected void loadStyleSheet(String styleSheet)(Code)



main
public static void main(String[] args) throws Exception(Code)
Displays a version detail dialog.
Parameters:
  args -



releaseThread
abstract protected void releaseThread()(Code)



removeExceptionListener
public void removeExceptionListener(ExceptionListener listener)(Code)

Parameters:
  listener -



removeFileFromMap
abstract protected void removeFileFromMap(String location)(Code)



removeGlobalActionListener
public void removeGlobalActionListener(ActionListener listener)(Code)
Unregister an ActionListener from all action event notifications from any component.
Parameters:
  listener - the listener that should no longer receive action event notifications.



removeGlobalDropListener
public void removeGlobalDropListener(DropListener listener)(Code)



removeGlobalItemChangeListener
public void removeGlobalItemChangeListener(ItemChangeListener listener)(Code)



removeGlobalKeyPressListener
public void removeGlobalKeyPressListener(KeyPressListener listener)(Code)



removeGlobalPropertyChangeListener
public void removeGlobalPropertyChangeListener(PropertyChangeListener listener)(Code)
Removes the PropertyChangeListener from the list of global listeners that are added to all new Component's. To further clarify, removing a global property change listener will NOT remove the listener from Component's that have already been created.
Parameters:
  listener - the listener to remove from the notification list.
throws:
  IllegalArgumentException - if listener is null.
See Also:   thinwire.ui.event.PropertyChangeListener



removeTimerTask
abstract public void removeTimerTask(Runnable task)(Code)

Parameters:
  task -



reportException
public void reportException(Object source, Throwable exception)(Code)

Parameters:
  source -
Parameters:
  exception -



resetTimerTask
abstract public void resetTimerTask(Runnable task)(Code)

Parameters:
  task -



setPackagePrivateMember
protected Object setPackagePrivateMember(String memberName, Component comp, Object value)(Code)



setPriorFocus
void setPriorFocus(Component comp)(Code)



showWindow
abstract protected void showWindow(Window w)(Code)



validateURL
static boolean validateURL(String url)(Code)



writeResourceToStream
public static void writeResourceToStream(String uri, OutputStream os)(Code)



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.