Class TLspStrokedLineStyle.Builder<B extends TLspStrokedLineStyle.Builder<B>>

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle.Builder<B>
com.luciad.view.lightspeed.style.TLspStrokedLineStyle.Builder<B>
Enclosing class:
TLspStrokedLineStyle

public static class TLspStrokedLineStyle.Builder<B extends TLspStrokedLineStyle.Builder<B>> extends ALspStyle.Builder<B>
Builder for stroked line styles. This builder can be used to create sequences of glyphs, which together form a stroke. Each of the various glyph() methods appends a particular type of glyph to the resulting pattern.
Since:
2012.0
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • all

      public B all(ALspStyle aStyle)
      Description copied from class: ALspStyle.Builder
      Sets all parameters on the builder based on the given style.

      This is useful for example to create a new style that has almost all properties equal to another style.

      Specified by:
      all in class ALspStyle.Builder<B extends TLspStrokedLineStyle.Builder<B>>
      Parameters:
      aStyle - the style to copy
      Returns:
      this
    • build

      public TLspStrokedLineStyle build()
      Description copied from class: ALspStyle.Builder
      Builds the style with the set parameters.
      Specified by:
      build in class ALspStyle.Builder<B extends TLspStrokedLineStyle.Builder<B>>
      Returns:
      the resulting style
    • rect

      public B rect(int aWidth, int aHeight, Color aColor)
      Appends a glyph consisting of a simple colored rectangle.
      Parameters:
      aWidth - the width of the rectangle
      aHeight - the height of the rectangle
      aColor - the fill color of the rectangle
      Returns:
      this builder
    • image

      public B image(BufferedImage aImage)
      Appends the specified image as a glyph.
      Parameters:
      aImage - the image to be appended to the stroke pattern
      Returns:
      this builder
    • image

      public B image(BufferedImage aImage, Color aModulationColor)
      Appends the specified image as a glyph and assigns it the given modulation color.
      Parameters:
      aImage - the image to be appended to the stroke pattern
      aModulationColor - the color with which the image will be multiplied while rendering the glyph
      Returns:
      this builder
    • icon

      public B icon(ILcdIcon aIcon)
      Appends the specified icon as a glyph. Icons are internally converted into images.
      Parameters:
      aIcon - the icon to be appended to the stroke pattern
      Returns:
      this builder
    • text

      public B text(String aText, Color aColor)
      Appends a text string as a glyph. Text strings are internally converted into images. The whole string is treated as a single glyph, which implies that it should never be broken up when being positioned in a view. If you want to add a long string, consider breaking it up into individual words, character groups or characters and appending these as separate glyphs. This will give painters more room when positioning the glyphs and can avoid large gaps in the painted result.
      Parameters:
      aText - the string to be appended to the stroke pattern
      aColor - the color of the text
      Returns:
      this builder
    • text

      public B text(String aText, Color aColor, Font aFont)
      Appends a text string as a glyph. Text strings are internally converted into images. The whole string is treated as a single glyph, which implies that it should never be broken up when being positioned in a view. If you want to add a long string, consider breaking it up into individual words, character groups or characters and appending these as separate glyphs. This will give painters more room when positioning the glyphs and can avoid large gaps in the painted result.
      Parameters:
      aText - the string to be appended to the stroke pattern
      aColor - the color of the text
      aFont - the font
      Returns:
      this builder
    • shape

      public B shape(Shape aShape, Color aColor)
      Appends a Shape as a glyph. The shape is given a black halo by default. To change the halo style, use shape(java.awt.Shape, java.awt.Color, java.awt.Color, int).
      Parameters:
      aShape - the shape to be appended to the stroke pattern
      aColor - the fill color of the shape
      Returns:
      this builder
    • shape

      public B shape(Shape aShape, Color aColor, Color aHaloColor, int aHaloThickness)
      Appends a Shape with a configurable halo style. To disable the halo, set the thickness to zero and/or the halo color to null.
      Parameters:
      aShape - the shape to be appended to the stroke pattern
      aColor - the fill color of the shape
      aHaloColor - the halo color of the shape (passing null disables the halo)
      aHaloThickness - the halo thickness of the shape (passing zero disables the halo)
      Returns:
      this builder
    • space

      public B space(int aWidth)
      Appends a blank glyph to the pattern.
      Parameters:
      aWidth - the width of the empty space that should be added
      Returns:
      this builder
    • zOrder

      public B zOrder(int aZOrder)
      Sets the Z-order of this style. Styles should be painted from lowest to highest Z-order.

      Increasing the number of different Z-orders can negatively impact painting performance. By default, it is set to 0.

      Parameters:
      aZOrder - the z order
      Returns:
      this