Source Code Cross Referenced for Toolkit.java in  » Database-Client » dbmjui » fr » aliacom » form » common » 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 » Database Client » dbmjui » fr.aliacom.form.common 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package fr.aliacom.form.common;
002:
003:        import java.beans.PropertyChangeListener;
004:        import java.beans.PropertyChangeSupport;
005:        import java.util.prefs.BackingStoreException;
006:        import java.util.prefs.Preferences;
007:
008:        import fr.aliacom.common.ui.IColor;
009:        import fr.aliacom.common.ui.IIcon;
010:        import fr.aliacom.common.ui.IInternalFrame;
011:        import fr.aliacom.common.ui.ISplashScreen;
012:        import fr.aliacom.common.ui.ITopLevelFrame;
013:        import fr.aliacom.form.storage.IFormRepository;
014:        import fr.aliacom.form.storage.IIconRepository;
015:        import fr.aliacom.form.storage.IScriptRepository;
016:        import fr.aliacom.util.StringFunctions;
017:
018:        /**
019:         * @author tom
020:         *
021:         *  (C) 2001, 2002 Thomas Cataldo
022:         */
023:        public abstract class Toolkit implements  IIconRepository,
024:                IFormRepository, IScriptRepository {
025:
026:            public static final int OPEN = 1 << 0;
027:            public static final int SAVE = 1 << 1;
028:
029:            private Preferences prefs;
030:            private PropertyChangeSupport pcs;
031:
032:            public Toolkit() {
033:                prefs = Preferences.userNodeForPackage(getClass());
034:                pcs = new PropertyChangeSupport(this );
035:            }
036:
037:            public abstract void init();
038:
039:            public void handleError(IFormComponent parent, Throwable t) {
040:                String message = "An (un)expected error occured. Sorry for the inconvenience.\n"
041:                        + "Please report the following text at \"tcataldo@users.sourceforge.net\":\n\n"
042:                        + StringFunctions.getExceptionTraceText(t);
043:                handleError(parent, message);
044:            }
045:
046:            public abstract void handleError(IFormComponent parent, String s);
047:
048:            /**
049:             * Method getNewParser.
050:             * @return FormParser
051:             */
052:            public abstract IFormParser getNewParser();
053:
054:            /**
055:             * Method newAliaInternalFrame.
056:             * @param f
057:             * @return AliaInternalFrame
058:             */
059:            public abstract IInternalFrame newInternalFrame(IForm f);
060:
061:            /**
062:             * Method newAliaTopLevelFrame.
063:             * @param f
064:             * @return AliaTopLevelFrame
065:             */
066:            public abstract ITopLevelFrame newTopLevelFrame(IForm f);
067:
068:            /**
069:             * Method confirm.
070:             * @param form
071:             * @param confirmMessage
072:             * @return boolean
073:             */
074:            public abstract boolean confirm(IFormComponent form,
075:                    String confirmMessage);
076:
077:            /**
078:             * Method newSplashScreen.
079:             * @param iconName
080:             * @param i
081:             * @return SplashScreen
082:             */
083:            public abstract ISplashScreen newSplashScreen(String iconName, int i);
084:
085:            /**
086:             * Method getIcon.
087:             * @param iconName
088:             * @return Icon
089:             */
090:            public abstract IIcon getIcon(String iconName);
091:
092:            /**
093:             * Method asyncExec.
094:             * @param asyncCommandWorker
095:             */
096:            public abstract void asyncExec(Runnable asyncCommandWorker);
097:
098:            /**
099:             * Method asyncExec.
100:             * @param syncCommandWorker
101:             */
102:            public abstract void syncExec(Runnable syncCommandWorker);
103:
104:            public FormWorker startWork(IWorker worker) {
105:                final FormWorker task = new FormWorker(worker);
106:                task.start();
107:                return task;
108:            }
109:
110:            /**
111:             * Method getDisplay.
112:             * @return Display
113:             */
114:            public abstract Object getDisplay();
115:
116:            /**
117:             * Method start.
118:             */
119:            public abstract void start(IApplication app);
120:
121:            public abstract void stop();
122:
123:            public abstract IColor newColor(int r, int g, int b);
124:
125:            public abstract void setMainWindow(IForm mainWindow);
126:
127:            public abstract IForm getMainWindow();
128:
129:            public abstract String showDirectoryDialog();
130:
131:            public abstract String showFontDialog();
132:
133:            /**
134:             * 
135:             * @param mode Toolkit.OPEN or Toolkit.SAVE
136:             * @return the path of the selected file, or <code>null</code> if cancelled.
137:             */
138:            public abstract String showFileDialog(int mode);
139:
140:            public String getMonospaceFontName() {
141:                return prefs.get("monospace", "Monospace");
142:            }
143:
144:            public void setMonospaceFontName(String font) {
145:                String oldValue = getMonospaceFontName();
146:                prefs.put("monospace", font);
147:                pcs.firePropertyChange("monospaceFontName", oldValue, font);
148:                try {
149:                    prefs.sync();
150:                } catch (BackingStoreException e) {
151:                    handleError(getMainWindow(), e);
152:                }
153:            }
154:
155:            /**
156:             * Returns the icon to display when the icon asked
157:             * by the user is not available in the {@link IIconRepository}.
158:             * 
159:             * @return the broken icon
160:             */
161:            public abstract IIcon getBrokenIcon();
162:
163:            /**
164:             * @param propertyName
165:             * @param listener
166:             */
167:            public synchronized void addPropertyChangeListener(
168:                    String propertyName, PropertyChangeListener listener) {
169:                pcs.addPropertyChangeListener(propertyName, listener);
170:            }
171:
172:            /**
173:             * @param propertyName
174:             * @param listener
175:             */
176:            public synchronized void removePropertyChangeListener(
177:                    String propertyName, PropertyChangeListener listener) {
178:                pcs.removePropertyChangeListener(propertyName, listener);
179:            }
180:
181:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.