17 private TextField word; |
17 private TextField word; |
18 private ChoiceGroup translit; |
18 private ChoiceGroup translit; |
19 private String translit_neniu; |
19 private String translit_neniu; |
20 private String translit_iksa; |
20 private String translit_iksa; |
21 private String translit_rusa; |
21 private String translit_rusa; |
|
22 private String translit_hungara; |
22 private StringItem showSearch; |
23 private StringItem showSearch; |
23 private String vortaro; |
24 private String vortaro; |
24 private DictIndex index; |
25 private DictIndex index; |
25 |
26 |
26 public AskWord() |
27 public AskWord() |
58 public void show() |
59 public void show() |
59 { |
60 { |
60 translit_neniu = T.t("Neniu"); |
61 translit_neniu = T.t("Neniu"); |
61 translit_iksa = T.t("Iksa sistemo"); |
62 translit_iksa = T.t("Iksa sistemo"); |
62 translit_rusa = T.t("ASCII-rusa"); |
63 translit_rusa = T.t("ASCII-rusa"); |
|
64 translit_hungara = T.t("ASCII-hungara"); |
63 |
65 |
64 myform = new Form(vortaro); |
66 myform = new Form(vortaro); |
65 |
67 |
66 word = new TextField(T.t("Vorto:"), "", 20, TextField.ANY); |
68 word = new TextField(T.t("Vorto:"), "", 20, TextField.ANY); |
67 myform.append(word); |
69 myform.append(word); |
76 lindex = translit.append(translit_iksa, null); |
78 lindex = translit.append(translit_iksa, null); |
77 if (tselected != null && tselected.equals(translit_iksa)) |
79 if (tselected != null && tselected.equals(translit_iksa)) |
78 translit.setSelectedIndex(lindex, true); |
80 translit.setSelectedIndex(lindex, true); |
79 translit.append(translit_rusa, null); |
81 translit.append(translit_rusa, null); |
80 if (tselected != null && tselected.equals(translit_rusa)) |
82 if (tselected != null && tselected.equals(translit_rusa)) |
|
83 translit.setSelectedIndex(lindex, true); |
|
84 translit.append(translit_hungara, null); |
|
85 if (tselected != null && tselected.equals(translit_hungara)) |
81 translit.setSelectedIndex(lindex, true); |
86 translit.setSelectedIndex(lindex, true); |
82 if (tselected == null) |
87 if (tselected == null) |
83 translit.setSelectedIndex(0, true); |
88 translit.setSelectedIndex(0, true); |
84 myform.append(translit); |
89 myform.append(translit); |
85 |
90 |
116 .equals(translit_iksa)) |
121 .equals(translit_iksa)) |
117 out = Replace.IksojAlCxapeloj(from); |
122 out = Replace.IksojAlCxapeloj(from); |
118 else if (translit.getString(translit.getSelectedIndex()) |
123 else if (translit.getString(translit.getSelectedIndex()) |
119 .equals(translit_rusa)) |
124 .equals(translit_rusa)) |
120 out = Replace.AsciiAlRusa(from); |
125 out = Replace.AsciiAlRusa(from); |
|
126 else if (translit.getString(translit.getSelectedIndex()) |
|
127 .equals(translit_hungara)) |
|
128 out = Replace.AsciiAlHungara(from); |
121 |
129 |
122 return out; |
130 return out; |
123 } |
131 } |
124 |
132 |
125 public void commandAction(Command c, Displayable d) |
133 public void commandAction(Command c, Displayable d) |