sk.baka.ambient
Enum ZoomEnum

java.lang.Object
  extended by java.lang.Enum<ZoomEnum>
      extended by sk.baka.ambient.ZoomEnum
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ZoomEnum>

public enum ZoomEnum
extends java.lang.Enum<ZoomEnum>

Zoom categories. Generally, low integer values means smaller image.

Author:
Martin Vysny

Enum Constant Summary
Buttons
          The menu/sub-menu buttons.
ListViewItems
          Zoom of the list view items.
 
Field Summary
 Interval levels
          Allowed levels.
 
Method Summary
 int getLevel(java.util.Map<ZoomEnum,java.lang.Integer> map)
          Returns zoom level for this category.
static java.util.EnumMap<ZoomEnum,java.lang.Integer> getMinLevels()
          Returns a map of levels having minimal levels.
 void setLevel(java.util.Map<ZoomEnum,java.lang.Integer> map, int level)
          Returns zoom level for this category.
static ZoomEnum valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ZoomEnum[] values()
          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 Detail

Buttons

public static final ZoomEnum Buttons
The menu/sub-menu buttons.


ListViewItems

public static final ZoomEnum ListViewItems
Zoom of the list view items.

Field Detail

levels

public final Interval levels
Allowed levels.

Method Detail

values

public static ZoomEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ZoomEnum c : ZoomEnum.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ZoomEnum valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getMinLevels

public static java.util.EnumMap<ZoomEnum,java.lang.Integer> getMinLevels()
Returns a map of levels having minimal levels.

Returns:
map with all zoom constants.

getLevel

public int getLevel(java.util.Map<ZoomEnum,java.lang.Integer> map)
Returns zoom level for this category.

Parameters:
map - the category map to query.
Returns:
zoom level or minimum level if not yet specified.

setLevel

public void setLevel(java.util.Map<ZoomEnum,java.lang.Integer> map,
                     int level)
Returns zoom level for this category.

Parameters:
map - the category map to modify.
level - the level


Copyright © 2007-2009. All Rights Reserved.