Source Code Cross Referenced for RemoteFrameWrapperNode.java in  » Web-Server » Jigsaw » org » w3c » jigadmin » editors » 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 Server » Jigsaw » org.w3c.jigadmin.editors 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // RemoteFrameWrapperNode.java
002:        // $Id: RemoteFrameWrapperNode.java,v 1.9 2000/08/16 21:37:30 ylafon Exp $
003:        // (c) COPYRIGHT MIT and INRIA, 1998.
004:        // Please first read the full copyright statement in file COPYRIGHT.html
005:
006:        package org.w3c.jigadmin.editors;
007:
008:        import java.util.Vector;
009:
010:        import org.w3c.jigadmin.RemoteResourceWrapper;
011:        import org.w3c.jigadmin.gui.Message;
012:
013:        import org.w3c.jigsaw.admin.RemoteResource;
014:        import org.w3c.jigsaw.admin.RemoteAccessException;
015:
016:        /**
017:         * The TreeNode for Frames
018:         * @version $Revision: 1.9 $
019:         * @author  Benoît Mahé (bmahe@w3.org)
020:         */
021:        public class RemoteFrameWrapperNode extends RemoteResourceWrapperNode {
022:
023:            /**
024:             * Get the pretty ResourceFrame name
025:             * @param frame The ResourceFrame
026:             * @param name The ResourceFrame name
027:             * @exception RemoteAccessException if a remote access error occurs.
028:             */
029:            protected static String getFrameName(RemoteResource frame,
030:                    String name) throws RemoteAccessException {
031:                String className = frame.getClassHierarchy()[0];
032:                String shortName = className.substring(className
033:                        .lastIndexOf('.') + 1);
034:                return shortName.concat(" (").concat(name).concat(")");
035:            }
036:
037:            /**
038:             * Get the pretty ResourceFrame name
039:             * @param frame The ResourceFrame
040:             * @exception RemoteAccessException if a remote access error occurs.
041:             */
042:            protected static String getFrameName(RemoteResource frame)
043:                    throws RemoteAccessException {
044:                String className = frame.getClassHierarchy()[0];
045:                String shortName = className.substring(className
046:                        .lastIndexOf('.') + 1);
047:                String frameName = (String) frame.getValue("identifier");
048:                return shortName.concat(" (").concat(frameName).concat(")");
049:            }
050:
051:            /**
052:             * Load the children of this node.
053:             */
054:            protected synchronized void loadChildren() {
055:                RemoteResource frames[] = null;
056:
057:                children = new Vector();
058:
059:                try {
060:                    if (rrw.getResource().isFramed())
061:                        frames = rrw.getResource().getFrames();
062:                } catch (RemoteAccessException ex) {
063:                    Message.showErrorMessage(rrw, ex);
064:                }
065:                if (frames == null)
066:                    return;
067:                for (int i = 0; i < frames.length; i++) {
068:                    RemoteResourceWrapper rrwf = new RemoteResourceWrapper(rrw,
069:                            frames[i]);
070:                    try {
071:                        RemoteFrameWrapperNode node = new RemoteFrameWrapperNode(
072:                                this , rrwf, getFrameName(frames[i]));
073:                        children.add(node);
074:                    } catch (RemoteAccessException ex) {
075:                        Message.showErrorMessage(rrw, ex);
076:                    }
077:                }
078:            }
079:
080:            /**
081:             * Returns true if this node is allowed to have children.
082:             * @return true if this node allows children, else false
083:             */
084:            public boolean getAllowsChildren() {
085:                try {
086:                    return (rrw.getResource().isFramed());
087:                } catch (RemoteAccessException ex) {
088:                    Message.showErrorMessage(rrw, ex);
089:                }
090:                return false;
091:            }
092:
093:            /**
094:             * Constructor
095:             * @param parent The parent node
096:             * @param rrw The associated RemoteResourceWrapper
097:             * @param name The name of this node
098:             */
099:            protected RemoteFrameWrapperNode(RemoteResourceWrapperNode parent,
100:                    RemoteResourceWrapper rrw, String name) {
101:                super (parent, rrw, name);
102:            }
103:
104:            /**
105:             * Constructor
106:             * @param parent The parent node
107:             * @param rrw The associated RemoteResourceWrapper
108:             */
109:            protected RemoteFrameWrapperNode(RemoteResourceWrapperNode parent,
110:                    RemoteResourceWrapper rrw) throws RemoteAccessException {
111:                super (parent, rrw, getFrameName(rrw.getResource()));
112:            }
113:
114:            /**
115:             * Constructor
116:             * @param rrw The associated RemoteResourceWrapper
117:             * @param name The name of this node
118:             */
119:            protected RemoteFrameWrapperNode(RemoteResourceWrapper rrw,
120:                    String name) {
121:                super(rrw, name);
122:            }
123:
124:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.