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


001:        // IndexersHelper.java
002:        // $Id: IndexersHelper.java,v 1.10 2000/08/16 21:37:27 ylafon Exp $
003:        // (c) COPYRIGHT MIT and INRIA, 1997.
004:        // Please first read the full copyright statement in file COPYRIGHT.html
005:
006:        package org.w3c.jigadm.editors;
007:
008:        import java.awt.BorderLayout;
009:        import java.awt.Button;
010:        import java.awt.Checkbox;
011:        import java.awt.Component;
012:        import java.awt.Container;
013:        import java.awt.GridBagConstraints;
014:        import java.awt.GridBagLayout;
015:        import java.awt.GridLayout;
016:        import java.awt.Label;
017:        import java.awt.Panel;
018:        import java.awt.ScrollPane;
019:        import java.awt.TextComponent;
020:        import java.awt.TextField;
021:
022:        import java.awt.event.ActionEvent;
023:        import java.awt.event.ActionListener;
024:
025:        import java.util.Properties;
026:        import java.util.StringTokenizer;
027:
028:        import org.w3c.jigadm.PropertyManager;
029:        import org.w3c.jigadm.RemoteResourceWrapper;
030:
031:        import org.w3c.jigsaw.admin.RemoteAccessException;
032:        import org.w3c.jigsaw.admin.RemoteResource;
033:
034:        import org.w3c.tools.widgets.FakeComboBox;
035:
036:        import org.w3c.tools.resources.Attribute;
037:
038:        public class IndexersHelper extends ResourceHelper {
039:
040:            class AddIndexerListener implements  ActionListener {
041:
042:                public void actionPerformed(ActionEvent ae) {
043:                    addIndexer();
044:                }
045:            }
046:
047:            RemoteResourceWrapper rrw = null;
048:            RemoteResource rr = null;
049:            RemoteResource[] child = null;
050:            Checkbox[] c = null;
051:            private boolean initialized = false;
052:            Properties prop;
053:            FakeComboBox combo;
054:            TextField tf;
055:            Panel widget;
056:            Panel addPanel = null;
057:
058:            protected void addIndexer() {
059:                if (tf.getText().length() > 0) {
060:                    RemoteResource nrr;
061:                    String selected = combo.getText();
062:                    if (selected != null)
063:                        if (selected.length() > 0) {
064:                            try {
065:                                nrr = rrw.getResource().registerResource(
066:                                        tf.getText(), selected);
067:                            } catch (RemoteAccessException ex) {
068:                                errorPopup("RemoteAccessException", ex);
069:                                return;
070:                            }
071:                            RemoteResourceWrapper nrrw;
072:                            nrrw = new RemoteResourceWrapper(rrw, nrr, rrw
073:                                    .getBrowser());
074:                            rrw.getBrowser()
075:                                    .insertNode(rrw, nrrw, tf.getText());
076:                        }
077:                }
078:            }
079:
080:            protected RemoteResourceWrapper getWrapper() {
081:                return rrw;
082:            }
083:
084:            public Component getComponent() {
085:                return widget;
086:            }
087:
088:            public void commitChanges() {
089:                return;
090:            }
091:
092:            public boolean hasChanged() {
093:                return false; // the changes are propagated instantly
094:            }
095:
096:            public void resetChanges() {
097:            }
098:
099:            public void clearChanged() {
100:            }
101:
102:            public final String getTitle() {
103:                return "Indexers";
104:            }
105:
106:            public IndexersHelper() {
107:                widget = new Panel();
108:            }
109:
110:            protected void initAddPanel(Properties config) {
111:                if (addPanel == null) {
112:                    Panel tfp;
113:                    addPanel = new Panel(new BorderLayout());
114:                    String af = config
115:                            .getProperty("org.w3c.jigadm.editors.resource.indexers");
116:                    StringTokenizer st = new StringTokenizer(af, "|");
117:                    ScrollPane fsp = new ScrollPane();
118:                    GridBagLayout fgbl = new GridBagLayout();
119:                    GridBagConstraints fgbc = new GridBagConstraints();
120:                    Panel fspp = new Panel(fgbl);
121:                    fsp.add(fspp);
122:
123:                    PropertyManager pm = PropertyManager.getPropertyManager();
124:                    String downPath = pm.getIconLocation("down");
125:                    String leftPath = pm.getIconLocation("left");
126:                    combo = new FakeComboBox(35, 7, true, downPath, leftPath);
127:                    while (st.hasMoreTokens())
128:                        combo.add(st.nextToken().trim());
129:                    fspp.add(combo);
130:
131:                    addPanel.add("Center", fsp);
132:                    Button newb = new Button("Add Indexer");
133:                    newb.addActionListener(new AddIndexerListener());
134:                    addPanel.add("South", newb);
135:                    tfp = new Panel(new GridLayout(1, 2));
136:                    tf = new TextField();
137:                    tfp.add(new Label("identifier"));
138:                    tfp.add(tf);
139:                    addPanel.add("North", tfp);
140:                }
141:                widget.add("Center", addPanel);
142:
143:            }
144:
145:            /**
146:             * initialize this helper
147:             * @param rrw The RemoteResourceWrapper
148:             * @param pr The properties
149:             * @exception RemoteAccessException if a remote access error occurs.
150:             */
151:            public void initialize(RemoteResourceWrapper rrw, Properties pr)
152:                    throws RemoteAccessException {
153:                if (!initialized)
154:                    initialized = true;
155:                else
156:                    return;
157:
158:                this .rrw = rrw;
159:                rr = rrw.getResource();
160:
161:                if (rr.isContainer()) {
162:                    widget.setLayout(new BorderLayout());
163:                    initAddPanel(pr);
164:                }
165:            }
166:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.