Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 248:c0f49708d9aa Implementation_of_communication
change put line option for put omnigraffle
author | tatsuki |
---|---|
date | Wed, 06 Jul 2016 01:48:13 +0900 |
parents | bf7c96516dd0 |
children | 803ab4479b7e |
files | src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/InsertNodePositionData.java src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/OmniGraffleCreater.java |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/InsertNodePositionData.java Tue Jul 05 06:59:03 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/InsertNodePositionData.java Wed Jul 06 01:48:13 2016 +0900 @@ -26,6 +26,10 @@ * この中身が空になったら全てのNodeにX座標の格納が終わったということ */ + public int getNODE_Y_GAP() { + return NODE_Y_GAP; + } + private int NODE_Y_GAP = 300; private final int X_GAP = 300; //ノードとノードの隙間 private int MAX_X = 100;
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/OmniGraffleCreater.java Tue Jul 05 06:59:03 2016 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/OmniGraffleCreater.java Wed Jul 06 01:48:13 2016 +0900 @@ -37,6 +37,7 @@ private String FONT_SIZE = "14"; private int CanvasSize_X = 100; private int CanvasSize_Y = 100; + private InsertNodePositionData insertNodePositionData; public OmniGraffleCreater(String file_name, JungleTree tree) throws ParserConfigurationException, IOException, URISyntaxException, TransformerException { this.file_name = file_name; @@ -132,8 +133,8 @@ private void createJungleTreeGraphics() throws UnsupportedEncodingException { - - TreeMap<TreeNode, NodePoint> treeMap = new InsertNodePositionData(tree).InsertPositionData(); + insertNodePositionData = new InsertNodePositionData(tree); + TreeMap<TreeNode, NodePoint> treeMap = insertNodePositionData.InsertPositionData(); Element plist = document.getDocumentElement(); Element dict = (Element) plist.getLastChild(); @@ -180,6 +181,12 @@ graphicsDict.appendChild(pointArray); String startLine = "{" + startLineX + "," + startLineY + "}" ; pointArray.appendChild(createElement("string", startLine)); + + int nodeYGap = insertNodePositionData.getNODE_Y_GAP(); + String middleLine1 = "{" + startLineX + "," + ( startLineY + ((nodeYGap - currentNodePoint.getHeight()) / 2) ) + "}" ; + pointArray.appendChild(createElement("string", middleLine1)); + String middleLine2 = "{" + endLineX + "," + ( startLineY + ((nodeYGap - currentNodePoint.getHeight()) / 2) ) + "}" ; + pointArray.appendChild(createElement("string", middleLine2)); String endLine = "{" + endLineX + "," + endLineY + "}" ; pointArray.appendChild(createElement("string", endLine));