Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Painters are a sort of user interface delegate for drawing foregrounds and backgrounds. SwingX includes some built-in painters:

  • AlphaPainter
  • BusyPainter
  • CapsulePainter
  • CheckerboardPainter
  • CompoundPainter
  • GlossPainter
  • ImagePainter
  • MattePainter
  • PinstripePainter
  • RectanglePainter
  • TextPainter
  • URLPainter

    Java class name:AlphaPainter

    SwingXBuilder node: alphaPainter

    Attribute

    Expected Type

    alpha

    float

    painters

    ArrayList<Painter> or Painter[]

    Java class name:BusyPainter

    SwingXBuilder node: busyPainter

    Attribute

    Expected Type

    barLength

    float

    barWidth

    float

    baseColor

    Color

    Java class name:CapsulePainter

    SwingXBuilder node: capsulePainter

    Attribute

    Expected Type

    portion

    CapsulePainter.Portion

    Java class name:CheckerboardPainter

    SwingXBuilder node: checkerboardPainter

    Attribute

    Expected Type

    squareSize

    float

    lightPaint

    Color

    darkPaint

    Color

CompoundPainter, as its name indicates, is a collection of other Painters. Order is important. CompoundPainters build from back to front. Here is an example of a CompoundPainter:

 AlphaPainter is a CompoundPainter as well, adding an alpha value to a collection of Painters.

  • No labels