svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.symbology / org.gvsig.symbology.lib / org.gvsig.symbology.lib.api / src / main / java / org / gvsig / symbology / fmap / mapcontext / rendering / symbol / style / IArrowDecoratorStyle.java @ 47476
History | View | Annotate | Download (3.73 KB)
1 |
/**
|
---|---|
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 |
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style; |
25 |
|
26 |
import java.awt.Graphics2D; |
27 |
import java.awt.geom.AffineTransform; |
28 |
import org.gvsig.fmap.dal.feature.Feature; |
29 |
import org.gvsig.fmap.geom.Geometry; |
30 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
31 |
import org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle; |
32 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol; |
33 |
|
34 |
/**
|
35 |
* @author gvSIG Team
|
36 |
* @version $Id$
|
37 |
*
|
38 |
*/
|
39 |
public interface IArrowDecoratorStyle extends IStyle { |
40 |
|
41 |
/**
|
42 |
* Obtains the number of arrows that the user wants to draw in the same line.
|
43 |
* @return
|
44 |
*/
|
45 |
public int getArrowMarkerCount(); |
46 |
|
47 |
/**
|
48 |
* Defines the number of arrows that the user wants to draw in the same line.
|
49 |
* @return
|
50 |
*/
|
51 |
public void setArrowMarkerCount(int arrowMarkerCount); |
52 |
|
53 |
/**
|
54 |
* Defines the flipAll attribute.If the value of this attribute is true all the
|
55 |
* arrows that we had drawn in the same line will be flipped.
|
56 |
* @return
|
57 |
*/
|
58 |
public boolean isFlipAll(); |
59 |
|
60 |
/**
|
61 |
* Obtains the flipAll attribute.If the value of this attribute is true all the
|
62 |
* arrows that we had drawn in the same line will be flipped.
|
63 |
* @return
|
64 |
*/
|
65 |
public void setFlipAll(boolean flipAll); |
66 |
|
67 |
/**
|
68 |
* Obtains the flipFirst attribute.If it is true only the first arrow of the line
|
69 |
* will be flipped.The rest will keep the same orientation.
|
70 |
* @return
|
71 |
*/
|
72 |
public boolean isFlipFirst(); |
73 |
|
74 |
/**
|
75 |
* Sets the flipFirst attribute.If it is true only the first arrow of the line
|
76 |
* will be flipped.The rest will keep the same orientation.
|
77 |
* @return
|
78 |
*/
|
79 |
public void setFlipFirst(boolean flipFirst); |
80 |
|
81 |
/**
|
82 |
* Gets the followLineAngle attribute.This attribute allows the arrow that we are
|
83 |
* going to draw to be more or less aligned with the line where it will be included (depending on the angle) .
|
84 |
* @return
|
85 |
*/
|
86 |
public boolean isFollowLineAngle(); |
87 |
|
88 |
/**
|
89 |
* Sets the followLineAngle attribute.This attribute allows the arrow that we are
|
90 |
* going to draw to be more or less aligned with the line where it will be included.
|
91 |
* (depending on the angle).
|
92 |
* @param followingLineAngle
|
93 |
* @return
|
94 |
*/
|
95 |
public void setFollowLineAngle(boolean followLineAngle); |
96 |
/**
|
97 |
* Draws an arrow(or other symbol that substitutes an arrow selected by the user)
|
98 |
* in a line.When the line is drawn, the symbol is added and takes care of the different
|
99 |
* options of the user(for example if he wants to flip the first symbol or all and
|
100 |
* the number of symbols per line to be drawn)
|
101 |
* @param g
|
102 |
* @param affineTransform, can be null
|
103 |
* @param feature
|
104 |
* @param shp
|
105 |
* @throws CreateGeometryException
|
106 |
*/
|
107 |
public void draw(Graphics2D g, AffineTransform affineTransform, |
108 |
Geometry geom, Feature feature) throws CreateGeometryException;
|
109 |
|
110 |
public IMarkerSymbol getMarker();
|
111 |
|
112 |
public void setMarker(IMarkerSymbol marker); |
113 |
} |