|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wimpi.telnetd.io.toolkit.Component
net.wimpi.telnetd.io.toolkit.ActiveComponent
net.wimpi.telnetd.io.toolkit.Selection
public class Selection
Class implementing a selection menu.
| Field Summary | |
|---|---|
static int |
ALIGN_LEFT
|
static int |
ALIGN_RIGHT
|
| Fields inherited from class net.wimpi.telnetd.io.toolkit.Component |
|---|
m_Dim, m_IO, m_Name, m_Position |
| Constructor Summary | |
|---|---|
Selection(BasicTerminalIO io,
java.lang.String name)
Constructs a Selection instance. |
|
| Method Summary | |
|---|---|
void |
addOption(java.lang.String str)
Method to add an Option to a Selection instance. |
void |
draw()
Method that draws the component. |
java.lang.String |
getOption(int index)
Accessor method for an option of this selection. |
int |
getSelected()
Accessor method to retrieve the selected option. |
void |
insertOption(java.lang.String str,
int index)
Method to insert an Option to a Selection instance at a specific index. |
void |
removeOption(int index)
Method to remove an existing Option from a Selection instance. |
void |
removeOption(java.lang.String str)
Method to remove an existing Option from a Selection instance. |
void |
run()
Method that will make the selection active, reading and processing input. |
void |
setSelected(int index)
Mutator method to set selected option programatically. |
| Methods inherited from class net.wimpi.telnetd.io.toolkit.Component |
|---|
getDimension, getLocation, getName, setDimension, setLocation, setLocation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ALIGN_LEFT
public static final int ALIGN_RIGHT
| Constructor Detail |
|---|
public Selection(BasicTerminalIO io,
java.lang.String name)
io - Object instance implementing the BasicTerminalIO interface.name - String representing this instances name.| Method Detail |
|---|
public void addOption(java.lang.String str)
str - String representing the option.
public void insertOption(java.lang.String str,
int index)
str - String representing the option.index - int representing the desired index.public void removeOption(java.lang.String str)
str - String representing the option.public void removeOption(int index)
index - int representing the options index.public java.lang.String getOption(int index)
index - int representing the options index.
public int getSelected()
public void setSelected(int index)
throws java.io.IOException
index - int representing an options index.
java.io.IOException
public void run()
throws java.io.IOException
run in class ActiveComponentjava.io.IOException
public void draw()
throws java.io.IOException
draw in class Componentjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||