Class DefaultFigureStyle
java.lang.Object
com.bc.ceres.binding.PropertyContainer
com.bc.ceres.swing.figure.support.DefaultFigureStyle
- All Implemented Interfaces:
PropertyChangeEmitter
,PropertySet
,FigureStyle
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyDescriptor
static final PropertyDescriptor
static final PropertyDescriptor
static final PropertyDescriptor
static final PropertyDescriptor
static final PropertyDescriptor
static final PropertyDescriptor
static final PropertyDescriptor
static final PropertyDescriptor
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFigureStyle
(FigureStyle parentStyle) DefaultFigureStyle
(String name) DefaultFigureStyle
(String name, FigureStyle parentStyle) -
Method Summary
Modifier and TypeMethodDescriptionstatic FigureStyle
createFromCss
(String css) static FigureStyle
createLineStyle
(Paint strokePaint) static FigureStyle
createLineStyle
(Paint strokePaint, Stroke stroke) static FigureStyle
createPointStyle
(Symbol symbol) static FigureStyle
createPointStyle
(Symbol symbol, Paint fillPaint, Paint strokePaint, Stroke stroke) static FigureStyle
createPointStyle
(Symbol symbol, Paint strokePaint, Stroke stroke) static DefaultFigureStyle
createPolygonStyle
(Paint fillPaint) static DefaultFigureStyle
createPolygonStyle
(Paint fillPaint, Paint strokePaint) static DefaultFigureStyle
createPolygonStyle
(Paint fillPaint, Paint strokePaint, Stroke stroke) boolean
void
fromCssString
(String css) double
Gets the effective fill paint used for drawing the interior of a polygonal shape.getName()
Gets the effective stroke style used for drawing the exterior of a lineal or polygonal shape.getStroke
(double scale) Gets the effective stroke style used for drawing the exterior of a lineal or polygonal shape.double
Gets the effective stroke paint used for drawing the exterior of a lineal or polygonal shape.double
Gets the effective point symbol used for drawing of points figures.double
double
<T> T
Gets the value of the named property.void
setFillColor
(Color fillColor) void
setFillOpacity
(double opacity) void
setStrokeColor
(Color strokeColor) void
setStrokeOpacity
(double opacity) void
setStrokeWidth
(double width) void
setSymbolImagePath
(String symbolName) void
setSymbolName
(String symbolName) void
setSymbolRefX
(double refX) void
setSymbolRefY
(double refY) void
Sets the value of the named property.Methods inherited from class com.bc.ceres.binding.PropertyContainer
addProperties, addProperty, addPropertyChangeListener, addPropertyChangeListener, createForFields, createMapBacked, createMapBacked, createMapBacked, createMapBacked, createObjectBacked, createObjectBacked, createObjectBacked, createValueBacked, createValueBacked, getDescriptor, getProperties, getProperty, isPropertyDefined, removeProperties, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setDefaultValues
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.bc.ceres.binding.PropertyChangeEmitter
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
Methods inherited from interface com.bc.ceres.binding.PropertySet
addProperties, addProperty, getDescriptor, getProperties, getProperty, isPropertyDefined, removeProperties, removeProperty, setDefaultValues
-
Field Details
-
FILL_COLOR
-
FILL_OPACITY
-
STROKE_COLOR
-
STROKE_OPACITY
-
STROKE_WIDTH
-
SYMBOL_NAME
-
SYMBOL_IMAGE
-
SYMBOL_REF_X
-
SYMBOL_REF_Y
-
-
Constructor Details
-
DefaultFigureStyle
public DefaultFigureStyle() -
DefaultFigureStyle
-
DefaultFigureStyle
-
DefaultFigureStyle
-
-
Method Details
-
createFromCss
-
createPointStyle
-
createPointStyle
-
createPointStyle
public static FigureStyle createPointStyle(Symbol symbol, Paint fillPaint, Paint strokePaint, Stroke stroke) -
createLineStyle
-
createLineStyle
-
createPolygonStyle
-
createPolygonStyle
-
createPolygonStyle
public static DefaultFigureStyle createPolygonStyle(Paint fillPaint, Paint strokePaint, Stroke stroke) -
getName
- Specified by:
getName
in interfaceFigureStyle
-
getValue
Description copied from interface:PropertySet
Gets the value of the named property.- Specified by:
getValue
in interfacePropertySet
- Overrides:
getValue
in classPropertyContainer
- Parameters:
name
- The property name.- Returns:
- The property value or
null
if a property with the given name does not exist.
-
setValue
Description copied from interface:PropertySet
Sets the value of the named property.- Specified by:
setValue
in interfacePropertySet
- Overrides:
setValue
in classPropertyContainer
- Parameters:
name
- The property name.value
- The new property value.- Throws:
IllegalArgumentException
- If the value is illegal. The cause will always be aValidationException
.
-
getSymbol
Description copied from interface:FigureStyle
Gets the effective point symbol used for drawing of points figures.- Specified by:
getSymbol
in interfaceFigureStyle
- Returns:
- The effective point symbol used for drawing.
-
getSymbolName
- Specified by:
getSymbolName
in interfaceFigureStyle
-
setSymbolName
-
getSymbolImagePath
- Specified by:
getSymbolImagePath
in interfaceFigureStyle
-
setSymbolImagePath
-
getSymbolRefX
public double getSymbolRefX()- Specified by:
getSymbolRefX
in interfaceFigureStyle
-
setSymbolRefX
public void setSymbolRefX(double refX) -
getSymbolRefY
public double getSymbolRefY()- Specified by:
getSymbolRefY
in interfaceFigureStyle
-
setSymbolRefY
public void setSymbolRefY(double refY) -
getStroke
Description copied from interface:FigureStyle
Gets the effective stroke style used for drawing the exterior of a lineal or polygonal shape. The effective paint may result from a number of different style properties.- Specified by:
getStroke
in interfaceFigureStyle
- Returns:
- The effective stroke style used for drawing.
-
getStroke
Description copied from interface:FigureStyle
Gets the effective stroke style used for drawing the exterior of a lineal or polygonal shape. The effective paint may result from a number of different style properties.- Specified by:
getStroke
in interfaceFigureStyle
- Parameters:
scale
- The current model-to-view scaling.- Returns:
- The effective stroke style used for drawing.
-
getStrokePaint
Gets the effective stroke paint used for drawing the exterior of a lineal or polygonal shape. The effective paint may result from a number of different style properties.- Specified by:
getStrokePaint
in interfaceFigureStyle
- Returns:
- The effective stroke paint used for drawing.
-
getStrokeColor
- Specified by:
getStrokeColor
in interfaceFigureStyle
-
setStrokeColor
-
getStrokeOpacity
public double getStrokeOpacity()- Specified by:
getStrokeOpacity
in interfaceFigureStyle
-
setStrokeOpacity
public void setStrokeOpacity(double opacity) -
getStrokeWidth
public double getStrokeWidth()- Specified by:
getStrokeWidth
in interfaceFigureStyle
-
setStrokeWidth
public void setStrokeWidth(double width) -
getFillPaint
Gets the effective fill paint used for drawing the interior of a polygonal shape. The effective paint may result from a number of different style properties.- Specified by:
getFillPaint
in interfaceFigureStyle
- Returns:
- The effective fill paint used for drawing.
-
getFillColor
- Specified by:
getFillColor
in interfaceFigureStyle
-
setFillColor
-
getFillOpacity
public double getFillOpacity()- Specified by:
getFillOpacity
in interfaceFigureStyle
-
setFillOpacity
public void setFillOpacity(double opacity) -
toCssString
- Specified by:
toCssString
in interfaceFigureStyle
-
fromCssString
- Specified by:
fromCssString
in interfaceFigureStyle
-
equals
-