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

de.lessvoid.nifty.examples.resolution.ResolutionControl 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.resolution;

import javax.annotation.Nonnull;
import java.util.Collection;

/**
 * The resolution change example needs a control to actually read and alter the used resolutions. This interface needs
 * to be implemented by the implementing renderers to provide the access to the different functions.
 *
 * @param  the type of the objects that are used to identify the different resolution values
 * @author Martin Karing <[email protected]>
 */
public interface ResolutionControl {
  /**
   * Get a list of resolutions that can be applied.
   *
   * @return the list of valid resolutions
   */
  @Nonnull
  Collection getResolutions();

  /**
   * Set a resolution that should be used from now on.
   *
   * @param newResolution the new resolution
   */
  void setResolution(T newResolution);

  /**
   * Get the resolution that applies currently.
   *
   * @return the current resolution
   */
  T getCurrentResolution();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy