Statistics
| Revision:

root / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / rendering / styling / IPlacementConstraints.java @ 10671

History | View | Annotate | Download (3.46 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41

    
42
/* CVS MESSAGES:
43
 *
44
 * $Id: IPlacementConstraints.java 10671 2007-03-09 08:33:43Z jaume $
45
 * $Log$
46
 * Revision 1.2  2007-03-09 08:33:43  jaume
47
 * *** empty log message ***
48
 *
49
 * Revision 1.1.2.2  2007/02/15 16:23:44  jaume
50
 * *** empty log message ***
51
 *
52
 * Revision 1.1.2.1  2007/02/09 07:47:05  jaume
53
 * Isymbol moved
54
 *
55
 *
56
 */
57

    
58
package com.iver.cit.gvsig.fmap.rendering.styling;
59

    
60
import org.cresques.px.gml.MultiPolygon;
61

    
62
import com.iver.cit.gvsig.fmap.core.FShape;
63
import com.iver.cit.gvsig.fmap.core.IGeometry;
64
import com.iver.cit.gvsig.fmap.core.symbols.ITextSymbol;
65

    
66
/**
67
 * @author   jaume dominguez faus - jaume.dominguez@iver.es
68
 */
69
public interface IPlacementConstraints {
70

    
71
        // constants regarding label duplication
72
        public static final int REMOVE_DUPLICATE_LABELS = 2;
73
        public static final int ONE_LABEL_PER_FEATURE = 3;
74
        public static final int ONE_LABEL_PER_FEATURE_PART = 4;
75

    
76
        // constants regarding point settings
77
        public static final int OFFSET_HORIZONTALY_AROUND_THE_POINT = 5;
78
        public static final int ON_TOP_OF_THE_POINT = 6;
79
        public static final int AT_SPECIFIED_ANGLE = 7;
80
        public static final int AT_ANGLE_SPECIFIED_BY_A_FIELD = 8;
81

    
82
        // constants regarding polygon settings (also apply for lines)
83
        public static final int HORIZONTAL = 9;
84
        public static final int PARALLEL = 10;
85

    
86
        // constants regarding line settings
87
        public static final int FOLLOWING_LINE = 11;
88
        public static final int PERPENDICULAR = 12;
89

    
90
        // constants regarding label position along the line
91
        public static final int ABOVE_THE_LINE = 1000;
92
        public static final int ON_THE_LINE = 1100;
93
        public static final int BELLOW_THE_LINE = 1200;
94

    
95
        public abstract void setDuplicateLabelsMode(int mode);
96

    
97
        public abstract void setPlacementMode(int mode);
98

    
99
        public abstract boolean isHorizontal();
100

    
101
        public abstract boolean isPerpendicular();
102

    
103
        public abstract boolean isFollowingLine();
104

    
105
        public abstract boolean isParallel();
106

    
107
        public abstract int getDuplicateLabelsMode();
108

    
109
        /**
110
         * Calculates the position where the next label will be placed. Or null
111
         * if the label does not have to be placed.
112
         *
113
         * @param geom, the geometry surface
114
         * @param label, the label to be placed
115
         * @param MultiPolygon exclusionZone
116
         * @return FShape[], the FShapes where the label will be placed
117
         */
118
        public abstract FShape[] getLocationsFor(IGeometry geom, ITextSymbol label,
119
                        MultiPolygon exclusionZone);
120

    
121
}