Class Widget

  • All Implemented Interfaces:
    Renderable, Updatable, Scene
    Direct Known Subclasses:
    Button, Form, SelectBox, TextField, TextLabel

    public abstract class Widget
    extends java.lang.Object
    implements Scene
    Base class for all subsystems that emulate user interface widgets (buttons, select boxes, text fields, etc.). This does not actually use the platform's native user interface, but implements graphics and interaction entirely in MultimediaLib so that the widgets works across all platforms.
    • Constructor Summary

      Constructors 
      Constructor Description
      Widget​(WidgetStyle style)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Location getLocation()  
      WidgetStyle getStyle()  
      protected float getX()  
      protected float getY()  
      void setLocation​(Location location)  
      void start()
      Widgets do not have initialization logic by default, but this can be added by overriding this method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface nl.colorize.multimedialib.renderer.Renderable

        render
      • Methods inherited from interface nl.colorize.multimedialib.scene.Scene

        end
      • Methods inherited from interface nl.colorize.multimedialib.renderer.Updatable

        update
    • Constructor Detail

    • Method Detail

      • start

        public void start()
        Widgets do not have initialization logic by default, but this can be added by overriding this method.
        Specified by:
        start in interface Scene
      • setLocation

        public void setLocation​(Location location)
      • getLocation

        public Location getLocation()
      • getX

        protected float getX()
      • getY

        protected float getY()