# HG changeset patch # User tatsuki # Date 1467737293 -32400 # Node ID c0f49708d9aaaa2d42adcaad419b2d9e82bc1513 # Parent bf7c96516dd0d45f7383f3fb966574ebde6f4ff5 change put line option for put omnigraffle diff -r bf7c96516dd0 -r c0f49708d9aa src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/InsertNodePositionData.java --- 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; diff -r bf7c96516dd0 -r c0f49708d9aa src/main/java/jp/ac/u_ryukyu/ie/cr/jungle/store/omnigraffle/OmniGraffleCreater.java --- 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 treeMap = new InsertNodePositionData(tree).InsertPositionData(); + insertNodePositionData = new InsertNodePositionData(tree); + TreeMap 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));