Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / 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 @ 34294

History | View | Annotate | Download (3.67 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
package org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style;
23

    
24
import java.awt.Graphics2D;
25
import java.awt.geom.AffineTransform;
26

    
27
import org.gvsig.fmap.dal.feature.Feature;
28
import org.gvsig.fmap.geom.Geometry;
29
import org.gvsig.fmap.geom.exception.CreateGeometryException;
30
import org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle;
31
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol;
32

    
33
/**
34
 * @author gvSIG Team
35
 * @version $Id$
36
 *
37
 */
38
public interface IArrowDecoratorStyle extends IStyle {
39

    
40
        /**
41
         * Obtains the number of arrows that the user wants to draw in the same line.
42
         * @return
43
         */
44
        public int getArrowMarkerCount();
45

    
46
        /**
47
         * Defines the number of arrows that the user wants to draw in the same line.
48
         * @return
49
         */
50
        public void setArrowMarkerCount(int arrowMarkerCount);
51

    
52
        /**
53
         * Defines the flipAll attribute.If the value of this attribute is true all the
54
         * arrows that we had drawn in the same line will be flipped.
55
         * @return
56
         */
57
        public boolean isFlipAll();
58

    
59
        /**
60
         * Obtains the flipAll attribute.If the value of this attribute is true all the
61
         * arrows that we had drawn in the same line will be flipped.
62
         * @return
63
         */
64
        public void setFlipAll(boolean flipAll);
65

    
66
        /**
67
         * Obtains the flipFirst attribute.If it is true only the first arrow of the line
68
         * will be flipped.The rest will keep the same orientation.
69
         * @return
70
         */
71
        public boolean isFlipFirst();
72

    
73
        /**
74
         * Sets the flipFirst attribute.If it is true only the first arrow of the line
75
         * will be flipped.The rest will keep the same orientation.
76
         * @return
77
         */
78
        public void setFlipFirst(boolean flipFirst);
79

    
80
        /**
81
         * Gets the followLineAngle attribute.This attribute allows the arrow that we are
82
         * going to draw to be more or less aligned with the line where it will be included (depending on the angle) .
83
         * @return
84
         */
85
        public boolean isFollowLineAngle();
86

    
87
        /**
88
         * Sets the followLineAngle attribute.This attribute allows the arrow that we are
89
         * going to draw to be more or less aligned with the line where it will be included.
90
         * (depending on the angle).
91
         * @param followingLineAngle
92
         * @return
93
         */
94
        public void setFollowLineAngle(boolean followLineAngle);
95
        /**
96
         * Draws an arrow(or other symbol that substitutes an arrow selected by the user)
97
         * in a line.When the line is drawn, the symbol is added and takes care of the different
98
         * options of the user(for example if he wants to flip the first symbol or all and
99
         * the number of symbols per line to be drawn)
100
         * @param g
101
         * @param affineTransform
102
         * @param feature 
103
         * @param shp
104
         * @throws CreateGeometryException 
105
         */
106
        public void draw(Graphics2D g, AffineTransform affineTransform,
107
                        Geometry geom, Feature feature) throws CreateGeometryException;
108
        
109
        public IMarkerSymbol getMarker();
110

    
111
        public void setMarker(IMarkerSymbol marker);
112
}