| graphical.ComboBox
ComboBox | public class ComboBox extends View implements Target,TextFilter,TextFieldOwner,Codable(Code) | | Based on IFC 1.0 example class. Added target/command handling stuff, mostly
by stealing from Popup but did a "parallel" command instead, since
ComboBox seems less ecumenical w/ it's commands - so it's not
a kosher implementation, it does the command only at the widget
level, not the ListItem level.
Also added enable/disable, fixed for correct display in different
types of windows, fixed closing on loss of focus (by adding
a new subclass off InternalWindow, which shouldn't be right),
and a host of other stuff.
Not tidy, but I'm in a hurry.
|
Constructor Summary | |
public | ComboBox() | public | ComboBox(int x, int y, int width, int height) |
Method Summary | |
public boolean | acceptsEvent(Object anObject, KeyEvent event, Vector eventVector) | public void | addItem(String value) | public void | addItems(Vector values) | public ListView | comboboxList() | public String | command() Returns the Popup's command. | public int | count() | public void | decode(Decoder decoder) | public void | describeClassInfo(ClassInfo info) | public void | drawView(Graphics g) | public void | encode(Encoder encoder) | public TextFilter | filter() | public void | finishDecoding() | public int | fudgeWidth() | public void | insertItemAt(String value, int index) | public boolean | isEnabled() | public int | maxShowCount() | public boolean | mouseDown(MouseEvent event) | public void | mouseDragged(MouseEvent event) | public void | mouseUp(MouseEvent event) | public TextFieldOwner | owner() | public void | performCommand(String command, Object object) | public void | removeAllItems() | public void | removeItem(String value) | public void | removeItemAt(int index) | public String | rowTitleWithTitlePrefix(String title) | public int | rowWithTitle(String title) | public int | rowWithTitlePrefix(String title) | public void | selectNextItem() | public void | selectPrevItem() | public void | selectRow(int index) | public int | selectRowWithTitle(String title) Modified to return the indice. | public int | selectedIndex() | public void | sendCommand() Sends a command to the Popup's Target. | public void | setCommand(String newCommand) Sets the Popup's command. | public void | setEditable(boolean b) Disables typing in the box. | public void | setEnabled(boolean b) | public void | setFilter(TextFilter object) | public void | setListIsVisible(boolean value) | public void | setMaxShowCount(int value) | public void | setOwner(TextFieldOwner object) | public void | setStringValue(String value) | public void | setTarget(Target newTarget) | public void | setTypeAhead(boolean b) Forces "type ahead" and validation - exiting also
forces a selection. | public void | sizeTo(int width, int height) | public void | stopFocus() | public String | stringValue() | public Target | target() Returns the Popup's Target. | public void | textEditingDidBegin(TextField textfield) | public void | textEditingDidEnd(TextField textfield, int endCondition, boolean contentsChanged) | public boolean | textEditingWillEnd(TextField textfield, int endCondition, boolean contentsChanged) | public void | textWasModified(TextField textfield) | public boolean | typeAhead() | public View | viewForMouse(int x, int y) | public void | willBecomeSelected() |
DROPWINDOW_KEYSCROLLGROUP_KEYLISTVIEW_KEYTEXTFIELD_KEYDROPBUTTON_KEYBORDER_KEYMAXSHOWCOUNT_KEYTEXTFILTER_KEYTEXTFIELDOWNER_KEY | final static String DROPWINDOW_KEYSCROLLGROUP_KEYLISTVIEW_KEYTEXTFIELD_KEYDROPBUTTON_KEYBORDER_KEYMAXSHOWCOUNT_KEYTEXTFILTER_KEYTEXTFIELDOWNER_KEY(Code) | | |
buttonImage | Bitmap buttonImage(Code) | | |
dropButton | Button dropButton(Code) | | |
isDownInListView | boolean isDownInListView(Code) | | |
isEnabled | boolean isEnabled(Code) | | |
iw_hack | InternalWindow iw_hack(Code) | | |
lastLength | int lastLength(Code) | | |
listIsVisible | boolean listIsVisible(Code) | | |
listView | ListView listView(Code) | | |
maxShowCount | int maxShowCount(Code) | | |
scrollGroup | ScrollGroup scrollGroup(Code) | | |
textField | TextField textField(Code) | | |
textFieldOwner | TextFieldOwner textFieldOwner(Code) | | |
textFilter | TextFilter textFilter(Code) | | |
thisViewDammit | View thisViewDammit(Code) | | |
typeAhead | boolean typeAhead(Code) | | |
ComboBox | public ComboBox()(Code) | | |
ComboBox | public ComboBox(int x, int y, int width, int height)(Code) | | |
acceptsEvent | public boolean acceptsEvent(Object anObject, KeyEvent event, Vector eventVector)(Code) | | |
addItems | public void addItems(Vector values)(Code) | | |
comboboxList | public ListView comboboxList()(Code) | | |
decode | public void decode(Decoder decoder) throws CodingException(Code) | | |
describeClassInfo | public void describeClassInfo(ClassInfo info)(Code) | | |
drawView | public void drawView(Graphics g)(Code) | | |
encode | public void encode(Encoder encoder) throws CodingException(Code) | | |
filter | public TextFilter filter()(Code) | | |
finishDecoding | public void finishDecoding() throws CodingException(Code) | | |
fudgeWidth | public int fudgeWidth()(Code) | | |
insertItemAt | public void insertItemAt(String value, int index)(Code) | | |
isEnabled | public boolean isEnabled()(Code) | | |
maxShowCount | public int maxShowCount()(Code) | | |
mouseDown | public boolean mouseDown(MouseEvent event)(Code) | | |
mouseDragged | public void mouseDragged(MouseEvent event)(Code) | | |
mouseUp | public void mouseUp(MouseEvent event)(Code) | | |
owner | public TextFieldOwner owner()(Code) | | |
removeAllItems | public void removeAllItems()(Code) | | |
removeItemAt | public void removeItemAt(int index)(Code) | | |
rowWithTitlePrefix | public int rowWithTitlePrefix(String title)(Code) | | |
selectNextItem | public void selectNextItem()(Code) | | |
selectPrevItem | public void selectPrevItem()(Code) | | |
selectRow | public void selectRow(int index)(Code) | | |
selectRowWithTitle | public int selectRowWithTitle(String title)(Code) | | Modified to return the indice.
The indice is < 0 if row is not found.
Also sets the string value to blank if nothing found.
|
selectedIndex | public int selectedIndex()(Code) | | |
sendCommand | public void sendCommand()(Code) | | Sends a command to the Popup's Target. This command is either the
selected ListItem's command, or the Popup's command (if the ListItem
has no command).
|
setCommand | public void setCommand(String newCommand)(Code) | | Sets the Popup's command. The Popup sends this command to its Target
if the selected ListItem does not have a command.
|
setEditable | public void setEditable(boolean b)(Code) | | Disables typing in the box. Pulldown still active.
|
setEnabled | public void setEnabled(boolean b)(Code) | | |
setFilter | public void setFilter(TextFilter object)(Code) | | |
setListIsVisible | public void setListIsVisible(boolean value)(Code) | | |
setMaxShowCount | public void setMaxShowCount(int value)(Code) | | |
setOwner | public void setOwner(TextFieldOwner object)(Code) | | |
setStringValue | public void setStringValue(String value)(Code) | | |
setTarget | public void setTarget(Target newTarget)(Code) | | |
setTypeAhead | public void setTypeAhead(boolean b)(Code) | | Forces "type ahead" and validation - exiting also
forces a selection.
|
sizeTo | public void sizeTo(int width, int height)(Code) | | |
stopFocus | public void stopFocus()(Code) | | |
textEditingDidBegin | public void textEditingDidBegin(TextField textfield)(Code) | | |
textEditingDidEnd | public void textEditingDidEnd(TextField textfield, int endCondition, boolean contentsChanged)(Code) | | |
textEditingWillEnd | public boolean textEditingWillEnd(TextField textfield, int endCondition, boolean contentsChanged)(Code) | | |
textWasModified | public void textWasModified(TextField textfield)(Code) | | |
typeAhead | public boolean typeAhead()(Code) | | |
viewForMouse | public View viewForMouse(int x, int y)(Code) | | |
willBecomeSelected | public void willBecomeSelected()(Code) | | |
|
|