(Command c, Displayable d)
| 84 | } |
| 85 | |
| 86 | public void commandAction(Command c, Displayable d){ |
| 87 | if (t.executeCommand(c, d)) { |
| 88 | return; |
| 89 | } |
| 90 | if (c == cmdRecent) { |
| 91 | new TextListBox(this); |
| 92 | return; |
| 93 | } |
| 94 | if (c == cmdOk) { |
| 95 | ti.setValue(t.body); |
| 96 | if (ti.id != null && t.body != null) { |
| 97 | int i = 0; |
| 98 | while (i < recentList.size()) { |
| 99 | if (t.body.equals((String) recentList.elementAt(i)) || i > 9) { |
| 100 | recentList.removeElementAt(i); |
| 101 | } else { |
| 102 | i++; |
| 103 | } |
| 104 | } |
| 105 | recentList.insertElementAt(t.body, 0); |
| 106 | saveRecentList(); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | VirtualCanvas.getInstance().show(parentList); |
| 111 | } |
| 112 | |
| 113 | private void loadRecentList() { |
| 114 | recentList=new Vector(10); |
nothing calls this directly
no test coverage detected