001    /////////////////////////////////////////////////
002    //This file is part of Sears project.
003    //Subtitle Editor And Re-Synch
004    //A tool to easily modify and resynch movies subtitles.
005    /////////////////////////////////////////////////
006    //This program is free software; 
007    //you can redistribute it and/or modify it under the terms 
008    //of the GNU General Public License 
009    //as published by the Free Software Foundation; 
010    //either version 2 of the License, or (at your option) any later version.
011    /////////////////////////////////////////////////
012    //Sears project is available under sourceforge
013    //at adress: http://sourceforge.net/projects/sears/
014    //Copyright (C) 2005 Booba Skaya
015    //Mail: booba.skaya@gmail.com
016    /////////////////////////////////////////////////
017    
018    // some suggestions about this class: floriaen@gmail.com
019    
020    package sears.gui.glassPane.element;
021    
022    import java.awt.Graphics2D;
023    import java.awt.Point;
024    import java.awt.Shape;
025    
026    /**
027     * <code>GPShape</code> offers manipulations controls on a define <code>Shape</code> object.
028     * ( ... )
029     * @see Shape
030     * @see Graphics2D
031     */
032    public interface GPShape {
033    
034            /**
035             * Translates the <code>GPShape</code> object to the new given coordinates.
036             * @param x the new x coordinates.
037             * @param y the new y coordinates.
038             */
039            public void translate(int x, int y);
040            
041            /**
042             * Translates the <code>GPShape</code> object to the new given point location.
043             * @param point the new point location
044             */
045            public void translate(Point point);
046            
047            /**
048             * Returns a <code>Shape</code> object that represents the abstract bounds 
049             * of the <code>GPShape</code>
050             * <br>This shape could be the real bounds, an aproximation 
051             * (like a rectangle that enclose entirely the GPShape) or a part of the GPShape.
052             * <br>It's depends to the implementation.
053             * 
054             * @return the shape bounds
055             */
056            public Shape getBounds();
057            
058            /**
059             * Paint the <code>GPShape</code> using the graphics context given in parameters
060             * @param gr the graphics context
061             */
062            public void paint(Graphics2D gr);
063    }