Class DefaultFigureStyle

java.lang.Object
com.bc.ceres.binding.PropertyContainer
com.bc.ceres.swing.figure.support.DefaultFigureStyle
All Implemented Interfaces:
PropertyChangeEmitter, PropertySet, FigureStyle

public class DefaultFigureStyle extends PropertyContainer implements FigureStyle
  • Field Details

  • Constructor Details

    • DefaultFigureStyle

      public DefaultFigureStyle()
    • DefaultFigureStyle

      public DefaultFigureStyle(String name)
    • DefaultFigureStyle

      public DefaultFigureStyle(FigureStyle parentStyle)
    • DefaultFigureStyle

      public DefaultFigureStyle(String name, FigureStyle parentStyle)
  • Method Details

    • createFromCss

      public static FigureStyle createFromCss(String css)
    • createPointStyle

      public static FigureStyle createPointStyle(Symbol symbol)
    • createPointStyle

      public static FigureStyle createPointStyle(Symbol symbol, Paint strokePaint, Stroke stroke)
    • createPointStyle

      public static FigureStyle createPointStyle(Symbol symbol, Paint fillPaint, Paint strokePaint, Stroke stroke)
    • createLineStyle

      public static FigureStyle createLineStyle(Paint strokePaint)
    • createLineStyle

      public static FigureStyle createLineStyle(Paint strokePaint, Stroke stroke)
    • createPolygonStyle

      public static DefaultFigureStyle createPolygonStyle(Paint fillPaint)
    • createPolygonStyle

      public static DefaultFigureStyle createPolygonStyle(Paint fillPaint, Paint strokePaint)
    • createPolygonStyle

      public static DefaultFigureStyle createPolygonStyle(Paint fillPaint, Paint strokePaint, Stroke stroke)
    • getName

      public String getName()
      Specified by:
      getName in interface FigureStyle
    • getValue

      public <T> T getValue(String name)
      Description copied from interface: PropertySet
      Gets the value of the named property.
      Specified by:
      getValue in interface PropertySet
      Overrides:
      getValue in class PropertyContainer
      Parameters:
      name - The property name.
      Returns:
      The property value or null if a property with the given name does not exist.
    • setValue

      public void setValue(String name, Object value) throws IllegalArgumentException
      Description copied from interface: PropertySet
      Sets the value of the named property.
      Specified by:
      setValue in interface PropertySet
      Overrides:
      setValue in class PropertyContainer
      Parameters:
      name - The property name.
      value - The new property value.
      Throws:
      IllegalArgumentException - If the value is illegal. The cause will always be a ValidationException.
    • getSymbol

      public Symbol getSymbol()
      Description copied from interface: FigureStyle
      Gets the effective point symbol used for drawing of points figures.
      Specified by:
      getSymbol in interface FigureStyle
      Returns:
      The effective point symbol used for drawing.
    • getSymbolName

      public String getSymbolName()
      Specified by:
      getSymbolName in interface FigureStyle
    • setSymbolName

      public void setSymbolName(String symbolName)
    • getSymbolImagePath

      public String getSymbolImagePath()
      Specified by:
      getSymbolImagePath in interface FigureStyle
    • setSymbolImagePath

      public void setSymbolImagePath(String symbolName)
    • getSymbolRefX

      public double getSymbolRefX()
      Specified by:
      getSymbolRefX in interface FigureStyle
    • setSymbolRefX

      public void setSymbolRefX(double refX)
    • getSymbolRefY

      public double getSymbolRefY()
      Specified by:
      getSymbolRefY in interface FigureStyle
    • setSymbolRefY

      public void setSymbolRefY(double refY)
    • getStroke

      public Stroke 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 interface FigureStyle
      Returns:
      The effective stroke style used for drawing.
    • getStroke

      public Stroke getStroke(double scale)
      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 interface FigureStyle
      Parameters:
      scale - The current model-to-view scaling.
      Returns:
      The effective stroke style used for drawing.
    • getStrokePaint

      public Paint 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 interface FigureStyle
      Returns:
      The effective stroke paint used for drawing.
    • getStrokeColor

      public Color getStrokeColor()
      Specified by:
      getStrokeColor in interface FigureStyle
    • setStrokeColor

      public void setStrokeColor(Color strokeColor)
    • getStrokeOpacity

      public double getStrokeOpacity()
      Specified by:
      getStrokeOpacity in interface FigureStyle
    • setStrokeOpacity

      public void setStrokeOpacity(double opacity)
    • getStrokeWidth

      public double getStrokeWidth()
      Specified by:
      getStrokeWidth in interface FigureStyle
    • setStrokeWidth

      public void setStrokeWidth(double width)
    • getFillPaint

      public Paint 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 interface FigureStyle
      Returns:
      The effective fill paint used for drawing.
    • getFillColor

      public Color getFillColor()
      Specified by:
      getFillColor in interface FigureStyle
    • setFillColor

      public void setFillColor(Color fillColor)
    • getFillOpacity

      public double getFillOpacity()
      Specified by:
      getFillOpacity in interface FigureStyle
    • setFillOpacity

      public void setFillOpacity(double opacity)
    • toCssString

      public String toCssString()
      Specified by:
      toCssString in interface FigureStyle
    • fromCssString

      public void fromCssString(String css)
      Specified by:
      fromCssString in interface FigureStyle
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object