Subversion Repositories general

Rev

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

PK
ëtñ. META-INF/þÊPK
ëtñ.
×Z6META-INF/MANIFEST.MFManifest-Version: 1.0
Comment: you can view images with this plugin
Transform-To-File: src/plugins/imagePlugin/ImagePluginTransform.xsl
Created-By: 1.4.0 (Sun Microsystems Inc.)
Description: ...(todo)
XMLEditor-Plugin-Name: ImageViewer
Class-Path: 
Transform-Fro-File: src/plugins/imagePlugin/ImagePluginTransformBack.x
 sl
Main-Class: src.plugins.imagePlugin.ImagePlugin

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

PK
Òrñ.™ùP(src/plugins/imagePlugin/ImagePanel.classÊþº¾-a"src/plugins/imagePlugin/ImagePaneljavax/swing/JPaneldxIdy
imageWidthimageHeightimageLjava/awt/Image;<init>()VCode(Z)V
LineNumberTableLocalVariableTablethis$Lsrc/plugins/imagePlugin/ImagePanel;paintComponent(Ljava/awt/Graphics;)Vjavax/swing/JComponentgetWidth()I
  getHeight
java/awt/Component!
getBackground()Ljava/awt/Color;#$
"%java/awt/Graphics'setColor(Ljava/awt/Color;)V)*
(+fillRect(IIII)V-.
(/
      1java/awt/Image3!(Ljava/awt/image/ImageObserver;)I5
465
48java/lang/Math:max(DD)D<=
;>       @       B       D        F  drawImage5(Ljava/awt/Image;IIIILjava/awt/image/ImageObserver;)ZHI
(JgLjava/awt/Graphics;whiwihkxDkyksetImage(Ljava/awt/Image;)VrepaintX
"YgetDxgetDy
getImageWidthgetImageHeight
SourceFileImagePanel.java        

4*·±
*+`ž*¶=*¶ >+*¶&¶,+¶0*´2Æ*´2¶76*´2¶96‡‡o9‡‡o9¸?9

—›‡
oŽ6‡
oŽ6*dlµA*dlµC*µE*µG+*´2*´A*´C¶KW±N01
346!8+95:=;E<N>U?^@gCqD{EF‡HJ\    žžLM™N
”O+rP5hQ=`RSEXTSNOUS
VWF
*+µ2*¶Z±OP      Q


[/*´A¬V\/*´C¬\]/*´E¬b^/*´G¬h_`PK
êð.îõ–[['src/plugins/imagePlugin/ImagePanel.java/* 
 * This file contains the ImagePanel class.
 * 
 * Coded by: Group 5, software practice summer 2003
 * University of Bielefeld, Germany
 * 
 * @version $Revision: 1.6 $
 *
 * Last modification: $Date: 2003/07/15 22:23:20 $
 * $Id: ImagePanel.java,v 1.6 2003/07/15 22:23:20 ioklasse Exp $
 */
 
package src.plugins.imagePlugin;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.JPanel;

/**
 *  Image panel shows any images.
 *
 *  @author Yulia Klassen, Viktoriya Zudova
 */
class ImagePanel extends JPanel
{
        /** dx-shift of image according to the left top corner of plugin panel */
        private int dx;
        /** dy-shift of image according to the left top corner of plugin panel */
        private int dy;
        /** width of the image */
        private int imageWidth;
        /** height of the image */
        private int imageHeight;

        /** current image */
        public Image image;

        /** constructor invokes JPanel to create all elements for options dialog */
        public ImagePanel()
        {
                super(true);
        }

        /** draws the image */
        public void paintComponent(Graphics g)
        {
                int w  = getWidth();
                int h  = getHeight();

                g.setColor(getBackground());
                g.fillRect(0, 0, w, h);

                if(image != null)
                {
                        int iw = image.getWidth(null);
                        int ih = image.getHeight(null);
                        double kx = (double)iw/w;
                        double ky = (double)ih/h;
                        double k = Math.max(kx, ky);

                        if(k >= 1) {
                          iw = (int)(iw/k);
                          ih = (int)(ih/k);
                        }

                        dx = (w-iw)/2;
                        dy = (h-ih)/2;
                        imageWidth = iw;
                        imageHeight = ih;

                        g.drawImage(image, dx, dy, iw, ih, null);
                }
        }

        /** sets the image */
        public void setImage(Image image)
        {
                this.image = image;
                repaint();
        }

        /** returns dx-shift of image according to the left top corner of plugin panel */
        public int getDx()
        {
                return dx;
        }

        /** returns dy-shift of image according to the left top corner of plugin panel */
        public int getDy()
        {
                return dy;
        }

        /** returns width of the image */
        public int getImageWidth()
        {
                return imageWidth;
        }

        /**  returns height of the image */
        public int getImageHeight()
        {
                return imageHeight;
        }
}PK
ãtñ.Ø•Ñ
ÉÉ)src/plugins/imagePlugin/ImagePlugin.classÊþº¾-¦#src/plugins/imagePlugin/ImagePluginjavax/swing/JPanelsrc/plugins/PluginInterfacejava/awt/event/ActionListener"java/awt/event/MouseMotionListener      java/awt/event/MouseListener
pluginNameLjava/lang/String;
ConstantValueImageViewerimageLjava/awt/Image;imageNameFieldLjavax/swing/JTextField;nameChangeButtonLjavax/swing/JButton;imageFileLabelLjavax/swing/JLabel;fileChooserLjavax/swing/JFileChooser;openFileButton
imagePanel$Lsrc/plugins/imagePlugin/ImagePanel;guiLsrc/gui/GuiInterface;ourEventListenerLsrc/control/OurEventListener;
imageNameNodeLorg/w3c/dom/Node;
imageFileNodecurrentFileLjava/io/File;<init>()VCode()
+
       -javax/swing/JTextField/
0+       2javax/swing/JButton4Change6(Ljava/lang/String;)V(8
59       ;javax/swing/JLabel=
>+       @javax/swing/JFileChooserB
C+       EOpen...G  I"src/plugins/imagePlugin/ImagePanelK
L+       Njava/awt/BorderLayoutP
Q+java/awt/ContainerS  setLayout(Ljava/awt/LayoutManager;)VUV
TWjava/awt/ComponentYaddMouseListener!(Ljava/awt/event/MouseListener;)V[\
Z]addMouseMotionListener'(Ljava/awt/event/MouseMotionListener;)V_`
Zaadd*(Ljava/awt/Component;)Ljava/awt/Component;cd
TeEastg)(Ljava/awt/Component;Ljava/lang/Object;)Vci
Tjjava/awt/Dimensionl(II)V(n
mojavax/swing/JComponentqsetPreferredSize(Ljava/awt/Dimension;)Vst
ruNorthwjavax/swing/AbstractButtonyaddActionListener"(Ljava/awt/event/ActionListener;)V{|
z}
setVisible(Z)V€
rLineNumberTableLocalVariableTablethis%Lsrc/plugins/imagePlugin/ImagePlugin;   leftPanelLjavax/swing/JPanel;
rightPaneltopPanelinit(Lsrc/gui/GuiInterface;)V    start+(Lorg/w3c/dom/Node;Lorg/w3c/dom/Document;)Vsrc/gui/GuiInterface‘getStatusInterface()Lsrc/gui/StatusInterface;“”’•src/gui/StatusInterface—setIcon(I)V™š˜›
setMessage8˜žsetPoint(Ljava/awt/Point;)V ¡˜¢¤java/lang/System¦outLjava/io/PrintStream;¨©       §ªnew node is "null"¬java/io/PrintStream®println°8
¯±
new node: ³java/lang/StringBufferµname: ·
¶9org/w3c/dom/NodeºgetNodeName()Ljava/lang/String;¼½»¾append,(Ljava/lang/String;)Ljava/lang/StringBuffer;ÀÁ
¶ÂtoStringĽ
¶ÅprintÇ8
¯È; attributes: Ê
getAttributes()Lorg/w3c/dom/NamedNodeMap;ÌͻΠ"Ðorg/w3c/dom/NamedNodeMapÒitem(I)Lorg/w3c/dom/Node;ÔÕÓÖ"=ØgetNodeValueÚ½»Û   getLength()IÝÞÓß°)
¯áhas element attributes: ã
hasAttributes()Zåæ»ç(Z)Ljava/lang/StringBuffer;Àé
¶ênameìgetNamedItem&(Ljava/lang/String;)Lorg/w3c/dom/Node;îïÓðurlò
fileName: ôjavax/swing/text/JTextComponentösetTextø8
÷ù        loadImageû8
üsetPluginPanel(Ljavax/swing/JPanel;)Vþÿ’elementenvironmentLorg/w3c/dom/Document;       imageNamefileNamelLorg/w3c/dom/NamedNodeMap;iIelementAttrstopsetOurEventListener!(Lsrc/control/OurEventListener;)V!"       newListenerforceStatusReportfirePluginChangedElement-(Lorg/w3c/dom/Element;Lorg/w3c/dom/Element;)Vsrc/control/OurEventjava/lang/Object([Ljava/lang/Object;)V(
src/control/OurEventListener
firedOurEvent(Lsrc/control/OurEvent;)V oldNodeLorg/w3c/dom/Element;changedElementeLsrc/control/OurEvent;&'       '       )No image+getCurrentFile()Ljava/io/File;-.’/java/io/File1
29
getParentFile4.
25getPath7½
28#(Ljava/io/File;Ljava/lang/String;)V(:
2;javax/imageio/ImageIO=read.(Ljava/io/File;)Ljava/awt/image/BufferedImage;?@
>AShow image from CgetLogInterface()Lsrc/gui/LogInterface;EF’GCannot open file Isrc/gui/LogInterfaceKlog(ILjava/lang/String;)VMNLO
>ùsetImage(Ljava/awt/Image;)VRS
LTjava/io/IOExceptionVdocexLjava/io/IOException;actionPerformed(Ljava/awt/event/ActionEvent;)Vjava/util/EventObject]       getSource()Ljava/lang/Object;_`
^a#$       cgetTexte½
÷fsetNodeValueh8»isetSelectedFile(Ljava/io/File;)Vkl
Cm
getMainWindow()Ljava/awt/Frame;op’qshowOpenDialog(Ljava/awt/Component;)Ist
CugetSelectedFilew.
Cx%$       zLjava/awt/event/ActionEvent;mouseDragged(Ljava/awt/event/MouseEvent;)Vjava/awt/event/MouseEventgetXÞ
€‚getY„Þ
€…      showMouse‡n
ˆLjava/awt/event/MouseEvent;
mouseMovedgetDxŒÞ
LgetDyÞ
L
getImageWidth’Þ
L“getImageHeight•Þ
L–java/awt/Point˜
™omouseXmouseYxymouseClickedmousePressed
mouseReleasedmouseEnteredmouseExited
SourceFileImagePlugin.java!


 !"#$%$&'()*É
*·,*µ.*»0Y·1µ3*»5Y7·:µ<*»>Y·?µA*»CY·DµF*»5YH·:µJ*»LY·MµO*»QY·R¶X*´O*¶^*´O*¶b»Y·,L+»QY·R¶X+*´3¶fW+*´<h¶k»Y·,M,»mYð·p¶v,»QY·R¶X,*´A¶fW,*´Jh¶k»Y·,N-»QY·R¶X-+¶fW-,h¶k*-x¶k**´O¶fW*´<*¶~*´J*¶~*¶‚±ƒzg?
EH"K-N8QETPk[lcmkqsr~s‡t‘x™y©z´{½|Çπځà‚ç„î…÷‡ÿˆŠ‹„*
…†sš‡ˆ™t‰ˆÏ>Šˆ‹Œ*>*+µŽ±ƒ
”•„…† *&F*´Ž¹–¹œ*´Ž¹–¹Ÿ*´Ž¹–¹£¥N¥:+Dz«­¶²§è²«´¶²²«»¶Y¸·¹+¹¿¶Ã¶Æ¶É²«˶É+¹Ï:ÆQ6§?²«»¶YÑ·¹¹×¹¿¶Ãٶù׹ܶöƶɄ¹à¡ÿ»²«¶â²«»¶Yä·¹+¹è¶ë¶Æ¶²+¹Ï:í¹ñ¹ÜNó¹ñ¹Ü:²«»¶Yõ·¹¶Ã¶Æ¶²*´3-¶ú*·ý*´Ž*¹*¶‚±ƒvŸ ¡-¤0¥4¦8§CªK«f¬n­v®{¯°„°ž±´°º¯É´Ï·ê¸ò¹º»(¾0¿6Â@ÃEĄRF…†F$F04v²~K   
ò6)*m3*¶‚*´Ž¹–¹œ*´Ž¹–¹Ÿ*´Ž¹–¹£±ƒËÌÍ#Î2Ï„3…†
*>*+µ±ƒ
ÙÚ„…†")*+±ƒæ„…†*t$»Y½Y+SY,SYS·N*´-¹!±ƒëì#í„*$…†$"#$$#%&û8*®
*µ(+Ç+*µ**´Ž¹–¹œ*´Ž¹–,¹Ÿ§È*´Ž¹0M,Ç*»2Y+·3µ(§ ²«,¶6¶9¶²*»2Y,¶6+·<µ(**´(¸Bµ**´Ž¹–¹œ*´Ž¹–»¶YD·¹+¶Ã¶Æ¹Ÿ§RM*´Ž¹H»¶YJ·¹+¶Ã¶Æ¹P*´Ž¹–¹œ*´Ž¹–»¶YJ·¹+¶Ã¶Æ¹Ÿ*´A+¶Q*´O*´*¶U±1§§WƒZùü     ýþÿ1;?N    [
k
v…§¨±ÃÈ×öþ „*
…†
;lX'¨NYZ[\*Éq+¶b*´<¦*´dÆ*´d*´3¶g¹j+¶b*´J¦F*´F*´(¶n*´F*´Ž¹r¶vš(**´F¶y¶9·ý*´{Æ*´{*´(¶9¹j±ƒ*
$%&"*-+8-K0Y2`3p7„q…†q%|}~*[+¶b*´O¦*´*Æ*+¶ƒ+¶†¶‰±ƒABD„…†%Š‹~*[+¶b*´O¦*´*Æ*+¶ƒ+¶†¶‰±ƒMNP„…†%Š‡n*Ê`*´O¶Žd>*´O¶‘d6››*´O¶”£*´O¶—¤*´Ž¹–¹£§*´Ž¹–»™Y·š¹£±ƒY
Z\)]5_Gb_d„4`…†`›
`œ

V
Kž
Ÿ~*5±ƒm„…†%Š ~*5±ƒv„…†%Š¡~*5±ƒ„…†%Š¢~*5±ƒˆ„…†%Š£~*W+¶b*´O¦*´Ž¹–¹£±ƒ‘’”„…†%Š¤¥PK
âtñ.WéD ð)ð)(src/plugins/imagePlugin/ImagePlugin.java/* 
 * This file contains the ImagePlugin class.
 * 
 * Coded by: Group 5, software practice summer 2003
 * University of Bielefeld, Germany
 * 
 * @version $Revision: 1.16 $
 *
 * Last modification: $Date: 2003/07/16 16:07:06 $
 * $Id: ImagePlugin.java,v 1.16 2003/07/16 16:07:06 swalkenh Exp $
 */

package src.plugins.imagePlugin;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Image;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.Point;

import java.io.File;
import java.io.IOException;

//import org.apache.xpath.XPathAPI;

//modified 10.07.03 Sascha W. cause of new PluginInterface
//import java.util.Map;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;

import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

//import javax.xml.transform.TransformerException;

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


/**
 * Image plugin shows any images.
 *
 * @author Yulia Klassen, Viktoriya Zudova
 */
public class ImagePlugin extends JPanel
  implements PluginInterface, ActionListener,
  MouseMotionListener, MouseListener
{
  //added 16.07.03 Sascha W. cause method "firedOurEvent" has changed
  /** Name of the plugin, used in method <code>firePluginChangedElement</code> */
  final private String pluginName = "ImageViewer";
        
  /* The current image. */
  private Image image;
  
  /* A text field to enter the name of an image. */
  private JTextField imageNameField = new JTextField();
  
  /* A button "Change" to change the name of an image. */
  private JButton nameChangeButton = new JButton("Change");
 
  /* A label to show the name of the current image file. */
  private JLabel imageFileLabel = new JLabel();
 
  /* A file chooser to choose an image file. */
  private JFileChooser fileChooser = new JFileChooser();
  
  /* A button "Open..." to change images. */
  private JButton openFileButton = new JButton("Open...");
  
  /* An image panel to show an image in. */
  private ImagePanel imagePanel = new ImagePanel();
  
  /* Stores a reference to the GUI. */
  private GuiInterface gui;
  
  //added 11/07/03 Sascha W.; own events are available now
  /* Stores a reference to the event listener. */
  private OurEventListener ourEventListener;

  /* Stores a reference to the node where the image's name is stored. */
  private Node imageNameNode;
  
  /* Stores a reference to the node where image's file name is stored. */
  private Node imageFileNode;
  
  /* The current file. */
  private File currentFile;

  /** The class constructor creates all elements for the image plugin. */
  public ImagePlugin()
  {
    
        // sets new layout
        setLayout(new BorderLayout());
        imagePanel.addMouseListener(this);
        imagePanel.addMouseMotionListener(this);

        // left panel: text field to enter name of image,
        //             change button to change image name
        JPanel leftPanel = new JPanel();
        leftPanel.setLayout(new BorderLayout());
        leftPanel.add(imageNameField);
        leftPanel.add(nameChangeButton, BorderLayout.EAST);

        // right panel: label to show name of image file,
        //              open button to change images
        JPanel rightPanel = new JPanel();
        rightPanel.setPreferredSize(new Dimension(240, 24));
        rightPanel.setLayout(new BorderLayout());
        rightPanel.add(imageFileLabel);
        rightPanel.add(openFileButton, BorderLayout.EAST);

        // top panel contains left and right panels
        JPanel topPanel = new JPanel();
        topPanel.setLayout(new BorderLayout());
        topPanel.add(leftPanel);
        topPanel.add(rightPanel, BorderLayout.EAST);

        add(topPanel, BorderLayout.NORTH);
        add(imagePanel);

        nameChangeButton.addActionListener(this);
        openFileButton.addActionListener(this);

        setVisible(false);
  }

  /**
   * Initializes the plugin.
   * 
   * @param gui: A reference to the GUI object.
   */  
  public void init(GuiInterface gui) {
        
        this.gui = gui;
  }

  /**
   * Starts the plugin
   * 
   * @param element        the element that user has chosen
   * @param environment    the current document   
   */
  public void start(Node element, Document environment)
  {
        gui.getStatusInterface().setIcon(StatusInterface.ICON_NONE);
        gui.getStatusInterface().setMessage(null);
        gui.getStatusInterface().setPoint(null);

        //for testing
        String imageName = "";
        String fileName = "";
        if (element == null) {
                System.out.println("new node is \"null\"");
        }
        else {
                System.out.println("new node: ");
                System.out.print("name: " + element.getNodeName());
                System.out.print("; attributes: ");
                NamedNodeMap l = element.getAttributes();
                if (l != null) {
                        for (int i = 0; i < l.getLength(); i++) {
                                System.out.print(" \"" + l.item(i).getNodeName() 
                                                                + "\"=" + l.item(i).getNodeValue());
                        }
                }
                System.out.println();

                //added and modified 14.07.03 Sascha W. during testing of transformations
                System.out.println("has element attributes: " + element.hasAttributes());
                NamedNodeMap elementAttr = element.getAttributes();
                imageName = elementAttr.getNamedItem("name").getNodeValue();  //findImageName(element);
                fileName = elementAttr.getNamedItem("url").getNodeValue();  //findFileName(element);
                System.out.println("fileName: " + fileName);
        }
        
        imageNameField.setText(imageName);
        loadImage(fileName);

        //added  15.07.03 Sascha W. was nonsene in method "init"
        gui.setPluginPanel(this);
        setVisible(true);
  }

  /**
   * Stops the plugin.
   */
  public void stop()
  {
        setVisible(false);
        gui.getStatusInterface().setIcon(StatusInterface.ICON_NONE);
        gui.getStatusInterface().setMessage(null);
        gui.getStatusInterface().setPoint(null);
  }

//====================================================================================
//old removed 10.07.03 Sascha W. cause of new PluginInterface

  //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;
  }


  //added 11/07/03 Sascha W.; own events are available now
  /**
   * Forces the text editor plugin to return the actual status as a node, 'cause
   * not well-formed parts have to be capsuled into a prosessing instruction.
   * 
   * @see src.gui.PluginInterface#forceStatusReport()
   */
  public void forceStatusReport() {
          //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, pluginName});
          ourEventListener.firedOurEvent(e);
  }

//====================================================================================

  /**
   *  loads image
   * 
   *  @param fileName    the file name that must be shown  
   */
  private void loadImage(String fileName)
  {
        //      file is absent
        currentFile = null;

        // file name is absent: status panel - "No image"
        if(fileName == null) {
          image = null;
          gui.getStatusInterface().setIcon(StatusInterface.ICON_WARNING);
          gui.getStatusInterface().setMessage("No image");
        }
        // get the current file from the directory where the doc is
        else {
          try {
                File doc = gui.getCurrentFile();

                if(doc == null)
                  currentFile = new File(fileName);
                else {
                        System.out.println(doc.getParentFile().getPath());
                    currentFile = new File(doc.getParentFile(), fileName);
                }

                image = javax.imageio.ImageIO.read(currentFile);
                gui.getStatusInterface().setIcon(StatusInterface.ICON_INFORMATION);
                gui.getStatusInterface().setMessage("Show image from " + fileName);
          }
          catch(IOException ex) {
                gui.getLogInterface().log(
                  LogInterface.TYPE_ERROR, "Cannot open file " + fileName);
                gui.getStatusInterface().setIcon(StatusInterface.ICON_ERROR);
                gui.getStatusInterface().setMessage("Cannot open file " + fileName);
          }
        }

        imageFileLabel.setText(fileName);
        imagePanel.setImage(image);
  }

  /**
   *  reaction of all buttons
   * 
   *  @param e      ..................    
   */
  public void actionPerformed(ActionEvent e)
  {
        if(e.getSource() == nameChangeButton) {
          if(imageNameNode != null) {
                imageNameNode.setNodeValue(imageNameField.getText());
          }
        }

        if(e.getSource() == openFileButton) {
          fileChooser.setSelectedFile(currentFile);

          if(fileChooser.showOpenDialog(gui.getMainWindow())
                == JFileChooser.APPROVE_OPTION)
          {
                loadImage(fileChooser.getSelectedFile().getPath());

                if(imageFileNode != null) {
                  imageFileNode.setNodeValue(currentFile.getPath());
                }
          }
        }
  }


  /**
   * invoked when a mouse button is pressed on a component 
   * 
   * @param e  ..................
   */
  public void mouseDragged(MouseEvent e)
  {
        if(e.getSource() == imagePanel && image != null) {
          showMouse(e.getX(), e.getY());
        }
  }

  /**
   * invoked when the mouse button has been moved on a component (with no buttons no down)
   * 
   * @param e .................
   */
  public void mouseMoved(MouseEvent e)
  {
        if(e.getSource() == imagePanel && image != null) {
          showMouse(e.getX(), e.getY());
        }
  }

  /** 
   * invoked when ........
   * 
   * @param e  ....................
   */
  public void showMouse(int mouseX, int mouseY)
  {
        int x = mouseX - imagePanel.getDx();
        int y = mouseY - imagePanel.getDy();

        if(x < 0 || y < 0 || x > imagePanel.getImageWidth()
          || y > imagePanel.getImageHeight())
        {
          gui.getStatusInterface().setPoint(null);
        }
        else {
          gui.getStatusInterface().setPoint(new Point(x, y));
        }
  }

  /**
   * invoked when the mouse has been clicked on a component
   * 
   * @param e  .....................
   */
  public void mouseClicked(MouseEvent e)
  {
  }

  /**
   * invoked when a mouse button has been pressed on a Component
   * 
   * @param e  ..............
   */
  public void mousePressed(MouseEvent e)
  {
  }

  /**
   * invoked when a mouse button has been released on a component
   * 
   * @param e  ......................
   */
  public void mouseReleased(MouseEvent e)
  {
  }

  /**
   * invoked when the mouse enters a component
   * 
   * @param e ...............
   */
  public void mouseEntered(MouseEvent e)
  {
  }

  /**
   * invoked when the mouse exits a component
   * 
   * @param e ................
   */
  public void mouseExited(MouseEvent e)
  {
        if(e.getSource() == imagePanel) {
          gui.getStatusInterface().setPoint(null);
        }
  }

}PK
lsñ.úàQMM0src/plugins/imagePlugin/ImagePluginTransform.xsl<!-- to-direction - status: ready for pictureviewer
     updated to given schema from 15/07/2003 
     Last Revision: 17/07/2003 by Sascha Walkenhorst -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />


<xsl:template match="/">
        <xsl:apply-templates />
</xsl:template>


<xsl:template match="PHOTO"><!-- element-plugin association -->
        <xsl:element name="IMAGE">
                <!-- work on attributes and childs -->
                <xsl:attribute name="name">
                        <xsl:value-of select="@label" />
                </xsl:attribute>
                <xsl:attribute name="url">
                        <xsl:value-of select="@uri" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('label'))">
                        <xsl:if test = "not(name(.) = ('uri'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="Bild"><!-- element-plugin association -->
        <xsl:element name="IMAGE">
                <!-- work on attributes and childs -->
                <xsl:attribute name="name">
                        <xsl:value-of select="@Name" />
                </xsl:attribute>
                <xsl:attribute name="url">
                        <xsl:value-of select="@Pfad" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('Name'))">
                        <xsl:if test = "not(name(.) = ('Pfad'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="Picture"><!-- element-plugin association -->
        <xsl:element name="IMAGE">
                <!-- work on attributes and childs -->
                <xsl:attribute name="name">
                        <xsl:value-of select="@Name" />
                </xsl:attribute>
                <xsl:attribute name="url">
                        <xsl:value-of select="@Path" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('Name'))">
                        <xsl:if test = "not(name(.) = ('Path'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="IMAGE"><!-- element-plugin association -->
        <xsl:element name="IMAGE">
                <!-- work on attributes and childs -->
                <xsl:attribute name="name">
                        <xsl:value-of select="@label" />
                </xsl:attribute>
                <xsl:attribute name="url">
                        <xsl:value-of select="@uri" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('label'))">
                        <xsl:if test = "not(name(.) = ('uri'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>


</xsl:stylesheet>PK
hsñ.cotÀÀ4src/plugins/imagePlugin/ImagePluginTransformBack.xsl<!-- back-direction - status: ready for pictureviewer
     updated to given schema from 15/07/2003 
     Last Revision: 17/07/2003 by Sascha Walkenhorst -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />


<xsl:template match="/">
        <xsl:apply-templates />
</xsl:template>


<xsl:template match="PHOTO">
        <xsl:element name="PHOTO">
                <!-- work on attributes and childs -->
                <xsl:attribute name="label">
                        <xsl:value-of select="@name" />
                </xsl:attribute>
                <xsl:attribute name="uri">
                        <xsl:value-of select="@url" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('name'))">
                        <xsl:if test = "not(name(.) = ('url'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="Bild">
        <xsl:element name="Bild">
                <!-- work on attributes and childs -->
                <xsl:attribute name="Name">
                        <xsl:value-of select="@name" />
                </xsl:attribute>
                <xsl:attribute name="Pfad">
                        <xsl:value-of select="@url" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('name'))">
                        <xsl:if test = "not(name(.) = ('url'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="Picture">
        <xsl:element name="Picture">
                <!-- work on attributes and childs -->
                <xsl:attribute name="Name">
                        <xsl:value-of select="@name" />
                </xsl:attribute>
                <xsl:attribute name="Path">
                        <xsl:value-of select="@url" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('name'))">
                        <xsl:if test = "not(name(.) = ('url'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>

<xsl:template match="IMAGE">
        <xsl:element name="IMAGE">
                <!-- work on attributes and childs -->
                <xsl:attribute name="label">
                        <xsl:value-of select="@name" />
                </xsl:attribute>
                <xsl:attribute name="uri">
                        <xsl:value-of select="@url" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('name'))">
                        <xsl:if test = "not(name(.) = ('url'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if></xsl:if>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:copy-of select="self::node()" />
                </xsl:for-each>
        </xsl:element>
</xsl:template>


</xsl:stylesheet>PK

ëtñ. META-INF/þÊPK

ëtñ.
×Z6+META-INF/MANIFEST.MFPK

Òrñ.™ùP(^src/plugins/imagePlugin/ImagePanel.classPK

êð.îõ–[['¾
src/plugins/imagePlugin/ImagePanel.javaPK

ãtñ.Ø•Ñ
ÉÉ)^src/plugins/imagePlugin/ImagePlugin.classPK

âtñ.WéD ð)ð)(n3src/plugins/imagePlugin/ImagePlugin.javaPK

lsñ.úàQMM0¤]src/plugins/imagePlugin/ImagePluginTransform.xslPK

hsñ.cotÀÀ4?jsrc/plugins/imagePlugin/ImagePluginTransformBack.xslPK•Qv