gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.swing / org.gvsig.raster.swing.impl / src / main / java / org / gvsig / raster / swing / impl / canvas / layer / function / DefaultBaseFunction.java @ 2585
History | View | Annotate | Download (2.21 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.raster.swing.impl.canvas.layer.function; |
23 |
|
24 |
import java.awt.Graphics; |
25 |
import java.util.List; |
26 |
|
27 |
import org.gvsig.raster.swing.gcanvas.BaseFunction; |
28 |
import org.gvsig.raster.swing.gcanvas.DrawableElement; |
29 |
import org.gvsig.raster.swing.impl.canvas.layer.DefaultMinMaxLines; |
30 |
/**
|
31 |
* Todo algoritmo que queramos que implemente un realce, debe heredar de esta base
|
32 |
* para poder distinguir los drawables genericos de los algoritmos.
|
33 |
*
|
34 |
* @author BorSanZa - Borja S?nchez Zamorano
|
35 |
*/
|
36 |
public abstract class DefaultBaseFunction extends DrawableElement implements BaseFunction { |
37 |
protected double minx = 0.0D; |
38 |
protected double maxx = 1.0D; |
39 |
|
40 |
|
41 |
/**
|
42 |
* Especifica el limite minimo del algoritmo en forma de porcentaje
|
43 |
* @param minx
|
44 |
*/
|
45 |
public void setMinX(double minx) { |
46 |
this.minx = minx;
|
47 |
} |
48 |
|
49 |
/**
|
50 |
* Especifica el limite maximo del algoritmo en forma de porcentaje
|
51 |
* @param maxx
|
52 |
*/
|
53 |
public void setMaxX(double maxx) { |
54 |
this.maxx = maxx;
|
55 |
} |
56 |
|
57 |
protected void paint(Graphics g) { |
58 |
/*List<DrawableElement> elements = canvas.getDrawableElements(DefaultMinMaxLines.class);
|
59 |
if (elements.size() > 0) {
|
60 |
DefaultMinMaxLines minMaxLines = (DefaultMinMaxLines) elements.get(0);
|
61 |
setMinX(minMaxLines.getMinDistance());
|
62 |
setMaxX(minMaxLines.getMaxDistance());
|
63 |
}*/
|
64 |
} |
65 |
} |