Class StatusDisplayBar

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
HPIndicator, KarmaIndicator, ManaIndicator

public class StatusDisplayBar extends JComponent
A component for drawing the various color bars.
See Also:
Serialized Form
  • Constructor Details

    • StatusDisplayBar

      public StatusDisplayBar(ScalingModel model)
      Create a StatusDisplayBar.
      Parameters:
      model - Scaling model. representation corresponds to the length of the color bar. The StatusDisplayBar will take care of the maximum representation value
  • Method Details

    • getModel

      public ScalingModel getModel()
      Return the value scaling model in use.
      Returns:
      model
    • setBarColor

      public void setBarColor(Color color)
      Set the color of the bar.
      Parameters:
      color - new color
    • setPainter

      protected void setPainter(StatusDisplayBar.BarPainter painter)
      Set painter for fancy colored bars.
      Parameters:
      painter - painter for coloring the template image
    • valueChanged

      protected void valueChanged()
      Called when the model value changes.
    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent