Enum PanelGraphics.Mode

java.lang.Object
java.lang.Enum<PanelGraphics.Mode>
org.bzdev.swing.PanelGraphics.Mode
All Implemented Interfaces:
Serializable, Comparable<PanelGraphics.Mode>
Enclosing class:
PanelGraphics

public static enum PanelGraphics.Mode extends Enum<PanelGraphics.Mode>
PanelGraphics modes. The term "drawing area" is described in the documentation for PanelGraphics.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Do not perform any scaling.
    Scale the drawing area in the horizontal and vertical directions so that it just fits inside a JPanel.
    Scale the drawing area equally in the horizontal and vertical directions so that it just fits inside a JPanel.
    Scale the drawing area equally in the horizontal and vertical directions so that it's horizontal dimensions just fits inside a JPanel.
    Scale the drawing area equally in the horizontal and vertical directions so that it's vertical dimensions just fits inside a JPanel.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • FIT

      public static final PanelGraphics.Mode FIT
      Scale the drawing area equally in the horizontal and vertical directions so that it just fits inside a JPanel.
    • FIT_HORIZONTAL

      public static final PanelGraphics.Mode FIT_HORIZONTAL
      Scale the drawing area equally in the horizontal and vertical directions so that it's horizontal dimensions just fits inside a JPanel.
    • FIT_VERTICAL

      public static final PanelGraphics.Mode FIT_VERTICAL
      Scale the drawing area equally in the horizontal and vertical directions so that it's vertical dimensions just fits inside a JPanel.
    • AS_IS

      public static final PanelGraphics.Mode AS_IS
      Do not perform any scaling. The drawing area will have an origin at (0, 0).
    • FILL

      public static final PanelGraphics.Mode FILL
      Scale the drawing area in the horizontal and vertical directions so that it just fits inside a JPanel. If the dimensions of the area and JPanel are not consistent, the scaling may be unequal.
  • Method Details

    • values

      public static PanelGraphics.Mode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PanelGraphics.Mode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null