Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.fmap.control / src / main / java / org / gvsig / fmap / mapcontrol / PrimitivesDrawer.java @ 44202

History | View | Annotate | Download (3.76 KB)

1 40559 jjdelcerro
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24 40435 jjdelcerro
/* gvSIG. Geographic Information System of the Valencian Government
25
*
26
* Copyright (C) 2007-2008 Infrastructures and Transports Department
27
* of the Valencian Government (CIT)
28
*
29
* This program is free software; you can redistribute it and/or
30
* modify it under the terms of the GNU General Public License
31
* as published by the Free Software Foundation; either version 2
32
* of the License, or (at your option) any later version.
33
*
34
* This program is distributed in the hope that it will be useful,
35
* but WITHOUT ANY WARRANTY; without even the implied warranty of
36
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
37
* GNU General Public License for more details.
38
*
39
* You should have received a copy of the GNU General Public License
40
* along with this program; if not, write to the Free Software
41
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
42
* MA  02110-1301, USA.
43
*
44
*/
45
46
/*
47
* AUTHORS (In addition to CIT):
48
* 2009 {Iver T.I.}   {Task}
49
*/
50
51
package org.gvsig.fmap.mapcontrol;
52
53
import java.awt.Color;
54
import java.awt.Graphics;
55
56
/**
57
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
58
 */
59
public interface PrimitivesDrawer {
60
61
        /**
62
         * This method is used to start a drawing process that needs to
63
         * be synchronized.
64
         * @param obj
65
         * The object that locks the resource.
66
         * @throws InterruptedException
67
         */
68
        public void startDrawing(Object obj) throws InterruptedException;
69
70
        /**
71
         * This method is used to finish a drawing process that needs to
72
         * be synchronized.
73
         * @param obj
74
         * The object that has locked the resource.
75
         */
76
        public void stopDrawing(Object obj);
77
78
        /**
79
         * This method sets the <code>Graphics</code> where the
80
         * <code>Drawer</code> has to draw all the objects.
81
         * @param graphics
82
         * The component where the new objects has to be drawn.
83
         */
84
        public void setGraphics(Graphics graphics);
85
86
        /**
87
         * Sets the color that is used to draw the objects that don't
88
         * have a symbol.
89
         * @param color
90
         * The color to use on the drawing operations.
91
         */
92
        public void setColor(Color color);
93
94
        /**
95
         * It draws a rectangle on the map using the color
96
         * specified using the {@link #setColor(Color)} method.
97
         * @param x
98
         * The minimum X coordinate.
99
         * @param y
100
         * The minimum Y coordinate.
101
         * @param width
102
         * The rectangle width.
103
         * @param height
104
         * The rectangle height.
105
         */
106
        public void drawRect(int x, int y, int width, int height);
107
108
        /**
109
         * It fills a rectangle on the map using the color
110
         * specified using the {@link #setColor(Color)} method.
111
         * @param x
112
         * The minimum X coordinate.
113
         * @param y
114
         * The minimum Y coordinate.
115
         * @param width
116
         * The rectangle width.
117
         * @param height
118
         * The rectangle height.
119
         */
120
        public void fillRect(int x, int y, int width, int height);
121
122
        public void drawOval(int i, int j, int sizePixels, int sizePixels2);
123
124
        public void drawLine(int x1, int y1, int x3, int y12);
125
}