public class FSymbol extends Object implements ISymbol
SELECTION_COLOR
Constructor and Description |
---|
FSymbol(int tipoSymbol)
Deprecated.
Crea un nuevo FSymbol.
|
Modifier and Type | Method and Description |
---|---|
void |
calculateRgb()
Deprecated.
Calcula el RGB del s�mbolo.
|
Object |
clone()
Deprecated.
Creates a copy of the object.
|
FSymbol |
cloneSymbol()
Deprecated.
Clona el s�mbolo actual.
|
static FSymbol |
createFromXML(XMLEntity xml)
Deprecated.
Crea el s�mbolo a partir del xml.
|
void |
draw(Graphics2D g,
AffineTransform affineTransform,
Geometry geom,
Feature feature,
Cancellable cancel)
Deprecated.
Used when a symbol is going to be drawn.The method to do
it will depend on the derived version of the symbol.
|
void |
drawInsideRectangle(Graphics2D g2,
AffineTransform scaleInstance,
Rectangle r,
PrintAttributes properties)
Deprecated.
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
FSymbol |
fastCloneSymbol()
Deprecated.
Se usa para el s�mbolo de selecci�n.
|
int |
getAlingHoriz()
Deprecated.
Devuelve la alineaci�n en horizontal.
|
int |
getAlingVert()
Deprecated.
Devuelve la alineaci�n en vertical.
|
String |
getClassName()
Deprecated.
|
Color |
getColor()
Deprecated.
Devuelve el color del s�mbolo.
|
String |
getDescription()
Deprecated.
Devuelve la descripci�n del s�mbolo.
|
Paint |
getFill()
Deprecated.
Devuelve el relleno.
|
Font |
getFont()
Deprecated.
Devuelve el Font del s�mbolo.
|
Color |
getFontColor()
Deprecated.
Devuelve el color de la fuente.
|
float |
getFontSize()
Deprecated.
Devuelve el tama�o de la fuente.
|
Image |
getIcon()
Deprecated.
Devuelve el icono.
|
URI |
getIconURI()
Deprecated.
|
ImageObserver |
getImgObserver()
Deprecated.
|
int |
getOnePointRgb()
Deprecated.
Devuelve el rgb del s�mbolo.
|
Color |
getOutlineColor()
Deprecated.
Devuelve el color de la l�nea de borde.
|
void |
getPixExtentPlus(Geometry geom,
float[] distances,
ViewPort viewPort,
int dpi)
Deprecated.
Returns the distance between the shape's bounding box and the
symbol-that-represents-this-shape's bounding box in a two-length-float
array passed as parameter.
|
int |
getRotation()
Deprecated.
Devuelve la rotaci�n.
|
int |
getSize()
Deprecated.
Devuelve el tama�o del s�mbolo.
|
Stroke |
getStroke()
Deprecated.
Devuelve el Stroke.
|
int |
getStyle()
Deprecated.
Devuelve el estilo del s�mbolo.
|
ISymbol |
getSymbolForSelection()
Deprecated.
Returns the derived version of the symbol that will be used to draw the
feature when it is selected.
|
static FSymbol |
getSymbolForSelection(FSymbol sym)
Deprecated.
A partir de un s�mbolo devuelve otro similar pero con el color de
selecci�n.
|
int |
getSymbolType()
Deprecated.
Devuelve el tipo de s�mbolo.
|
XMLEntity |
getXMLEntity()
Deprecated.
|
boolean |
isFontSizeInPixels()
Deprecated.
Devuelve true si el tama�o de la fuente esta seleccionado en pixels.
|
boolean |
isOneDotOrPixel(Geometry geom,
double[] positionOfDotOrPixel,
ViewPort viewPort,
int dpi)
Deprecated.
Informs that the geometry will be represented with that symbol in just one pixel or dot
|
boolean |
isOutlined()
Deprecated.
Devuelve si el s�mbolo contiene o no linea de borde.
|
boolean |
isShapeVisible()
Deprecated.
Devuelve true si el shape es visible.
|
boolean |
isSizeInPixels()
Deprecated.
Devuelve si el tama�o del s�mbolo est� en pixels.
|
boolean |
isSuitableFor(Geometry geom)
Deprecated.
True if this symbol is ok for the geometry.
|
void |
loadFromState(PersistentState state)
Deprecated.
Set the state of the object from the state passed as parameter.
|
void |
print(Graphics2D g,
AffineTransform at,
Geometry shape,
PrintAttributes properties)
Deprecated.
|
void |
saveToState(PersistentState state)
Deprecated.
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setAlingHoriz(int m_AlingHoriz)
Deprecated.
Introduce la alineaci�n en horizontal.
|
void |
setAlingVert(int m_AlingVert)
Deprecated.
Introduce la alineaci�n en vertical.
|
void |
setColor(Color m_Color)
Deprecated.
Introduce el color del s�mbolo.
|
void |
setDescription(String m_Descrip)
Deprecated.
Introduce la descripci�n del s�mbolo.
|
void |
setFill(Paint m_Fill)
Deprecated.
Introduce el relleno.
|
void |
setFont(Font m_Font)
Deprecated.
Introduce el Font del s�mbolo.
|
void |
setFontColor(Color m_FontColor)
Deprecated.
Introduce el color de la fuente.
|
void |
setFontSize(float m_FontSize)
Deprecated.
Introduce el tama�o de la fuente.
|
void |
setFontSizeInPixels(boolean m_bUseFontSize)
Deprecated.
Introduce si se usa el tama�o de la fuente en pixels.
|
void |
setIcon(Image m_Icon)
Deprecated.
Introduce la imagen que hace de icono.
|
void |
setIconURI(URI iconURI)
Deprecated.
|
void |
setImgObserver(ImageObserver imgObserver)
Deprecated.
|
void |
setOutlineColor(Color m_outlineColor)
Deprecated.
Introduce el color de la l�nea de borde.
|
void |
setOutlined(boolean m_useOutline)
Deprecated.
Introduce si el s�mbolo contiene linea de brode o no.
|
void |
setRotation(int m_Rotation)
Deprecated.
Introduce la rotaci�n.
|
void |
setShapeVisible(boolean m_bDrawShape)
Deprecated.
Introduce si el shape e visible o no lo es.
|
void |
setSize(int m_Size)
Deprecated.
Introduce el tama�o del s�mbolo.
|
void |
setSizeInPixels(boolean m_bUseSize)
Deprecated.
Introduce si el tama�o del simbolo est� en pixels.
|
void |
setStroke(Stroke m_Stroke)
Deprecated.
Introduce el Stroke.
|
void |
setStyle(int m_Style)
Deprecated.
Introduce el estilo del s�mbolo.
|
void |
setSymbolType(int m_symbolType)
Deprecated.
Introduce el tipo de s�mbolo.
|
void |
setXMLEntity(XMLEntity xml)
Deprecated.
|
static float[] |
toArray(String linePattern,
float lineWidth)
Deprecated.
Converts the comma-delimited string into a List of trimmed strings.
|
public static final int SYMBOL_STYLE_FILL_SOLID
public static final int SYMBOL_STYLE_FILL_TRANSPARENT
public static final int SYMBOL_STYLE_FILL_HORIZONTAL
public static final int SYMBOL_STYLE_FILL_VERTICAL
public static final int SYMBOL_STYLE_FILL_CROSS
public static final int SYMBOL_STYLE_FILL_UPWARD_DIAGONAL
public static final int SYMBOL_STYLE_FILL_DOWNWARD_DIAGONAL
public static final int SYMBOL_STYLE_FILL_CROSS_DIAGONAL
public static final int SYMBOL_STYLE_FILL_GRAYFILL
public static final int SYMBOL_STYLE_FILL_LIGHTGRAYFILL
public static final int SYMBOL_STYLE_FILL_DARKGRAYFILL
public static final int SYMBOL_STYLE_MARKER_CIRCLE
public static final int SYMBOL_STYLE_MARKER_SQUARE
public static final int SYMBOL_STYLE_MARKER_TRIANGLE
public static final int SYMBOL_STYLE_MARKER_CROSS
public static final int SYMBOL_STYLE_MARKER_TRUETYPE
public static final int SYMBOL_STYLE_MARKER_IMAGEN
public static final int SYMBOL_STYLE_DGNSPECIAL
public static final int SYMBOL_STYLE_LINE_SOLID
public static final int SYMBOL_STYLE_LINE_DASH
public static final int SYMBOL_STYLE_LINE_DOT
public static final int SYMBOL_STYLE_LINE_DASHDOT
public static final int SYMBOL_STYLE_LINE_DASHDOTDOT
public static final int SYMBOL_STYLE_LINE_RAIL
public static final int SYMBOL_STYLE_LINE_ARROW
public static final int SYMBOL_STYLE_TEXT_NORMAL
public static final int SYMBOL_STYLE_TEXT_CURSIVE
public static final int SYMBOL_STYLE_TEXT_BOLD
public static final int SYMBOL_STYLE_TEXT_BOLDCURSIVE
public String m_LinePattern
public Color m_BackColor
public Paint m_BackFill
public FSymbol(int tipoSymbol)
tipoSymbol
- Tipo de S�mbolo.
case FConstant.SYMBOL_TYPE_POINT:
case FConstant.SYMBOL_TYPE_POINTZ:
case FConstant.SYMBOL_TYPE_MULTIPOINT:
m_bUseSize = true; // Esto es lo primero que hay que hacer siempre
// para evitar un StackOverflow
m_useOutline = false;
setStyle(FConstant.SYMBOL_STYLE_MARKER_SQUARE);
setSize(5); //pixels
break;
case FConstant.SYMBOL_TYPE_LINE:
case FConstant.SYMBOL_TYPE_POLYLINEZ:
case FConstant.SYMBOL_TYPE_POLYGONZ:
setStroke(new BasicStroke());
setStyle(FConstant.SYMBOL_STYLE_LINE_SOLID);
break;
case FConstant.SYMBOL_TYPE_FILL:
setStroke(new BasicStroke());
setStyle(FConstant.SYMBOL_STYLE_FILL_SOLID);
break;
case FShape.MULTI:
m_bUseSize = true;
setStroke(new BasicStroke());
setStyle(FConstant.SYMBOL_STYLE_FILL_SOLID);
// setStyle(FConstant.SYMBOL_STYLE_MARKER_SQUARE);
setSize(5); //pixels
break;
case FConstant.SYMBOL_TYPE_TEXT:
setStroke(new BasicStroke());
setStyle(FConstant.SYMBOL_STYLE_TEXT_NORMAL);
setFont(new Font("Dialog",Font.PLAIN,12));
break;public static float[] toArray(String linePattern, float lineWidth)
linePattern
- a String with comma-delimited valueslineWidth
- DOCUMENT ME!IllegalArgumentException
- DOCUMENT ME!public static FSymbol getSymbolForSelection(FSymbol sym)
sym
- S�mbolo a modificar.public FSymbol cloneSymbol()
public FSymbol fastCloneSymbol()
public void calculateRgb()
public int getOnePointRgb()
getOnePointRgb
in interface ISymbol
public XMLEntity getXMLEntity()
com.iver.cit.gvsig.gui.layout.fframes.IFFrame#getXMLEntity()
public static FSymbol createFromXML(XMLEntity xml)
xml
- xml que contiene la informaci�n para crear el s�mbolo.public void setStyle(int m_Style)
m_Style
- The m_Style to set.public int getStyle()
public void setSymbolType(int m_symbolType)
m_symbolType
- The m_symbolType to set.public int getSymbolType()
getSymbolType
in interface ISymbol
public void setOutlined(boolean m_useOutline)
m_useOutline
- The m_useOutline to set.public boolean isOutlined()
public void setColor(Color m_Color)
public Color getColor()
public void setOutlineColor(Color m_outlineColor)
m_outlineColor
- The m_outlineColor to set.public Color getOutlineColor()
public void setFont(Font m_Font)
m_Font
- The m_Font to set.public Font getFont()
public void setFontColor(Color m_FontColor)
m_FontColor
- The m_FontColor to set.public Color getFontColor()
public void setFontSizeInPixels(boolean m_bUseFontSize)
m_bUseFontSize
- The m_bUseFontSize to set.public boolean isFontSizeInPixels()
public void setShapeVisible(boolean m_bDrawShape)
m_bDrawShape
- The m_bDrawShape to set.public boolean isShapeVisible()
isShapeVisible
in interface ISymbol
public void setSize(int m_Size)
m_Size
- The m_Size to set.public int getSize()
public void setIcon(Image m_Icon)
m_Icon
- The m_Icon to set.public Image getIcon()
public void setRotation(int m_Rotation)
m_Rotation
- The m_Rotation to set.public int getRotation()
public void setFill(Paint m_Fill)
m_Fill
- The m_Fill to set.public Paint getFill()
public void setStroke(Stroke m_Stroke)
m_Stroke
- The m_Stroke to set.public Stroke getStroke()
public void setSizeInPixels(boolean m_bUseSize)
m_bUseSize
- The m_bUseSize to set.public boolean isSizeInPixels()
public void setDescription(String m_Descrip)
setDescription
in interface ISymbol
m_Descrip
- The m_Descrip to set.ISymbol.getDescription();
public String getDescription()
getDescription
in interface ISymbol
public void setAlingVert(int m_AlingVert)
m_AlingVert
- The m_AlingVert to set.public int getAlingVert()
public void setAlingHoriz(int m_AlingHoriz)
m_AlingHoriz
- The m_AlingHoriz to set.public int getAlingHoriz()
public void setFontSize(float m_FontSize)
m_FontSize
- The m_FontSize to set.public float getFontSize()
public URI getIconURI()
public void setIconURI(URI iconURI)
public ImageObserver getImgObserver()
public void setImgObserver(ImageObserver imgObserver)
imgObserver
- The imgObserver to set.public ISymbol getSymbolForSelection()
ISymbol
getSymbolForSelection
in interface ISymbol
public void draw(Graphics2D g, AffineTransform affineTransform, Geometry geom, Feature feature, Cancellable cancel)
ISymbol
public void getPixExtentPlus(Geometry geom, float[] distances, ViewPort viewPort, int dpi)
ISymbol
Returns the distance between the shape's bounding box and the
symbol-that-represents-this-shape's bounding box in a two-length-float
array passed as parameter.
After this method returns, the float array passed will contain two values
representing the amount of pixels separating each of the X (first element)
and Y (second element) axes.
This distance maybe dependent on:
And in any other case, if the unit of the symbol is pixels or the symbol is not even an instance of CartographicSupport, the returning values are only defined by the symbol and are not calculated.
getPixExtentPlus
in interface ISymbol
public boolean isSuitableFor(Geometry geom)
ISymbol
isSuitableFor
in interface ISymbol
public void drawInsideRectangle(Graphics2D g2, AffineTransform scaleInstance, Rectangle r, PrintAttributes properties) throws SymbolDrawingException
ISymbol
drawInsideRectangle
in interface ISymbol
properties
- TODOSymbolDrawingException
- TODOpublic String getClassName()
public void setXMLEntity(XMLEntity xml)
public void print(Graphics2D g, AffineTransform at, Geometry shape, PrintAttributes properties)
print
in interface IPrintable
public boolean isOneDotOrPixel(Geometry geom, double[] positionOfDotOrPixel, ViewPort viewPort, int dpi)
ISymbol
isOneDotOrPixel
in interface ISymbol
positionOfDotOrPixel
- (out) filled with pixel or dot locationpublic Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException