tcMenuJavaAPI
Public Member Functions | List of all members
com.thecoderscorner.menu.domain.state.CurrentScrollPosition Class Reference

Public Member Functions

 CurrentScrollPosition (int position, String value)
 
 CurrentScrollPosition (String text)
 
int getPosition ()
 
String getValue ()
 
String toString ()
 
boolean equals (Object o)
 
int hashCode ()
 
void setTextValue (Object txt)
 

Detailed Description

Represents a scroll position as used by ScrollChoiceMenuItems, it holds the position and the current string value.

Constructor & Destructor Documentation

◆ CurrentScrollPosition() [1/2]

com.thecoderscorner.menu.domain.state.CurrentScrollPosition.CurrentScrollPosition ( int  position,
String  value 
)

Create from the position and value

Parameters
positionthe current position
valuethe current value

◆ CurrentScrollPosition() [2/2]

com.thecoderscorner.menu.domain.state.CurrentScrollPosition.CurrentScrollPosition ( String  text)

Create from a textual representation in the form, position-value, EG 1-Pizza

Parameters
textthe text form of the object to parse

Member Function Documentation

◆ getPosition()

int com.thecoderscorner.menu.domain.state.CurrentScrollPosition.getPosition ( )
Returns
the current position

◆ getValue()

String com.thecoderscorner.menu.domain.state.CurrentScrollPosition.getValue ( )
Returns
the current value

◆ setTextValue()

void com.thecoderscorner.menu.domain.state.CurrentScrollPosition.setTextValue ( Object  txt)

Allows the value to be changed just after creation, this is for local UIs where the setting happens just after creation of the state.

Parameters
txtthe new value

The documentation for this class was generated from the following file: