public class BasicStyle extends Object implements Style
| Modifier and Type | Field and Description |
|---|---|
protected float |
alignment |
protected float |
alpha |
protected String |
attribute |
protected boolean |
autoscale |
protected Color |
colorFill |
protected Color |
colorLine |
protected static Font |
DEFAULT_FONT |
protected boolean |
drawFill |
protected boolean |
drawLabel |
protected boolean |
drawLine |
protected Font |
font |
protected Color |
fontColor |
protected Color |
halo |
protected boolean |
highlightFeature |
protected int |
lineWidth |
protected org.apache.log4j.Logger |
logger |
protected int |
maxScale |
protected int |
minScale |
protected double |
multiplier |
protected FeatureAnnotationSymbol |
pointSymbol |
protected static String |
POINTSYMBOL_FOLDER |
protected String |
pointSymbolFilename |
protected int |
pointSymbolSize |
ALIGNMENT, ALPHA, ATTRIBUTE, AUTO_POINTSYMBOL, AUTOSCALE, COLOR, FAMILY, FILL, HALO, HIGHLIGHT, LABEL, LINE, MAX_POINTSYMBOLSIZE, MAX_SCALE, MIN_POINTSYMBOLSIZE, MIN_SCALE, MULTIPLIER, NAME, NO_POINTSYMBOL, PAINT, POINTSYMBOL, SIZE, STYLE, STYLE_ELEMENT, WIDTHTYPE_ATTRIBUTE| Constructor and Description |
|---|
BasicStyle()
Creates either an empty or default BasicStyle.
|
BasicStyle(boolean drawFill,
Color colorFill,
boolean drawLine,
Color colorLine,
int lineWidth,
boolean highlightFeature,
float alpha,
String pointSymbolName,
int pointSymbolSize,
boolean drawLabel,
Font font,
Color fontColor,
String attribute,
float alignment,
int minScale,
int maxScale,
double multiplier,
boolean autoscale,
Color halo)
Creates a new BasicStyle.
|
BasicStyle(org.jdom.Element element)
Creates a new BasicStyle object.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates an exact copy of this BasicStyle.
|
int |
compareTo(Object o)
Compares this BasicStyle with the delivered object.
|
FeatureAnnotationSymbol |
createAutoPointSymbol()
DOCUMENT ME!
|
static Color |
darken(Color c)
Darkens the delivered color to 60%.
|
float |
getAlignment()
DOCUMENT ME!
|
float |
getAlpha()
DOCUMENT ME!
|
Color |
getFillColor()
DOCUMENT ME!
|
Font |
getFont()
DOCUMENT ME!
|
Color |
getFontColor()
DOCUMENT ME!
|
Color |
getHalo()
DOCUMENT ME!
|
String |
getLabel()
Deprecated.
|
Color |
getLineColor()
DOCUMENT ME!
|
int |
getLineWidth()
DOCUMENT ME!
|
int |
getMaxScale()
DOCUMENT ME!
|
int |
getMinScale()
DOCUMENT ME!
|
double |
getMultiplier()
DOCUMENT ME!
|
FeatureAnnotationSymbol |
getPointSymbol()
DOCUMENT ME!
|
String |
getPointSymbolFilename()
DOCUMENT ME!
|
int |
getPointSymbolSize()
DOCUMENT ME!
|
void |
initFromElement(org.jdom.Element element)
Initialies an object that implements the ConvertableToXML interface from a DOM Element.
|
boolean |
isAutoscale()
DOCUMENT ME!
|
boolean |
isDrawFill()
DOCUMENT ME!
|
boolean |
isDrawLabel()
DOCUMENT ME!
|
boolean |
isDrawLine()
DOCUMENT ME!
|
boolean |
isHighlightFeature()
DOCUMENT ME!
|
static Color |
lighten(Color c)
Brightens the delivered color for aprox.
|
void |
setAlignment(float alignment)
DOCUMENT ME!
|
void |
setAlpha(float alpha)
DOCUMENT ME!
|
void |
setAutoscale(boolean autoscale)
DOCUMENT ME!
|
void |
setDefaultValues()
Resets this BasicStyle back to default.
|
void |
setDrawFill(boolean drawFill)
DOCUMENT ME!
|
void |
setDrawLabel(boolean drawLabel)
DOCUMENT ME!
|
void |
setDrawLine(boolean drawLine)
DOCUMENT ME!
|
void |
setFillColor(Color colorFill)
DOCUMENT ME!
|
void |
setFont(Font font)
DOCUMENT ME!
|
void |
setFontColor(Color fontColor)
DOCUMENT ME!
|
void |
setHalo(Color halo)
DOCUMENT ME!
|
void |
setHighlightFeature(boolean highlightFeature)
DOCUMENT ME!
|
void |
setLabel(String attribute)
Deprecated.
|
void |
setLineColor(Color colorLine)
DOCUMENT ME!
|
void |
setLineWidth(int lineWidth)
DOCUMENT ME!
|
void |
setMaxScale(int maxScale)
DOCUMENT ME!
|
void |
setMinScale(int minScale)
DOCUMENT ME!
|
void |
setMultiplier(double multiplier)
DOCUMENT ME!
|
void |
setPointSymbol(FeatureAnnotationSymbol pointSymbol)
Deprecated.
|
void |
setPointSymbolFilename(String pointSymbolFilename)
DOCUMENT ME!
|
void |
setPointSymbolSize(int pointSymbolSize)
DOCUMENT ME!
|
org.jdom.Element |
toElement()
Creates a JDOM-element that represents this BasicStyle.
|
protected static final Font DEFAULT_FONT
protected static final String POINTSYMBOL_FOLDER
protected final org.apache.log4j.Logger logger
protected boolean drawFill
protected boolean drawLine
protected Color colorFill
protected Color colorLine
protected int lineWidth
protected boolean highlightFeature
protected float alpha
protected String pointSymbolFilename
protected int pointSymbolSize
protected boolean drawLabel
protected Font font
protected Color fontColor
protected String attribute
protected float alignment
protected int minScale
protected int maxScale
protected double multiplier
protected boolean autoscale
protected FeatureAnnotationSymbol pointSymbol
protected Color halo
public BasicStyle()
public BasicStyle(org.jdom.Element element)
throws Exception
element - DOCUMENT ME!Exception - DOCUMENT ME!public BasicStyle(boolean drawFill,
Color colorFill,
boolean drawLine,
Color colorLine,
int lineWidth,
boolean highlightFeature,
float alpha,
String pointSymbolName,
int pointSymbolSize,
boolean drawLabel,
Font font,
Color fontColor,
String attribute,
float alignment,
int minScale,
int maxScale,
double multiplier,
boolean autoscale,
Color halo)
drawFill - true if the filling should be painted, else falsecolorFill - the fillingcolordrawLine - true if the line should be painted, else falsecolorLine - the linecolorlineWidth - the linewidthhighlightFeature - true if features should lighten up on mouseoveralpha - alpha-value (0=invisible to 1=visible)pointSymbolName - name of the pointsymbolpointSymbolSize - size of the pointsymobldrawLabel - true if the labels should be painted, else falsefont - fonttype of the labelsfontColor - the fontcolorattribute - attribute that be shown as labelalignment - alignment of the labelminScale - minimum scale at which the label is still visiblemaxScale - maximum scale at which the label is still visiblemultiplier - the size multiplier (non-effective if autoscale is enabled)autoscale - true to resize the label according to the zoomlevel, else falsehalo - DOCUMENT ME!public void setDefaultValues()
public org.jdom.Element toElement()
toElement in interface ConvertableToXMLpublic int compareTo(Object o)
compareTo in interface Comparableo - object that should be compared with this BasicStylepublic Object clone() throws CloneNotSupportedException
clone in interface Styleclone in class ObjectCloneNotSupportedException - DOCUMENT ME!public boolean isDrawFill()
StyleisDrawFill in interface Stylepublic void setDrawFill(boolean drawFill)
StylesetDrawFill in interface StyledrawFill - DOCUMENT ME!public boolean isDrawLine()
StyleisDrawLine in interface Stylepublic void setDrawLine(boolean drawLine)
StylesetDrawLine in interface StyledrawLine - DOCUMENT ME!public boolean isHighlightFeature()
StyleisHighlightFeature in interface Stylepublic void setHighlightFeature(boolean highlightFeature)
StylesetHighlightFeature in interface StylehighlightFeature - DOCUMENT ME!public Color getFillColor()
StylegetFillColor in interface Stylepublic void setFillColor(Color colorFill)
StylesetFillColor in interface StylecolorFill - DOCUMENT ME!public Color getLineColor()
StylegetLineColor in interface Stylepublic void setLineColor(Color colorLine)
StylesetLineColor in interface StylecolorLine - DOCUMENT ME!public int getLineWidth()
StylegetLineWidth in interface Stylepublic void setLineWidth(int lineWidth)
StylesetLineWidth in interface StylelineWidth - DOCUMENT ME!public float getAlpha()
Stylepublic void setAlpha(float alpha)
Stylepublic String getPointSymbolFilename()
StylegetPointSymbolFilename in interface Stylepublic void setPointSymbolFilename(String pointSymbolFilename)
StylesetPointSymbolFilename in interface StylepointSymbolFilename - DOCUMENT ME!public int getPointSymbolSize()
StylegetPointSymbolSize in interface Stylepublic void setPointSymbolSize(int pointSymbolSize)
StylesetPointSymbolSize in interface StylepointSymbolSize - DOCUMENT ME!public boolean isDrawLabel()
StyleisDrawLabel in interface Stylepublic void setDrawLabel(boolean drawLabel)
StylesetDrawLabel in interface StyledrawLabel - DOCUMENT ME!public Color getFontColor()
StylegetFontColor in interface Stylepublic void setFontColor(Color fontColor)
StylesetFontColor in interface StylefontColor - DOCUMENT ME!@Deprecated public String getLabel()
Style@Deprecated public void setLabel(String attribute)
Stylepublic float getAlignment()
StylegetAlignment in interface Stylepublic void setAlignment(float alignment)
StylesetAlignment in interface Stylealignment - DOCUMENT ME!public int getMinScale()
StylegetMinScale in interface Stylepublic void setMinScale(int minScale)
StylesetMinScale in interface StyleminScale - DOCUMENT ME!public int getMaxScale()
StylegetMaxScale in interface Stylepublic void setMaxScale(int maxScale)
StylesetMaxScale in interface StylemaxScale - DOCUMENT ME!public double getMultiplier()
StylegetMultiplier in interface Stylepublic void setMultiplier(double multiplier)
StylesetMultiplier in interface Stylemultiplier - DOCUMENT ME!public boolean isAutoscale()
StyleisAutoscale in interface Stylepublic void setAutoscale(boolean autoscale)
StylesetAutoscale in interface Styleautoscale - DOCUMENT ME!public void initFromElement(org.jdom.Element element)
throws Exception
ConvertableToXMLinitFromElement in interface ConvertableToXMLelement - the elemen to be reconstructedException - if the object could not be initialized@Deprecated public void setPointSymbol(FeatureAnnotationSymbol pointSymbol)
StylesetPointSymbol in interface StylepointSymbol - DOCUMENT ME!public FeatureAnnotationSymbol getPointSymbol()
StylegetPointSymbol in interface Stylepublic static Color darken(Color c)
c - color that should be darkerpublic static Color lighten(Color c)
c - color that should be lighterpublic FeatureAnnotationSymbol createAutoPointSymbol()
Copyright © 2012–2026 cismet GmbH. All rights reserved.