Revision 10679 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/AbstractLineSymbol.java

View differences:

AbstractLineSymbol.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.2  2007-01-24 17:58:22  jaume
46
* Revision 1.3  2007-03-09 11:20:56  jaume
47
* Advanced symbology (start committing)
48
*
49
* Revision 1.2.2.3  2007/02/21 16:09:02  jaume
50
* *** empty log message ***
51
*
52
* Revision 1.2.2.2  2007/02/15 16:23:44  jaume
53
* *** empty log message ***
54
*
55
* Revision 1.2.2.1  2007/02/09 07:47:04  jaume
56
* Isymbol moved
57
*
58
* Revision 1.2  2007/01/24 17:58:22  jaume
47 59
* new features and architecture error fixes
48 60
*
49 61
* Revision 1.1  2007/01/16 11:50:44  jaume
......
54 66
package com.iver.cit.gvsig.fmap.core.symbols;
55 67

  
56 68
import java.awt.Color;
57
import java.awt.Stroke;
58 69

  
59 70
import com.iver.cit.gvsig.fmap.core.FShape;
60 71
import com.iver.cit.gvsig.fmap.core.IGeometry;
72
import com.iver.cit.gvsig.fmap.core.styles.ILineStyle;
73
import com.iver.cit.gvsig.fmap.core.styles.SimpleLineStyle;
61 74
import com.iver.cit.gvsig.fmap.core.v02.FConstant;
62 75

  
63
public abstract class AbstractLineSymbol extends AbstractSymbol {
76
/**
77
 * @author   jaume dominguez faus - jaume.dominguez@iver.es
78
 */
79
public abstract class AbstractLineSymbol extends AbstractSymbol implements ILineSymbol {
80
	/**
81
	 * @uml.property  name="color"
82
	 */
64 83
	private Color color;
65
	private Stroke stroke;
84
	private ILineStyle lineStyle;
66 85

  
86
	/* (non-Javadoc)
87
	 * @see com.iver.cit.gvsig.fmap.core.symbols.ILineSymbol#getColor()
88
	 */
89
	/**
90
	 * @return
91
	 * @uml.property  name="color"
92
	 */
67 93
	public final Color getColor() {
68 94
		return color;
69 95
	}
70 96

  
97
	/* (non-Javadoc)
98
	 * @see com.iver.cit.gvsig.fmap.core.symbols.ILineSymbol#setColor(java.awt.Color)
99
	 */
100
	/**
101
	 * @param color
102
	 * @uml.property  name="color"
103
	 */
71 104
	public final void setColor(Color color) {
72 105
		this.color = color;
73 106
	}
74 107

  
75 108

  
109
	/* (non-Javadoc)
110
	 * @see com.iver.cit.gvsig.fmap.core.symbols.ILineSymbol#getSymbolType()
111
	 */
76 112
	public final int getSymbolType() {
77 113
		return FConstant.SYMBOL_TYPE_LINE;
78 114
	}
79 115

  
116
	/* (non-Javadoc)
117
	 * @see com.iver.cit.gvsig.fmap.core.symbols.ILineSymbol#isSuitableFor(com.iver.cit.gvsig.fmap.core.IGeometry)
118
	 */
80 119
	public boolean isSuitableFor(IGeometry geom) {
81 120
		switch(geom.getGeometryType()) {
82 121
		// pasted from FSymbol
......
89 128
		return false;
90 129
	}
91 130

  
92
	public final Stroke getStroke() {
93
		return stroke;
131
	/* (non-Javadoc)
132
	 * @see com.iver.cit.gvsig.fmap.core.symbols.ILineSymbol#getLineStyle()
133
	 */
134
	/**
135
	 * @return
136
	 * @uml.property  name="lineStyle"
137
	 */
138
	public ILineStyle getLineStyle() {
139
		if (lineStyle == null)
140
			lineStyle = new SimpleLineStyle();
141
		return lineStyle;
94 142
	}
95 143

  
96
	public final void setStroke(Stroke stroke) {
97
		this.stroke = stroke;
144
	/* (non-Javadoc)
145
	 * @see com.iver.cit.gvsig.fmap.core.symbols.ILineSymbol#setLineStyle(com.iver.cit.gvsig.fmap.core.styles.SimpleLineStyle)
146
	 */
147
	/**
148
	 * @param lineStyle
149
	 * @uml.property  name="lineStyle"
150
	 */
151
	public void setLineStyle(ILineStyle lineStyle) {
152
		this.lineStyle = lineStyle;
98 153
	}
154
	
155
	public int getAlpha() {
156
		return color.getAlpha();
157
	}
158
	
159
	public void setAlpha(int outlineAlpha) {
160
		color = new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha);
161
	}
99 162

  
100 163
}

Also available in: Unified diff