Methods Summary |
---|
public void | add(java.lang.String item)List Related Methods
list.add(item);
|
public void | add(java.lang.String item, int index)
list.add(item, index);
|
public void | addActionListener(java.awt.event.ActionListener al)
edit.addActionListener(al);
|
public void | addItem(java.lang.String item)
list.addItem(item);
|
public void | addItem(java.lang.String item, int index)
list.addItem(item, index);
|
public void | addItemListener(java.awt.event.ItemListener il)
list.addItemListener(il);
|
public void | delItem(int index)
list.delItem(index);
|
public void | firstTime()
Component frame = this;
while (!(frame instanceof Frame) && frame != null) {
frame = frame.getParent();
}
if (frame == null) {
System.out.println("No frame found in hierarchy");
System.exit(0);
}
listWindow = new PullDownList( (Frame) frame, list);
listWindow.validate();
|
public int | getSelectedIndex()
return list.getSelectedIndex();
|
public java.lang.String | getSelectedItem()
return list.getSelectedItem();
|
public java.lang.String | getText()Text Related Methods
return edit.getText();
|
public void | itemStateChanged(java.awt.event.ItemEvent ie)
if (ie.getStateChange() == ItemEvent.SELECTED) {
String s = list.getSelectedItem();
edit.setText(s);
edit.selectAll();
pullDown();
}
|
public void | pullDown()
if (listWindow.isVisible() == false) {
listWindow.show(this);
} else
listWindow.setVisible(false);
|
public void | removeActionListener(java.awt.event.ActionListener al)
edit.removeActionListener(al);
|
public void | removeItemListener(java.awt.event.ItemListener il)
list.removeItemListener(il);
|
public void | select(int index)
list.select(index);
String s = list.getSelectedItem();
edit.setText(s);
edit.selectAll();
|
public void | setEditable(boolean f)
edit.setEditable(f);
|