Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 763 → Rev 764

/sun/xmleditor/trunk/src/plugins/regionEditorPlugin/RegionEditorPlugin.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.25 $
* @version $Revision: 1.26 $
*
* Last modification: $Date: 2003/07/23 18:32:04 $
* $Id: RegionEditorPlugin.java,v 1.25 2003/07/23 18:32:04 cstollen Exp $
* Last modification: $Date: 2003/07/23 20:09:50 $
* $Id: RegionEditorPlugin.java,v 1.26 2003/07/23 20:09:50 ioklasse Exp $
*/
 
package src.plugins.regionEditorPlugin;
60,7 → 60,7
*
* @author Yulia Klassen, Viktoriya Zudova
*
* @version $Revision: 1.25 $ Last modification: $Date: 2003/07/23 18:32:04 $
* @version $Revision: 1.26 $ Last modification: $Date: 2003/07/23 20:09:50 $
*/
public class RegionEditorPlugin
extends JPanel
69,76 → 69,76
/** Name of the plugin, used in method <code>firePluginChangedElement</code> */
final private String pluginName = "RegionEditor";
 
/* The current image. */
/** The current image. */
private Image image;
/* Label where the name of image is. */
/** Label where the name of image is. */
private JLabel imageNameLabel = new JLabel(" Image Name ");
 
/* A text field to enter the name of an image. */
/** A text field to enter the name of an image. */
private JTextField imageNameField = new JTextField();
 
/* A button "Confirm" to change the image name in the node. */
/** A button "Confirm" to change the image name in the node. */
private JButton confirmButton = new JButton("Confirm");
 
/* Label where the name of region is. */
/** Label where the name of region is. */
private JLabel regionNameLabel = new JLabel(" Region Name ");
 
/* A text field to enter the name of region. */
/** A text field to enter the name of region. */
private JTextField regionNameField = new JTextField();
 
/* A button "Confirm" to change the region name. */
/** A button "Confirm" to change the region name. */
private JButton regionConfirmButton = new JButton("Confirm");
 
/* An image panel to show an image in. */
/** An image panel to show an image in. */
private ImagePanel imagePanel;
 
/* Stores a reference to the GUI. */
/** Stores a reference to the GUI. */
private GuiInterface gui;
 
/* Stores a reference to the event listener. */
/** Stores a reference to the event listener. */
private OurEventListener ourEventListener;
 
/* The image's name from the attributes of the selected node. */
/** The image's name from the attributes of the selected node. */
private String imageName;
 
/* The location of the image. */
/** The location of the image. */
private String imageUrl;
 
/* The current file. */
/** The current file. */
private File currentFile;
 
/* The node given from the basis program. */
/** The node given from the basis program. */
private Node oldNode;
 
/* The node returned to the basis program. */
/** The node returned to the basis program. */
private Node changedNode;
 
/* The list of all regions. */
/** The list of all regions. */
private List regions = new ArrayList();
 
/* The selected region. */
/** The selected region. */
private Region selectedRegion;
 
/* The normal cursor. */
/** The normal cursor. */
private Cursor normalCursor = new Cursor(Cursor.DEFAULT_CURSOR);
 
/* The moving cursor. */
/** The moving cursor. */
private Cursor moveCursor = new Cursor(Cursor.MOVE_CURSOR);
 
/* The resizing cursor. */
/** The resizing cursor. */
private Cursor resizeCursor = new Cursor(Cursor.SE_RESIZE_CURSOR);
 
/* The moving flag: true if some region is moving at the moment. */
/** The moving flag: true if some region is moving at the moment. */
private boolean inMove = false;
 
/* The resizing flag: true if some region is resizing at the moment. */
/** The resizing flag: true if some region is resizing at the moment. */
private boolean inResize = false;
 
/* The region popup menu. */
/** The region popup menu. */
private JPopupMenu popup = new JPopupMenu();
 
/* The popup menu item to delete the region. */
/** The popup menu item to delete the region. */
private JMenuItem deleteSelectedItem = new JMenuItem("Delete the region");
 
/** The class constructor creates all elements for the RegionEditor plugin. */
/sun/xmleditor/trunk/src/plugins/regionEditorPlugin/ImagePanel.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.5 $
* @version $Revision: 1.6 $
*
* Last modification: $Date: 2003/07/23 19:42:37 $
* $Id: ImagePanel.java,v 1.5 2003/07/23 19:42:37 ioklasse Exp $
* Last modification: $Date: 2003/07/23 23:32:15 $
* $Id: ImagePanel.java,v 1.6 2003/07/23 23:32:15 ioklasse Exp $
*/
 
package src.plugins.regionEditorPlugin;
26,32 → 26,32
*
* @author Yulia Klassen, Viktoriya Zudova
*
* @version $Revision: 1.5 $ Last modification: $Date: 2003/07/23 19:42:37 $
* @version $Revision: 1.6 $ Last modification: $Date: 2003/07/23 23:32:15 $
*/
class ImagePanel extends JPanel {
 
/* The current image. */
/** The current image. */
private Image image;
 
/* The dx-shift of an image in relation to the left top corner of plugin panel. */
/** The dx-shift of an image in relation to the left top corner of plugin panel. */
private int dx;
 
/* The dy-shift of an image in realtion to the left top corner of plugin panel. */
/** The dy-shift of an image in realtion to the left top corner of plugin panel. */
private int dy;
 
/* The width of the image. */
/** The width of the image. */
private int imageWidth;
 
/* The height of the image. */
/** The height of the image. */
private int imageHeight;
 
/* The scale coef of the image. */
/** The scale coef of the image. */
private double coef;
/* The list of all regions. */
/** The list of all regions. */
private List regions;
/* The selected region. */
/** The selected region. */
private Region selectedRegion;
 
/**
/sun/xmleditor/trunk/src/plugins/regionEditorPlugin/Region.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.2 $
* @version $Revision: 1.3 $
*
* Last modification: $Date: 2003/07/23 11:58:09 $
* $Id: Region.java,v 1.2 2003/07/23 11:58:09 ioklasse Exp $
* Last modification: $Date: 2003/07/23 19:42:52 $
* $Id: Region.java,v 1.3 2003/07/23 19:42:52 ioklasse Exp $
*/
 
package src.plugins.regionEditorPlugin;
22,18 → 22,18
*/
public class Region
{
/* Stores name of region.*/
/** Stores name of region.*/
private String name;
 
/* Stores coordinates of region. */
/** Stores coordinates of region. */
private Rectangle rect;
 
/* Creates empty region with coordinates and name. */
/** Creates empty region with coordinates and name. */
public Region()
{
}
 
/* Construktor creates new region with coordinates and name.
/** Construktor creates new region with coordinates and name.
*
* @param name: Region name.
* @param rect: Region coordinates.
44,7 → 44,7
this.rect = rect;
}
 
/* Returns the name of the region.
/** Returns the name of the region.
*
* @return the name of the region.
*/
53,7 → 53,7
return name;
}
 
/* Sets the name of the region.
/** Sets the name of the region.
*
* @param name: The name of the region.
*/
62,7 → 62,7
this.name = name;
}
 
/* Returns the coordinates of the region.
/** Returns the coordinates of the region.
*
* @return the coordinates of the region.
*/
71,7 → 71,7
return rect;
}
 
/* Sets the coordinates of the region.
/** Sets the coordinates of the region.
*
* @param rect: The coordinates of the region.
*/