User: ko5tik
Date: 02/02/22 10:28:09
Modified: src/java/xdocletgui/swing Main.java MainPanel.java
TagFamiliesPanel.java TagFamilyPanel.java
TagPanel.java
Added: src/java/xdocletgui/swing ProgramElementRenderer.java
RenderProgramElementTreeListener.java
Log:
weed out all references to Documented. only one compile error
on XJavaDoc instantiation.
Aslak, would you please fix it?
I go home and prepare myself to watching USA-Russia
Revision Changes Path
1.4 +1 -1 xdocletgui/src/java/xdocletgui/swing/Main.java
Index: Main.java
===================================================================
RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/Main.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- Main.java 17 Feb 2002 19:44:18 -0000 1.3
+++ Main.java 22 Feb 2002 18:28:09 -0000 1.4
@@ -50,7 +50,7 @@
import xjavadoc.XJavaDoc;
import xjavadoc.XJavaDocException;
import xjavadoc.XClass;
-import xjavadoc.parser.SourceClass;
+import xjavadoc.SourceClass;
import org.apache.tools.ant.*;
import org.apache.tools.ant.types.*;
1.3 +2 -2 xdocletgui/src/java/xdocletgui/swing/MainPanel.java
Index: MainPanel.java
===================================================================
RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/MainPanel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- MainPanel.java 17 Feb 2002 19:44:18 -0000 1.2
+++ MainPanel.java 22 Feb 2002 18:28:09 -0000 1.3
@@ -127,8 +127,8 @@
TagFamiliesPanel tagFamiliesPanel = new
TagFamiliesPanel(tagFamilies);
// hook them together via a listener
- RenderDocumentedTreeListener renderDocumentedTreeListener =
new RenderDocumentedTreeListener(tagFamiliesPanel);
- _tree.addTreeSelectionListener(renderDocumentedTreeListener);
+ RenderProgramElementTreeListener
renderProgramElementTreeListener = new
RenderProgramElementTreeListener(tagFamiliesPanel);
+
_tree.addTreeSelectionListener(renderProgramElementTreeListener);
// show them both in a split pane
JSplitPane splitPane = new
JSplitPane(JSplitPane.HORIZONTAL_SPLIT, s, tagFamiliesPanel);
1.2 +123 -122 xdocletgui/src/java/xdocletgui/swing/TagFamiliesPanel.java
Index: TagFamiliesPanel.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/TagFamiliesPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- TagFamiliesPanel.java 25 Jan 2002 00:50:16 -0000 1.1
+++ TagFamiliesPanel.java 22 Feb 2002 18:28:09 -0000 1.2
@@ -41,7 +41,7 @@
import xtags.TagFamilies;
import xtags.TagFamily;
-import xjavadoc.Documented;
+import xjavadoc.XProgramElement;
/**
* This is the outermost panel for configurations. It contains one tab for each
@@ -50,9 +50,10 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Aslak Helles�y</a>
* @created 3. oktober 2001
- * @version $Id: TagFamiliesPanel.java,v 1.1 2002/01/25 00:50:16 rinkrank Exp $
+ * @version $Id: TagFamiliesPanel.java,v 1.1.1.1 2002/01/25 00:50:16 rinkrank
+ * Exp $
*/
-public class TagFamiliesPanel extends JPanel implements DocumentedRenderer {
+public class TagFamiliesPanel extends JPanel implements ProgramElementRenderer {
/**
* @todo-javadoc Describe the field
@@ -100,9 +101,9 @@
* Renders tags for a class or method
*
* @todo avoid creating a new JTabbedPane every time this method is called
- * @param documented the class or method to render
+ * @param xprogramelement the class or method to render
*/
- public void render(Documented documented) {
+ public void render(XProgramElement xprogramelement) {
removeAll();
JTabbedPane tabPane = new JTabbedPane();
// Have to insert a new tab pane every time to ensure it's drawn
properly
@@ -110,11 +111,11 @@
add(tabPane, BorderLayout.CENTER);
for (int i = 0; i < _configurations.size(); i++) {
TagFamily tagFamily = _configurations.get(i);
- if (tagFamily.supports(documented)) {
- // OK, the configuration supports the documented. Get
the
- // corresponding panel and tell it to render the
documented
+ if (tagFamily.supports(xprogramelement)) {
+ // OK, the configuration supports the xprogramelement.
Get the
+ // corresponding panel and tell it to render the
xprogramelement
TagFamilyPanel tagFamilyPanel =
(TagFamilyPanel)_configurationPanels.get(tagFamily);
- tagFamilyPanel.render(documented);
+ tagFamilyPanel.render(xprogramelement);
tabPane.addTab(tagFamily.getName(), null,
tagFamilyPanel, tagFamily.getUsage());
}
}
1.2 +147 -145 xdocletgui/src/java/xdocletgui/swing/TagFamilyPanel.java
Index: TagFamilyPanel.java
===================================================================
RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/TagFamilyPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- TagFamilyPanel.java 25 Jan 2002 00:50:16 -0000 1.1
+++ TagFamilyPanel.java 22 Feb 2002 18:28:09 -0000 1.2
@@ -44,8 +44,8 @@
import xtags.Tag;
import xtags.TagFamily;
-import xjavadoc.Documented;
import xjavadoc.XClass;
+import xjavadoc.XProgramElement;
/**
* This is the panel that will appear on each of the TagFamiliesPanel's tabs. It
@@ -77,9 +77,10 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Aslak Helles�y</a>
* @created 3. oktober 2001
- * @version $Id: TagFamilyPanel.java,v 1.1 2002/01/25 00:50:16 rinkrank Exp $
+ * @version $Id: TagFamilyPanel.java,v 1.1.1.1 2002/01/25 00:50:16 rinkrank Exp
+ * $
*/
-public class TagFamilyPanel extends JPanel implements DocumentedRenderer {
+public class TagFamilyPanel extends JPanel implements ProgramElementRenderer {
/**
* @todo-javadoc Describe the field
@@ -126,18 +127,19 @@
* DocumentedRendererImpl with a ref to the JComponent and that's where
* this method should be implemented. Need to make abstract method of the
* add method, which might be different (addTab)
- * @param documented Describe what the parameter does
+ * @param xprogramelement Describe what the parameter does
+ * @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for method parameter
*/
- public void render(Documented documented) {
+ public void render(XProgramElement xprogramelement) {
_panel.removeAll();
for (int i = 0; i < _tagFamily.size(); i++) {
Tag tag = _tagFamily.getTag(i);
- if (tag.supports(documented)) {
+ if (tag.supports(xprogramelement)) {
// OK, the tag supports the documented. Get the
// corresponding panel and tell it to render the
documented
TagPanel tagPanel = (TagPanel)_tagPanels.get(tag);
- tagPanel.render(documented);
+ tagPanel.render(xprogramelement);
_panel.add(tagPanel);
}
}
1.2 +209 -209 xdocletgui/src/java/xdocletgui/swing/TagPanel.java
Index: TagPanel.java
===================================================================
RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/TagPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- TagPanel.java 25 Jan 2002 00:50:16 -0000 1.1
+++ TagPanel.java 22 Feb 2002 18:28:09 -0000 1.2
@@ -41,7 +41,7 @@
import xtags.Tag;
import xtags.TagParameter;
-import xjavadoc.Documented;
+import xjavadoc.XProgramElement;
/**
* This is the panel that will appear inside a TagFamilyPanel. There will be one
@@ -62,9 +62,9 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Aslak Helles�y</a>
* @created 3. oktober 2001
- * @version $Id: TagPanel.java,v 1.1 2002/01/25 00:50:16 rinkrank Exp $
+ * @version $Id: TagPanel.java,v 1.2 2002/02/22 18:28:09 ko5tik Exp $
*/
-public class TagPanel extends JPanel implements DocumentedRenderer {
+public class TagPanel extends JPanel implements ProgramElementRenderer {
/**
* @todo-javadoc Describe the field
@@ -113,28 +113,28 @@
* @todo don't check for supports, check whether the tag is set or not. Account
* for multiple tags and warn about tags that are specified more than once
* if they are not allowed to be multiple.
- * @param documented Describe what the parameter does
+ * @param xprogramelement Describe what the parameter does
*/
- public void render(Documented documented) {
+ public void render(XProgramElement xprogramelement) {
removeAll();
for (int i = 0; i < _tag.size(); i++) {
TagParameter tagParameter = _tag.getTagParameter(i);
- if (tagParameter.supports(documented)) {
- // OK, the tag supports the documented. Get the
- // corresponding panel and tell it to render the
documented
+ if (tagParameter.supports(xprogramelement)) {
+ // OK, the tag supports the xprogramelement. Get the
+ // corresponding panel and tell it to render the
xprogramelement
ComponentPair componentPair =
(ComponentPair)_componentPairs.get(tagParameter);
add(componentPair.getLabel());
JComponent editor = componentPair.getEditor();
if (editor instanceof
TagParameterComponentFactory.ValueCombo) {
- // set the values. They depend on the
documented.
+ // set the values. They depend on the
xprogramelement.
TagParameterComponentFactory.ValueCombo combo
= (TagParameterComponentFactory.ValueCombo)editor;
-
combo.setValues(tagParameter.getOptions(documented));
+
combo.setValues(tagParameter.getOptions(xprogramelement));
}
add(editor);
// Let the editor know what parameter it is editing
TagParameterComponentFactory.Valuable valuable =
(TagParameterComponentFactory.Valuable)editor;
- valuable.setTagParameterInGui(documented.doc(),
_tag.getName(), tagParameter.getName());
+ valuable.setTagParameterInGui(xprogramelement.doc(),
_tag.getName(), tagParameter.getName());
// set the tag parameter text
// if (documented.doc() != null) {
1.1 xdocletgui/src/java/xdocletgui/swing/ProgramElementRenderer.java
Index: ProgramElementRenderer.java
===================================================================
/*
* Copyright (c) 2001, Aslak Helles�y, BEKK Consulting
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of BEKK Consulting nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
/*
* Change log
*
*/
package xdocletgui.swing;
import xjavadoc.XProgramElement;
/**
* @author Aslak Helles�y
* @created 29. desember 2001
* @perhaps move this class up one level, or to a different package?
*/
public interface ProgramElementRenderer {
/**
* Describe what the method does
*
* @param xprogramelement Describe what the parameter does
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for method parameter
*/
public void render(XProgramElement xprogramelement);
}
1.1
xdocletgui/src/java/xdocletgui/swing/RenderProgramElementTreeListener.java
Index: RenderProgramElementTreeListener.java
===================================================================
/*
* Copyright (c) 2001, Aslak Helles�y, BEKK Consulting
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of BEKK Consulting nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
/*
* Change log
*
*/
package xdocletgui.swing;
import javax.swing.event.TreeSelectionListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.tree.TreePath;
import javax.swing.tree.DefaultMutableTreeNode;
import xjavadoc.XProgramElement;
/**
* Describe what this class does
*
* @author Aslak Helles�y
* @created 29. desember 2001
* @todo-javadoc Write javadocs
*/
public class RenderProgramElementTreeListener implements TreeSelectionListener {
/**
* @todo-javadoc Describe the field
*/
private final ProgramElementRenderer _programElementRenderer;
/**
* Describe what the RenderDocumentedTreeListener constructor does
*
* @param programElementRenderer Describe what the parameter does
* @todo-javadoc Write javadocs for method parameter
* @todo-javadoc Write javadocs for constructor
* @todo-javadoc Write javadocs for method parameter
*/
public RenderProgramElementTreeListener(ProgramElementRenderer
programElementRenderer) {
_programElementRenderer = programElementRenderer;
}
/**
* Describe what the method does
*
* @param e Describe what the parameter does
* @todo-javadoc Write javadocs for method
* @todo-javadoc Write javadocs for method parameter
*/
public void valueChanged(TreeSelectionEvent e) {
TreePath treePath = e.getPath();
DefaultMutableTreeNode treeNode =
(DefaultMutableTreeNode)treePath.getLastPathComponent();
try {
XProgramElement xprogramelement =
(XProgramElement)treeNode.getUserObject();
_programElementRenderer.render(xprogramelement);
} catch (ClassCastException ex) {
}
}
}
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel