Package com.marcusslover.plus.lib.item
Enum Class Canvas.PopulatorContext.DefaultViewStrategy
java.lang.Object
java.lang.Enum<Canvas.PopulatorContext.DefaultViewStrategy>
com.marcusslover.plus.lib.item.Canvas.PopulatorContext.DefaultViewStrategy
- All Implemented Interfaces:
Serializable,Comparable<Canvas.PopulatorContext.DefaultViewStrategy>,Constable
- Enclosing class:
Canvas.PopulatorContext<T>
public static enum Canvas.PopulatorContext.DefaultViewStrategy
extends Enum<Canvas.PopulatorContext.DefaultViewStrategy>
Default view strategies.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFills all slots on the canvas, except the edges on the sides.Fills all first possible slots on the canvas.Fills all first possible middle slots on the canvas. -
Method Summary
Modifier and TypeMethodDescriptionavoidEdges(int rows) Gets all slots that are not on the edges.middleSlots(int rows) Gets all middle slots from the given-sized menu.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FULL
Fills all first possible slots on the canvas. -
MIDDLE
Fills all first possible middle slots on the canvas. -
AVOID_SIDE_EDGES
Fills all slots on the canvas, except the edges on the sides. Note that this strategy DOES fill the upper and lower edges.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
middleSlots
Gets all middle slots from the given-sized menu. The middle slots are the slots that are not on the edges.- Parameters:
rows- the rows- Returns:
- the middle slots
-
avoidEdges
Gets all slots that are not on the edges.- Parameters:
rows- the rows- Returns:
- the slots
-