public class GridUiNavigation extends java.lang.Object implements UiNavigation
UiNavigation
implementation that treats all UiElement
s as
placed inside a gridConstructor and Description |
---|
GridUiNavigation(int xsColumns)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getTotalColumns()
Returns the total amount of columns for the current
ScreenSize |
int |
getTotalRows()
Returns the total amount of rows for the current
ScreenSize |
void |
layout(ScreenSize screenSize) |
Actionable |
navigate(int keycode) |
void |
resetCursor() |
void |
set(int index,
Actionable actionable) |
void |
set(int x,
int y,
Actionable actionable) |
void |
setWidth(ScreenSize screenSize,
int columns)
Sets the amount columns of the grid on a specific
ScreenSize |
java.lang.String |
toString() |
public GridUiNavigation(int xsColumns)
xsColumns
- The amount of columns of the grid on a ScreenSize.XS
screenpublic void layout(ScreenSize screenSize)
layout
in interface UiNavigation
public void set(int index, Actionable actionable)
set
in interface UiNavigation
public void set(int x, int y, Actionable actionable)
x
- y
- actionable
- public Actionable navigate(int keycode)
navigate
in interface UiNavigation
public void resetCursor()
resetCursor
in interface UiNavigation
public void setWidth(ScreenSize screenSize, int columns)
ScreenSize
screenSize
- The ScreenSize
columns
- The amount of columns in the gridpublic int getTotalColumns()
ScreenSize
public int getTotalRows()
ScreenSize
public java.lang.String toString()
toString
in class java.lang.Object