Mercurial > hg > Database > Christie
changeset 241:dc76dd99eebb
rework
author | ichikitakahiro <e165713@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 23 Jan 2020 00:56:38 +0900 |
parents | 05c0b1649ca7 |
children | faff3236236d |
files | src/main/java/christie/remotingTextEditor/GetOpponentMessage.java src/main/java/christie/remotingTextEditor/SetEditorCommunication.java src/main/java/christie/textEditor/NewTextEditor.java |
diffstat | 3 files changed, 14 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/christie/remotingTextEditor/GetOpponentMessage.java Tue Jan 21 21:43:29 2020 +0900 +++ b/src/main/java/christie/remotingTextEditor/GetOpponentMessage.java Thu Jan 23 00:56:38 2020 +0900 @@ -14,7 +14,6 @@ @Take String string; - Message offset; @Peek NewTextEditor myEditor;
--- a/src/main/java/christie/remotingTextEditor/SetEditorCommunication.java Tue Jan 21 21:43:29 2020 +0900 +++ b/src/main/java/christie/remotingTextEditor/SetEditorCommunication.java Thu Jan 23 00:56:38 2020 +0900 @@ -17,18 +17,18 @@ @Override protected void run(CodeGearManager cgm) { // System.out.println(topoDG.getNodeName()); - while(myEditor.checkPermission() == false){ - try{ - Thread.sleep(1); - }catch(InterruptedException e){ - - } - } - int sendOffset = myEditor.getOffset(); - System.out.println(topoDG.getNodeName()+ ":catchoffset=: " + sendOffset); -// put("opponent", "offset", new Message()); - myEditor.changeToFalseSendPermmision(); - cgm.setup(new SetEditorCommunication()); +// while(myEditor.checkPermission() == false){ +// try{ +// Thread.sleep(1); +// }catch(InterruptedException e){ +// +// } +// } +// int sendOffset = myEditor.getOffset(); +// System.out.println(topoDG.getNodeName()+ ":catchoffset=: " + sendOffset); +//// put("opponent", "offset", new Message()); +// myEditor.changeToFalseSendPermmision(); +// cgm.setup(new SetEditorCommunication()); }
--- a/src/main/java/christie/textEditor/NewTextEditor.java Tue Jan 21 21:43:29 2020 +0900 +++ b/src/main/java/christie/textEditor/NewTextEditor.java Thu Jan 23 00:56:38 2020 +0900 @@ -15,8 +15,8 @@ static JTextArea textArea = new JTextArea(); - public void callInner(){ - textFrame.insertText(); + public void insertMessage(int offset, String str){ + textFrame.insertText(offset, str); } public boolean checkPermission(){