sgtplot
Class DefaultContourLineAttribute
- java.lang.Object
-
- sgtplot.LineAttribute
-
- sgtplot.DefaultContourLineAttribute
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Attribute
public class DefaultContourLineAttribute extends LineAttribute
Sets the default rendering style for contour line data.Color, width, and dash characteristics areDefaultContourLineAttributeproperties. For individual contour lines, the characteristics can be overridden byContourLineAttributewhen used withContourLevels.- Since:
- 2.0
- See Also:
GridCartesianRenderer,ContourLevels,ContourLineAttribute, Serialized Form
-
-
Field Summary
-
Fields inherited from class sgtplot.LineAttribute
CAP_BUTT, CAP_ROUND, CAP_SQUARE, DASHED, HEAVY, HIGHLIGHT, JOIN_BEVEL, JOIN_MITER, JOIN_ROUND, MARK, MARK_LINE, SOLID, STROKE
-
-
Constructor Summary
Constructors Constructor and Description DefaultContourLineAttribute()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectcopy()Copy theLineAttribute.intgetCapStyle()Get the contour line cap style.java.awt.ColorgetColor()Get the contour line color.ContourLineAttributegetContourLineAttribute()Get the associatedContourLineAttributefloat[]getDashArray()Get dash array.floatgetDashPhase()Get the dash phase.java.awt.ColorgetLabelColor()Get the contour label color.java.awt.FontgetLabelFont()Get the contour label font.java.lang.StringgetLabelFormat()Get the contour label format.doublegetLabelHeightP()Get the contour label height.java.lang.StringgetLabelText()Return label text from associatedContourLineAttribute, if none return empty string.floatgetMiterLimit()Get the contour line miter limit.intgetMiterStyle()Get the contour line miter style.intgetSignificantDigits()Get the number of significant digits for auto labelling.intgetStyle()Get the contour line style.floatgetWidth()Get the contour line width.booleanisAutoLabel()Test if auto label is enabled.booleanisLabelEnabled()Test if the contour label is enabled.DefaultContourLineAttributesetContourLineAttribute(ContourLineAttribute attr)Set theContourLineAttributethat will potentially override attributes.voidsetLabelColor(java.awt.Color color)Set the default contour label color
Property Change:labelColor.voidsetLabelEnabled(boolean sle)Enable/disable the contour label.voidsetLabelFont(java.awt.Font font)Set the default contour label font.voidsetLabelFormat(java.lang.String format)Set the default contour label format.voidsetLabelHeightP(double height)Set the default contour label height.voidsetLabelText(java.lang.String label)Set label text for associatedContourLineAttribute.voidsetSignificantDigits(int sig)Set the number of significant digits for auto labelling.voidsetStyle(int st)Override the default setStyle.java.lang.StringtoString()Get aStringrepresentation of theLineAttribute.-
Methods inherited from class sgtplot.LineAttribute
addPropertyChangeListener, equals, getId, getMark, getMarkHeightP, isBatch, removePropertyChangeListener, setBatch, setBatch, setCapStyle, setColor, setDashArray, setDashPhase, setId, setMark, setMarkHeightP, setMiterLimit, setMiterStyle, setWidth
-
-
-
-
Constructor Detail
-
DefaultContourLineAttribute
public DefaultContourLineAttribute()
Default constructor. Defaults are:labelColor =
Color.blacklabelHeightP = 0.16 labelFont = null labelFormat = "" sigDigits = 2
-
-
Method Detail
-
setContourLineAttribute
public DefaultContourLineAttribute setContourLineAttribute(ContourLineAttribute attr)
Set theContourLineAttributethat will potentially override attributes.
-
getContourLineAttribute
public ContourLineAttribute getContourLineAttribute()
Get the associatedContourLineAttribute
-
setLabelText
public void setLabelText(java.lang.String label)
Set label text for associatedContourLineAttribute.
-
getLabelText
public java.lang.String getLabelText()
Return label text from associatedContourLineAttribute, if none return empty string.
-
setLabelEnabled
public void setLabelEnabled(boolean sle)
Enable/disable the contour label.
Property Change:labelEnabled.
-
isLabelEnabled
public boolean isLabelEnabled()
Test if the contour label is enabled. Use associatedContourLineAttributeif it exists and has labelEnabledOverrideen set tofalse.
-
setLabelColor
public void setLabelColor(java.awt.Color color)
Set the default contour label color
Property Change:labelColor.
-
getLabelColor
public java.awt.Color getLabelColor()
Get the contour label color. Use associatedContourLineAttributeif it exists and has labelColorOverrideen set tofalse.
-
setLabelHeightP
public void setLabelHeightP(double height)
Set the default contour label height.
Property Change:labelHeightP.
-
getLabelHeightP
public double getLabelHeightP()
Get the contour label height. Use associatedContourLineAttributeif it exists and has labelHeightPOverrideen set tofalse.
-
setLabelFont
public void setLabelFont(java.awt.Font font)
Set the default contour label font.
Property Change:labelFont.
-
getLabelFont
public java.awt.Font getLabelFont()
Get the contour label font. Use associatedContourLineAttributeif it exists and has labelFontOverrideen set tofalse.
-
setSignificantDigits
public void setSignificantDigits(int sig)
Set the number of significant digits for auto labelling.
Property Change:significantDigits.
-
getSignificantDigits
public int getSignificantDigits()
Get the number of significant digits for auto labelling.
-
setLabelFormat
public void setLabelFormat(java.lang.String format)
Set the default contour label format.
Property Change:labelFormat.
-
getLabelFormat
public java.lang.String getLabelFormat()
Get the contour label format. Use associatedContourLineAttributeif it exists and has labelFormatOverrideen set tofalse.
-
isAutoLabel
public boolean isAutoLabel()
Test if auto label is enabled. Use associatedContourLineAttributeif it exists otherwise always returnstrue.
-
getDashArray
public float[] getDashArray()
Get dash array. Use associatedContourLineAttributeif it exists and has dashArrayOverrideen set tofalse.- Overrides:
getDashArrayin classLineAttribute
-
getDashPhase
public float getDashPhase()
Get the dash phase. Use associatedContourLineAttributeif it exists and has dashPhaseOverrideen set tofalse.- Overrides:
getDashPhasein classLineAttribute
-
setStyle
public void setStyle(int st)
Override the default setStyle. Legal styles do not include MARK or MARK_LINE.- Overrides:
setStylein classLineAttribute- Parameters:
st- line style
-
getStyle
public int getStyle()
Get the contour line style. Use associatedContourLineAttributeif it exists and has styleOverrideen set tofalse.- Overrides:
getStylein classLineAttribute- Returns:
- line style
-
getColor
public java.awt.Color getColor()
Get the contour line color. Use associatedContourLineAttributeif it exists and has colorOverrideen set tofalse.- Overrides:
getColorin classLineAttribute- Returns:
- line
Color
-
getWidth
public float getWidth()
Get the contour line width. Use associatedContourLineAttributeif it exists and has widthOverrideen set tofalse.- Overrides:
getWidthin classLineAttribute- Returns:
- line width in physcial coordinates.
-
getCapStyle
public int getCapStyle()
Get the contour line cap style. Use associatedContourLineAttributeif it exists and has capStyleOverrideen set tofalse.- Overrides:
getCapStylein classLineAttribute
-
getMiterStyle
public int getMiterStyle()
Get the contour line miter style. Use associatedContourLineAttributeif it exists and has miterStyleOverrideen set tofalse.- Overrides:
getMiterStylein classLineAttribute
-
getMiterLimit
public float getMiterLimit()
Get the contour line miter limit. Use associatedContourLineAttributeif it exists and has miterLimitOverrideen set tofalse.- Overrides:
getMiterLimitin classLineAttribute
-
toString
public java.lang.String toString()
Description copied from class:LineAttributeGet aStringrepresentation of theLineAttribute.- Specified by:
toStringin interfaceAttribute- Overrides:
toStringin classLineAttribute- Returns:
Stringrepresentation
-
copy
public java.lang.Object copy()
Description copied from class:LineAttributeCopy theLineAttribute.- Overrides:
copyin classLineAttribute- Returns:
- new
LineAttribute
-
-
DMelt 3.0 © DataMelt by jWork.ORG