• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

密猟オンラインクライアントプログラム JAVAベース


Commit MetaInfo

Revision19 (tree)
Time2016-12-23 23:09:00
Authormanjihq

Log Message

プレフィックスコマンドを送出したあとには、エディットボックスをクリアするようにした

Change Summary

Incremental Difference

--- trunk/src/hunton/HuntMessageView.java (revision 18)
+++ trunk/src/hunton/HuntMessageView.java (revision 19)
@@ -41,6 +41,10 @@
4141 editWnd.requestFocus();
4242 }
4343
44+ public void setEditText(String s) {
45+ editWnd.setText(s);
46+ }
47+
4448 @Override
4549 public void actionPerformed(ActionEvent e) {
4650 /* send message or command */
--- trunk/src/hunton/SendTask.java (revision 18)
+++ trunk/src/hunton/SendTask.java (revision 19)
@@ -16,10 +16,12 @@
1616
1717 public void send(String s) {
1818 boolean bneed_resetfocus = true;
19+ boolean bneed_clearedit = false;
1920 switch (s.charAt(0)) {
2021 case '/':
2122 /* command prefix */
2223
24+ bneed_clearedit = true;
2325 if (s.length() == 1) {
2426 //
2527 break;
@@ -174,6 +176,7 @@
174176 case '!':
175177 /* mail commmand prefix */
176178
179+ bneed_clearedit = true;
177180 switch (s.charAt(1)) {
178181 case 'W':
179182 case 'w':
@@ -268,6 +271,11 @@
268271 doSendMessage(s);
269272 break;
270273 }
274+ if (bneed_clearedit == true) {
275+ HuntMessageView hview;
276+ hview = (HuntMessageView) Hunt.getMessageView();
277+ hview.setEditText("");
278+ }
271279 if (bneed_resetfocus == true) {
272280 Hunt.getMainView().requestFocus();
273281 }