All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.lessvoid.nifty.examples.NiftyExample Maven / Gradle / Ivy

Go to download

Lots of Nifty example code! You can find the source for nearly all demos/tutorials in here.

There is a newer version: 1.4.3
Show newest version
package de.lessvoid.nifty.examples;

import de.lessvoid.nifty.Nifty;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * This class defines a example for Nifty. If defines how the example is supposed to be load in a unified way.
 *
 * @author Martin Karing <[email protected]>
 */
public interface NiftyExample {
  /**
   * The start screen that is supposed to be load initial.
   *
   * @return the name of the start screen
   */
  String getStartScreen();

  /**
   * The resource path of the XML file that is supposed to be load for the example.
   *
   * @return the resource path to the main XML or {@code null} in case no XML file is supposed to be load
   */
  @Nullable
  String getMainXML();

  /**
   * The title of this demonstration example.
   *
   * @return the title of this example
   */
  @Nonnull
  String getTitle();

  /**
   * This function is called right before the example itself is executed. In case building or changing the GUI before
   * its displayed is required: This is the place.
   *
   * @param nifty the used instance of the Nifty-GUI
   */
  void prepareStart(Nifty nifty);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy