Source Code Cross Referenced for LAFPreferences.java in  » Database-Client » squirrel-sql-2.6.5a » net » sourceforge » squirrel_sql » plugins » laf » 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 » squirrel sql 2.6.5a » net.sourceforge.squirrel_sql.plugins.laf 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package net.sourceforge.squirrel_sql.plugins.laf;
002:
003:        /*
004:         * Copyright (C) 2001-2006 Colin Bell
005:         * colbell@users.sourceforge.net
006:         *
007:         * This program is free software; you can redistribute it and/or
008:         * modify it under the terms of the GNU General Public License
009:         * as published by the Free Software Foundation; either version 2
010:         * of the License, or any later version.
011:         *
012:         * This program is distributed in the hope that it will be useful,
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
015:         * GNU General Public License for more details.
016:         *
017:         * You should have received a copy of the GNU General Public License
018:         * along with this program; if not, write to the Free Software
019:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
020:         */
021:        import java.io.Serializable;
022:        import javax.swing.UIManager;
023:        import net.sourceforge.squirrel_sql.fw.gui.FontInfo;
024:        import net.sourceforge.squirrel_sql.fw.id.IHasIdentifier;
025:        import net.sourceforge.squirrel_sql.fw.id.IIdentifier;
026:
027:        /**
028:         * This JavaBean class represents the user specific
029:         * preferences for this plugin.
030:         *
031:         * @author  <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
032:         */
033:        public class LAFPreferences implements  Cloneable, Serializable,
034:                IHasIdentifier {
035:            static final long serialVersionUID = 5458252097202539743L;
036:
037:            /** The <CODE>IIdentifier</CODE> that uniquely identifies this object. */
038:            private IIdentifier _id;
039:            private String _lafClassName;
040:            private FontInfo _fiMenu;
041:            private FontInfo _fiStatic;
042:            private FontInfo _fiStatusBar;
043:            private FontInfo _fiOther;
044:            private boolean _fiMenuEnabled;
045:            private boolean _fiStaticEnabled;
046:            private boolean _fiStatusBarEnabled;
047:            private boolean _fiOtherEnabled;
048:
049:            /**
050:             * If<tt>true</tt> allow LAF to set frame and dialog title bars and
051:             * borders.
052:             * */
053:            private boolean _canLAFSetBorders = false;
054:
055:            public LAFPreferences() {
056:                super ();
057:                _lafClassName = UIManager
058:                        .getCrossPlatformLookAndFeelClassName();
059:            }
060:
061:            public LAFPreferences(IIdentifier id) {
062:                this ();
063:                _id = id;
064:            }
065:
066:            /**
067:             * Return a copy of this object.
068:             */
069:            public Object clone() {
070:                try {
071:                    return super .clone();
072:                } catch (CloneNotSupportedException ex) {
073:                    throw new InternalError(ex.getMessage()); // Impossible.
074:                }
075:            }
076:
077:            public String getLookAndFeelClassName() {
078:                return _lafClassName;
079:            }
080:
081:            public void setLookAndFeelClassName(String data) {
082:                _lafClassName = data;
083:            }
084:
085:            public FontInfo getMenuFontInfo() {
086:                return _fiMenu;
087:            }
088:
089:            public void setMenuFontInfo(FontInfo data) {
090:                _fiMenu = data;
091:            }
092:
093:            public FontInfo getStaticFontInfo() {
094:                return _fiStatic;
095:            }
096:
097:            public void setStaticFontInfo(FontInfo data) {
098:                _fiStatic = data;
099:            }
100:
101:            public FontInfo getStatusBarFontInfo() {
102:                return _fiStatusBar;
103:            }
104:
105:            public void setStatusBarFontInfo(FontInfo data) {
106:                _fiStatusBar = data;
107:            }
108:
109:            public FontInfo getOtherFontInfo() {
110:                return _fiOther;
111:            }
112:
113:            public void setOtherFontInfo(FontInfo data) {
114:                _fiOther = data;
115:            }
116:
117:            public boolean isMenuFontEnabled() {
118:                return _fiMenuEnabled;
119:            }
120:
121:            public void setMenuFontEnabled(boolean data) {
122:                _fiMenuEnabled = data;
123:            }
124:
125:            public boolean isStaticFontEnabled() {
126:                return _fiStaticEnabled;
127:            }
128:
129:            public void setStaticFontEnabled(boolean data) {
130:                _fiStaticEnabled = data;
131:            }
132:
133:            public boolean isStatusBarFontEnabled() {
134:                return _fiStatusBarEnabled;
135:            }
136:
137:            public void setStatusBarFontEnabled(boolean data) {
138:                _fiStatusBarEnabled = data;
139:            }
140:
141:            public boolean isOtherFontEnabled() {
142:                return _fiOtherEnabled;
143:            }
144:
145:            public void setOtherFontEnabled(boolean data) {
146:                _fiOtherEnabled = data;
147:            }
148:
149:            /**
150:             * @see IHasIdentifier#getIdentifier()
151:             */
152:            public IIdentifier getIdentifier() {
153:                return null;
154:            }
155:
156:            /**
157:             * Gets the _id.
158:             * @return Returns a IIdentifier
159:             */
160:            public IIdentifier getId() {
161:                return _id;
162:            }
163:
164:            /**
165:             * Sets the _id.
166:             * @param _id The _id to set
167:             */
168:            public void setId(IIdentifier _id) {
169:                this ._id = _id;
170:            }
171:
172:            /**
173:             * Specifies whether LAF allowed to set frame and dialog title bars and
174:             * borders.
175:             */
176:            public boolean getCanLAFSetBorder() {
177:                return _canLAFSetBorders;
178:            }
179:
180:            /**
181:             * Set whether LAF allowed to set frame and dialog title bars and
182:             * borders.
183:             */
184:            public void setCanLAFSetBorder(boolean value) {
185:                _canLAFSetBorders = value;
186:            }
187:
188:            /**
189:             * @see java.lang.Object#hashCode()
190:             */
191:            @Override
192:            public int hashCode() {
193:                final int PRIME = 31;
194:                int result = 1;
195:                result = PRIME * result + (_canLAFSetBorders ? 1231 : 1237);
196:                result = PRIME * result
197:                        + ((_fiMenu == null) ? 0 : _fiMenu.hashCode());
198:                result = PRIME * result + (_fiMenuEnabled ? 1231 : 1237);
199:                result = PRIME * result
200:                        + ((_fiOther == null) ? 0 : _fiOther.hashCode());
201:                result = PRIME * result + (_fiOtherEnabled ? 1231 : 1237);
202:                result = PRIME * result
203:                        + ((_fiStatic == null) ? 0 : _fiStatic.hashCode());
204:                result = PRIME * result + (_fiStaticEnabled ? 1231 : 1237);
205:                result = PRIME
206:                        * result
207:                        + ((_fiStatusBar == null) ? 0 : _fiStatusBar.hashCode());
208:                result = PRIME * result + (_fiStatusBarEnabled ? 1231 : 1237);
209:                result = PRIME * result + ((_id == null) ? 0 : _id.hashCode());
210:                result = PRIME
211:                        * result
212:                        + ((_lafClassName == null) ? 0 : _lafClassName
213:                                .hashCode());
214:                return result;
215:            }
216:
217:            /**
218:             * @see java.lang.Object#equals(java.lang.Object)
219:             */
220:            @Override
221:            public boolean equals(Object obj) {
222:                if (this  == obj)
223:                    return true;
224:                if (obj == null)
225:                    return false;
226:                if (getClass() != obj.getClass())
227:                    return false;
228:                final LAFPreferences other = (LAFPreferences) obj;
229:                if (_canLAFSetBorders != other._canLAFSetBorders)
230:                    return false;
231:                if (_fiMenu == null) {
232:                    if (other._fiMenu != null)
233:                        return false;
234:                } else if (!_fiMenu.equals(other._fiMenu))
235:                    return false;
236:                if (_fiMenuEnabled != other._fiMenuEnabled)
237:                    return false;
238:                if (_fiOther == null) {
239:                    if (other._fiOther != null)
240:                        return false;
241:                } else if (!_fiOther.equals(other._fiOther))
242:                    return false;
243:                if (_fiOtherEnabled != other._fiOtherEnabled)
244:                    return false;
245:                if (_fiStatic == null) {
246:                    if (other._fiStatic != null)
247:                        return false;
248:                } else if (!_fiStatic.equals(other._fiStatic))
249:                    return false;
250:                if (_fiStaticEnabled != other._fiStaticEnabled)
251:                    return false;
252:                if (_fiStatusBar == null) {
253:                    if (other._fiStatusBar != null)
254:                        return false;
255:                } else if (!_fiStatusBar.equals(other._fiStatusBar))
256:                    return false;
257:                if (_fiStatusBarEnabled != other._fiStatusBarEnabled)
258:                    return false;
259:                if (_id == null) {
260:                    if (other._id != null)
261:                        return false;
262:                } else if (!_id.equals(other._id))
263:                    return false;
264:                if (_lafClassName == null) {
265:                    if (other._lafClassName != null)
266:                        return false;
267:                } else if (!_lafClassName.equals(other._lafClassName))
268:                    return false;
269:                return true;
270:            }
271:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.