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 PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptorstatic final PropertyDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionDefaultFigureStyle(FigureStyle parentStyle) DefaultFigureStyle(String name) DefaultFigureStyle(String name, FigureStyle parentStyle) -
Method Summary
Modifier and TypeMethodDescriptionstatic FigureStylecreateFromCss(String css) static FigureStylecreateLineStyle(Paint strokePaint) static FigureStylecreateLineStyle(Paint strokePaint, Stroke stroke) static FigureStylecreatePointStyle(Symbol symbol) static FigureStylecreatePointStyle(Symbol symbol, Paint fillPaint, Paint strokePaint, Stroke stroke) static FigureStylecreatePointStyle(Symbol symbol, Paint strokePaint, Stroke stroke) static DefaultFigureStylecreatePolygonStyle(Paint fillPaint) static DefaultFigureStylecreatePolygonStyle(Paint fillPaint, Paint strokePaint) static DefaultFigureStylecreatePolygonStyle(Paint fillPaint, Paint strokePaint, Stroke stroke) booleanvoidfromCssString(String css) doubleGets 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.doubleGets the effective stroke paint used for drawing the exterior of a lineal or polygonal shape.doubleGets the effective point symbol used for drawing of points figures.doubledouble<T> TGets the value of the named property.voidsetFillColor(Color fillColor) voidsetFillOpacity(double opacity) voidsetStrokeColor(Color strokeColor) voidsetStrokeOpacity(double opacity) voidsetStrokeWidth(double width) voidsetSymbolImagePath(String symbolName) voidsetSymbolName(String symbolName) voidsetSymbolRefX(double refX) voidsetSymbolRefY(double refY) voidSets 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, setDefaultValuesMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.bc.ceres.binding.PropertyChangeEmitter
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListenerMethods 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:
getNamein interfaceFigureStyle
-
getValue
Description copied from interface:PropertySetGets the value of the named property.- Specified by:
getValuein interfacePropertySet- Overrides:
getValuein classPropertyContainer- Parameters:
name- The property name.- Returns:
- The property value or
nullif a property with the given name does not exist.
-
setValue
Description copied from interface:PropertySetSets the value of the named property.- Specified by:
setValuein interfacePropertySet- Overrides:
setValuein 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:FigureStyleGets the effective point symbol used for drawing of points figures.- Specified by:
getSymbolin interfaceFigureStyle- Returns:
- The effective point symbol used for drawing.
-
getSymbolName
- Specified by:
getSymbolNamein interfaceFigureStyle
-
setSymbolName
-
getSymbolImagePath
- Specified by:
getSymbolImagePathin interfaceFigureStyle
-
setSymbolImagePath
-
getSymbolRefX
public double getSymbolRefX()- Specified by:
getSymbolRefXin interfaceFigureStyle
-
setSymbolRefX
public void setSymbolRefX(double refX) -
getSymbolRefY
public double getSymbolRefY()- Specified by:
getSymbolRefYin interfaceFigureStyle
-
setSymbolRefY
public void setSymbolRefY(double refY) -
getStroke
Description copied from interface:FigureStyleGets 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:
getStrokein interfaceFigureStyle- Returns:
- The effective stroke style used for drawing.
-
getStroke
Description copied from interface:FigureStyleGets 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:
getStrokein 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:
getStrokePaintin interfaceFigureStyle- Returns:
- The effective stroke paint used for drawing.
-
getStrokeColor
- Specified by:
getStrokeColorin interfaceFigureStyle
-
setStrokeColor
-
getStrokeOpacity
public double getStrokeOpacity()- Specified by:
getStrokeOpacityin interfaceFigureStyle
-
setStrokeOpacity
public void setStrokeOpacity(double opacity) -
getStrokeWidth
public double getStrokeWidth()- Specified by:
getStrokeWidthin 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:
getFillPaintin interfaceFigureStyle- Returns:
- The effective fill paint used for drawing.
-
getFillColor
- Specified by:
getFillColorin interfaceFigureStyle
-
setFillColor
-
getFillOpacity
public double getFillOpacity()- Specified by:
getFillOpacityin interfaceFigureStyle
-
setFillOpacity
public void setFillOpacity(double opacity) -
toCssString
- Specified by:
toCssStringin interfaceFigureStyle
-
fromCssString
- Specified by:
fromCssStringin interfaceFigureStyle
-
equals
-