root / branches / v2_0_0_prep / libraries / libFMap_controls / src / org / gvsig / fmap / mapcontrol / PrimitivesDrawer.java @ 38605
History | View | Annotate | Download (2.83 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
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 2
|
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 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2009 {Iver T.I.} {Task}
|
26 |
*/
|
27 |
|
28 |
package org.gvsig.fmap.mapcontrol; |
29 |
|
30 |
import java.awt.Color; |
31 |
import java.awt.Graphics; |
32 |
|
33 |
/**
|
34 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
35 |
*/
|
36 |
public interface PrimitivesDrawer { |
37 |
|
38 |
/**
|
39 |
* This method is used to start a drawing process that needs to
|
40 |
* be synchronized.
|
41 |
* @param obj
|
42 |
* The object that locks the resource.
|
43 |
* @throws InterruptedException
|
44 |
*/
|
45 |
public void startDrawing(Object obj) throws InterruptedException; |
46 |
|
47 |
/**
|
48 |
* This method is used to finish a drawing process that needs to
|
49 |
* be synchronized.
|
50 |
* @param obj
|
51 |
* The object that has locked the resource.
|
52 |
*/
|
53 |
public void stopDrawing(Object obj); |
54 |
|
55 |
/**
|
56 |
* This method sets the <code>Graphics</code> where the
|
57 |
* <code>Drawer</code> has to draw all the objects.
|
58 |
* @param graphics
|
59 |
* The component where the new objects has to be drawn.
|
60 |
*/
|
61 |
public void setGraphics(Graphics graphics); |
62 |
|
63 |
/**
|
64 |
* Sets the color that is used to draw the objects that don't
|
65 |
* have a symbol.
|
66 |
* @param color
|
67 |
* The color to use on the drawing operations.
|
68 |
*/
|
69 |
public void setColor(Color color); |
70 |
|
71 |
/**
|
72 |
* It draws a rectangle on the map using the color
|
73 |
* specified using the {@link #setColor(Color)} method.
|
74 |
* @param x
|
75 |
* The minimum X coordinate.
|
76 |
* @param y
|
77 |
* The minimum Y coordinate.
|
78 |
* @param width
|
79 |
* The rectangle width.
|
80 |
* @param height
|
81 |
* The rectangle height.
|
82 |
*/
|
83 |
public void drawRect(int x, int y, int width, int height); |
84 |
|
85 |
/**
|
86 |
* It fills a rectangle on the map using the color
|
87 |
* specified using the {@link #setColor(Color)} method.
|
88 |
* @param x
|
89 |
* The minimum X coordinate.
|
90 |
* @param y
|
91 |
* The minimum Y coordinate.
|
92 |
* @param width
|
93 |
* The rectangle width.
|
94 |
* @param height
|
95 |
* The rectangle height.
|
96 |
*/
|
97 |
public void fillRect(int x, int y, int width, int height); |
98 |
|
99 |
public void drawOval(int i, int j, int sizePixels, int sizePixels2); |
100 |
|
101 |
public void drawLine(int x1, int y1, int x3, int y12); |
102 |
} |