Package snap.view

Class ViewBuilder<T extends View>

java.lang.Object
snap.view.ViewBuilder<T>

public class ViewBuilder<T extends View> extends Object
A class to facilitate building views quickly.
  • Constructor Details

    • ViewBuilder

      public ViewBuilder(Class<T> aClass)
      Constructor.
  • Method Details

    • cls

      public ViewBuilder<T> cls(Class<? extends View> aClass)
      Set class.
    • name

      public ViewBuilder<T> name(String aName)
      Set name.
    • text

      public ViewBuilder<T> text(String aString)
      Set text.
    • font

      public ViewBuilder<T> font(Font aFont)
      Set font.
    • toolTip

      public ViewBuilder<T> toolTip(String aString)
      Set font.
    • reset

      public void reset()
      Resets ViewBuilder.
    • save

      public T save()
      Builds and save current view.
    • build

      public T build()
      Builds the current view.
    • buildAll

      public T[] buildAll()
      Returns all views.
    • buildMenu

      public Menu buildMenu(String aName, String aText)
      Returns menu with all menu items.