Subversion Repositories general

Rev

Rev 327 | Blame | Last modification | View Log | RSS feed

PK
wVë.  META-INF/þÊPK
wVë.~ƒkk66META-INF/MANIFEST.MFManifest-Version: 1.0
Comment: view everything as text, best as default plugin
Transform-To-File: src/plugins/textEditorPlugin/TextEditorPluginTransf
 orm.xsl
Created-By: 1.4.0 (Sun Microsystems Inc.)
Description: ...(todo)
XMLEditor-Plugin-Name: TextEditor
Class-Path: 
Transform-Fro-File: src/plugins/textEditorPlugin/TextEditorPluginTrans
 formBack.xsl
Main-Class: src.plugins.textEditorPlugin.TextEditorPlugin

Name: src/plugins/textEditorPlugin
Specification-Version: 0.4 (05/07/03)
Specification-Title: plugin for XMLEditor
Implementation-Version: 0.1 (05/07/03)
Implementation-Title: src.plugins.textEditorPlugin
Implementation-Vendor: group5, software practice SS_2003, University B
 ielefeld, Germany
Specification-Vendor: group5, software practice SS_2003, University Bi
 elefeld, Germany

PK
Y<ë.!src/plugins/textEditorPlugin/CVS/PK
âTë.A"˜¦      ¦    3src/plugins/textEditorPlugin/TextEditorPlugin.classÊþº¾-|-src/plugins/textEditorPlugin/TextEditorPluginjavax/swing/JPanelsrc/plugins/PluginInterfaceguiLsrc/gui/GuiInterface;ourEventListenerLsrc/control/OurEventListener;textAreaLjavax/swing/JTextArea;
scrollPaneLjavax/swing/JScrollPane;<init>()VCode
javax/swing/JTextArea
       javax/swing/JScrollPane(Ljava/awt/Component;)V

       java/lang/System outLjava/io/PrintStream;"#   !$+I'm a new instance of the TextEditorPlugin!&java/io/PrintStream(println(Ljava/lang/String;)V*+
),LineNumberTableLocalVariableTablethis/Lsrc/plugins/textEditorPlugin/TextEditorPlugin;init(Lsrc/gui/GuiInterface;)V    4src/gui/GuiInterface6setPluginPanel(Ljavax/swing/JPanel;)V897:javax/swing/JComponent<
setVisible(Z)V>?
=@java/awt/BorderLayoutB
Cjava/awt/ContainerE  setLayout(Ljava/awt/LayoutManager;)VGH
FICenterKadd)(Ljava/awt/Component;Ljava/lang/Object;)VMN
FOTextEditorPlugin initializedQstart.(Lorg/w3c/dom/Element;Lorg/w3c/dom/Document;)Vjava/lang/ObjectUtoString()Ljava/lang/String;WX
VYappend[+
\elementLorg/w3c/dom/Element;environmentLorg/w3c/dom/Document;stopsetOurEventListener!(Lsrc/control/OurEventListener;)V        
        enewListenerforceStatusReportfirePluginChangedElement-(Lorg/w3c/dom/Element;Lorg/w3c/dom/Element;)Vsrc/control/OurEventk([Ljava/lang/Object;)Vm
lnsrc/control/OurEventListenerp
firedOurEvent(Lsrc/control/OurEvent;)VrsqtoldNodechangedElementeLsrc/control/OurEvent;
SourceFileTextEditorPlugin.java!       

a'*·*»Y·µ*»Y*´·µ²%'¶-±."#&$/'0123{/*+µ5+*¹;*¶A*»CY·D¶J**´L¶P²%R¶-±.,-./0&3.4//01/STW*´+¶Z¶]*¶A±.OQR/ 01^_`ab4*¶A±.
Z[/01cd>*+µf±.
cd/01g
h+±.p/01ijo»lY½VY+SY,S·oN*´f-¹u±.uvw/*01v_w_xyz{PK
áTë.‰MjÅ›
›
2src/plugins/textEditorPlugin/TextEditorPlugin.java/*
* software practice
* ss_2003
* group project: XML-Editor
* $Id: TextEditorPlugin.java,v 1.5 2003/07/10 16:04:53 cstollen Exp $
*/

package src.plugins.textEditorPlugin;

import java.awt.BorderLayout;
import javax.swing.*;

import org.w3c.dom.Document;
import org.w3c.dom.Element;

import src.control.OurEvent;
import src.control.OurEventListener;
import src.gui.*;
import src.plugins.PluginInterface;


/** The Text Editor Plugin is used for textual XML node editing
 * @author Christian Stollenwerk
 */
public class TextEditorPlugin extends JPanel
                                                          implements PluginInterface {
        
        private GuiInterface gui;
        private OurEventListener ourEventListener;
        private JTextArea textArea = new JTextArea();
        private JScrollPane scrollPane = new JScrollPane(textArea);


        public TextEditorPlugin() {
                System.out.println("I'm a new instance of the TextEditorPlugin!");
        }
        

        /** initializes the Text Editor Plugin, but does not show it
         * @see src.gui.PluginInterface#init(src.gui.GuiInterface)
         */
        public void init(GuiInterface gui) {
                // connects the Plugin to the GUI
                this.gui = gui;
                gui.setPluginPanel(this);
                setVisible(false);
                setLayout(new BorderLayout());
                add(scrollPane, BorderLayout.CENTER);
                // only for testing
                //start(null, null);
                System.out.println("TextEditorPlugin initialized");
        }


        /** starts the Text Editor Plugin if a registered node is choosen
         * 
         * @param element the selected node from the XML document, read-only
         * @param environment the whole XML document, read-only
         * 
         * @see src.gui.PluginInterface#start(org.w3c.dom.Element, org.w3c.dom.Document)
         */
        public void start(final Element element, final Document environment) {
                // testing output
                /*String elem = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" +
                      "<SCENESTATE>\n<VIEW>\n" +
                     "<!-- Dies ist ein Kommentar -->\n" +
                  "<IMAGE name=\"image1\" url =\"image1.jpg\">\n" +
                      "</IMAGE>\n<REGIONSET image=\"image1\">\n" +
                   "<RECT x=\"10\" y=\"20\" b=\"50\" h=\"70\">\nTasse\n" +
                        "</RECT>\n" +
                  "<RECT x=\"50\" y=\"10\" b=\"10\" h=\"5\">\n" +
                        "Tastatur\n" +
                 "</RECT>\n" +
                  "</REGIONSET>\n" +
                     "<PHOTO label=\"schoenes bild\" url=\"image1.jpg\">\n" +
                       "</PHOTO>\n" +
                 "</VIEW>\n" +
                  "</SCENESTATE>";*/
                textArea.append(element.toString());
                //textArea.append(elem);
                setVisible(true);
        }


        /** stop showing the Text Editor Plugin
         * 
         * @see src.gui.PluginInterface#stop()
         */
        public void stop() {
                setVisible(false);
        }


        //added 11/07/03 Sascha W.; own events are available now
        /* (non-Javadoc)
         * @see src.gui.PluginInterface#setOurEventListener(src.control.OurEventListener)
         */
        public void setOurEventListener(OurEventListener newListener) {
                ourEventListener = newListener;
        }


        /**
         * forces the Text Editor Plugin to return the actual status as a node
         * not well-formed parts have to be capsuled into a prosessing instruction
         * 
         * @see src.gui.PluginInterface#forceStatusReport()
         */
        public void forceStatusReport() {
                //added 11/07/03 Sascha W.; own events are available now
                //firePluginChangedElement(originalElement, originalElement);
        }
        
        
        //added 11/07/03 Sascha W.; own events are available now
        private void firePluginChangedElement(Element oldNode, Element changedElement) {
                OurEvent e = new OurEvent(new Object[] {oldNode, changedElement});
                ourEventListener.firedOurEvent(e);
        }

}PK
‘]ç.3$á£ææ=src/plugins/textEditorPlugin/TextEditorPluginManifestAdditionXMLEditor-Plugin-Name: TextEditor
Comment: view everything as text, best as default plugin
Description: ...(todo)
Main-Class: src.plugins.textEditorPlugin.TextEditorPlugin
Class-Path: 
Transform-To-File: src/plugins/textEditorPlugin/TextEditorPluginTransform.xsl
Transform-Fro-File: src/plugins/textEditorPlugin/TextEditorPluginTransformBack.xsl

Name: src/plugins/textEditorPlugin
Specification-Title: plugin for XMLEditor
Specification-Version: 0.4 (05/07/03)
Specification-Vendor: group5, software practice SS_2003, University Bielefeld, Germany
Implementation-Title: src.plugins.textEditorPlugin
Implementation-Version: 0.1 (05/07/03)
Implementation-Vendor: group5, software practice SS_2003, University Bielefeld, Germany
PK
’]ç.´C›'YY:src/plugins/textEditorPlugin/TextEditorPluginTransform.xsl<!-- status: testing for TextEditor plugin -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />

<!-- simply copy the whole document -->
<xsl:template match="/"><!-- element-plugin association -->
        <xsl:copy-of select="node()" />
</xsl:template>

</xsl:stylesheet>PK
‘]ç.´C›'YY>src/plugins/textEditorPlugin/TextEditorPluginTransformBack.xsl<!-- status: testing for TextEditor plugin -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />

<!-- simply copy the whole document -->
<xsl:template match="/"><!-- element-plugin association -->
        <xsl:copy-of select="node()" />
</xsl:template>

</xsl:stylesheet>PK

wVë.  META-INF/þÊPK

wVë.~ƒkk66+META-INF/MANIFEST.MFPK

Y<ë.!“src/plugins/textEditorPlugin/CVS/PK

âTë.A"˜¦      ¦    3Òsrc/plugins/textEditorPlugin/TextEditorPlugin.classPK

áTë.‰MjÅ›
›
2É
src/plugins/textEditorPlugin/TextEditorPlugin.javaPK

‘]ç.3$á£ææ=´src/plugins/textEditorPlugin/TextEditorPluginManifestAdditionPK

’]ç.´C›'YY:õsrc/plugins/textEditorPlugin/TextEditorPluginTransform.xslPK

‘]ç.´C›'YY>¦ src/plugins/textEditorPlugin/TextEditorPluginTransformBack.xslPKÌ["