Source Code Cross Referenced for ObjectEditorPanel.java in  » 6.0-JDK-Modules » java-3d » org » jdesktop » j3dedit » scenegrapheditor » nodeeditors » 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 » 6.0 JDK Modules » java 3d » org.jdesktop.j3dedit.scenegrapheditor.nodeeditors 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  $Header: /cvs/j3dfly/J3dEditor/src/org/jdesktop/j3dedit/scenegrapheditor/nodeeditors/ObjectEditorPanel.java,v 1.1 2005/04/20 22:21:01 paulby Exp $
003:         *
004:         *                         Sun Public License Notice
005:         *
006:         *  The contents of this file are subject to the Sun Public License Version
007:         *  1.0 (the "License"). You may not use this file except in compliance with
008:         *  the License. A copy of the License is available at http://www.sun.com/
009:         *  
010:         *  The Original Code is the Java 3D(tm) Scene Graph Editor.
011:         *  The Initial Developer of the Original Code is Paul Byrne.
012:         *  Portions created by Paul Byrne are Copyright (C) 2002.
013:         *  All Rights Reserved.
014:         *  
015:         *  Contributor(s): Paul Byrne.
016:         *  
017:         **/
018:        package org.jdesktop.j3dedit.scenegrapheditor.nodeeditors;
019:
020:        import java.awt.Frame;
021:        import javax.swing.JPanel;
022:        import javax.media.j3d.NodeComponent;
023:
024:        /**
025:         * Superclass for all Component Editors
026:         *
027:         * @author Paul Byrne
028:         * @version	1.5, 01/18/02
029:         */
030:        public abstract class ObjectEditorPanel extends JPanel {
031:
032:            protected Object node; // Reference to node which is
033:            // being edited
034:
035:            protected NodeEditorPanel parentEditor; // EditorPanel in which this
036:            // component editor is working
037:
038:            private boolean updateFlag; // Set true each time user changes GUI values
039:            protected boolean readOnly = false;
040:
041:            public ObjectEditorPanel() {
042:                super ();
043:            }
044:
045:            public void setReadOnly(boolean readOnly) {
046:                this .readOnly = readOnly;
047:
048:                for (int i = 0; i < getComponentCount(); i++)
049:                    getComponent(i).setEnabled(!readOnly);
050:            }
051:
052:            public boolean getReadOnly() {
053:                return readOnly;
054:            }
055:
056:            /** 
057:             * Start editing this node
058:             * Set the GUI components
059:             * Set the capability bits
060:             */
061:            public void startEdit(Object node, NodeEditorPanel parent) {
062:                this .node = node;
063:
064:                parentEditor = parent;
065:            }
066:
067:            /**
068:             * Finish editing this node
069:             * Set capability bits back to original settings
070:             */
071:            public void finishEdit() {
072:                resetCapabilityBits(node);
073:                parentEditor = null;
074:            }
075:
076:            /** @deprecated
077:             */
078:            protected void resetControls() {
079:                throw new RuntimeException("Dont call reset Controls");
080:            }
081:
082:            /**
083:             * Set the GUI controls for represent node
084:             */
085:            protected abstract void setControls();
086:
087:            /**
088:             * Permanently apply the changes to the node
089:             */
090:            protected abstract void applyChanges();
091:
092:            /**
093:             * Reset the changes to the state when setControls or applyChanges
094:             * was last called
095:             */
096:            protected abstract void resetChanges();
097:
098:            /**
099:             * Set capability bits so panel can update node
100:             */
101:            protected abstract void setCapabilityBits(Object node);
102:
103:            /**
104:             * Reset capability bits to original settings
105:             */
106:            protected void resetCapabilityBits(Object node) {
107:            }
108:
109:            protected void storeCapabilityBits(Object node) {
110:            }
111:
112:            /**
113:             * Create the GUI components and layout panel
114:             */
115:            protected void createPanel() {
116:            }
117:
118:            /**
119:             * Called by NodeState when the user applies changes
120:             * or when changes need applying
121:             */
122:            protected void setUpdateRequired(boolean update) {
123:                updateFlag = update;
124:
125:                parentEditor.setUpdateRequired(update);
126:            }
127:
128:            /**
129:             * Returns true if the user has changed the state using the GUI
130:             */
131:            protected boolean getUpdateRequired() {
132:                return updateFlag;
133:            }
134:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.