Package tripleplay.ui

Class GlyphWidget<T extends GlyphWidget<T>>


public abstract class GlyphWidget<T extends GlyphWidget<T>> extends SizableWidget<T>
Base for widgets that consist of a single glyph. Performs all boilerplate layout stuff and delegates the painting to subclasses: paint(Canvas). Note this should only be used for widgets that need to do some composition of images or other drawing for their display. Otherwise they should do their own arranging of group and image layers etc.
  • Method Details

    • render

      public void render()
      Redraws this widget's glyph if the widget is visible and laid out. Called automatically whenever the widget is laid out. Note that this is not the same as Element.invalidate(). That's protected and causes all parent containers to re-layout. This simply updates the image.