Source Code Cross Referenced for TrimDescriptor.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » internal » layout » 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 » IDE Eclipse » ui workbench » org.eclipse.ui.internal.layout 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2005, 2006 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         *******************************************************************************/package org.eclipse.ui.internal.layout;
011:
012:        /**
013:         * Manages the internal piece of trim for each trim area.
014:         * 
015:         * @since 3.2
016:         */
017:        public class TrimDescriptor {
018:
019:            /**
020:             * The window trim object.
021:             */
022:            private IWindowTrim fTrim;
023:
024:            /**
025:             * The cache for the window trim object's control.
026:             */
027:            private SizeCache fCache;
028:
029:            /**
030:             * The cache for the common drag affordance, if available.
031:             */
032:            private SizeCache fDockingHandle = null;
033:
034:            /**
035:             * The current area that we belong to.
036:             * 
037:             * @see TrimLayout#getAreaIds()
038:             */
039:            private int fAreaId;
040:
041:            /**
042:             * Create a trim descriptor for the trim manager.
043:             * 
044:             * @param trim
045:             *            the window trim
046:             * @param areaId
047:             *            the trim area we belong to.
048:             */
049:            public TrimDescriptor(IWindowTrim trim, int areaId) {
050:                fTrim = trim;
051:                fAreaId = areaId;
052:            }
053:
054:            /**
055:             * @return Returns the fCache.
056:             */
057:            public SizeCache getCache() {
058:                return fCache;
059:            }
060:
061:            /**
062:             * Set the trim cache. Because of the requirements of possibly changing
063:             * orientation when docking on a different side, the same IWindowTrim
064:             * sometimes needs to have it's control SizeCache replaced.
065:             * 
066:             * @param c
067:             *            cache.
068:             */
069:            public void setCache(SizeCache c) {
070:                fCache = c;
071:            }
072:
073:            /**
074:             * @return Returns the fTrim.
075:             */
076:            public IWindowTrim getTrim() {
077:                return fTrim;
078:            }
079:
080:            /**
081:             * Return the cache for the common drag affordance.
082:             * 
083:             * @return return the docking handle cache
084:             */
085:            public SizeCache getDockingCache() {
086:                return fDockingHandle;
087:            }
088:
089:            /**
090:             * The trim ID.
091:             * 
092:             * @return the trim ID. This should not be <code>null</code>.
093:             */
094:            public String getId() {
095:                return fTrim.getId();
096:            }
097:
098:            /**
099:             * Returns whether the control for this trim is visible.
100:             * 
101:             * @return <code>true</code> if the control is visible.
102:             */
103:            public boolean isVisible() {
104:                if (!fTrim.getControl().isDisposed()) {
105:                    return fTrim.getControl().isVisible();
106:                }
107:                return false;
108:            }
109:
110:            /**
111:             * Set the cache for the common drag affordance.
112:             * 
113:             * @param cache
114:             *            the sizecache for the docking control
115:             */
116:            public void setDockingCache(SizeCache cache) {
117:                fDockingHandle = cache;
118:            }
119:
120:            /**
121:             * The area ID this descriptor belongs to.
122:             * 
123:             * @return the ID
124:             * @see TrimLayout#getAreaIds()
125:             */
126:            public int getAreaId() {
127:                return fAreaId;
128:            }
129:
130:            /**
131:             * Set the current area this descriptor belongs to.
132:             * 
133:             * @param id
134:             *            the area ID.
135:             * @see TrimLayout#getAreaIds()
136:             */
137:            public void setAreaId(int id) {
138:                fAreaId = id;
139:            }
140:
141:            /**
142:             * Flush any contained size caches.
143:             */
144:            public void flush() {
145:                if (fCache != null) {
146:                    fCache.flush();
147:                }
148:                if (fDockingHandle != null) {
149:                    fDockingHandle.flush();
150:                }
151:            }
152:
153:            /**
154:             * Update the visibility of the trim controls.
155:             * 
156:             * @param visible
157:             *            visible or not.
158:             */
159:            public void setVisible(boolean visible) {
160:                if (fTrim.getControl() != null
161:                        && !fTrim.getControl().isDisposed()) {
162:                    fTrim.getControl().setVisible(visible);
163:                }
164:                if (fDockingHandle != null
165:                        && fDockingHandle.getControl() != null
166:                        && !fDockingHandle.getControl().isDisposed()) {
167:                    fDockingHandle.getControl().setVisible(visible);
168:                }
169:            }
170:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.