Package cnuphys.lund

Class LundStyle

java.lang.Object
cnuphys.lund.LundStyle

public class LundStyle extends Object
  • Field Details

  • Method Details

    • getLineColor

      public Color getLineColor()
      Get the line color
      Returns:
      the line color
    • getFillColor

      public Color getFillColor()
      Get the fill color
      Returns:
      the fill color
    • getTransparentFillColor

      public Color getTransparentFillColor()
      Get a transparent version of the fill color.
      Returns:
      a transparent version of the fill color.
    • setLineColor

      public void setLineColor(Color color)
      Set the line color
      Parameters:
      color - the new line color
    • setFillColor

      public void setFillColor(Color color)
      Set the fill color
      Parameters:
      color - the new fill color
    • getStroke

      public Stroke getStroke()
      Get the stroke
      Returns:
      the drawing stroke
    • addLundStyle

      public static LundStyle addLundStyle(LundId lundId, Color lineColor)
      Add a lund style into the database
      Parameters:
      lundId - the lund particle id
      lineColor - the line color
      Returns:
      the added style (or if it already existed, taken from the database)
    • getStyle

      public static LundStyle getStyle(LundId lundId)
      Get a style for a given lund Id. Returns _unknownStyle if the style hasn't been added yet or lundId is null.
      Parameters:
      lundId - the Id to match
      Returns:
      the style