[7] | 1 | package hozo.maptool;
|
---|
| 2 |
|
---|
| 3 | import java.awt.Color;
|
---|
| 4 | import java.awt.Dimension;
|
---|
| 5 | import java.awt.Font;
|
---|
| 6 | import java.awt.FontMetrics;
|
---|
| 7 | import java.awt.Graphics;
|
---|
| 8 | import java.awt.Graphics2D;
|
---|
| 9 | import java.awt.GridBagLayout;
|
---|
| 10 | import java.awt.List;
|
---|
| 11 | import java.awt.Point;
|
---|
| 12 | import java.awt.Rectangle;
|
---|
| 13 | import java.util.ArrayList;
|
---|
| 14 | import java.util.Enumeration;
|
---|
| 15 | import java.util.StringTokenizer;
|
---|
| 16 | import java.util.Vector;
|
---|
| 17 |
|
---|
| 18 | import javax.swing.DefaultListModel;
|
---|
| 19 | import javax.swing.JButton;
|
---|
| 20 | import javax.swing.JCheckBox;
|
---|
| 21 | import javax.swing.JComponent;
|
---|
| 22 | import javax.swing.JDialog;
|
---|
| 23 | import javax.swing.JFileChooser;
|
---|
| 24 | import javax.swing.JFrame;
|
---|
| 25 | import javax.swing.JLabel;
|
---|
| 26 | import javax.swing.JList;
|
---|
| 27 | import javax.swing.JOptionPane;
|
---|
| 28 | import javax.swing.JPanel;
|
---|
| 29 | import javax.swing.JScrollPane;
|
---|
| 30 | import javax.swing.JTextField;
|
---|
| 31 | import javax.swing.border.*;
|
---|
| 32 |
|
---|
| 33 | import org.biohackathon.SPARQLBuilder.OWL.Path;
|
---|
| 34 |
|
---|
| 35 | import java.awt.*;
|
---|
| 36 | import java.awt.event.*;
|
---|
| 37 | import java.awt.Toolkit;
|
---|
| 38 | import java.io.*;
|
---|
| 39 | import java.util.Iterator;
|
---|
| 40 |
|
---|
| 41 | //import hozo.oe.util.*;
|
---|
| 42 |
|
---|
| 43 | class Edge {
|
---|
| 44 | ExbpNode from;
|
---|
| 45 | ExbpNode to;
|
---|
| 46 |
|
---|
| 47 | double len;
|
---|
| 48 | // String key = "";
|
---|
| 49 | //
|
---|
| 50 | // boolean isVisible=true;
|
---|
| 51 |
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 |
|
---|
| 55 | public class ExtendBP extends JPanel implements Runnable{
|
---|
| 56 |
|
---|
| 57 | private static final long serialVersionUID = 1L;
|
---|
| 58 | ExbpNode exbp_node_center; //�ス�ス�スS�スフ(Root�スフ)E�ス�ス�ス�ス�ス�スNode
|
---|
| 59 | ExbpNode exbp_node_pick; // @jve:decl-index=0:
|
---|
| 60 | Vector<ExbpNode> nodes; // @jve:decl-index=0:
|
---|
| 61 |
|
---|
| 62 | ArrayList<Color> topicColorList = new ArrayList<Color>(10);
|
---|
| 63 |
|
---|
| 64 |
|
---|
| 65 | // HZEditor _hzeditor;
|
---|
| 66 | ExtendFrame _extendFrame; //#kozaki 2008/07/31
|
---|
| 67 | // ExtendBPPopupMenu _popupMenu;
|
---|
| 68 |
|
---|
| 69 | private int currentLayerNum = 6;
|
---|
| 70 | private int currentLayerLength = 80;
|
---|
| 71 | private boolean isVisibleCenter = true;
|
---|
| 72 | private boolean isVisibleInflu = true;
|
---|
| 73 | private boolean isVisibleLink = true; //#kozaki�ス@2008/06/14�ス@�スf�スt�スH�ス�ス�スg�ス�スLink�ス�ス\�ス�ス�ス�ス�ス�ス謔、�スノ変更
|
---|
| 74 | private boolean isVisibleLevel = false;
|
---|
| 75 | private boolean isVisibleBorder = true;
|
---|
| 76 |
|
---|
| 77 | public boolean skip_repetition = true;//#kozaki�ス@2009/11/30�ス@�スJ�ス�スヤゑソス�ス�ス
|
---|
| 78 |
|
---|
| 79 | private static int WIDTH_MARGIN = 80;
|
---|
| 80 | private static int HEIGHT_MARGIN = 50;
|
---|
| 81 | private static int FONT_MARGIN = 10;
|
---|
| 82 |
|
---|
| 83 | private int layoutOption = 0;
|
---|
| 84 | public static int LinkCentricLayout = 0;
|
---|
| 85 | public static int NodeCentricLayout = 1;
|
---|
| 86 | public static int LinkCentricLayout2= 2;
|
---|
| 87 |
|
---|
| 88 |
|
---|
| 89 | protected static final String DEFAULT_NAME = "(ROOT)";
|
---|
| 90 | public static Font fontLink = new Font("Times", Font.PLAIN, 12);
|
---|
| 91 | Font fontBorder = new Font("Times", Font.BOLD, 18);
|
---|
| 92 |
|
---|
| 93 | private static String DASH_PATURN = "0.0f, 5.0f, 5.0f, 0.0f";
|
---|
| 94 |
|
---|
| 95 | public String command; //#kozaki�ス@2008/10/03�ス@�スR�ス}�ス�ス�スh�ス�スString�スナ保趣ソス�ス�ス�ス�ス
|
---|
| 96 | public String[] optionList = new String[4];
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | //#kozaki 2008/10/19�ス@�スg�ス�ス�ストゑソス�スネゑソス�スフで削除
|
---|
| 100 | //public Vector tempGobjList = new Vector(20); // �スI�ス�ス�ス�ス�ス�ス�スI�スu�スW�スF�スN�スg�ス�ス�スi�ス[�ス�ス�ス�スR�ス�ス�スN�スV�ス�ス�ス�ス
|
---|
| 101 |
|
---|
| 102 | Vector<RoleLists> role_lists = new Vector<RoleLists>(10); //#kozaki 2008/01/02�ス@�スe�スw�スナの�ソス�ス[�ス�ス�スフ趣ソズ格�ス[
|
---|
| 103 |
|
---|
| 104 | RoleLists link_list = new RoleLists();
|
---|
| 105 |
|
---|
| 106 |
|
---|
| 107 | //#kozaki 2008/03/22 �スT�スu�ス�ス�ス齒茨ソス�ス�スp�スフ変撰ソス
|
---|
| 108 | // static boolean isSubLung = false;
|
---|
| 109 |
|
---|
| 110 | // private int scale; // �ス`�ス�ス{�ス�ス
|
---|
| 111 | private JFrame _ownerFrame = null; // �ス�ス�ス�ス�スt�ス�ス�ス[�ス�ス
|
---|
| 112 |
|
---|
| 113 | //#kozaki�ス@�スo�スl�ス�ス�スf�ス�ス�スp
|
---|
| 114 | private Thread relaxer;
|
---|
| 115 | // private boolean random;
|
---|
| 116 | public boolean stop = true;
|
---|
| 117 | public boolean stopOnLayer = true;
|
---|
| 118 | public boolean showEdges = false;
|
---|
| 119 | Vector<Edge> edges = new Vector<Edge>();
|
---|
| 120 |
|
---|
| 121 | public MapFactory mapfactory;
|
---|
| 122 |
|
---|
| 123 | // public MapCommandDialog cmd_dialog;
|
---|
| 124 |
|
---|
| 125 | // ChangeViewFrame changeView;
|
---|
| 126 |
|
---|
| 127 | // public ArrayList<ArrayList<Node>> hilight_nodes=new ArrayList<ArrayList<Node>>();
|
---|
| 128 |
|
---|
| 129 | static Color[] hilight_color = {
|
---|
| 130 | Color.red,
|
---|
| 131 | Color.blue,
|
---|
| 132 | Color.green,
|
---|
| 133 | Color.cyan,
|
---|
| 134 | Color.magenta,
|
---|
| 135 | new Color(153,0,153)
|
---|
| 136 | /* Color.orange/*,
|
---|
| 137 |
|
---|
| 138 | Color.pink, //#kozaki�ス@2008/08/18�ス@�ス�ス�スヤゑソスマ更
|
---|
| 139 | Color.yellow,
|
---|
| 140 |
|
---|
| 141 | new Color(255,102,255), // Color.magenta, //#kozaki�ス@2008/08/18�ス@�ス�ス�スヤゑソスマ更
|
---|
| 142 | Color.lightGray,
|
---|
| 143 | new Color(255,51,102),// //
|
---|
| 144 | new Color(50,155,255), // //
|
---|
| 145 | Color.gray*/
|
---|
| 146 | };
|
---|
| 147 |
|
---|
| 148 | static String[] hilight_color_str = {
|
---|
| 149 | "red","blue","green","aqua","fuchsia","purple"};
|
---|
| 150 |
|
---|
| 151 |
|
---|
| 152 | /**
|
---|
| 153 | * This is the default constructor
|
---|
| 154 | */
|
---|
| 155 | public ExtendBP(MapFactory fac) {
|
---|
| 156 | super();
|
---|
| 157 | mapfactory = fac;
|
---|
| 158 | ExbpNode exbpnode= new ExbpNode("Center");;
|
---|
| 159 | this.exbp_node_center = exbpnode;
|
---|
| 160 | // exbpnode = new ExbpNode("TEST");
|
---|
| 161 | // exbpnode= new ExbpNode("Center");;
|
---|
| 162 | // exbpnode.setChildrenColor(Color.red);
|
---|
| 163 | // exbpnode.key="prop1";
|
---|
| 164 | // this.exbp_node_center.addChild(exbpnode);
|
---|
| 165 | // this.exbp_node_center.addChild(new ExbpNode("TEST2"));
|
---|
| 166 | // this.exbp_node_center.addChild(new ExbpNode("TEST3"));
|
---|
| 167 | // this.exbp_node_center.addChild(new ExbpNode("TEST4"));
|
---|
| 168 |
|
---|
| 169 | // cmd_dialog = new MapCommandDialog(this);
|
---|
| 170 | // _popupMenu = new ExtendBPPopupMenu(this, null);
|
---|
| 171 | //
|
---|
| 172 | // new MapCommandEasy(this);
|
---|
| 173 |
|
---|
| 174 | initialize();
|
---|
| 175 | }
|
---|
| 176 |
|
---|
| 177 | /* public ExtendBP(JFrame owner) {
|
---|
| 178 | this();
|
---|
| 179 | initialize();
|
---|
| 180 | this._ownerFrame = owner;
|
---|
| 181 | }*/
|
---|
| 182 |
|
---|
| 183 |
|
---|
| 184 | // #hirota 08/10/21
|
---|
| 185 | public MapFactory getMapFactory(){
|
---|
| 186 | return this.mapfactory;
|
---|
| 187 | }
|
---|
| 188 |
|
---|
| 189 | public void setcenternode(ExbpNode center){
|
---|
| 190 | this.exbp_node_center = center;
|
---|
| 191 | }
|
---|
| 192 |
|
---|
| 193 | public int getlength(ExbpNode from, ExbpNode to){
|
---|
| 194 | return (int)Math.abs(Math.sqrt((from.getCenterPoint().x-to.getCenterPoint().x)*(from.getCenterPoint().x-to.getCenterPoint().x)
|
---|
| 195 | + (from.getCenterPoint().y-to.getCenterPoint().y)*(from.getCenterPoint().y-to.getCenterPoint().y)) );
|
---|
| 196 | }
|
---|
| 197 |
|
---|
| 198 |
|
---|
| 199 | void addEdge(ExbpNode from, ExbpNode to, int len, boolean isv) {
|
---|
| 200 | Edge e = new Edge();
|
---|
| 201 | e.from = from;
|
---|
| 202 | e.to = to;
|
---|
| 203 | e.len = len;
|
---|
| 204 | // e.key = from.exbpnode.key;
|
---|
| 205 | // e.isVisible = isv;
|
---|
| 206 | // if(e.key.equals("")){
|
---|
| 207 | // e.key = "is_a";
|
---|
| 208 | // }
|
---|
| 209 | //
|
---|
| 210 |
|
---|
| 211 | edges.addElement(e);
|
---|
| 212 |
|
---|
| 213 | }
|
---|
| 214 | public void start() {
|
---|
| 215 | relaxer = new Thread(this);
|
---|
| 216 | relaxer.start();
|
---|
| 217 | }
|
---|
| 218 |
|
---|
| 219 | public void stop() {
|
---|
| 220 | relaxer = null;
|
---|
| 221 | }
|
---|
| 222 |
|
---|
| 223 | public void run() {
|
---|
| 224 |
|
---|
| 225 | Thread me = Thread.currentThread();
|
---|
| 226 | while (relaxer == me) {
|
---|
| 227 | relax();
|
---|
| 228 |
|
---|
| 229 | // if (random && (Math.random() < 0.03)) {
|
---|
| 230 | // Node1 n = nodes[(int)(Math.random() * nnodes)];
|
---|
| 231 | //
|
---|
| 232 | // if (!n.fixed) {
|
---|
| 233 | // n.x += 100*Math.random() - 50;
|
---|
| 234 | // n.y += 100*Math.random() - 50;
|
---|
| 235 | // }
|
---|
| 236 | // }
|
---|
| 237 |
|
---|
| 238 | try {
|
---|
| 239 | Thread.sleep(100);
|
---|
| 240 | } catch (InterruptedException e) {
|
---|
| 241 | break;
|
---|
| 242 | }
|
---|
| 243 | }
|
---|
| 244 | }
|
---|
| 245 |
|
---|
| 246 | synchronized void relax() {
|
---|
| 247 | //#kozaki
|
---|
| 248 | int cx = this.exbp_node_center.getCenterPoint().x;
|
---|
| 249 | int cy = this.exbp_node_center.getCenterPoint().y;
|
---|
| 250 |
|
---|
| 251 |
|
---|
| 252 | if( stop ){
|
---|
| 253 | }
|
---|
| 254 | else{
|
---|
| 255 | // #hirota 8/1
|
---|
| 256 | int sikii = 0;
|
---|
| 257 | Enumeration<Edge> en_edges = this.edges.elements();
|
---|
| 258 | while(en_edges.hasMoreElements()){
|
---|
| 259 | //for (int i = 0 ; i < nedges ; i++) {
|
---|
| 260 | Edge e = en_edges.nextElement();
|
---|
| 261 | //Edge e = edges[i];
|
---|
| 262 | double vx = e.to.getCenterPoint().x - e.from.getCenterPoint().x;
|
---|
| 263 | double vy = e.to.getCenterPoint().y - e.from.getCenterPoint().y;
|
---|
| 264 | double len = Math.sqrt(vx * vx + vy * vy);
|
---|
| 265 | len = (len == 0) ? .0001 : len;
|
---|
| 266 | double f = (e.len - len) / (len * 3);
|
---|
| 267 | double dx = f * vx;
|
---|
| 268 | double dy = f * vy;
|
---|
| 269 |
|
---|
| 270 | e.to.dx += dx;
|
---|
| 271 | e.to.dy += dy;
|
---|
| 272 | e.from.dx += -dx;
|
---|
| 273 | e.from.dy += -dy;
|
---|
| 274 | }
|
---|
| 275 |
|
---|
| 276 |
|
---|
| 277 | Enumeration<ExbpNode> en = this.nodes.elements();
|
---|
| 278 | while(en.hasMoreElements()){
|
---|
| 279 | //for (int i = 0 ; i < nnodes ; i++) {
|
---|
| 280 | ExbpNode n1 = en.nextElement();
|
---|
| 281 | if(this.exbp_node_center.equals(n1)){
|
---|
| 282 | continue;
|
---|
| 283 | }
|
---|
| 284 | //Node1 n1 = nodes[i];
|
---|
| 285 | double dx = 0;
|
---|
| 286 | double dy = 0;
|
---|
| 287 |
|
---|
| 288 | Enumeration<ExbpNode> en2 = this.nodes.elements();
|
---|
| 289 | while(en2.hasMoreElements()){
|
---|
| 290 | //for (int j = 0 ; j < nnodes ; j++) {
|
---|
| 291 | ExbpNode n2 = en2.nextElement();
|
---|
| 292 | //if (i == j) {
|
---|
| 293 | if (n1.equals(n2)) {
|
---|
| 294 | continue;
|
---|
| 295 | }
|
---|
| 296 | //Node1 n2 = nodes[j];
|
---|
| 297 | double vx = n1.getCenterPoint().x - n2.getCenterPoint().x;
|
---|
| 298 | double vy = n1.getCenterPoint().y - n2.getCenterPoint().y;
|
---|
| 299 | double len = vx * vx + vy * vy;
|
---|
| 300 | if (len == 0) {
|
---|
| 301 | dx += Math.random();
|
---|
| 302 | dy += Math.random();
|
---|
| 303 | } else if (len < 100*100) {
|
---|
| 304 | dx += vx / len;
|
---|
| 305 | dy += vy / len;
|
---|
| 306 | }
|
---|
| 307 | }
|
---|
| 308 | double dlen = dx * dx + dy * dy;
|
---|
| 309 | if (dlen > 0) {
|
---|
| 310 | dlen = Math.sqrt(dlen) / 2;
|
---|
| 311 | n1.dx += dx / dlen;
|
---|
| 312 | n1.dy += dy / dlen;
|
---|
| 313 | }
|
---|
| 314 | }
|
---|
| 315 |
|
---|
| 316 | Dimension d = getSize();
|
---|
| 317 |
|
---|
| 318 | Enumeration<ExbpNode> en3 = this.nodes.elements();
|
---|
| 319 | while(en3.hasMoreElements()){
|
---|
| 320 | //for (int i = 0 ; i < nnodes ; i++) {
|
---|
| 321 | //Node1 n = nodes[i];
|
---|
| 322 | ExbpNode n = en3.nextElement();
|
---|
| 323 | int layer = n.getLocatedLayer();
|
---|
| 324 | if(this.exbp_node_center.equals(n)){
|
---|
| 325 | continue;
|
---|
| 326 | }
|
---|
| 327 |
|
---|
| 328 | // stop�ス�ス�ストゑソス�スネゑソス�スニゑソス
|
---|
| 329 | if(! n.n_stop ){
|
---|
| 330 | if (!n.fixed) {
|
---|
| 331 | n.x += Math.max(-5, Math.min(5, n.dx));
|
---|
| 332 | n.y += Math.max(-5, Math.min(5, n.dy));
|
---|
| 333 | }
|
---|
| 334 | if (n.x < 0) {
|
---|
| 335 | n.x = 0;
|
---|
| 336 | } else if (n.x > d.width) {
|
---|
| 337 | n.x = d.width;
|
---|
| 338 | }
|
---|
| 339 | if (n.y < 0) {
|
---|
| 340 | n.y = 0;
|
---|
| 341 | } else if (n.y > d.height) {
|
---|
| 342 | n.y = d.height;
|
---|
| 343 | }
|
---|
| 344 |
|
---|
| 345 |
|
---|
| 346 |
|
---|
| 347 | n.dx /= 2;
|
---|
| 348 | n.dy /= 2;
|
---|
| 349 |
|
---|
| 350 |
|
---|
| 351 |
|
---|
| 352 | // #hirota 08/8/1
|
---|
| 353 | // �ス�ス�スa�スv�スZ
|
---|
| 354 | // 閾値�ス�ス�ス�ス�ス�ス�ス黷ス�スニゑソス length_of_layer
|
---|
| 355 | if(stopOnLayer){
|
---|
| 356 | // double rx = ( this.graph.cx - n.x );
|
---|
| 357 | // double ry = ( this.graph.cy - n.y );
|
---|
| 358 | //double rx = ( n.x - this.graph.cx);
|
---|
| 359 | //double ry = ( n.y - this.graph.cy);
|
---|
| 360 | double rx = ( n.getCenterPoint().x - cx);
|
---|
| 361 | double ry = ( n.getCenterPoint().y - cy);
|
---|
| 362 | if( Math.abs( (Math.sqrt( rx*rx + ry*ry) - (layer*currentLayerLength)) ) > sikii ){
|
---|
| 363 | //System.out.println( "layer :" + n.layer + " label ::" + n.lbl + " r:" + (int)(Math.sqrt( n.x*n.x + n.y*n.y)) );
|
---|
| 364 |
|
---|
| 365 | //n.n_stop = true;
|
---|
| 366 |
|
---|
| 367 | // #hirota 8/7 test
|
---|
| 368 |
|
---|
| 369 | // �スp�スx�スフ搾ソス�ス�ス�ス�ス�スニゑソス
|
---|
| 370 | //double theta = Math.atan2(rx, ry);
|
---|
| 371 | // double theta = Math.atan2(rx, ry);
|
---|
| 372 | double theta = Math.atan2(ry, rx);
|
---|
| 373 |
|
---|
| 374 | // �スナ適(x,y)�ス�ス�ス�ス�ス�ス
|
---|
| 375 | double ddx = (layer*currentLayerLength)*Math.cos(theta);
|
---|
| 376 | double ddy = (layer*currentLayerLength)*Math.sin(theta);
|
---|
| 377 | //System.out.println(" node : ddx ddy :" + n.lbl + ddx + ", "+ddy);
|
---|
| 378 |
|
---|
| 379 | //n.x= this.graph.cx + ddx;
|
---|
| 380 | //n.y= this.graph.cy + ddy;
|
---|
| 381 | n.x= cx + (new Double(ddx)).intValue() -n.width/2;
|
---|
| 382 | n.y= cy + (new Double(ddy)).intValue() -n.height/2;
|
---|
| 383 |
|
---|
| 384 | }
|
---|
| 385 | }
|
---|
| 386 |
|
---|
| 387 |
|
---|
| 388 |
|
---|
| 389 | }
|
---|
| 390 | // stop�ス�ス�ストゑソス�ス�スニゑソス
|
---|
| 391 | else{
|
---|
| 392 | // #hirota 08/8/1
|
---|
| 393 | //double rx = Math.abs( this.graph.cx - n.x );
|
---|
| 394 | //double ry = Math.abs( this.graph.cy - n.y );
|
---|
| 395 | double rx = Math.abs( cx - n.getCenterPoint().x );
|
---|
| 396 | double ry = Math.abs( cy - n.getCenterPoint().y );
|
---|
| 397 | if( Math.abs( (Math.sqrt( rx*rx + ry*ry) - (layer*currentLayerLength) ) )<= sikii ){
|
---|
| 398 |
|
---|
| 399 | n.n_stop = false;
|
---|
| 400 | }
|
---|
| 401 | }
|
---|
| 402 | }
|
---|
| 403 | repaint();
|
---|
| 404 | }
|
---|
| 405 | }
|
---|
| 406 |
|
---|
| 407 |
|
---|
| 408 | //#kozaki�ス@2008/06/26�ス@�ス�ス�スC�スA�スE�スg�スン抵ソス
|
---|
| 409 | public void setLayoutOption(int layout){
|
---|
| 410 | this.layoutOption = layout;
|
---|
| 411 | }
|
---|
| 412 |
|
---|
| 413 | // public ExtendBP(HZEditor hze) {
|
---|
| 414 | // super();
|
---|
| 415 | // initialize();
|
---|
| 416 | // //ExbpNode.setColors();
|
---|
| 417 | // this.setHZEditor(hze);
|
---|
| 418 | // }
|
---|
| 419 |
|
---|
| 420 | // #kozaki 2007/10/28�ス@ExbpNode�スヨゑソスpath�スイべゑソス
|
---|
| 421 | // #hirota 09/11/19 path�ス�スvector�スナ返ゑソス
|
---|
| 422 | public Vector getPath2(ExbpNode node){
|
---|
| 423 | System.out.println(node.getPath());
|
---|
| 424 |
|
---|
| 425 | Vector path = new Vector();//String path="";//"["+node.getLabel()+"]";
|
---|
| 426 | Vector<ExbpNode> nodes = new Vector<ExbpNode>();
|
---|
| 427 | for(ExbpNode n = node ; n.parent!=null ; n=n.parent ) {
|
---|
| 428 | nodes.insertElementAt(n,0);
|
---|
| 429 | //path="["+n.parent.getLabel()+"]"+ "\n-"+ n.key +"->"+path;
|
---|
| 430 | }
|
---|
| 431 | ExbpNode n =nodes.firstElement();
|
---|
| 432 |
|
---|
| 433 | path.add(this.exbp_node_center); //path +="["+this.exbp_node_center.getLabel()+"]\n"; //Root
|
---|
| 434 | Enumeration<ExbpNode> en = nodes.elements();
|
---|
| 435 | while(en.hasMoreElements()){
|
---|
| 436 | n =en.nextElement();
|
---|
| 437 |
|
---|
| 438 | path.add(n);
|
---|
| 439 |
|
---|
| 440 | if(n.opt.equals("")){
|
---|
| 441 | n.opt="isa";
|
---|
| 442 | }
|
---|
| 443 | //#kozaki 2009/01/20�ス@�ス�ス�ス�スヌ会ソス
|
---|
| 444 | if(n.opt.startsWith(":!")){
|
---|
| 445 | //path +="("+n.opt+")->"+n.key+"<- ["+ n.getLabel()+"]\n";
|
---|
| 446 | }
|
---|
| 447 | else if(n.opt.startsWith(":")){
|
---|
| 448 | //path +="("+n.opt+")<-"+n.key+"-- ["+ n.getLabel()+"]\n";
|
---|
| 449 | }
|
---|
| 450 | else{
|
---|
| 451 | //path +="("+n.opt+")--"+n.key+"-> ["+ n.getLabel()+"]\n";
|
---|
| 452 | }
|
---|
| 453 | }
|
---|
| 454 | return path;
|
---|
| 455 | }
|
---|
| 456 |
|
---|
| 457 | //#kozaki 2007/10/28�ス@ExbpNode�スヨゑソスpath�スイべゑソス
|
---|
| 458 | public String getPath(ExbpNode node){
|
---|
| 459 | System.out.println(node.getPath());
|
---|
| 460 |
|
---|
| 461 | String path="";//"["+node.getLabel()+"]";
|
---|
| 462 | Vector<ExbpNode> nodes = new Vector<ExbpNode>();
|
---|
| 463 | for(ExbpNode n = node ; n.parent!=null ; n=n.parent ) {
|
---|
| 464 | nodes.insertElementAt(n,0);
|
---|
| 465 | //path="["+n.parent.getLabel()+"]"+ "\n-"+ n.key +"->"+path;
|
---|
| 466 | }
|
---|
| 467 | ExbpNode n =nodes.firstElement();
|
---|
| 468 |
|
---|
| 469 | path +="["+this.exbp_node_center.getLabel()+"]\n"; //Root
|
---|
| 470 | Enumeration<ExbpNode> en = nodes.elements();
|
---|
| 471 | while(en.hasMoreElements()){
|
---|
| 472 | n =en.nextElement();
|
---|
| 473 | if(n.opt.equals("")){
|
---|
| 474 | n.opt="isa";
|
---|
| 475 | }
|
---|
| 476 | //#kozaki 2009/01/20�ス@�ス�ス�ス�スヌ会ソス
|
---|
| 477 | if(n.opt.startsWith(":!")){
|
---|
| 478 | path +="("+n.opt+")->"+n.key+"<- ["+ n.getLabel()+"]\n";
|
---|
| 479 | }
|
---|
| 480 | else if(n.opt.startsWith(":")){
|
---|
| 481 | path +="("+n.opt+")<-"+n.key+"-- ["+ n.getLabel()+"]\n";
|
---|
| 482 | }
|
---|
| 483 | else{
|
---|
| 484 | path +="("+n.opt+")--"+n.key+"-> ["+ n.getLabel()+"]\n";
|
---|
| 485 | }
|
---|
| 486 | }
|
---|
| 487 | return path;
|
---|
| 488 | }
|
---|
| 489 | //#kozaki 2007/10/28�ス@ExbpNode�スヨゑソスpath�スイべゑソス
|
---|
| 490 | public void showPath(ExbpNode node){
|
---|
| 491 | //JOptionPane.showMessageDialog(this, getPath(node));
|
---|
| 492 | // #enegate# 08/07/07 �スt�ス�ス�ス[�ス�ス�ス�ス�ス�ス�スノ配�スu�ス�ス�ス�ス
|
---|
| 493 | //JOptionPane.showMessageDialog(this._ownerFrame, getPath(node),"The detail of the conceptual chain",JOptionPane.OK_OPTION);
|
---|
| 494 |
|
---|
| 495 | // #hirota save�スp�ス@ // �スy�スQ�スl�スzsave_maps�ス�ス�ス�ス
|
---|
| 496 | int ans = JOptionPane.showConfirmDialog(this._ownerFrame, getPath(node),"�スp�スX�スフ詳細 �スロ托ソス�ス�ス�スワゑソス�ス�ス�スH",
|
---|
| 497 | JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
|
---|
| 498 | if(ans!=JOptionPane.YES_OPTION){
|
---|
| 499 | return;
|
---|
| 500 | }
|
---|
| 501 | else{
|
---|
| 502 | String OPEN_DIRECTORY = "./data3/mapdata/";
|
---|
| 503 | File dir = new File(OPEN_DIRECTORY);
|
---|
| 504 | if(!dir.exists()){
|
---|
| 505 | File ont_file = this.mapfactory.getFile();
|
---|
| 506 | if(ont_file!=null){
|
---|
| 507 | OPEN_DIRECTORY= ont_file.getParentFile().getAbsolutePath();
|
---|
| 508 | }
|
---|
| 509 | }
|
---|
| 510 | JFileChooser fd = new JFileChooser(OPEN_DIRECTORY);
|
---|
| 511 | fd.showSaveDialog(this);
|
---|
| 512 | File file = fd.getSelectedFile();
|
---|
| 513 |
|
---|
| 514 | this.saveMAPinXML(file,node);// this.saveMAPinXML(file);
|
---|
| 515 | return;
|
---|
| 516 | }
|
---|
| 517 |
|
---|
| 518 |
|
---|
| 519 | }
|
---|
| 520 |
|
---|
| 521 | // void setRoles(boolean inh){
|
---|
| 522 | //
|
---|
| 523 | // }
|
---|
| 524 |
|
---|
| 525 |
|
---|
| 526 | //#kozaki 2011/01/25 �ス�ス�スS�ス�ス�ス辜会ソスx�ス�ス�ス�ス�ス�スv�ス�ス�ス�スExbpNode�ス�スT�ス�ス�スト返ゑソス�スD
|
---|
| 527 | public ExbpNode findExbpNode(String lbl){
|
---|
| 528 | ExbpNode node;// = this.exbp_node_center;
|
---|
| 529 | Vector<ExbpNode> nodes = new Vector<ExbpNode>();
|
---|
| 530 | nodes.add(this.exbp_node_center);
|
---|
| 531 |
|
---|
| 532 | for(int i=0;i<nodes.size();i++){
|
---|
| 533 | node = nodes.elementAt(i);
|
---|
| 534 | if(node.getLabel().equals(lbl)){
|
---|
| 535 | return node;
|
---|
| 536 | }
|
---|
| 537 | else{
|
---|
| 538 | nodes.addAll(node.children);
|
---|
| 539 | }
|
---|
| 540 | }
|
---|
| 541 |
|
---|
| 542 | return null;
|
---|
| 543 | }
|
---|
| 544 |
|
---|
| 545 | public void paint(Graphics g){
|
---|
| 546 |
|
---|
| 547 | // this.setForeground(Color.white);
|
---|
| 548 | Dimension d = this.getSize();
|
---|
| 549 | g.setColor(Color.WHITE);
|
---|
| 550 | g.fillRect(0,0, d.width,d.height);
|
---|
| 551 |
|
---|
| 552 | //#kozaki�ス@�スo�スl�スフ描�ス�スi�スf�スo�スb�スO�スp�スj
|
---|
| 553 | if(showEdges){
|
---|
| 554 | Enumeration<Edge> en_edges = this.edges.elements();
|
---|
| 555 | while(en_edges.hasMoreElements()){
|
---|
| 556 | Edge e = en_edges.nextElement();
|
---|
| 557 | g.setColor(Color.red);
|
---|
| 558 | // g.drawLine(e.to.x, e.to.y, e.from.x, e.from.y);
|
---|
| 559 | g.drawLine(e.to.getCenterPoint().x, e.to.getCenterPoint().y, e.from.getCenterPoint().x, e.from.getCenterPoint().y);
|
---|
| 560 | }
|
---|
| 561 | }
|
---|
| 562 |
|
---|
| 563 |
|
---|
| 564 | // // �ス`�ス�ス{�ス�ス�ス�スン定す�ス�ス
|
---|
| 565 | // double dScale = getScaledCanvasScale();
|
---|
| 566 | // ((Graphics2D) g).scale(dScale, dScale);
|
---|
| 567 |
|
---|
| 568 | // �ス�ス�スE�ス�スフ円�スハゑソス`�ス�ス
|
---|
| 569 | if (this.isVisibleBorder) {
|
---|
| 570 | this.drawBorderCircle(g);
|
---|
| 571 | }
|
---|
| 572 |
|
---|
| 573 | // �スK�スw�スフ円�スハゑソス`�ス�ス
|
---|
| 574 | if (this.isVisibleLevel) {
|
---|
| 575 | this.drawLayerCircle(g);
|
---|
| 576 | }
|
---|
| 577 |
|
---|
| 578 | // �スm�ス[�スh�スヤの撰ソス�ス�ス�ス
|
---|
| 579 | if (this.isVisibleLink) {
|
---|
| 580 | this.drawLink(g);
|
---|
| 581 | }
|
---|
| 582 |
|
---|
| 583 | // �スm�ス[�スh�ス�ス`�ス�ス
|
---|
| 584 | Enumeration<ExbpNode> en_nodes = this.nodes.elements();
|
---|
| 585 | int node_num=0;
|
---|
| 586 | while(en_nodes.hasMoreElements()){
|
---|
| 587 | ExbpNode node = en_nodes.nextElement();
|
---|
| 588 | //System.out.println("PAINT:"+node.getLabel());
|
---|
| 589 | //node.paint2(g);
|
---|
| 590 | // �ス�ス�ス[�スg�スm�ス[�スh�スフ描�ス�ス
|
---|
| 591 | if (node.equals(this.exbp_node_center)) {
|
---|
| 592 | if (this.isVisibleCenter) {
|
---|
| 593 | //node.paint2(g);
|
---|
| 594 | node.paint(g,this);
|
---|
| 595 | }
|
---|
| 596 | }
|
---|
| 597 | else if(!node.visible){//#kozaki 2008/08/15
|
---|
| 598 | continue;
|
---|
| 599 | }
|
---|
| 600 | else {
|
---|
| 601 | //node.paint2(g);
|
---|
| 602 | node.paint(g,this);
|
---|
| 603 | }
|
---|
| 604 |
|
---|
| 605 | // g.setColor(Color.blue);
|
---|
| 606 | // g.drawString(Integer.toString(node_num), node.x-5, node.y-5);
|
---|
| 607 | // node_num++;
|
---|
| 608 | //#kozaki 2007/09/07�ス@�ス�ス�ス�ス�スT�スO�ス�ス�スw�ス�ス�スm�ス[�スh�ス�ス�ス�ス�ス�ス�ス\�ス�ス
|
---|
| 609 | // if(node.getHozoNode()!=null){
|
---|
| 610 | // if(node.getHozoNode().isPicked){
|
---|
| 611 | // node.paintHilighit(g,Color.green);
|
---|
| 612 | //// g.setColor(Color.green);
|
---|
| 613 | //// g.drawRect(node.x-1, node.y-1, node.width+2, node.height+2);
|
---|
| 614 | //// g.drawRect(node.x-2, node.y-2, node.width+4, node.height+4);
|
---|
| 615 | //// g.drawRect(node.x, node.y, node.width, node.height);
|
---|
| 616 | // }}
|
---|
| 617 |
|
---|
| 618 | //�スI�ス�ス�ス�ス�スフ具ソス�ス�ス�ス\�ス�ス�ス�ス�ス�ス�スi�ス{�ス�ス�ス�スExbpNode�スN�ス�ス�スX�スノ移行�ス�ス�スラゑソス�スj
|
---|
| 619 | if(node.equals(this.exbp_node_pick)){
|
---|
| 620 | /*#kozaki 2009/06/12�ス@�ス�ス�ス黹鯉ソスC�ス�ス�ス[�スフハ�スC�ス�ス�スC�スg�ス�ス�ス�ス゚ゑソスy�スb�ス�スz
|
---|
| 621 | * if(this.cmd_dialog.all_node.isSelected()){
|
---|
| 622 | int layer = exbp_node_pick.getLocatedLayer();
|
---|
| 623 | ExbpNode[] target_nodes = getExbpNodesAtLear(layer,true);
|
---|
| 624 | for(int i=0;i<target_nodes.length;i++){
|
---|
| 625 | if(target_nodes[i].getOrgNode()==exbp_node_pick.getOrgNode()){
|
---|
| 626 | target_nodes[i].paintHilighit(g,Color.red);
|
---|
| 627 | }else{
|
---|
| 628 | target_nodes[i].paintHilighit(g,Color.pink);
|
---|
| 629 | }
|
---|
| 630 | }
|
---|
| 631 | }*/
|
---|
| 632 |
|
---|
| 633 | //#kozaki�ス@2008/02/10�ス@�スI�ス�ス�ス�ス�ス�ス�スm�ス[�スh�スノ趣ソス�ス�スp�スX�ス�ス�ス�ス�ス�ス�ス\�ス�ス
|
---|
| 634 | node.painthilightPath(g,Color.red);
|
---|
| 635 | //node.painthilightPath(g,Color.pink);
|
---|
| 636 | if(this.isVisibleInflu){
|
---|
| 637 | node.paintInfluencePath(this,g,Color.orange);
|
---|
| 638 | }
|
---|
| 639 | node.paintHilighit(g,Color.red);
|
---|
| 640 | //�ス�ス�ス[�スg�スm�ス[�スh�スフ描�ス�ス
|
---|
| 641 | if (this.isVisibleCenter) {
|
---|
| 642 | //exbp_node_center.paint2(g);
|
---|
| 643 | exbp_node_center.paint2(g);
|
---|
| 644 | }
|
---|
| 645 | // g.setColor(Color.red);
|
---|
| 646 | // g.drawRect(node.x-1, node.y-1, node.width+2, node.height+2);
|
---|
| 647 | // g.drawRect(node.x-2, node.y-2, node.width+4, node.height+4);
|
---|
| 648 | // g.drawRect(node.x, node.y, node.width, node.height);
|
---|
| 649 | }
|
---|
| 650 |
|
---|
| 651 |
|
---|
| 652 | // �スZ�ス�ス�ス^�ス[�スm�ス[�スh�スフみ具ソス�ス�ス�ス\�ス�ス
|
---|
| 653 | g.setColor(Color.BLUE);
|
---|
| 654 | if (node.equals(this.exbp_node_center) && this.isVisibleCenter) {
|
---|
| 655 | g.drawRect(node.x-1, node.y-1, node.width+2, node.height+2);
|
---|
| 656 | g.drawRect(node.x-2, node.y-2, node.width+4, node.height+4);
|
---|
| 657 | g.drawRect(node.x, node.y, node.width, node.height);
|
---|
| 658 | }
|
---|
| 659 | }
|
---|
| 660 | }
|
---|
| 661 |
|
---|
| 662 |
|
---|
| 663 | public void paint2ndHighlit(ExbpNode node){
|
---|
| 664 | Graphics g=this.getGraphics();
|
---|
| 665 | node.painthilightPath(g,Color.magenta);
|
---|
| 666 | if(this.isVisibleInflu){
|
---|
| 667 | node.paintInfluencePath(this,g,Color.yellow);
|
---|
| 668 | }
|
---|
| 669 | node.paintHilighit(g,Color.pink);
|
---|
| 670 |
|
---|
| 671 | if (this.isVisibleCenter) {
|
---|
| 672 | //exbp_node_center.paint2(g);
|
---|
| 673 | exbp_node_center.paint(g,this);
|
---|
| 674 |
|
---|
| 675 | }
|
---|
| 676 | }
|
---|
| 677 |
|
---|
| 678 |
|
---|
| 679 |
|
---|
| 680 | public void setRoleRestrictedView(String[] role_lists, boolean rest_visble){
|
---|
| 681 | //View�スフク�ス�ス�スA
|
---|
| 682 | setRoleRestrictedViewClear();
|
---|
| 683 |
|
---|
| 684 | if(role_lists.length==0){
|
---|
| 685 | //setRoleRestrictedViewClear();
|
---|
| 686 | return;
|
---|
| 687 | }
|
---|
| 688 | //�ス�ス�スラてのノ�ス[�スh�ス�スs�スツ趣ソス�スノゑソス�ス�ス
|
---|
| 689 | if(rest_visble){
|
---|
| 690 | this.exbp_node_center.setVisbleChildren(false);
|
---|
| 691 | }
|
---|
| 692 |
|
---|
| 693 |
|
---|
| 694 | Enumeration<ExbpNode> en = this.nodes.elements();
|
---|
| 695 | while(en.hasMoreElements()){
|
---|
| 696 | ExbpNode node = (ExbpNode)en.nextElement();
|
---|
| 697 | if (node.equals(this.exbp_node_center)) {
|
---|
| 698 |
|
---|
| 699 | }
|
---|
| 700 | else {
|
---|
| 701 | //node.setHighLight(false, Color.red);
|
---|
| 702 | node.setLinkHighLight(false, Color.white);
|
---|
| 703 | for(int i=0;i<role_lists.length;i++){
|
---|
| 704 | //Node n = (Node)node.getOrgNode();
|
---|
| 705 | if(node.key.equals(role_lists[i])){
|
---|
| 706 | //�ス}�スb�ス`�ス�ス�ス�ス�スm�ス[�スh�スヘ擾ソスハゑソス�スワめて可趣ソス�スノゑソス�ス�ス
|
---|
| 707 | if(rest_visble){
|
---|
| 708 | node.setVisibleTrueWithParent();
|
---|
| 709 | }
|
---|
| 710 | if(i==0){
|
---|
| 711 | node.setLinkHighLight(true, Color.red);
|
---|
| 712 | }
|
---|
| 713 | else if(i==1){
|
---|
| 714 | node.setLinkHighLight(true, Color.blue);
|
---|
| 715 | }
|
---|
| 716 | else if(i==2){
|
---|
| 717 | node.setLinkHighLight(true, Color.green);
|
---|
| 718 | }
|
---|
| 719 | else if(i==3){
|
---|
| 720 | node.setLinkHighLight(true, Color.cyan);
|
---|
| 721 | }
|
---|
| 722 | else{
|
---|
| 723 | node.setLinkHighLight(true, Color.pink);
|
---|
| 724 | }
|
---|
| 725 | break;
|
---|
| 726 | }
|
---|
| 727 | }
|
---|
| 728 | }
|
---|
| 729 | }
|
---|
| 730 | //new ChangeViewFrame(this,cls_lists);
|
---|
| 731 | this.repaint();
|
---|
| 732 | }
|
---|
| 733 |
|
---|
| 734 | //#hirota 09/5/22 �ス�ス�スナは,node.key�スフみの費ソス�ス�スネので,�ス{�スN�ス�ス�スX�ス�ス�ス�スフ具ソスハまでゑソス�ス�ス
|
---|
| 735 | public void setRoleRestrictedViewWithClassConst(Vector role_lists, boolean rest_visble){
|
---|
| 736 |
|
---|
| 737 | }
|
---|
| 738 |
|
---|
| 739 |
|
---|
| 740 | public void setRoleRestrictedViewClear(){
|
---|
| 741 | //this.exbp_node_center.setVisbleChildren(true);
|
---|
| 742 | Enumeration<ExbpNode> en = this.nodes.elements();
|
---|
| 743 | while(en.hasMoreElements()){
|
---|
| 744 | ExbpNode node = (ExbpNode)en.nextElement();
|
---|
| 745 | node.setLinkHighLight(false, Color.red);
|
---|
| 746 | }
|
---|
| 747 | this.repaint();
|
---|
| 748 | }
|
---|
| 749 |
|
---|
| 750 |
|
---|
| 751 | // public void setClassRestrictedView(Node[] target_cls/*String[] cls_lists*/){}
|
---|
| 752 |
|
---|
| 753 | public void setClassRestrictedViewClear(){
|
---|
| 754 | //this.exbp_node_center.setVisbleChildren(true);
|
---|
| 755 | Enumeration<ExbpNode> en = this.nodes.elements();
|
---|
| 756 | while(en.hasMoreElements()){
|
---|
| 757 | ExbpNode node = (ExbpNode)en.nextElement();
|
---|
| 758 | //node.setHighLight(false, Color.red);
|
---|
| 759 | node.setHighLight(false, Color.white);
|
---|
| 760 | node.clearHighLightColorList();
|
---|
| 761 | }
|
---|
| 762 | this.repaint();
|
---|
| 763 | }
|
---|
| 764 |
|
---|
| 765 | //#kozaki 2009/02/13�ス@�スs�スツ趣ソス�スノゑソス�ス�スヘ囲ゑソス�スC�スI�ス�ス�ス�ス�ス�ス�スm�ス[�スh�スネ会ソス�スノ鯉ソス�ス�ス
|
---|
| 766 | // public void setClassRestrictedView2(ExbpNode[] target_nodes, Node[] target_cls/*String[] cls_lists*/){}
|
---|
| 767 |
|
---|
| 768 |
|
---|
| 769 | public void setClassRestrictedView2(ExbpNode ceter_node, String[] cls_lists){}
|
---|
| 770 |
|
---|
| 771 |
|
---|
| 772 |
|
---|
| 773 | private float[] getDashList() {
|
---|
| 774 | StringTokenizer st = new StringTokenizer(DASH_PATURN, ",");
|
---|
| 775 | float[] list = new float[st.countTokens()];
|
---|
| 776 | int i = 0;
|
---|
| 777 | try {
|
---|
| 778 | while (st.hasMoreTokens()) {
|
---|
| 779 | list[i] = (new Float(st.nextToken())).floatValue();
|
---|
| 780 | i++;
|
---|
| 781 | }
|
---|
| 782 | } catch (final NumberFormatException nfe) {
|
---|
| 783 | float[] fd = { 1.0f };
|
---|
| 784 | return fd;
|
---|
| 785 | }
|
---|
| 786 | return list;
|
---|
| 787 | }
|
---|
| 788 |
|
---|
| 789 | private void drawBorderCircle(Graphics g) {
|
---|
| 790 | Graphics2D g2 = (Graphics2D) g;
|
---|
| 791 | //super.paintComponent(g2);
|
---|
| 792 | BasicStroke dashedStroke
|
---|
| 793 | = new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, getDashList(), 0.0f);
|
---|
| 794 | Stroke currentStroke = g2.getStroke();
|
---|
| 795 | g2.setStroke(dashedStroke);
|
---|
| 796 |
|
---|
| 797 | // �ス�ス�スS�ス_
|
---|
| 798 | Point pt = getCenterPosition();
|
---|
| 799 | int cx = pt.x;
|
---|
| 800 | int cy = pt.y;
|
---|
| 801 |
|
---|
| 802 | Vector<String> draw_option = new Vector<String>();
|
---|
| 803 | if(optionList!=null){
|
---|
| 804 | for(int k=0; k<optionList.length;k++){
|
---|
| 805 | if(optionList[k]!=null){//#kozaki�スo�スO�ス�ス�ス
|
---|
| 806 | if(optionList[k].startsWith(":")){
|
---|
| 807 | String[] sub_option = optionList[k].split(":");
|
---|
| 808 | for(int l=1;l<sub_option.length;l++){
|
---|
| 809 | if(sub_option[l].indexOf("=")>0){
|
---|
| 810 | String[] subsub_opt = sub_option[l].split("=");
|
---|
| 811 | draw_option.add("["+subsub_opt[0]+"]");//#kozaki�ス@2007/09/07�ス@:�スI�スv�スV�ス�ス�ス�ス�スフ際ゑソスKey�ス�ス[]�スナ囲ゑソス
|
---|
| 812 | int num = Integer.parseInt(subsub_opt[1]);
|
---|
| 813 | for(int m=1;m<num;m++){
|
---|
| 814 | draw_option.add(ExbpNode.IS_A);
|
---|
| 815 | }
|
---|
| 816 | }
|
---|
| 817 | else{
|
---|
| 818 | draw_option.add("["+sub_option[l]+"]");//#kozaki�ス@2007/09/07�ス@:�スI�スv�スV�ス�ス�ス�ス�スフ際ゑソスKey�ス�ス[]�スナ囲ゑソス
|
---|
| 819 | }
|
---|
| 820 | }
|
---|
| 821 | }
|
---|
| 822 | else{
|
---|
| 823 | draw_option.add(optionList[k]);
|
---|
| 824 | }
|
---|
| 825 | }
|
---|
| 826 | }
|
---|
| 827 | }
|
---|
| 828 |
|
---|
| 829 | for (int i = 0; i < currentLayerNum + 1; i++) {
|
---|
| 830 | boolean canDraw = false;
|
---|
| 831 | String option = null;
|
---|
| 832 | int len = currentLayerLength * i + currentLayerLength / 2;
|
---|
| 833 | /*if (i == 0 && this.isVisibleCenter) {
|
---|
| 834 | //canDraw = true;
|
---|
| 835 | canDraw = false;
|
---|
| 836 | } else */if (i == currentLayerNum) {
|
---|
| 837 | canDraw = true;
|
---|
| 838 | } else if (optionList != null && i > 0 && draw_option.size() > i-1) {
|
---|
| 839 | //option = optionList[i-1];
|
---|
| 840 | //#kozaki 2008/08/12�ス@�スI�スv�スV�ス�ス�ス�ス�ス\�スL�スフ抵ソス�ス�ス
|
---|
| 841 | if(this.exbp_node_center.getLabel().contains("ROOT") && draw_option.size() > i-1){
|
---|
| 842 | option = draw_option.elementAt(i-1);
|
---|
| 843 | }else if(draw_option.size() > i){
|
---|
| 844 | option = draw_option.elementAt(i);
|
---|
| 845 | }
|
---|
| 846 | else{
|
---|
| 847 | option ="";
|
---|
| 848 | }
|
---|
| 849 | //System.out.println("drawBorderCircle:"+i+option);
|
---|
| 850 | if (option.indexOf(ExbpNode.IS_A) == 0
|
---|
| 851 | && option.length() == ExbpNode.IS_A.length()) {
|
---|
| 852 | canDraw = false;
|
---|
| 853 | } else {
|
---|
| 854 | canDraw = true;
|
---|
| 855 | }
|
---|
| 856 | }
|
---|
| 857 |
|
---|
| 858 | if (canDraw) {
|
---|
| 859 | g2.setColor(Color.BLACK);
|
---|
| 860 | g2.drawOval(cx-len, cy-len, len*2, len*2);
|
---|
| 861 | if (option != null) {
|
---|
| 862 | g.setFont(fontBorder);
|
---|
| 863 | g.setColor(Color.BLACK);
|
---|
| 864 | String s = "<" + option + ">";
|
---|
| 865 | g.drawString(s,
|
---|
| 866 | cx - FONT_MARGIN,
|
---|
| 867 | cy - len - FONT_MARGIN);
|
---|
| 868 | }
|
---|
| 869 | }
|
---|
| 870 | }
|
---|
| 871 |
|
---|
| 872 | g2.setStroke(currentStroke);
|
---|
| 873 | }
|
---|
| 874 |
|
---|
| 875 | // �スK�スw�スフ円�スハゑソス`�ス�ス
|
---|
| 876 | private void drawLayerCircle(Graphics g) {
|
---|
| 877 | // // �ス�ス�スS�スm�ス[�スh�スフ包ソス�スニ搾ソス�ス�ス
|
---|
| 878 | // int nw = this.exbp_node_center.width;
|
---|
| 879 | // int nh = this.exbp_node_center.height;
|
---|
| 880 | // // �ス�ス�スS�ス_
|
---|
| 881 | // //int cx = currentLayerLength * currentLayerNum + 30 + (nw / 2);
|
---|
| 882 | // int cx = currentLayerLength * currentLayerNum + WIDTH_MARGIN;
|
---|
| 883 | // int cy = currentLayerLength * currentLayerNum + HEIGHT_MARGIN + (nh / 2);
|
---|
| 884 | Point pt = getCenterPosition();
|
---|
| 885 | int cx = pt.x;
|
---|
| 886 | int cy = pt.y;
|
---|
| 887 |
|
---|
| 888 | for (int i = 1; i < currentLayerNum + 1; i++) {
|
---|
| 889 | int len = currentLayerLength * i;
|
---|
| 890 | g.setColor(Color.LIGHT_GRAY);
|
---|
| 891 | g.drawOval(cx-len, cy-len, len*2, len*2);
|
---|
| 892 | }
|
---|
| 893 | }
|
---|
| 894 |
|
---|
| 895 | // public Color getHilightColor(Node n){
|
---|
| 896 | // int clr=0;
|
---|
| 897 | // for(int i=0;i<hilight_nodes.size();i++){
|
---|
| 898 | // if(hilight_nodes.get(i).contains(n)){
|
---|
| 899 | // clr=i;
|
---|
| 900 | // while(clr>=6){
|
---|
| 901 | // clr-=6;
|
---|
| 902 | // }
|
---|
| 903 | // return hilight_color[clr];
|
---|
| 904 | // }
|
---|
| 905 | // }
|
---|
| 906 | //
|
---|
| 907 | //
|
---|
| 908 | // return Color.yellow;
|
---|
| 909 | // }
|
---|
| 910 |
|
---|
| 911 | private Point getCenterPosition() {
|
---|
| 912 | Point pt = new Point(0,0);
|
---|
| 913 | // �ス�ス�スS�スm�ス[�スh�スフ包ソス�スニ搾ソス�ス�ス
|
---|
| 914 | int nw = this.exbp_node_center.width;
|
---|
| 915 | int nh = this.exbp_node_center.height;
|
---|
| 916 | // �ス�ス�スS�ス_
|
---|
| 917 | //int cx = currentLayerLength * currentLayerNum + 30 + (nw / 2);
|
---|
| 918 | int cx = currentLayerLength * currentLayerNum + WIDTH_MARGIN;
|
---|
| 919 | int cy = currentLayerLength * currentLayerNum + HEIGHT_MARGIN + (nh / 2);
|
---|
| 920 | // �ス�ス�ス�ス�ス`�スF�スb�スN
|
---|
| 921 | if (cx < 0) cx = 0;
|
---|
| 922 | if (cy < 0) cy = 0;
|
---|
| 923 | pt.setLocation(cx, cy);
|
---|
| 924 | return pt;
|
---|
| 925 | }
|
---|
| 926 |
|
---|
| 927 | // �スm�ス[�スh�スヤの撰ソス�ス�ス�ス
|
---|
| 928 | private void drawLink(Graphics g) {
|
---|
| 929 | ExbpNode rootNode = this.exbp_node_center;
|
---|
| 930 | // �スq�スm�ス[�スh�スノ対ゑソス�スト撰ソス�ス�ス�ス
|
---|
| 931 | this.drawLinkNode(g, rootNode);
|
---|
| 932 | }
|
---|
| 933 |
|
---|
| 934 | // �スq�スm�ス[�スh�スノ対ゑソス�スト撰ソス�ス�ス�ス
|
---|
| 935 | private void drawLinkNode(Graphics g, ExbpNode node) {
|
---|
| 936 | ExbpNode parentNode = node;
|
---|
| 937 | int px = parentNode.x + parentNode.width / 2;
|
---|
| 938 | int py = parentNode.y + parentNode.height / 2;
|
---|
| 939 | // Vector<ExbpNode> childNodes = parentNode.getChildExbpNodes();
|
---|
| 940 | // Iterator it = childNodes.iterator();
|
---|
| 941 |
|
---|
| 942 | // #kozaki 2008/02/09�ス@�ス�ス�ス[�スt�ス�ス�ス�ス�スp�スフダ�ス~�ス[�スm�ス[�スh�スヘ描�ス謔オ�スネゑソス
|
---|
| 943 | // Vector childs = new Vector();
|
---|
| 944 | // while (it.hasNext()) {
|
---|
| 945 | // ExbpNode childNode = (ExbpNode) it.next();
|
---|
| 946 | // if(childNode.isDummy){
|
---|
| 947 | // childs.addAll(childNode.children);
|
---|
| 948 | // }
|
---|
| 949 | // else{
|
---|
| 950 | // childs.add(childNode);
|
---|
| 951 | // }
|
---|
| 952 | // }
|
---|
| 953 | //#kozaki 2008/05/09�ス@Dummy�ス�ス2�スi�スネ擾ソスフ擾ソス�ス�ス�スホ会ソス�ス�ス�ス\�スb�スh�スノ変更
|
---|
| 954 | Vector<ExbpNode> childs = parentNode.getChildren();
|
---|
| 955 | Iterator<ExbpNode> it = childs.iterator();
|
---|
| 956 |
|
---|
| 957 | while (it.hasNext()) {
|
---|
| 958 | ExbpNode childNode = it.next();
|
---|
| 959 | if(!childNode.visible){//#kozaki 2008/08/15
|
---|
| 960 | continue;
|
---|
| 961 | }
|
---|
| 962 | Graphics2D g2 = (Graphics2D)g;
|
---|
| 963 | BasicStroke wideStroke = new BasicStroke(1.0f);
|
---|
| 964 | g2.setStroke(wideStroke);
|
---|
| 965 |
|
---|
| 966 | int cx = childNode.x + childNode.width / 2;
|
---|
| 967 | int cy = childNode.y + childNode.height / 2;
|
---|
| 968 | // �ス�ス�ス�スl�ス�ス�ス\�ス�ス�スホ象外�スナゑソス�ス�スホ表�ス�ス�ス�ス�スネゑソス
|
---|
| 969 | //if (cx == 0 && cy == 0) {
|
---|
| 970 | if (nodes.contains(childNode)) {
|
---|
| 971 | g.setColor(Color.blue);
|
---|
| 972 |
|
---|
| 973 | if(childNode.opt.startsWith("isa")){
|
---|
| 974 | g.setColor(Color.green);
|
---|
| 975 | drawArrow(g,px,py,cx,cy);
|
---|
| 976 | }
|
---|
| 977 | else if(childNode.opt.startsWith("super")){
|
---|
| 978 | g.setColor(Color.green);
|
---|
| 979 | drawArrow(g,cx,cy,px,py);
|
---|
| 980 | }
|
---|
| 981 | else if(childNode.opt.startsWith(":!")){
|
---|
| 982 | g.setColor(Color.orange);
|
---|
| 983 | }
|
---|
| 984 | else if(childNode.opt.startsWith(":")){
|
---|
| 985 | g.setColor(Color.red);
|
---|
| 986 | drawArrow(g,cx,cy,px,py);
|
---|
| 987 | }
|
---|
| 988 | else{
|
---|
| 989 | drawArrow(g,px,py,cx,cy);
|
---|
| 990 | }
|
---|
| 991 |
|
---|
| 992 |
|
---|
| 993 | if (parentNode.equals(this.exbp_node_center)) {
|
---|
| 994 | if (this.isVisibleCenter) {
|
---|
| 995 | if(childNode.link_highlight==true){
|
---|
| 996 | float dash[] = {10.0f, 3.0f};
|
---|
| 997 | wideStroke = new BasicStroke(3.0f,
|
---|
| 998 | BasicStroke.CAP_BUTT,
|
---|
| 999 | BasicStroke.JOIN_MITER,
|
---|
| 1000 | 10.0f,
|
---|
| 1001 | dash,
|
---|
| 1002 | 0.0f);
|
---|
| 1003 | g2.setStroke(wideStroke);
|
---|
| 1004 | g2.setColor(childNode.link_highligjtColor);
|
---|
| 1005 | g2.drawLine(px, py, cx, cy);
|
---|
| 1006 | }
|
---|
| 1007 | else{
|
---|
| 1008 | g.drawLine(px, py, cx, cy);
|
---|
| 1009 | }
|
---|
| 1010 | drawLinkName(g,childNode, px, py, cx, cy);
|
---|
| 1011 |
|
---|
| 1012 | }
|
---|
| 1013 | } else {
|
---|
| 1014 | if(childNode.link_highlight==true){
|
---|
| 1015 | float dash[] = {10.0f, 3.0f};
|
---|
| 1016 | wideStroke = new BasicStroke(3.0f,
|
---|
| 1017 | BasicStroke.CAP_BUTT,
|
---|
| 1018 | BasicStroke.JOIN_MITER,
|
---|
| 1019 | 10.0f,
|
---|
| 1020 | dash,
|
---|
| 1021 | 0.0f);
|
---|
| 1022 | g2.setStroke(wideStroke);
|
---|
| 1023 | g2.setColor(childNode.link_highligjtColor);
|
---|
| 1024 | g2.drawLine(px, py, cx, cy);
|
---|
| 1025 | }
|
---|
| 1026 | else{
|
---|
| 1027 | g.drawLine(px, py, cx, cy);
|
---|
| 1028 | }
|
---|
| 1029 | drawLinkName(g,childNode, px, py, cx, cy);
|
---|
| 1030 | }
|
---|
| 1031 | // �スq�スm�ス[�スh�スノ対ゑソス�スト撰ソス�ス�ス�ス
|
---|
| 1032 | this.drawLinkNode(g, childNode);
|
---|
| 1033 | }
|
---|
| 1034 | }
|
---|
| 1035 | }
|
---|
| 1036 |
|
---|
| 1037 | void drawArrow(Graphics g,int px,int py, int cx, int cy){
|
---|
| 1038 | int r = 10;
|
---|
| 1039 | double arc = java.lang.Math.atan2(py-cy, px-cx);//-Math.PI;
|
---|
| 1040 | double arc_1 = arc-Math.PI/6;
|
---|
| 1041 | double arc_2 = arc+Math.PI/6;
|
---|
| 1042 | int arc_x = px + (cx-px)*3/4;
|
---|
| 1043 | int arc_y = py + (cy-py)*3/4;
|
---|
| 1044 | g.drawLine(arc_x+(int)(Math.cos(arc_1)*r),arc_y+(int)(Math.sin(arc_1)*r), arc_x, arc_y);
|
---|
| 1045 | g.drawLine(arc_x+(int)(Math.cos(arc_2)*r),arc_y+(int)(Math.sin(arc_2)*r), arc_x, arc_y);
|
---|
| 1046 |
|
---|
| 1047 | }
|
---|
| 1048 |
|
---|
| 1049 | private void drawLinkName(Graphics g, ExbpNode node,
|
---|
| 1050 | int px, int py, int cx, int cy) {
|
---|
| 1051 | int sx = (px + cx) / 2;
|
---|
| 1052 | int sy = (py + cy) / 2;
|
---|
| 1053 | g.setFont(fontLink);
|
---|
| 1054 | g.setColor(Color.GRAY);
|
---|
| 1055 | g.drawString(node.key, sx+5, sy);
|
---|
| 1056 | }
|
---|
| 1057 |
|
---|
| 1058 | /* public void update(Graphics g){
|
---|
| 1059 | this.setForeground(Color.white);
|
---|
| 1060 |
|
---|
| 1061 | Enumeration en_nodes = this.nodes.elements();
|
---|
| 1062 | while(en_nodes.hasMoreElements()){
|
---|
| 1063 | ExbpNode node = (ExbpNode)en_nodes.nextElement();
|
---|
| 1064 | node.paint2(g);
|
---|
| 1065 | }
|
---|
| 1066 | }*/
|
---|
| 1067 |
|
---|
| 1068 |
|
---|
| 1069 | /**
|
---|
| 1070 | * This method initializes this
|
---|
| 1071 | *
|
---|
| 1072 | * @return void
|
---|
| 1073 | */
|
---|
| 1074 | private void initialize() {
|
---|
| 1075 | this.setSize(300, 200);
|
---|
| 1076 | this.setLayout(new GridBagLayout());
|
---|
| 1077 | this.nodes = new Vector<ExbpNode>();
|
---|
| 1078 | //#kozaki 2008/08/11
|
---|
| 1079 | ExbpMouseListener mouseL = new ExbpMouseListener(this);
|
---|
| 1080 | this.addMouseListener(mouseL);
|
---|
| 1081 | this.addMouseMotionListener(mouseL);
|
---|
| 1082 | //setNodes();
|
---|
| 1083 | //this.tempGobjList = null;
|
---|
| 1084 |
|
---|
| 1085 |
|
---|
| 1086 | }
|
---|
| 1087 |
|
---|
| 1088 | //�スw�ス閧オ�ス�ス�スK�スw�スノゑソス�ス�スExbpNode�ス�スヤゑソス #kozaki 2009/01/22�ス@skipUnVisible:�ス�ス�スs�スツ趣ソス�スフノ�ス[�スh�ス�ス�スX�スL�スb�スv�ス�ス�ス�ス
|
---|
| 1089 | ExbpNode[] getExbpNodesAtLear(int layer, boolean skipUnVisible){
|
---|
| 1090 | if(this.exbp_node_center==null)return null;
|
---|
| 1091 |
|
---|
| 1092 | Vector<ExbpNode> nodes = new Vector<ExbpNode>();
|
---|
| 1093 | nodes.addElement(this.exbp_node_center);
|
---|
| 1094 | for(int i=1;i<=layer;i++){
|
---|
| 1095 | Enumeration<ExbpNode> en = nodes.elements();
|
---|
| 1096 | Vector<ExbpNode> nodes2 = new Vector<ExbpNode>();
|
---|
| 1097 | while(en.hasMoreElements()){
|
---|
| 1098 | ExbpNode node = en.nextElement();
|
---|
| 1099 | //#kozaki 2009/01/08�ス@Leaf�スナ擾ソス�ス�ス�ス�ス�ス�ス謔、�スノダ�ス~�ス[�スm�ス[�スh�ス�スヌ会ソス�ス�ス�ス髀茨ソス�ス
|
---|
| 1100 | if(node.key.equals(ExbpNode.IS_A)||node.key.equals(ExbpNode.IS_A_L)){
|
---|
| 1101 | if(node.getChildren().size()==0){
|
---|
| 1102 | node.removeDummyNodesAll();
|
---|
| 1103 | ExbpNode dummy = new ExbpNode(node.getLabel());
|
---|
| 1104 | dummy.setDummyNode(true);
|
---|
| 1105 | dummy.setOrgNode(node.getOrgNode());
|
---|
| 1106 | dummy.key=node.key;
|
---|
| 1107 | node.addChild(dummy);
|
---|
| 1108 | //nodes2.add(dummy);
|
---|
| 1109 | }
|
---|
| 1110 | }
|
---|
| 1111 |
|
---|
| 1112 | //�スs�スツ趣ソス�スフノ�ス[�スh�ス�ス�スホゑソス�ス�ス�ス�ス
|
---|
| 1113 | if(!skipUnVisible){
|
---|
| 1114 | nodes2.addAll(node.getChildrenWithISADummy(false));
|
---|
| 1115 | }
|
---|
| 1116 | else{
|
---|
| 1117 | nodes2.addAll(node.getChildrenWithISADummy(true));
|
---|
| 1118 | }
|
---|
| 1119 |
|
---|
| 1120 | }
|
---|
| 1121 | //�ス�ス�スフ段�スノ擾ソス�ス�ス�ス�ス�スレ行�ス�ス�ス驍ス�ス゚デ�ス[�ス^�ス�スn�ス�ス
|
---|
| 1122 | nodes = nodes2;
|
---|
| 1123 | }
|
---|
| 1124 |
|
---|
| 1125 | ExbpNode[] exbpnodes = new ExbpNode[nodes.size()];
|
---|
| 1126 | nodes.copyInto(exbpnodes);
|
---|
| 1127 | return exbpnodes;
|
---|
| 1128 | }
|
---|
| 1129 |
|
---|
| 1130 |
|
---|
| 1131 |
|
---|
| 1132 | //#kozaki 2008/10/25�ス@�ス�ス�ス�ス�スモ擾ソス�スノゑソス�ス�ス�ス�ス�ス�ス�ス�ス�ス�ス�ス\�スb�スh�ス�ス�ス�ス�ス�ス�ス�スノ難ソス�ス�ス
|
---|
| 1133 | String getSelectedRoles(int i){
|
---|
| 1134 | RoleLists roles =(RoleLists) role_lists.elementAt(i);
|
---|
| 1135 | // Enumeration en = roles.getRoleLists().elements();
|
---|
| 1136 | List list = new List(roles.getRoleLists().size(),true);
|
---|
| 1137 | // while(en.hasMoreElements()){
|
---|
| 1138 | // String role = (String)en.nextElement();
|
---|
| 1139 | // list.add(role);
|
---|
| 1140 | // }
|
---|
| 1141 |
|
---|
| 1142 | Vector<String> rolelists = roles.getRoleLists();
|
---|
| 1143 | Vector<Integer> hit_num_lists = roles.getHitNumLists();
|
---|
| 1144 | for(int l=0;l<rolelists.size();l++){
|
---|
| 1145 | String role = rolelists.elementAt(l);
|
---|
| 1146 | int num = hit_num_lists.elementAt(l).intValue();
|
---|
| 1147 | list.add(role+","+num);
|
---|
| 1148 | }
|
---|
| 1149 |
|
---|
| 1150 |
|
---|
| 1151 | JScrollPane jsc = new JScrollPane(list);
|
---|
| 1152 | int ans = JOptionPane.showConfirmDialog(this,jsc,"Select Roles",JOptionPane.YES_NO_CANCEL_OPTION );
|
---|
| 1153 |
|
---|
| 1154 | String selected_role="";
|
---|
| 1155 | if(ans==JOptionPane.YES_OPTION ){
|
---|
| 1156 | String[] selected = list.getSelectedItems();
|
---|
| 1157 | for(int k=0;k<selected.length;k++){
|
---|
| 1158 | if(k>0){
|
---|
| 1159 | selected_role+="|";
|
---|
| 1160 | }
|
---|
| 1161 | selected_role+=selected[k].split(",")[0];
|
---|
| 1162 | }
|
---|
| 1163 |
|
---|
| 1164 | return selected_role;
|
---|
| 1165 | }
|
---|
| 1166 |
|
---|
| 1167 | return null;
|
---|
| 1168 | }
|
---|
| 1169 |
|
---|
| 1170 | //�スeLink�スフ撰ソス�ス�ス�ス齬暦ソスナ返ゑソス
|
---|
| 1171 | Vector getLinkListCount(){
|
---|
| 1172 | return link_list.getHitNumLists();
|
---|
| 1173 | }
|
---|
| 1174 | //�ス�ス�スラてゑソスLink�スフ一覧�ス�スヤゑソス
|
---|
| 1175 | Vector getLinkList(){
|
---|
| 1176 | link_list.clearRoles();
|
---|
| 1177 | Enumeration en = this.nodes.elements();
|
---|
| 1178 | while(en.hasMoreElements()){
|
---|
| 1179 | ExbpNode n =(ExbpNode)en.nextElement();
|
---|
| 1180 | link_list.addRole(n.key);
|
---|
| 1181 | }
|
---|
| 1182 | return link_list.getRoleLists();
|
---|
| 1183 | //
|
---|
| 1184 | // Vector links = new Vector();
|
---|
| 1185 | // this.link_count.removeAllElements();
|
---|
| 1186 | //
|
---|
| 1187 | // Enumeration en = this.nodes.elements();
|
---|
| 1188 | // while(en.hasMoreElements()){
|
---|
| 1189 | // ExbpNode n =(ExbpNode)en.nextElement();
|
---|
| 1190 | // int index = links.indexOf(n.key);
|
---|
| 1191 | // if(index<0){
|
---|
| 1192 | // links.addElement(n.key);
|
---|
| 1193 | // this.link_count.add(1);
|
---|
| 1194 | // }
|
---|
| 1195 | // else{
|
---|
| 1196 | // Integer c = (Integer)link_count.elementAt(index);
|
---|
| 1197 | // c++;
|
---|
| 1198 | // }
|
---|
| 1199 | // }
|
---|
| 1200 | // link_list=links;
|
---|
| 1201 | //
|
---|
| 1202 | // return links;
|
---|
| 1203 | }
|
---|
| 1204 |
|
---|
| 1205 | //#kozaki �ス�ス�ス�ス`�ス謗橸ソスフ位置�スフ費ソス�ス�ス�ス�ス
|
---|
| 1206 | public void setNodesLoc(){
|
---|
| 1207 | Graphics g = this.getGraphics();
|
---|
| 1208 | Enumeration<ExbpNode> en_nodes = this.nodes.elements();
|
---|
| 1209 | while(en_nodes.hasMoreElements()){
|
---|
| 1210 | ExbpNode node = en_nodes.nextElement();
|
---|
| 1211 | if (node != null) {
|
---|
| 1212 | node.adjustLoc(g);//#kozaki 2009/01/20�ス@paint�ス�ス�ス\�スb�スh�スフ茨ソス{�ス�ス�スフゑソス�ス゚抵ソス�ス�ス
|
---|
| 1213 | //node.paint3(g);
|
---|
| 1214 | //node.paint2(g);
|
---|
| 1215 | node.paint(g,this);
|
---|
| 1216 | }
|
---|
| 1217 | }
|
---|
| 1218 | repaint();
|
---|
| 1219 | }
|
---|
| 1220 |
|
---|
| 1221 | void setNodes(String opt){}
|
---|
| 1222 |
|
---|
| 1223 | public void refreshExbp(){
|
---|
| 1224 |
|
---|
| 1225 | int num_of_layer = currentLayerNum;
|
---|
| 1226 | int length_of_layer=currentLayerLength;
|
---|
| 1227 |
|
---|
| 1228 | //�ス�ス�スS�ス�ス�スW�ス�スン抵ソス
|
---|
| 1229 | int cx=length_of_layer*num_of_layer + WIDTH_MARGIN;
|
---|
| 1230 | int cy=length_of_layer*num_of_layer + HEIGHT_MARGIN;
|
---|
| 1231 |
|
---|
| 1232 |
|
---|
| 1233 | //�ス�ス�スフゑソス�ス�ス�ス�スフ描�ス諠�ソス\�スb�スh�スヘ,ExtendBP�スN�ス�ス�スX�スナ設抵ソス\�ス�ス
|
---|
| 1234 | exbp_node_center.color = ExbpNode.CENTER_COLOR;
|
---|
| 1235 | exbp_node_center.font = new Font("Times", Font.BOLD, (int)((ExbpNode.Font_node_size)*(ExbpNode.Font_node_center )));
|
---|
| 1236 | exbp_node_center.setLocation(cx,cy);
|
---|
| 1237 |
|
---|
| 1238 | //�ス�ス�スハノ�ス[�スh�スフ色�スw�ス�ス
|
---|
| 1239 | Enumeration<ExbpNode> chi_en = exbp_node_center.children.elements();
|
---|
| 1240 | int color = 0;
|
---|
| 1241 | while(chi_en.hasMoreElements()){
|
---|
| 1242 | ExbpNode chi_node = chi_en.nextElement();
|
---|
| 1243 | if(color>9){
|
---|
| 1244 | color-=10;
|
---|
| 1245 | }
|
---|
| 1246 | if(chi_node!=null){
|
---|
| 1247 |
|
---|
| 1248 | // #hirota 09/11/19
|
---|
| 1249 | // if(chi_node.getParentHozoNode() != null){
|
---|
| 1250 | // //System.out.println("** parent_test:"+chi_node.getParentHozoNode().getLabel());
|
---|
| 1251 | // }else{
|
---|
| 1252 | // //System.out.println("** parent_test:Error");
|
---|
| 1253 | // }
|
---|
| 1254 |
|
---|
| 1255 | chi_node.setChildrenColor(ExbpNode.node_color[color]);
|
---|
| 1256 | color++;
|
---|
| 1257 | }
|
---|
| 1258 | }
|
---|
| 1259 |
|
---|
| 1260 |
|
---|
| 1261 | //�ス�ス�スハノ�ス[�スh�スフ配�スu�ス�ス�ス�ス
|
---|
| 1262 | this.setNodesLoc(num_of_layer, length_of_layer, 1,12);
|
---|
| 1263 | setNodesLoc(); // �スハ置�ス�ス�ス�ス�ス�ス�ス
|
---|
| 1264 |
|
---|
| 1265 | // nodes.addAll(exbp_node_center.getVisbleChildren());
|
---|
| 1266 |
|
---|
| 1267 | //#kozaki 2008/08/11�ス@�スo�スl�ス�ス�スf�ス�ス�スp�スフ�ソス�ス�ス�スN�スヌ会ソス
|
---|
| 1268 | setEdgesForSpringModel();
|
---|
| 1269 | this.start();
|
---|
| 1270 | }
|
---|
| 1271 |
|
---|
| 1272 |
|
---|
| 1273 | //#kozaki 2008/08/13�スo�スl�ス�ス�スf�ス�ス�スp�スフ�ソス�ス�ス�スN�スヌ会ソス
|
---|
| 1274 | void setEdgesForSpringModel(){
|
---|
| 1275 | this.edges.removeAllElements();
|
---|
| 1276 | System.out.println("�スo�スl�ス�ス�スf�ス�ス�スp�スフ�ソス�ス�ス�スN�スヌ会ソス:currentLayerNum"+currentLayerNum);
|
---|
| 1277 | Enumeration en = this.nodes.elements();
|
---|
| 1278 | while(en.hasMoreElements()){
|
---|
| 1279 | ExbpNode n = (ExbpNode)en.nextElement();
|
---|
| 1280 | if(n.getParent()!=null && n.visible){
|
---|
| 1281 | //this.addEdge(n.getParent(), n, this.currentLayerLength*3/2, false);
|
---|
| 1282 | this.addEdge(n.getParent(), n, this.getlength(n.getParent(), n), false);
|
---|
| 1283 | }
|
---|
| 1284 | }
|
---|
| 1285 | Vector<ExbpNode>[] chi_n = new Vector[this.currentLayerNum+1];
|
---|
| 1286 | // chi_n[0] = this.exbp_node_center.children; #kozaki 2009/02/13�ス@ROOT�ス�スツゑソス�ス�スニゑソス�ス�ス�ス�ス�ス�ス�スネゑソスo�スO�スC�ス�ス
|
---|
| 1287 | chi_n[0] = new Vector();
|
---|
| 1288 | chi_n[0].addAll(this.exbp_node_center.children);
|
---|
| 1289 |
|
---|
| 1290 | for(int i=0;i<currentLayerNum;i++){
|
---|
| 1291 | if(chi_n[i]!=null){
|
---|
| 1292 | Enumeration en_chi = chi_n[i].elements();
|
---|
| 1293 | chi_n[i+1] = new Vector();
|
---|
| 1294 | while(en_chi.hasMoreElements()){
|
---|
| 1295 | ExbpNode n = (ExbpNode)en_chi.nextElement();
|
---|
| 1296 | chi_n[i+1].addAll(n.children); }
|
---|
| 1297 | }
|
---|
| 1298 | }
|
---|
| 1299 |
|
---|
| 1300 | //#kozaki 2008/08/15�ス@�スs�スツ趣ソス�スフノ�ス[�スh�ス�ス�スO�ス�ス
|
---|
| 1301 | ExbpNode n;
|
---|
| 1302 | for(int i=0;i<currentLayerNum+1;i++){
|
---|
| 1303 | if(chi_n[i]!=null){
|
---|
| 1304 | Enumeration en_chi = chi_n[i].elements();
|
---|
| 1305 | Vector remove=new Vector();
|
---|
| 1306 | while(en_chi.hasMoreElements()){
|
---|
| 1307 | n = (ExbpNode)en_chi.nextElement();
|
---|
| 1308 | if(!n.visible)remove.addElement(n);
|
---|
| 1309 | }
|
---|
| 1310 | chi_n[i].removeAll(remove);
|
---|
| 1311 | }
|
---|
| 1312 | }
|
---|
| 1313 |
|
---|
| 1314 | for(int i=0;i<currentLayerNum+1;i++){
|
---|
| 1315 | if(chi_n[i]!=null && chi_n[i].size()>=2){
|
---|
| 1316 | System.out.println("addEdge:Layer=="+i);
|
---|
| 1317 | Enumeration en_chi = chi_n[i].elements();
|
---|
| 1318 | ExbpNode n0 = (ExbpNode)en_chi.nextElement();
|
---|
| 1319 | ExbpNode n1 = null;
|
---|
| 1320 | while(en_chi.hasMoreElements()){
|
---|
| 1321 | n1 = (ExbpNode)en_chi.nextElement();
|
---|
| 1322 | this.addEdge(n0, n1, this.getlength(n0, n1), false);
|
---|
| 1323 | //System.out.println(" ==>"+n0.getLabel()+":::"+n1.getLabel());
|
---|
| 1324 | n0 = n1;
|
---|
| 1325 | }
|
---|
| 1326 | ExbpNode n_0 = (ExbpNode)chi_n[i].firstElement();
|
---|
| 1327 | ExbpNode n_1 = (ExbpNode)chi_n[i].lastElement();
|
---|
| 1328 | this.addEdge(n_1, n_0, this.getlength(n_1, n_0), false);
|
---|
| 1329 |
|
---|
| 1330 | }
|
---|
| 1331 | }
|
---|
| 1332 | }
|
---|
| 1333 |
|
---|
| 1334 | void setNodesLoc(int num_of_layer,int length_of_layer, double arc, int node_size){
|
---|
| 1335 | this.nodes.removeAllElements();
|
---|
| 1336 | this.nodes.addElement(exbp_node_center);
|
---|
| 1337 |
|
---|
| 1338 | //#kozaki 2008/06/26�ス@�スハ置�ス�ス�ス�ス�スp�スフダ�ス~�ス[�スm�ス[�スh�ス�スヌ会ソス�ス�ス�ス�ス
|
---|
| 1339 | if(this.layoutOption==LinkCentricLayout2){
|
---|
| 1340 | exbp_node_center.setDummyNodes(num_of_layer);
|
---|
| 1341 | }
|
---|
| 1342 | else{
|
---|
| 1343 | exbp_node_center.removeDummyNodes();
|
---|
| 1344 | }
|
---|
| 1345 |
|
---|
| 1346 | currentLayerNum = num_of_layer;
|
---|
| 1347 | currentLayerLength = length_of_layer;
|
---|
| 1348 |
|
---|
| 1349 | //�ス�ス�スS�ス�ス�スW�ス�スン抵ソス
|
---|
| 1350 | int cx=length_of_layer * num_of_layer + WIDTH_MARGIN;
|
---|
| 1351 | int cy=length_of_layer * num_of_layer + HEIGHT_MARGIN;
|
---|
| 1352 |
|
---|
| 1353 | if (exbp_node_center == null) return; // �スG�ス�ス�ス[�ス�ス�ス
|
---|
| 1354 |
|
---|
| 1355 | exbp_node_center.setLocation(cx,cy);
|
---|
| 1356 | //�ス�ス�スハノ�ス[�スh�スフ配�スu�ス�ス�ス�ス
|
---|
| 1357 |
|
---|
| 1358 | //�スp�スx�ス�ス�ス�スフ奇ソスニなゑソスS�ストの葉�スフ撰ソス�スフ搾ソス�スv�ス�ス�ス�ス�ス゚ゑソス
|
---|
| 1359 | int leaf_num_all = exbp_node_center.getLeafNum(num_of_layer+1);
|
---|
| 1360 | System.out.println("Leaf NUM = "+leaf_num_all);
|
---|
| 1361 |
|
---|
| 1362 | //�スe�スハ厄ソス�スノ配�スu�ス�ス�ス�ス
|
---|
| 1363 | //�スJ�スn�ス_�ス�スロ趣ソス�ス�ス�ス驍ス�ス゚の変撰ソス
|
---|
| 1364 | double start_arc=0;//Math.PI*3;
|
---|
| 1365 | if(arc<1){
|
---|
| 1366 | start_arc = (Math.PI-2*arc*Math.PI)/2;//#kozaki 2008/03/25�ス@�ス�ス`�スフ角�スx�スン抵ソス
|
---|
| 1367 | }
|
---|
| 1368 | double r;
|
---|
| 1369 | // int scale = Integer.parseInt(_extendFrame.jtf_scale.getText());
|
---|
| 1370 |
|
---|
| 1371 | double rt =Double.parseDouble( this._extendFrame.jtf_rotation.getText());
|
---|
| 1372 |
|
---|
| 1373 | start_arc=Math.PI * rt;
|
---|
| 1374 | System.out.println("rotation="+rt+" start_arc="+start_arc);
|
---|
| 1375 | //�スJ�スn�ス_�スCLeaf�ス�ス�スv�スCLayer�ス�ス�ス�ス�スw�ス閧オ�スト各�スハの配�スu�ス�ス�ス�ス�スs�ス�ス�スI�ス�ス�スp�スx�ス�スヤゑソス
|
---|
| 1376 | Enumeration chi_en = exbp_node_center.getVisbleChildren().elements();
|
---|
| 1377 | while(chi_en.hasMoreElements()){
|
---|
| 1378 | ExbpNode node = (ExbpNode) chi_en.nextElement();
|
---|
| 1379 | r = 2*Math.PI*node.getLeafNum(num_of_layer)/leaf_num_all*arc;//#kozaki 2008/03/25�ス@�ス�ス`�スフ角�スx�スン抵ソス
|
---|
| 1380 | //#kozaki 2008/06/26�ス@�ス�ス�スC�スA�スE�スg�スフ切ゑソスヨゑソス
|
---|
| 1381 | if(this.layoutOption==LinkCentricLayout || this.layoutOption==LinkCentricLayout2){
|
---|
| 1382 | setLayerArcNew(node,cx,cy,length_of_layer,start_arc,r,num_of_layer, node_size);
|
---|
| 1383 | }
|
---|
| 1384 | else{
|
---|
| 1385 | setLayerArc(node,cx,cy,length_of_layer,start_arc,r,num_of_layer, node_size);
|
---|
| 1386 | }
|
---|
| 1387 | start_arc += r;
|
---|
| 1388 | }
|
---|
| 1389 | }
|
---|
| 1390 |
|
---|
| 1391 | //#kozaki�ス@2008/08/12�ス@�スz�スu�ス�ス�ス�ス�ス轤キ�ス�ス�ス�ス
|
---|
| 1392 | void setNodesLocRandom(int num_of_layer,int length_of_layer, double arc, int node_size){
|
---|
| 1393 | //�ス�ス�スS�ス�ス�スW�ス�スン抵ソス
|
---|
| 1394 | if (exbp_node_center == null) return; // �スG�ス�ス�ス[�ス�ス�ス
|
---|
| 1395 |
|
---|
| 1396 | int cx=exbp_node_center.getCenterPoint().x;
|
---|
| 1397 | int cy=exbp_node_center.getCenterPoint().y;
|
---|
| 1398 |
|
---|
| 1399 | //�ス�ス�スハノ�ス[�スh�スフ配�スu�ス�ス�ス�ス
|
---|
| 1400 |
|
---|
| 1401 | //�スp�スx�ス�ス�ス�スフ奇ソスニなゑソスS�ストの葉�スフ撰ソス�スフ搾ソス�スv�ス�ス�ス�ス�ス゚ゑソス
|
---|
| 1402 | int leaf_num_all = exbp_node_center.getLeafNum(num_of_layer+1);
|
---|
| 1403 | //�スe�スハ厄ソス�スノ配�スu�ス�ス�ス�ス
|
---|
| 1404 | //�スJ�スn�ス_�ス�スロ趣ソス�ス�ス�ス驍ス�ス゚の変撰ソス
|
---|
| 1405 | double start_arc=0;
|
---|
| 1406 | if(arc<1){
|
---|
| 1407 | start_arc = (Math.PI-2*arc*Math.PI)/2;//#kozaki 2008/03/25�ス@�ス�ス`�スフ角�スx�スン抵ソス
|
---|
| 1408 | }
|
---|
| 1409 | double r;
|
---|
| 1410 |
|
---|
| 1411 | //�スJ�スn�ス_�スCLeaf�ス�ス�スv�スCLayer�ス�ス�ス�ス�スw�ス閧オ�スト各�スハの配�スu�ス�ス�ス�ス�スs�ス�ス�スI�ス�ス�スp�スx�ス�スヤゑソス
|
---|
| 1412 | Enumeration chi_en = exbp_node_center.getVisbleChildren().elements();
|
---|
| 1413 | while(chi_en.hasMoreElements()){
|
---|
| 1414 | ExbpNode node = (ExbpNode) chi_en.nextElement();
|
---|
| 1415 | r = 2*Math.PI*node.getLeafNum(num_of_layer)/leaf_num_all*arc;//#kozaki 2008/03/25�ス@�ス�ス`�スフ角�スx�スン抵ソス
|
---|
| 1416 | //#kozaki 2008/06/26�ス@�ス�ス�スC�スA�スE�スg�スフ切ゑソスヨゑソス
|
---|
| 1417 | if(this.layoutOption==LinkCentricLayout || this.layoutOption==LinkCentricLayout2){
|
---|
| 1418 | setLayerArcNew(node,cx,cy,length_of_layer,start_arc,r,num_of_layer,node_size);
|
---|
| 1419 | }
|
---|
| 1420 | else{
|
---|
| 1421 | setLayerArc(node,cx,cy,length_of_layer,start_arc,r,num_of_layer,node_size);
|
---|
| 1422 | }
|
---|
| 1423 | start_arc += r;
|
---|
| 1424 | }
|
---|
| 1425 | }
|
---|
| 1426 |
|
---|
| 1427 |
|
---|
| 1428 |
|
---|
| 1429 | ExbpNode getPick(Point pp){
|
---|
| 1430 | Enumeration<ExbpNode> node_en = this.nodes.elements();
|
---|
| 1431 | while(node_en.hasMoreElements()){
|
---|
| 1432 | ExbpNode node =node_en.nextElement();
|
---|
| 1433 | if(node.visible){
|
---|
| 1434 | if(node.contains(pp.x, pp.y)){
|
---|
| 1435 | System.out.println("Clicked!!"+node.getLabel());
|
---|
| 1436 | //exbp_node_pick=node; #kozaki 08/02/14
|
---|
| 1437 | return node;
|
---|
| 1438 | }
|
---|
| 1439 | }
|
---|
| 1440 | }
|
---|
| 1441 | //exbp_node_pick=null; #kozaki 08/02/14
|
---|
| 1442 | return null;
|
---|
| 1443 | }
|
---|
| 1444 |
|
---|
| 1445 | //�ス�ス�スS�ス_�スC�ス�ス�スS�ス�ス�ス�スフ具ソス�ス�ス�スC�スz�スu�ス�ス�ス�スm�ス[�スh�スiVector�スj�ス�ス�スw�ス閧オ�スト円�ス�ス�スExbpNode�ス�スz�スu�ス�ス�ス�ス
|
---|
| 1446 | void setLayer(Vector layer_nodes,int cx,int cy,int l){
|
---|
| 1447 | int size = layer_nodes.size();
|
---|
| 1448 | int i=0;
|
---|
| 1449 | Enumeration wc = layer_nodes.elements();
|
---|
| 1450 | while(wc.hasMoreElements()){
|
---|
| 1451 | ExbpNode wnode = (ExbpNode)wc.nextElement();
|
---|
| 1452 | //Node wnode = (Node)wc.nextElement();
|
---|
| 1453 | Double dx =new Double(l*java.lang.Math.sin(java.lang.Math.PI*2*i/size));
|
---|
| 1454 | Double dy =new Double(l*java.lang.Math.cos(java.lang.Math.PI*2*i/size));
|
---|
| 1455 | wnode.setLocation(cx+dx.intValue(),cy+dy.intValue());
|
---|
| 1456 | // System.out.print("x="+cx+dx.intValue());
|
---|
| 1457 | // System.out.println("y="+cy+dy.intValue());
|
---|
| 1458 |
|
---|
| 1459 | nodes.addElement(wnode);
|
---|
| 1460 | i++;
|
---|
| 1461 | }
|
---|
| 1462 | }
|
---|
| 1463 |
|
---|
| 1464 | // �スJ�スn�ス_�スCLeaf�ス�ス�スv�スCLayer�ス�ス�ス�ス�スw�ス閧オ�スト各�スハの配�スu�ス�ス�ス�ス�スs�ス�ス�スI�ス�ス�スp�スx�ス�スヤゑソス
|
---|
| 1465 | void setLayerArc(ExbpNode node,int cx,int cy,int l,double start_arc,double r,int layer_num, int node_size){
|
---|
| 1466 | Vector<ExbpNode> arc_nodes = new Vector<ExbpNode>();
|
---|
| 1467 | arc_nodes.addElement(node);
|
---|
| 1468 |
|
---|
| 1469 | for(int layer=1;layer<=layer_num;layer++){
|
---|
| 1470 | Vector<ExbpNode> arc_nodes2 = new Vector<ExbpNode>();
|
---|
| 1471 |
|
---|
| 1472 | int size = arc_nodes.size();
|
---|
| 1473 | int i=0;
|
---|
| 1474 | Enumeration<ExbpNode> arc_en = arc_nodes.elements();
|
---|
| 1475 | while(arc_en.hasMoreElements()){
|
---|
| 1476 | ExbpNode arc_node = arc_en.nextElement();
|
---|
| 1477 | //�ス�スi�スレは擾ソス�ス�ス�ス蛯ォ�ス゚のフ�スH�ス�ス�スg�スノゑソス�ス�ス
|
---|
| 1478 | if(layer==1){
|
---|
| 1479 | // #hirota 08/08/19
|
---|
| 1480 | arc_node.font = new Font("Times", Font.BOLD, (int)(node_size*(ExbpNode.Font_node_layer2)));
|
---|
| 1481 | }
|
---|
| 1482 | else{
|
---|
| 1483 | arc_node.font = new Font("Times", Font.PLAIN, node_size);
|
---|
| 1484 | }
|
---|
| 1485 | Double dx =new Double(l*layer*java.lang.Math.cos(start_arc+r*i/size+r*0.5/size)); //#kozaki 2008/06/26
|
---|
| 1486 | Double dy =new Double(l*layer*java.lang.Math.sin(start_arc+r*i/size+r*0.5/size)); //#kozaki 2008/06/26
|
---|
| 1487 | // Double dx =new Double(l*layer*java.lang.Math.sin(start_arc+r*i/size+r*0.5/size));
|
---|
| 1488 | // Double dy =new Double(l*layer*java.lang.Math.cos(start_arc+r*i/size+r*0.5/size));
|
---|
| 1489 | arc_node.setLocation(cx+dx.intValue(),cy+dy.intValue());
|
---|
| 1490 |
|
---|
| 1491 |
|
---|
| 1492 |
|
---|
| 1493 | // System.out.print("x="+cx+dx.intValue());
|
---|
| 1494 | // System.out.println("y="+cy+dy.intValue());
|
---|
| 1495 | nodes.addElement(arc_node);
|
---|
| 1496 | i++;
|
---|
| 1497 |
|
---|
| 1498 | arc_nodes2.addAll(arc_node.getVisbleChildren());
|
---|
| 1499 | }
|
---|
| 1500 | arc_nodes = arc_nodes2;
|
---|
| 1501 | }
|
---|
| 1502 |
|
---|
| 1503 | }
|
---|
| 1504 |
|
---|
| 1505 | //#kozaki�ス@2008/06/14�ス@�スz�スu�スA�ス�ス�スS�ス�ス�スY�ス�ス�スフ会ソス�ス
|
---|
| 1506 | // �スJ�スn�ス_�スCLeaf�ス�ス�スv�スCLayer�ス�ス�ス�ス�スw�ス閧オ�スト各�スハの配�スu�ス�ス�ス�ス�スs�ス�ス�スI�ス�ス�スp�スx�ス�スヤゑソス
|
---|
| 1507 | void setLayerArcNew(ExbpNode node,int cx,int cy,int l,double start_arc,double r,int layer_num, int node_size){
|
---|
| 1508 | Vector<ExbpNode> arc_nodes = new Vector<ExbpNode>();
|
---|
| 1509 | arc_nodes.addElement(node);
|
---|
| 1510 |
|
---|
| 1511 | //�スeLayer�スフノ�ス[�スh�スフ�ソス�スX�スg�ス�スロ趣ソス�ス�ス�ス�ス
|
---|
| 1512 | Vector<ExbpNode>[] layer_nodes = new Vector[layer_num+1];
|
---|
| 1513 | layer_nodes[0] = new Vector<ExbpNode>();
|
---|
| 1514 | layer_nodes[0].addElement(node);
|
---|
| 1515 |
|
---|
| 1516 | for(int layer=0;layer<layer_num;layer++){
|
---|
| 1517 | layer_nodes[layer+1] = new Vector<ExbpNode>();
|
---|
| 1518 |
|
---|
| 1519 | int size = layer_nodes[layer].size();
|
---|
| 1520 | int i=0;
|
---|
| 1521 | Enumeration arc_en = layer_nodes[layer].elements();
|
---|
| 1522 | while(arc_en.hasMoreElements()){
|
---|
| 1523 | ExbpNode arc_node = (ExbpNode)arc_en.nextElement();
|
---|
| 1524 | //�ス�スi�スレは擾ソス�ス�ス�ス蛯ォ�ス゚のフ�スH�ス�ス�スg�スノゑソス�ス�ス
|
---|
| 1525 | if(layer==0){
|
---|
| 1526 |
|
---|
| 1527 | // #hirota 08/08/19
|
---|
| 1528 | arc_node.font = new Font("Times", Font.PLAIN, (int)(node_size*(ExbpNode.Font_node_layer2)));
|
---|
| 1529 | //arc_node.font=ExbpNode.font_2;
|
---|
| 1530 | }else{
|
---|
| 1531 | arc_node.font = new Font("Times", Font.PLAIN, node_size);
|
---|
| 1532 | }
|
---|
| 1533 | Double dx =new Double(l*(layer+1)*java.lang.Math.cos(start_arc+r*i/size+r*0.5/size));
|
---|
| 1534 | Double dy =new Double(l*(layer+1)*java.lang.Math.sin(start_arc+r*i/size+r*0.5/size));
|
---|
| 1535 | //Double dx =new Double(l*(layer+1)*java.lang.Math.sin(start_arc+r*i/size+r*0.5/size));
|
---|
| 1536 | //Double dy =new Double(l*(layer+1)*java.lang.Math.cos(start_arc+r*i/size+r*0.5/size));
|
---|
| 1537 | arc_node.setLocation(cx+dx.intValue(),cy+dy.intValue());
|
---|
| 1538 |
|
---|
| 1539 |
|
---|
| 1540 | nodes.addElement(arc_node);
|
---|
| 1541 | i++;
|
---|
| 1542 |
|
---|
| 1543 | layer_nodes[layer+1].addAll(arc_node.getVisbleChildren());
|
---|
| 1544 | }
|
---|
| 1545 |
|
---|
| 1546 |
|
---|
| 1547 |
|
---|
| 1548 | //arc_nodes = arc_nodes2;
|
---|
| 1549 | }
|
---|
| 1550 |
|
---|
| 1551 |
|
---|
| 1552 | // #kozaki �スV�ス�ス�ス�ス�スz�スu�スA�ス�ス�スS�ス�ス�スY�ス�ス�ス�ス�ス�スヤ外�ス�ス�スフL�ス�ス�ス�ス�ス�ス�ス�ス�スフ位置�ス�ス�ス�ス�ス�ス�ス�スフ位置�ス�ス�ス�ス�ス゚ゑソス
|
---|
| 1553 | for(int k=layer_num-2;k>0;k--){//#kozaki 2011/01/26 k=0�スフとゑソス�スヘ擾ソス�ス�ス�ス�ス�ス�スO�ス�ス�ス�ス]�ス�ス�ス�ス�ス�ス�スニゑソス�スノゑソス�ス�ス�ス�ス�ス�ス�スネるか�ス�ス@
|
---|
| 1554 | if(layer_nodes[k]!=null){
|
---|
| 1555 | //Enumeration en = layer_nodes[k].elements();
|
---|
| 1556 | double start0 = start_arc;//�スq�スm�ス[�スh�ス�ス�ス�ス�ス�ス�ス鼾�ソスitmp_node�スj�ス�ス�ス�ス�スp
|
---|
| 1557 | double center = start_arc + r;
|
---|
| 1558 |
|
---|
| 1559 | Vector<ExbpNode> tmp_node = new Vector<ExbpNode>();
|
---|
| 1560 | for(int index=0; index<layer_nodes[k].size();index++){
|
---|
| 1561 | ExbpNode node2 = (ExbpNode)layer_nodes[k].elementAt(index);
|
---|
| 1562 | //System.out.println(node2.getLabel());
|
---|
| 1563 | if(node2.getVisbleChildren().size()>0){
|
---|
| 1564 | ExbpNode chi_start = (ExbpNode)node2.getVisbleChildren().firstElement();
|
---|
| 1565 | ExbpNode chi_end = (ExbpNode)node2.getVisbleChildren().lastElement();
|
---|
| 1566 | double start = java.lang.Math.atan2(chi_start.getY()-cy, chi_start.getX()-cx);
|
---|
| 1567 | double end = java.lang.Math.atan2(chi_end.getY()-cy, chi_end.getX()-cx);
|
---|
| 1568 | if(start<0){
|
---|
| 1569 | start +=2*Math.PI;
|
---|
| 1570 | }
|
---|
| 1571 | if(end<0){
|
---|
| 1572 | end +=2*Math.PI;
|
---|
| 1573 | }
|
---|
| 1574 | center = (start+end)/2;
|
---|
| 1575 |
|
---|
| 1576 | // System.out.println("start: "+chi_start.getLabel()+java.lang.Math.toDegrees(start));
|
---|
| 1577 | // System.out.print("end :"+chi_end.getLabel()+java.lang.Math.toDegrees(end)+"\n");
|
---|
| 1578 | // System.out.println("===>> "+java.lang.Math.toDegrees(center));
|
---|
| 1579 |
|
---|
| 1580 |
|
---|
| 1581 | Double dx =new Double(l*(k+1)*java.lang.Math.cos(center));
|
---|
| 1582 | Double dy =new Double(l*(k+1)*java.lang.Math.sin(center));
|
---|
| 1583 | node2.setLocation(cx+dx.intValue(),cy+dy.intValue());
|
---|
| 1584 |
|
---|
| 1585 | if(tmp_node.size()>0){
|
---|
| 1586 | double arc = Math.abs(center-start0)/(tmp_node.size()+1);
|
---|
| 1587 | Enumeration<ExbpNode> arc_en = tmp_node.elements();
|
---|
| 1588 | int i=1;
|
---|
| 1589 | while(arc_en.hasMoreElements()){
|
---|
| 1590 | ExbpNode n = arc_en.nextElement();
|
---|
| 1591 | Double dx2 =new Double(l*(k+1)*Math.cos(start0+arc*i));
|
---|
| 1592 | Double dy2 =new Double(l*(k+1)*Math.sin(start0+arc*i));
|
---|
| 1593 | n.setLocation(cx+dx2.intValue(),cy+dy2.intValue());
|
---|
| 1594 | //System.out.println("TMP"+n.getLabel()+Math.toDegrees(start0+arc*i));
|
---|
| 1595 | i++;
|
---|
| 1596 | }
|
---|
| 1597 | tmp_node.removeAllElements();
|
---|
| 1598 | }
|
---|
| 1599 |
|
---|
| 1600 | start0=center;
|
---|
| 1601 | }
|
---|
| 1602 | else{//�スq�スm�ス[�スh�ス�ス�ス�ス�ス�ス�スネゑソス�ス鼾�ソスヘ,�ス�スナ位置�ス�ス�ス�ス�ス�ス�ス�ス�ス驛奇ソスX�スg�スノ難ソス�ス�ス
|
---|
| 1603 | tmp_node.addElement(node2);
|
---|
| 1604 | }
|
---|
| 1605 | }
|
---|
| 1606 | if(tmp_node.size()>0){//�スナ鯉ソスノ厄ソス�スz�スu�スフノ�ス[�スh�ス�ス�スc�ス�ス�ストゑソス�ス�スニゑソス�スフ擾ソス�ス�ス
|
---|
| 1607 | double arc = java.lang.Math.abs(start_arc + r-start0)/(tmp_node.size()+1);
|
---|
| 1608 | Enumeration<ExbpNode> arc_en = tmp_node.elements();
|
---|
| 1609 | int i=1;
|
---|
| 1610 | //System.out.println("center:"+Math.toDegrees(center));
|
---|
| 1611 | //System.out.println("start0:"+Math.toDegrees(start0));
|
---|
| 1612 |
|
---|
| 1613 | while(arc_en.hasMoreElements()){
|
---|
| 1614 | ExbpNode n = arc_en.nextElement();
|
---|
| 1615 | Double dx2 =new Double(l*(k+1)*Math.cos(start0+arc*i));
|
---|
| 1616 | Double dy2 =new Double(l*(k+1)*Math.sin(start0+arc*i));
|
---|
| 1617 | // Double dx2 =new Double(l*(k+1)*java.lang.Math.cos(start_arc+r/2+arc*i));
|
---|
| 1618 | // Double dy2 =new Double(l*(k+1)*java.lang.Math.sin(start_arc+r/2+arc*i));
|
---|
| 1619 | n.setLocation(cx+dx2.intValue(),cy+dy2.intValue());
|
---|
| 1620 | //System.out.println("TMP:"+n.getLabel()+Math.toDegrees(start0+arc*i));
|
---|
| 1621 | i++;
|
---|
| 1622 | }
|
---|
| 1623 | }
|
---|
| 1624 | }
|
---|
| 1625 | }
|
---|
| 1626 | /* for(int k=layer_num-2;k>=0;k--){
|
---|
| 1627 | if(layer_nodes[k]!=null){
|
---|
| 1628 | Enumeration en = layer_nodes[k].elements();
|
---|
| 1629 | double start0 = start_arc;
|
---|
| 1630 | Vector<ExbpNode> tmp_node = new Vector<ExbpNode>();
|
---|
| 1631 | while(en.hasMoreElements()){
|
---|
| 1632 | ExbpNode node2 = (ExbpNode)en.nextElement();
|
---|
| 1633 | System.out.println(node2.getLabel());
|
---|
| 1634 | if(node2.children.size()>0){
|
---|
| 1635 | ExbpNode chi_start = (ExbpNode)node2.children.firstElement();
|
---|
| 1636 | ExbpNode chi_end = (ExbpNode)node2.children.lastElement();
|
---|
| 1637 | double start = java.lang.Math.atan2(chi_start.getY()-cy, chi_start.getX()-cx);
|
---|
| 1638 | double end = java.lang.Math.atan2(chi_end.getY()-cy, chi_end.getX()-cx);
|
---|
| 1639 | if(start<0){
|
---|
| 1640 | start +=2*Math.PI;
|
---|
| 1641 | }
|
---|
| 1642 | if(end<0){
|
---|
| 1643 | end +=2*Math.PI;
|
---|
| 1644 | }
|
---|
| 1645 | double center = (start+end)/2;
|
---|
| 1646 | // if(java.lang.Math.abs(end-start)>java.lang.Math.PI){
|
---|
| 1647 | // center = center + java.lang.Math.PI;
|
---|
| 1648 | // }
|
---|
| 1649 |
|
---|
| 1650 | System.out.println("start: "+chi_start.getLabel()+java.lang.Math.toDegrees(start));
|
---|
| 1651 | System.out.print("end :"+chi_end.getLabel()+java.lang.Math.toDegrees(end)+"\n");
|
---|
| 1652 | System.out.println("===>> "+java.lang.Math.toDegrees(center));
|
---|
| 1653 |
|
---|
| 1654 |
|
---|
| 1655 | Double dx =new Double(l*(k+1)*java.lang.Math.cos(//start));
|
---|
| 1656 | center));
|
---|
| 1657 | Double dy =new Double(l*(k+1)*java.lang.Math.sin(//start));
|
---|
| 1658 | //2*java.lang.Math.PI+
|
---|
| 1659 | center));
|
---|
| 1660 |
|
---|
| 1661 | // dx = new Double(l*(k+1)*((chi_start.getX()-cx)/(l*(k+2))));
|
---|
| 1662 | // dy = new Double(l*(k+1)*((chi_start.getY()-cy)/(l*(k+2))));
|
---|
| 1663 | node2.setLocation(cx+dx.intValue(),cy+dy.intValue());
|
---|
| 1664 | //node2.label+="*";
|
---|
| 1665 |
|
---|
| 1666 | if(tmp_node.size()>0){
|
---|
| 1667 | double arc = java.lang.Math.abs(center-start0)/(tmp_node.size());
|
---|
| 1668 | Enumeration arc_en = tmp_node.elements();
|
---|
| 1669 | int i=0;
|
---|
| 1670 | while(arc_en.hasMoreElements()){
|
---|
| 1671 | ExbpNode n = (ExbpNode)arc_en.nextElement();
|
---|
| 1672 | Double dx2 =new Double(l*(k+1)*java.lang.Math.cos(start0+arc*i));
|
---|
| 1673 | Double dy2 =new Double(l*(k+1)*java.lang.Math.sin(start0+arc*i));
|
---|
| 1674 | //n.setLocation(cx+dx2.intValue(),cy+dy2.intValue());
|
---|
| 1675 | i++;
|
---|
| 1676 | }
|
---|
| 1677 | tmp_node.removeAllElements();
|
---|
| 1678 | start0=center;
|
---|
| 1679 | }
|
---|
| 1680 | }
|
---|
| 1681 | else{//�スq�スm�ス[�スh�ス�ス�ス�ス�ス�ス�スネゑソス�ス鼾�ソスヘ,�ス�スナ位置�ス�ス�ス�ス�ス�ス�ス�ス�ス驛奇ソスX�スg�スノ難ソス�ス�ス
|
---|
| 1682 | tmp_node.addElement(node2);
|
---|
| 1683 | }
|
---|
| 1684 | }
|
---|
| 1685 | if(tmp_node.size()>0){//�スナ鯉ソスノ厄ソス�スz�スu�スフノ�ス[�スh�ス�ス�スc�ス�ス�ストゑソス�ス�スニゑソス�スフ擾ソス�ス�ス
|
---|
| 1686 | double arc = java.lang.Math.abs(start_arc+r/2-start0)/(tmp_node.size());
|
---|
| 1687 | Enumeration arc_en = tmp_node.elements();
|
---|
| 1688 | int i=1;
|
---|
| 1689 | while(arc_en.hasMoreElements()){
|
---|
| 1690 | ExbpNode n = (ExbpNode)arc_en.nextElement();
|
---|
| 1691 | Double dx2 =new Double(l*(k+1)*java.lang.Math.cos(start_arc+r/2+arc*i));
|
---|
| 1692 | Double dy2 =new Double(l*(k+1)*java.lang.Math.sin(start_arc+r/2+arc*i));
|
---|
| 1693 | //n.setLocation(cx+dx2.intValue(),cy+dy2.intValue());
|
---|
| 1694 | i++;
|
---|
| 1695 | }
|
---|
| 1696 | }
|
---|
| 1697 | }
|
---|
| 1698 | }*/
|
---|
| 1699 |
|
---|
| 1700 | }
|
---|
| 1701 |
|
---|
| 1702 |
|
---|
| 1703 | /**
|
---|
| 1704 | *
|
---|
| 1705 | * �ス�ス�ス[�スg�スm�ス[�スh�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定し�スワゑソス�スB
|
---|
| 1706 | *
|
---|
| 1707 | * @return �ス�ス�ス[�スg�スm�ス[�スh�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�ス�ス�ス゚ゑソス�スワゑソス�スB
|
---|
| 1708 | */
|
---|
| 1709 | public boolean isVisibleCenter() {
|
---|
| 1710 | return isVisibleCenter;
|
---|
| 1711 | }
|
---|
| 1712 |
|
---|
| 1713 | /**
|
---|
| 1714 | *
|
---|
| 1715 | * �ス�ス�ス[�スg�スm�ス[�スh�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定し�スワゑソス�スB
|
---|
| 1716 | *
|
---|
| 1717 | * @param isVisibleCenter �ス�ス�ス[�スg�スm�ス[�スh�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定す�ス�スB
|
---|
| 1718 | */
|
---|
| 1719 | public void setVisibleCenter(boolean isVisibleCenter) {
|
---|
| 1720 | this.isVisibleCenter = isVisibleCenter;
|
---|
| 1721 | }
|
---|
| 1722 |
|
---|
| 1723 | //#kozaki 2008/02/10�ス@�スe�ス�ス�ス�ス�ス\�ス�ス�ス�ス�ス驍ゥ
|
---|
| 1724 | public void setVisibleInflu(boolean isVisibleInflu) {
|
---|
| 1725 | this.isVisibleInflu = isVisibleInflu;
|
---|
| 1726 | }
|
---|
| 1727 |
|
---|
| 1728 | /**
|
---|
| 1729 | *
|
---|
| 1730 | * �ス�ス�ス�ス�スN�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定し�スワゑソス�スB
|
---|
| 1731 | *
|
---|
| 1732 | * @return �ス�ス�ス�ス�スN�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�ス�ス�ス゚ゑソス�スワゑソス�スB
|
---|
| 1733 | */
|
---|
| 1734 | public boolean isVisibleLink() {
|
---|
| 1735 | return isVisibleLink;
|
---|
| 1736 | }
|
---|
| 1737 |
|
---|
| 1738 | /**
|
---|
| 1739 | *
|
---|
| 1740 | * �ス�ス�ス�ス�スN�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定し�スワゑソス�スB
|
---|
| 1741 | *
|
---|
| 1742 | * @param isVisibleLink �ス�ス�ス�ス�スN�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定す�ス�スB
|
---|
| 1743 | */
|
---|
| 1744 | public void setVisibleLink(boolean isVisibleLink) {
|
---|
| 1745 | this.isVisibleLink = isVisibleLink;
|
---|
| 1746 | }
|
---|
| 1747 |
|
---|
| 1748 | /**
|
---|
| 1749 | *
|
---|
| 1750 | * �ス�ス�スx�ス�ス�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定し�スワゑソス�スB
|
---|
| 1751 | *
|
---|
| 1752 | * @return �ス�ス�スx�ス�ス�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�ス�ス�ス゚ゑソス�スワゑソス�スB
|
---|
| 1753 | */
|
---|
| 1754 | public boolean isVisibleLevel() {
|
---|
| 1755 | return isVisibleLevel;
|
---|
| 1756 | }
|
---|
| 1757 |
|
---|
| 1758 | /**
|
---|
| 1759 | *
|
---|
| 1760 | * �ス�ス�スx�ス�ス�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定し�スワゑソス�スB
|
---|
| 1761 | *
|
---|
| 1762 | * @param isVisibleLink �ス�ス�スx�ス�ス�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定す�ス�スB
|
---|
| 1763 | */
|
---|
| 1764 | public void setVisibleLevel(boolean isVisibleLevel) {
|
---|
| 1765 | this.isVisibleLevel = isVisibleLevel;
|
---|
| 1766 | }
|
---|
| 1767 |
|
---|
| 1768 |
|
---|
| 1769 | /**
|
---|
| 1770 | *
|
---|
| 1771 | * �ス�ス�スE�ス�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定し�スワゑソス�スB
|
---|
| 1772 | *
|
---|
| 1773 | * @return �ス�ス�スE�ス�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�ス�ス�ス゚ゑソス�スワゑソス�スB
|
---|
| 1774 | */
|
---|
| 1775 | public boolean isVisibleBorder() {
|
---|
| 1776 | return isVisibleBorder;
|
---|
| 1777 | }
|
---|
| 1778 |
|
---|
| 1779 | /**
|
---|
| 1780 | *
|
---|
| 1781 | * �ス�ス�スE�ス�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定し�スワゑソス�スB
|
---|
| 1782 | *
|
---|
| 1783 | * @param isVisibleLink �ス�ス�スE�ス�ス�ス\�ス�ス�ス�ス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定す�ス�スB
|
---|
| 1784 | */
|
---|
| 1785 | public void setVisibleBorder(boolean isVisibleBorder) {
|
---|
| 1786 | this.isVisibleBorder = isVisibleBorder;
|
---|
| 1787 | }
|
---|
| 1788 |
|
---|
| 1789 | /**
|
---|
| 1790 | *
|
---|
| 1791 | * �スm�ス[�スh�ス�ス�スト登�ス^�ス�ス�スワゑソス�スB
|
---|
| 1792 | *
|
---|
| 1793 | * @param node �スト登�ス^�ス�ス�ス�スm�ス[�スh�ス�ス�スw�ス閧キ�ス�スB
|
---|
| 1794 | */
|
---|
| 1795 | protected void reentryExbpNode(ExbpNode node) {
|
---|
| 1796 | if (node != null && this.nodes.contains(node)) {
|
---|
| 1797 | this.nodes.remove(node);
|
---|
| 1798 | this.nodes.add(node);
|
---|
| 1799 | }
|
---|
| 1800 | }
|
---|
| 1801 |
|
---|
| 1802 | //#kozaki 2008/10/03�ス@XML�ス`�ス�ス�スフ別フ�ス@�スC�ス�ス�スニゑソス�ストマ�スb�スv�ス�スロ托ソス
|
---|
| 1803 | public void saveMAPinXML(java.io.File save_file){}
|
---|
| 1804 | public void saveMAPinXML(java.io.File save_file,ExbpNode selected_node){}
|
---|
| 1805 | }
|
---|
| 1806 |
|
---|
| 1807 |
|
---|
| 1808 |
|
---|
| 1809 | class ExbpNode extends Rectangle{
|
---|
| 1810 |
|
---|
| 1811 | public static String IS_A = "is-a";
|
---|
| 1812 | public static String IS_A_L = "IS-A";
|
---|
| 1813 |
|
---|
| 1814 | String label = "label";
|
---|
| 1815 | ExbpNode parent;
|
---|
| 1816 | Vector<ExbpNode> children = new Vector<ExbpNode>();
|
---|
| 1817 | // Node hozo_node;
|
---|
| 1818 | Object org_node;//#kozaki 2008/10/19�ス@Hozo�スネ外�スノゑソス�スホ会ソス�ス�ス�ス驍ス�ス�ス
|
---|
| 1819 |
|
---|
| 1820 | // #hirota 08/08/19 node_size�スマ更
|
---|
| 1821 | public Font font = new Font("Times", Font.PLAIN, 12);
|
---|
| 1822 |
|
---|
| 1823 | static int Font_node_size = 12;
|
---|
| 1824 | static double Font_node_center = 1.6;
|
---|
| 1825 | static double Font_node_layer2 = 1.3;
|
---|
| 1826 | // static Font font_1 = new Font("Times", Font.BOLD, 18);
|
---|
| 1827 | // static Font font_2 = new Font("Times", Font.BOLD, 14);
|
---|
| 1828 | // static Font font_3 = new Font("Times", Font.PLAIN, 12);
|
---|
| 1829 |
|
---|
| 1830 | int evaluation = 0;//0:=�ス�ス�スL�ス�ス
|
---|
| 1831 | int evaluation_1 = 0;//0:=�ス�ス�スL�ス�ス
|
---|
| 1832 | int evaluation_2 = 0;//0:=�ス�ス�スL�ス�ス
|
---|
| 1833 | int evaluation_3 = 0;//0:=�ス�ス�スL�ス�ス
|
---|
| 1834 | int evaluation_4 = 0;//0:=�ス�ス�スL�ス�ス
|
---|
| 1835 | String evaluation_comment = "";
|
---|
| 1836 |
|
---|
| 1837 |
|
---|
| 1838 |
|
---|
| 1839 | /* public boolean equals(Object obj) {
|
---|
| 1840 | if (!(obj instanceof ExbpNode)) {
|
---|
| 1841 | return false;
|
---|
| 1842 | }
|
---|
| 1843 |
|
---|
| 1844 | ExbpNode other = (ExbpNode)obj;
|
---|
| 1845 |
|
---|
| 1846 | if(this.org_node==null || other.org_node==null){
|
---|
| 1847 | return false;
|
---|
| 1848 | }
|
---|
| 1849 |
|
---|
| 1850 | return this.org_node.equals(other.org_node);
|
---|
| 1851 | }*/
|
---|
| 1852 |
|
---|
| 1853 |
|
---|
| 1854 |
|
---|
| 1855 | static Color[] node_color = {
|
---|
| 1856 | Color.orange,
|
---|
| 1857 | Color.cyan,
|
---|
| 1858 | Color.pink, //#kozaki�ス@2008/08/18�ス@�ス�ス�スヤゑソスマ更
|
---|
| 1859 | Color.yellow,
|
---|
| 1860 | Color.green,
|
---|
| 1861 | new Color(255,102,255), // Color.magenta, //#kozaki�ス@2008/08/18�ス@�ス�ス�スヤゑソスマ更
|
---|
| 1862 | Color.lightGray,
|
---|
| 1863 | new Color(255,51,102),//Color.red, //
|
---|
| 1864 | new Color(50,155,255), //Color.blue, //
|
---|
| 1865 | Color.gray
|
---|
| 1866 | };
|
---|
| 1867 |
|
---|
| 1868 | // #hirota 09/11/19 �スT�スX�スe�スi�スp�スF�スン抵ソス
|
---|
| 1869 | // �スS�ス[�ス�ス�スC�ス�ス�スハ撰ソス�スE�スC�スホ搾ソスC�ス]�ス�スworld�スC�ス�ス�スC�ス�ス�スフ托ソス
|
---|
| 1870 | String[] parent_nodes = {"�スS�ス[�ス�ス","�ス�ス�スハ撰ソス�スE","�スホ搾ソス","�ス]�ス�スworld","�ス�ス�ス","�ス�ス�スフ托ソス"};
|
---|
| 1871 | static Color[] node_color_sus = {
|
---|
| 1872 | Color.orange, // �スS�ス[�ス�ス
|
---|
| 1873 | Color.cyan, //�ス@�ス�ス�スハ撰ソス�スE
|
---|
| 1874 | Color.pink, //�ス@�スホ搾ソス
|
---|
| 1875 | Color.yellow, //�ス@�ス]�ス�スworld
|
---|
| 1876 | Color.green, //�ス@�ス�ス�ス
|
---|
| 1877 | Color.gray //�ス@�ス�ス�スフ托ソス
|
---|
| 1878 | };
|
---|
| 1879 |
|
---|
| 1880 |
|
---|
| 1881 | public static final Color CENTER_COLOR = new Color(200,200,255); //#kozaki 2008/08/18�ス@�ス�ス�ス�スフ色�スノ変更
|
---|
| 1882 | //public static final Color CENTER_COLOR = new Color(100,0,255); // �ス�ス�スF
|
---|
| 1883 |
|
---|
| 1884 | Color color = Color.yellow;
|
---|
| 1885 |
|
---|
| 1886 | //Font font = new Font("Times", Font.PLAIN, 12);
|
---|
| 1887 |
|
---|
| 1888 | protected String key = "";
|
---|
| 1889 | protected String opt = "";//#kozaki�ス@2007/10/28�ス@�スR�ス}�ス�ス�スh�ス�ス�スL�ス�ス�ス�ス�ス�ス
|
---|
| 1890 |
|
---|
| 1891 | protected boolean isDummy = false;//#kozaki 2008/02/09�ス@is-a�スフ�ソス�ス[�スt�スナ擾ソス�ス�ス�ス�ス�ス�ス�ス驍ス�ス゚のダ�ス~�ス[�スm�ス[�スh�スノ設定す�ス�ス
|
---|
| 1892 |
|
---|
| 1893 | //#kozaki�ス@�スo�スl�ス�ス�スf�ス�ス�スp
|
---|
| 1894 | double dx;
|
---|
| 1895 | double dy;
|
---|
| 1896 | boolean n_stop=false;
|
---|
| 1897 | boolean fixed;
|
---|
| 1898 |
|
---|
| 1899 | boolean visible = true; //#kozaki 2008/08/15
|
---|
| 1900 | boolean match = false; //#kozaki 2011/01/25 SeracPath�ス�ス�ス�ス�スp5
|
---|
| 1901 | boolean highlight = false; //#kozaki�ス@2009/01/05�ス@compare�ス�ス�ス�スマ更
|
---|
| 1902 | Color highligjtColor = Color.white;
|
---|
| 1903 | boolean link_highlight = false;
|
---|
| 1904 | Color link_highligjtColor = Color.white;
|
---|
| 1905 |
|
---|
| 1906 | boolean isDobule = false;//#kozaki 2009/01/22�ス@�スd�ス�スNode�ス`�スF�スb�スN�スp
|
---|
| 1907 |
|
---|
| 1908 | boolean open_sub = true;//#kozaki 2008/10/25
|
---|
| 1909 | boolean not_focus = false;
|
---|
| 1910 |
|
---|
| 1911 | ArrayList<Color> topicColorList = new ArrayList<Color>(10);
|
---|
| 1912 |
|
---|
| 1913 |
|
---|
| 1914 | // private int _layer = 0;
|
---|
| 1915 |
|
---|
| 1916 | // #hirota 09/12/17 �ス�ス�ス�ス�スフパ�スX�ス]�ス�ス�スp�ス�ス�ス�ス
|
---|
| 1917 | public ExbpNode tracepath(ExbpNode _exbpNode,int tensuu, String s){
|
---|
| 1918 |
|
---|
| 1919 | if(this.parent != null){
|
---|
| 1920 | if(_exbpNode != null ){
|
---|
| 1921 | if(this.visible == true){
|
---|
| 1922 |
|
---|
| 1923 | if(this.label.equals(_exbpNode.label)){
|
---|
| 1924 |
|
---|
| 1925 | if(this.key.equals(_exbpNode.key) ){
|
---|
| 1926 | tensuu++;
|
---|
| 1927 | }
|
---|
| 1928 |
|
---|
| 1929 | // System.out.println("*** :"+ this.label + ", �ス�ス " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
|
---|
| 1930 | String str = " :"+ this.label + "�ス�ス "+ "(" +this.key + "):" + this.parent.label+ ", tensuu:"+tensuu;
|
---|
| 1931 | System.out.println(str);
|
---|
| 1932 |
|
---|
| 1933 | this.setColorFont(Color.red,font);
|
---|
| 1934 | this.parent.tracepath(_exbpNode.parent,tensuu,s+"\n"+str);
|
---|
| 1935 |
|
---|
| 1936 |
|
---|
| 1937 | }else{
|
---|
| 1938 | System.out.println("*** error");
|
---|
| 1939 | return null;
|
---|
| 1940 | }
|
---|
| 1941 | }
|
---|
| 1942 |
|
---|
| 1943 | }
|
---|
| 1944 |
|
---|
| 1945 | }else{
|
---|
| 1946 |
|
---|
| 1947 | try{
|
---|
| 1948 |
|
---|
| 1949 | // PrintWriter out = new PrintWriter(new BufferedWriter(
|
---|
| 1950 | // new FileWriter("./091221-path.txt",true)));
|
---|
| 1951 | PrintWriter out = new PrintWriter(new BufferedWriter(
|
---|
| 1952 | new FileWriter("C:\\�スy�スナ新�スz�ス�ス�ス�ス�ス}�スb�スv\\091221-path.txt",true)));
|
---|
| 1953 | out.println(s);
|
---|
| 1954 | System.out.println(s);
|
---|
| 1955 | System.out.println("*** OK!!");
|
---|
| 1956 |
|
---|
| 1957 |
|
---|
| 1958 | out.close();
|
---|
| 1959 |
|
---|
| 1960 | }
|
---|
| 1961 | catch(Exception e){
|
---|
| 1962 | e.printStackTrace();
|
---|
| 1963 | }
|
---|
| 1964 |
|
---|
| 1965 | }
|
---|
| 1966 |
|
---|
| 1967 |
|
---|
| 1968 | return null;
|
---|
| 1969 |
|
---|
| 1970 | }
|
---|
| 1971 | // #ohta 2011/01/15
|
---|
| 1972 | public void clearHighLightColorList() {
|
---|
| 1973 | this.topicColorList.clear();
|
---|
| 1974 | }
|
---|
| 1975 |
|
---|
| 1976 | public void addTopicColor(Color clr) {
|
---|
| 1977 | if (!this.topicColorList.contains(clr)) {
|
---|
| 1978 | topicColorList.add(clr);
|
---|
| 1979 | }
|
---|
| 1980 | }
|
---|
| 1981 |
|
---|
| 1982 |
|
---|
| 1983 | public void setHighLight(boolean b, Color clr){
|
---|
| 1984 | this.highlight=b;
|
---|
| 1985 | if(clr==null){
|
---|
| 1986 | this.highligjtColor=Color.white;
|
---|
| 1987 | }
|
---|
| 1988 | else{
|
---|
| 1989 | this.highligjtColor=clr;
|
---|
| 1990 | // // #ohta 2011/01/15
|
---|
| 1991 | // if (!this.topicColorList.contains(clr)) {
|
---|
| 1992 | // topicColorList.add(clr);
|
---|
| 1993 | // }
|
---|
| 1994 | }
|
---|
| 1995 | }
|
---|
| 1996 |
|
---|
| 1997 | public void setLinkHighLight(boolean b, Color clr){
|
---|
| 1998 | this.link_highlight=b;
|
---|
| 1999 | if(clr==null){
|
---|
| 2000 | this.link_highligjtColor=Color.white;
|
---|
| 2001 | }
|
---|
| 2002 | else{
|
---|
| 2003 | this.link_highligjtColor=clr;
|
---|
| 2004 | }
|
---|
| 2005 | }
|
---|
| 2006 |
|
---|
| 2007 |
|
---|
| 2008 | // #kozaki 2008/10/03�ス@XML�スf�ス[�ス^�スニゑソス�スト保托ソス�ス�ス�ス�スフに暦ソス�スp�ス�ス�ス�ス
|
---|
| 2009 | // #hirota 09/11/19 �スI�ス�ス�スm�ス[�スh�スツゑソス
|
---|
| 2010 | void SaveInXML(PrintWriter prt,Vector selected_nodes ){}
|
---|
| 2011 |
|
---|
| 2012 | //#kozaki 2008/10/03�ス@XML�スf�ス[�ス^�スニゑソス�スト保托ソス�ス�ス�ス�スフに暦ソス�スp�ス�ス�ス�ス
|
---|
| 2013 | //#kozaki 2010/02/21�ス@�スマ更
|
---|
| 2014 | void SaveInXML(PrintWriter prt){}
|
---|
| 2015 |
|
---|
| 2016 | private String saveEValuation(){
|
---|
| 2017 | if(this.evaluation!=0){
|
---|
| 2018 | return
|
---|
| 2019 | "<EVAL ev=\""+this.evaluation
|
---|
| 2020 | +"\" ev1=\""+this.evaluation_1
|
---|
| 2021 | +"\" ev2=\""+this.evaluation_2
|
---|
| 2022 | +"\" ev3=\""+this.evaluation_3
|
---|
| 2023 | +"\" ev4=\""+this.evaluation_4
|
---|
| 2024 | +"\" >"+this.evaluation_comment+"</EVAL>";
|
---|
| 2025 | }
|
---|
| 2026 |
|
---|
| 2027 | return "";
|
---|
| 2028 | }
|
---|
| 2029 |
|
---|
| 2030 | //#kozaki�ス@2008/08/15
|
---|
| 2031 | void setVisibleWithChildren(boolean b){
|
---|
| 2032 | this.visible = b;
|
---|
| 2033 | // if(!b){
|
---|
| 2034 | // this.setBounds(0,0,0,0);
|
---|
| 2035 | // }
|
---|
| 2036 | //
|
---|
| 2037 | Enumeration en = this.children.elements();
|
---|
| 2038 | while(en.hasMoreElements()){
|
---|
| 2039 | ExbpNode node = (ExbpNode)en.nextElement();
|
---|
| 2040 | node.setVisibleWithChildren(b);
|
---|
| 2041 | }
|
---|
| 2042 | }
|
---|
| 2043 |
|
---|
| 2044 | void setVisible(boolean b){
|
---|
| 2045 | this.visible = b;
|
---|
| 2046 | }
|
---|
| 2047 |
|
---|
| 2048 | //#kozaki 2009/01/05�ス@�スe�スm�ス[�スh�ス�ス�スワめて可趣ソス�スノゑソス�ス�ス
|
---|
| 2049 | void setVisibleTrueWithParent(){
|
---|
| 2050 | this.visible = true;
|
---|
| 2051 | this.not_focus=false;
|
---|
| 2052 | if(this.parent!=null){
|
---|
| 2053 | this.parent.open_sub=true;
|
---|
| 2054 | this.parent.setVisibleTrueWithParent();
|
---|
| 2055 | }
|
---|
| 2056 | }
|
---|
| 2057 |
|
---|
| 2058 | void setMatchTrueWithParent(){
|
---|
| 2059 | this.match = true;
|
---|
| 2060 | if(this.parent!=null){
|
---|
| 2061 | this.parent.setMatchTrueWithParent();
|
---|
| 2062 | }
|
---|
| 2063 | }
|
---|
| 2064 |
|
---|
| 2065 | void clearMatchWithChildren(){
|
---|
| 2066 | this.match = false;
|
---|
| 2067 | Enumeration en = this.children.elements();
|
---|
| 2068 | while(en.hasMoreElements()){
|
---|
| 2069 | ExbpNode node = (ExbpNode)en.nextElement();
|
---|
| 2070 | node.clearMatchWithChildren();
|
---|
| 2071 | }
|
---|
| 2072 | }
|
---|
| 2073 |
|
---|
| 2074 |
|
---|
| 2075 | //#kozaki 2009/01/05�ス@�スe�スm�ス[�スh�ス�ス�スワめて可趣ソス�スノゑソス�ス�ス
|
---|
| 2076 | void setVisiblefalseWithParent(){
|
---|
| 2077 | this.visible = false;
|
---|
| 2078 | this.not_focus=false;
|
---|
| 2079 | if(this.parent!=null){
|
---|
| 2080 | this.parent.open_sub=false;
|
---|
| 2081 | this.parent.setVisiblefalseWithParent();
|
---|
| 2082 | }
|
---|
| 2083 | }
|
---|
| 2084 |
|
---|
| 2085 | //#kozaki 2010/07/04�ス@�スe�スm�ス[�スh�ス�ス�スワめて色�ス�スマゑソス�ス�ス
|
---|
| 2086 | void setColorWithParent(Color c){
|
---|
| 2087 | this.color =c;
|
---|
| 2088 | if(this.parent!=null){
|
---|
| 2089 | this.parent.setColorWithParent(c);
|
---|
| 2090 | }
|
---|
| 2091 | }
|
---|
| 2092 |
|
---|
| 2093 | //#baba 2011/01/17�ス@�スe�スm�ス[�スh�ス�ス�スワめてト�スs�スb�スN�スF�ス�スマゑソス�ス�ス
|
---|
| 2094 | void setTopicColorWithParent(Color c){
|
---|
| 2095 | this.addTopicColor(c);
|
---|
| 2096 | if(this.parent!=null){
|
---|
| 2097 | this.parent.setTopicColorWithParent(c);
|
---|
| 2098 | }
|
---|
| 2099 | }
|
---|
| 2100 |
|
---|
| 2101 |
|
---|
| 2102 | //#kozaki 2009/02/13�ス@�スm�ス[�スh�スフ状況に会ソス�ス�ス�スト会ソス�スハノ�ス[�スh�ス�スOpen/Close�ス�スリゑソスヨゑソス�ス�ス
|
---|
| 2103 | void changeOpenSub(){
|
---|
| 2104 | boolean b=true;
|
---|
| 2105 | if(getVisbleChildren().size()==this.children.size()){
|
---|
| 2106 | //this.setVisbleChildren(false);
|
---|
| 2107 | b=false;
|
---|
| 2108 | }
|
---|
| 2109 | else if(getVisbleChildren().size()>0){
|
---|
| 2110 | //this.setVisbleChildren(false);
|
---|
| 2111 | b=false;
|
---|
| 2112 | }
|
---|
| 2113 | // else{
|
---|
| 2114 | // this.setVisbleChildren(true);
|
---|
| 2115 | // }
|
---|
| 2116 | //this.setVisbleChildren(b);
|
---|
| 2117 | this.visible = true;
|
---|
| 2118 | this.open_sub=b;
|
---|
| 2119 | Enumeration en = this.children.elements();
|
---|
| 2120 | while(en.hasMoreElements()){
|
---|
| 2121 | ExbpNode n =(ExbpNode)en.nextElement();
|
---|
| 2122 | //if(!n.not_focus){
|
---|
| 2123 | n.visible=b;
|
---|
| 2124 | //}
|
---|
| 2125 | }
|
---|
| 2126 | }
|
---|
| 2127 |
|
---|
| 2128 | //#kozaki 2008/10/06�ス@�スq�スm�ス[�スh�スフ表�ス�ス�ス�スマ更
|
---|
| 2129 | void setVisbleChildren(boolean b){
|
---|
| 2130 | this.open_sub=b;
|
---|
| 2131 | setVisibleWithChildren(b);
|
---|
| 2132 | this.visible = true;//�ス�ス�ス�ス�ス�ス�スg�スヘ擾ソスノ表�ス�ス�ス�ス�ス�ス
|
---|
| 2133 | }
|
---|
| 2134 |
|
---|
| 2135 | void setNotFocusChildren(boolean b){
|
---|
| 2136 | this.not_focus=b;
|
---|
| 2137 | setNotFocusChildrenWithChildren(b);
|
---|
| 2138 | }
|
---|
| 2139 |
|
---|
| 2140 | void setNotFocusChildrenWithChildren(boolean b){
|
---|
| 2141 | this.not_focus = b;
|
---|
| 2142 | // if(!b){
|
---|
| 2143 | // this.setBounds(0,0,0,0);
|
---|
| 2144 | // }
|
---|
| 2145 | //
|
---|
| 2146 | Enumeration en = this.children.elements();
|
---|
| 2147 | while(en.hasMoreElements()){
|
---|
| 2148 | ExbpNode node = (ExbpNode)en.nextElement();
|
---|
| 2149 | node.setNotFocusChildren(b);
|
---|
| 2150 | }
|
---|
| 2151 | }
|
---|
| 2152 |
|
---|
| 2153 | Vector getVisbleChildren(){
|
---|
| 2154 | Vector<ExbpNode> vec = new Vector<ExbpNode> ();
|
---|
| 2155 | Enumeration en = this.children.elements();
|
---|
| 2156 | while(en.hasMoreElements()){
|
---|
| 2157 | ExbpNode n =(ExbpNode)en.nextElement();
|
---|
| 2158 | if(n.visible){
|
---|
| 2159 | vec.addElement(n);
|
---|
| 2160 | }
|
---|
| 2161 | }
|
---|
| 2162 | return vec;
|
---|
| 2163 | }
|
---|
| 2164 |
|
---|
| 2165 | Vector getInVisbleChildren(){
|
---|
| 2166 | Vector<ExbpNode> vec = new Vector<ExbpNode> ();
|
---|
| 2167 | Enumeration en = this.children.elements();
|
---|
| 2168 | while(en.hasMoreElements()){
|
---|
| 2169 | ExbpNode n =(ExbpNode)en.nextElement();
|
---|
| 2170 | if(!n.visible){
|
---|
| 2171 | vec.addElement(n);
|
---|
| 2172 | }
|
---|
| 2173 | }
|
---|
| 2174 | return vec;
|
---|
| 2175 | }
|
---|
| 2176 |
|
---|
| 2177 | //#kozaki 2008/02/09�ス@is-a�スフ�ソス�ス[�スt�スナ擾ソス�ス�ス�ス�ス�ス�ス�ス驍ス�ス゚のダ�ス~�ス[�スm�ス[�スh�スノ設定す�ス�ス
|
---|
| 2178 | void setDummyNode(boolean b){
|
---|
| 2179 | this.isDummy = b;
|
---|
| 2180 | }
|
---|
| 2181 |
|
---|
| 2182 | // void addChild(ExbpNode chi){
|
---|
| 2183 | // this.children.addElement(chi);
|
---|
| 2184 | // chi.parent=this;
|
---|
| 2185 | // if(!this.open_sub){
|
---|
| 2186 | // chi.visible=false;
|
---|
| 2187 | // chi.open_sub=false;
|
---|
| 2188 | // }
|
---|
| 2189 | // }
|
---|
| 2190 |
|
---|
| 2191 |
|
---|
| 2192 | boolean checkUpperPath(ExbpNode chi){
|
---|
| 2193 | ExbpNode par_node = this.getParent();
|
---|
| 2194 | if(par_node==null){
|
---|
| 2195 | return false;
|
---|
| 2196 | }
|
---|
| 2197 |
|
---|
| 2198 | Object org_node = par_node.getOrgNode();
|
---|
| 2199 | if(org_node!=null){
|
---|
| 2200 | if(org_node.equals(chi.getOrgNode())){
|
---|
| 2201 | return true;
|
---|
| 2202 | }
|
---|
| 2203 | else{
|
---|
| 2204 | return par_node.checkUpperPath(chi);
|
---|
| 2205 | }
|
---|
| 2206 | }
|
---|
| 2207 |
|
---|
| 2208 | return false;
|
---|
| 2209 | }
|
---|
| 2210 |
|
---|
| 2211 | // #hirota 2009/11/24 Any�スr�ス�ス�スp�ス�ス�ス�ス�スH�スH�スル急�スp
|
---|
| 2212 | void addChild(ExbpNode chi){
|
---|
| 2213 | /*
|
---|
| 2214 | Enumeration en = this.children.elements();
|
---|
| 2215 | while(en.hasMoreElements()){
|
---|
| 2216 | ExbpNode node = (ExbpNode) en.nextElement();
|
---|
| 2217 | if(node.getLabel().equals(chi.getLabel())){
|
---|
| 2218 | return;
|
---|
| 2219 | }
|
---|
| 2220 | }
|
---|
| 2221 | */
|
---|
| 2222 | //#kozaki�ス@2009/11/30�ス@�スJ�ス�スヤゑソス�スフ会ソス�ス�ス�ス�ス�ス
|
---|
| 2223 | if(this.checkUpperPath(chi)){
|
---|
| 2224 | return;
|
---|
| 2225 | }
|
---|
| 2226 | // ExbpNode par_node2 = this.getParent();
|
---|
| 2227 | // if(par_node2!=null){
|
---|
| 2228 | // Object org_node = par_node2.getOrgNode();
|
---|
| 2229 | // if(org_node!=null){
|
---|
| 2230 | // if(org_node.equals(chi.getOrgNode())){
|
---|
| 2231 | // return;
|
---|
| 2232 | // }
|
---|
| 2233 | // }
|
---|
| 2234 | // }
|
---|
| 2235 |
|
---|
| 2236 |
|
---|
| 2237 | this.children.addElement(chi);
|
---|
| 2238 | chi.parent=this;
|
---|
| 2239 | if(!this.open_sub){
|
---|
| 2240 | chi.visible=false;
|
---|
| 2241 | chi.open_sub=false;
|
---|
| 2242 | }
|
---|
| 2243 | if(chi.getLabel().equals("Any")){
|
---|
| 2244 | chi.visible=false;
|
---|
| 2245 | }
|
---|
| 2246 | }
|
---|
| 2247 |
|
---|
| 2248 | void removeChild(ExbpNode chi){
|
---|
| 2249 | this.children.remove(chi);
|
---|
| 2250 | chi.parent=null;
|
---|
| 2251 | }
|
---|
| 2252 |
|
---|
| 2253 | //#hirota 09/11/19 ont�ス�スフ最擾ソスハノ�ス[�スh�ス�スヤゑソス
|
---|
| 2254 | // Node getParentHozoNode(){}
|
---|
| 2255 |
|
---|
| 2256 | //#kozaki 2008/05/09�ス@�スe�スm�ス[�スh�スiDummy�ス�ス�ス�ス�ス�ス�スj�ス�スヤゑソス
|
---|
| 2257 | ExbpNode getParent(){
|
---|
| 2258 | if(this.parent==null){
|
---|
| 2259 | return null;
|
---|
| 2260 | }
|
---|
| 2261 | else if(!this.parent.isDummy){
|
---|
| 2262 | return this.parent;
|
---|
| 2263 | }
|
---|
| 2264 | else{
|
---|
| 2265 | return this.parent.getParent();
|
---|
| 2266 | }
|
---|
| 2267 | }
|
---|
| 2268 |
|
---|
| 2269 | //#kozaki 2008/05/09�ス@�スe�スm�ス[�スh�スiDummy�ス�ス�ス�ス�ス�ス�スj�ス�スヤゑソス
|
---|
| 2270 | ExbpNode getParentNode(ExbpNode target){
|
---|
| 2271 | if(this.parent==null){
|
---|
| 2272 | return null;
|
---|
| 2273 | }
|
---|
| 2274 | else if(!this.parent.isDummy && this.parent.equals(target)){
|
---|
| 2275 | return this.parent;
|
---|
| 2276 | }
|
---|
| 2277 | else{
|
---|
| 2278 | return this.parent.getParent();
|
---|
| 2279 | }
|
---|
| 2280 | }
|
---|
| 2281 |
|
---|
| 2282 | //#kozaki 2008/07/31�ス@�ス�ス�スi�スレのノ�ス[�スh�スナゑソス�ス驍ゥ�ス�スヤゑソス
|
---|
| 2283 | public int getLocatedLayer(){
|
---|
| 2284 | int i=0;
|
---|
| 2285 | for(ExbpNode node=this;node.parent!=null;node=node.parent){
|
---|
| 2286 | if(!(node.parent==null)){
|
---|
| 2287 | i++;
|
---|
| 2288 | }
|
---|
| 2289 | // if(!node.getLabel().equals("ROOT")){
|
---|
| 2290 | // i++;
|
---|
| 2291 | // }
|
---|
| 2292 | }
|
---|
| 2293 | return i;
|
---|
| 2294 | }
|
---|
| 2295 |
|
---|
| 2296 | //#kozaki 2008/05/09�ス@�スハ段�ス�ス�スフ子�スm�ス[�スh�スiDummy�ス�ス�ス�ス�ス�ス�スj�ス�スヤゑソス
|
---|
| 2297 | Vector<ExbpNode> getChildren(){
|
---|
| 2298 | Vector<ExbpNode> vec = new Vector<ExbpNode>();
|
---|
| 2299 | Iterator<ExbpNode> it = this.children.iterator();
|
---|
| 2300 | while (it.hasNext()) {
|
---|
| 2301 | ExbpNode childNode = it.next();
|
---|
| 2302 | if(childNode.isDummy){
|
---|
| 2303 | vec.addAll(childNode.getChildren());
|
---|
| 2304 | }
|
---|
| 2305 | else{
|
---|
| 2306 | vec.add(childNode);
|
---|
| 2307 | }
|
---|
| 2308 | }
|
---|
| 2309 | return vec;
|
---|
| 2310 | }
|
---|
| 2311 |
|
---|
| 2312 | //#kozaki 2008/05/09�ス@�スハ段�ス�ス�スフ子�スm�ス[�スh�スiDummy�ス�ス�スワむ)�ス�スヤゑソス
|
---|
| 2313 | //#kozaki2009/01/22�ス@�スs�スツ趣ソス�スフ擾ソス�ス�ス�スヌ会ソス
|
---|
| 2314 | Vector<ExbpNode> getChildrenWithISADummy(boolean skipUnVisvle){
|
---|
| 2315 | Vector<ExbpNode> vec = new Vector<ExbpNode>();
|
---|
| 2316 | // if(skipUnVisvle && !this.open_sub){
|
---|
| 2317 | // return vec;
|
---|
| 2318 | // }
|
---|
| 2319 |
|
---|
| 2320 | Iterator<ExbpNode> it = this.children.iterator();
|
---|
| 2321 | while (it.hasNext()) {
|
---|
| 2322 | ExbpNode childNode = it.next();
|
---|
| 2323 | if(childNode.isDummy){
|
---|
| 2324 | //vec.addAll(childNode.getChildren());
|
---|
| 2325 | if(childNode.key.equals(ExbpNode.IS_A)||childNode.key.equals(ExbpNode.IS_A_L)){
|
---|
| 2326 | //if(!skipUnVisvle || childNode.visible){
|
---|
| 2327 | vec.add(childNode);
|
---|
| 2328 | //}
|
---|
| 2329 | }
|
---|
| 2330 | }
|
---|
| 2331 | else{
|
---|
| 2332 | //if(!skipUnVisvle || childNode.visible){
|
---|
| 2333 | vec.add(childNode);
|
---|
| 2334 | //}
|
---|
| 2335 | }
|
---|
| 2336 | }
|
---|
| 2337 | return vec;
|
---|
| 2338 | }
|
---|
| 2339 |
|
---|
| 2340 |
|
---|
| 2341 |
|
---|
| 2342 | //#kozaki 2009/01/04�ス@Key�ス�ス�スw�ス閧オ�スト子�スm�ス[�スh�ス�スヤゑソス
|
---|
| 2343 | ExbpNode findChildNodeByKey(String key){
|
---|
| 2344 | Vector<ExbpNode> chi_nodes = this.getChildExbpNodes();
|
---|
| 2345 | Enumeration<ExbpNode> en = chi_nodes.elements();
|
---|
| 2346 | String[] keys;
|
---|
| 2347 | while(en.hasMoreElements()){
|
---|
| 2348 | ExbpNode node = (ExbpNode)en.nextElement();
|
---|
| 2349 | if(node.key.equals(key)){
|
---|
| 2350 | return node;
|
---|
| 2351 | }
|
---|
| 2352 | //�ス�ス�ス{�ス�ス�スヘ,�スu,�ス�スリゑソスv�スフ擾ソス�ス�ス�ス�ス�スK�スv
|
---|
| 2353 | // keys = node.key.split(",");
|
---|
| 2354 | // for(int i=0;i<keys.length;i++){
|
---|
| 2355 | // if(keys[i].equals(key)){
|
---|
| 2356 | // return node;
|
---|
| 2357 | // }
|
---|
| 2358 | // }
|
---|
| 2359 | }
|
---|
| 2360 |
|
---|
| 2361 | return null;
|
---|
| 2362 | }
|
---|
| 2363 |
|
---|
| 2364 | ExbpNode(int x, int y, int w, int h){
|
---|
| 2365 | super(x,y,w,h);
|
---|
| 2366 | }
|
---|
| 2367 |
|
---|
| 2368 | ExbpNode(String lbl, int x, int y, int w, int h){
|
---|
| 2369 | super(x,y,w,h);
|
---|
| 2370 | this.setLabel(lbl);
|
---|
| 2371 | }
|
---|
| 2372 |
|
---|
| 2373 | ExbpNode(String lbl){
|
---|
| 2374 | super(0,0,0,0);
|
---|
| 2375 | this.setLabel(lbl);
|
---|
| 2376 | }
|
---|
| 2377 |
|
---|
| 2378 | ExbpNode copy(){
|
---|
| 2379 | ExbpNode copy = new ExbpNode(this.getLabel());
|
---|
| 2380 | copy.setOrgNode(this.getOrgNode());
|
---|
| 2381 | copy.key=this.key;
|
---|
| 2382 | copy.opt=this.opt;
|
---|
| 2383 | return copy;
|
---|
| 2384 | }
|
---|
| 2385 |
|
---|
| 2386 | //�ス�ス�スハ概�スO�スフ含めゑソスExbpNode�ス�ス�ス�ャ
|
---|
| 2387 | /* ExbpNode(Node node){
|
---|
| 2388 | this(node.getLabel(),0,0,0,0);
|
---|
| 2389 | // #kozaki 2008/03/29�ス@�スT�スu�ス�ス�ス齒茨ソス�ス
|
---|
| 2390 | if(mapfactory.isSubLung){
|
---|
| 2391 | this.setLabel(node.getSubLabel());
|
---|
| 2392 | System.out.println("�スT�スu�ス�ス�ス�ス:"+node.getLabel()+"-->"+node.getSubLabel());
|
---|
| 2393 | }
|
---|
| 2394 | this.setHozoNode(node);
|
---|
| 2395 | this.key = IS_A;
|
---|
| 2396 |
|
---|
| 2397 | Enumeration chi_en = node.childs.elements();
|
---|
| 2398 | while(chi_en.hasMoreElements()){
|
---|
| 2399 | Node chi_node = (Node)chi_en.nextElement();
|
---|
| 2400 | ExbpNode chi = new ExbpNode(chi_node);
|
---|
| 2401 | this.addChild(chi);
|
---|
| 2402 | }
|
---|
| 2403 | }*/
|
---|
| 2404 |
|
---|
| 2405 |
|
---|
| 2406 |
|
---|
| 2407 | //�ス�ス�スハ概�スO�スフ含めゑソスExbpNode�ス�ス�ス�ャ�スi�スF�スw�ス閧�ス�スj isa�スR�ス}�ス�ス�スh�スフみ擾ソス�ス�ス
|
---|
| 2408 | /* ExbpNode(Node node,Color clr){
|
---|
| 2409 | this(node.getLabel(),0,0,0,0);
|
---|
| 2410 | // #kozaki 2008/08/12
|
---|
| 2411 | if(clr==null){
|
---|
| 2412 | this.color=this.CENTER_COLOR;
|
---|
| 2413 | }else{
|
---|
| 2414 | this.color=clr;
|
---|
| 2415 | }
|
---|
| 2416 | //#kozaki 2008/03/22�ス@�スT�スu�ス�ス�ス齒茨ソス�ス
|
---|
| 2417 | if(mapfactory.isSubLung){
|
---|
| 2418 | this.setLabel(node.getSubLabel());
|
---|
| 2419 | System.out.println("�スT�スu�ス�ス�ス�ス:"+node.getLabel()+"-->"+node.getSubLabel());
|
---|
| 2420 | }
|
---|
| 2421 |
|
---|
| 2422 | this.setHozoNode(node);
|
---|
| 2423 |
|
---|
| 2424 | this.key = IS_A;
|
---|
| 2425 |
|
---|
| 2426 | //this.color=clr;
|
---|
| 2427 | Enumeration<Node> chi_en = node.childs.elements();
|
---|
| 2428 | int color_i=0;
|
---|
| 2429 | Color chi_clr = clr;
|
---|
| 2430 | while(chi_en.hasMoreElements()){
|
---|
| 2431 | if(clr==null){
|
---|
| 2432 | chi_clr=ExbpNode.node_color[color_i];
|
---|
| 2433 | color_i++;
|
---|
| 2434 | if(color_i>9){
|
---|
| 2435 | color_i=0;
|
---|
| 2436 | }
|
---|
| 2437 | }
|
---|
| 2438 | Node chi_node = chi_en.nextElement();
|
---|
| 2439 | //#kozaki 2008/08/13�ス@RH�スヘ会ソス�スハ概�スO�スニゑソス�スト趣ソス�スo�ス�ス�スネゑソス
|
---|
| 2440 | // if(chi_node instanceof NodeRH){
|
---|
| 2441 | // continue;
|
---|
| 2442 | // }
|
---|
| 2443 | ExbpNode chi = new ExbpNode(chi_node,chi_clr);
|
---|
| 2444 | this.addChild(chi);
|
---|
| 2445 | }
|
---|
| 2446 |
|
---|
| 2447 | // #kozaki�ス@2008/08/09�ス@IS-A�スフ擾ソス�ス�ス(is-a�スニ擾ソス�ス�ス�ス�ス�スe�スヘ,�スルぼ難ソス�ス�ス)
|
---|
| 2448 | chi_en = node.extendedChilds.elements();
|
---|
| 2449 | while(chi_en.hasMoreElements()){
|
---|
| 2450 | Node chi_node = chi_en.nextElement();
|
---|
| 2451 | if(clr==null){
|
---|
| 2452 | chi_clr=ExbpNode.node_color[color_i];
|
---|
| 2453 | color_i++;
|
---|
| 2454 | if(color_i>9){
|
---|
| 2455 | color_i=0;
|
---|
| 2456 | }
|
---|
| 2457 | }
|
---|
| 2458 | ExbpNode chi = new ExbpNode(chi_node,chi_clr);
|
---|
| 2459 | this.addChild(chi);
|
---|
| 2460 | }
|
---|
| 2461 | }
|
---|
| 2462 | */
|
---|
| 2463 | //#kozaki 07/08/30
|
---|
| 2464 | //�ス�ス�スハ概�スO�ス�ス�スワめゑソスExbpNode�ス�ス�ス�ャ�スi�スF�スw�ス閧�ス�スj�ス@Leaf�スフ擾ソス�ス�ス
|
---|
| 2465 | /* ExbpNode(Node node,Color clr,String key){
|
---|
| 2466 | this(node.getLabel(),0,0,0,0);
|
---|
| 2467 | // #kozaki 2008/08/12
|
---|
| 2468 | if(clr==null){
|
---|
| 2469 | this.color=this.CENTER_COLOR;
|
---|
| 2470 | }else{
|
---|
| 2471 | this.color=clr;
|
---|
| 2472 | }
|
---|
| 2473 |
|
---|
| 2474 | // #kozaki 2008/03/29�ス@�スT�スu�ス�ス�ス齒茨ソス�ス
|
---|
| 2475 | if(mapfactory.isSubLung){
|
---|
| 2476 | this.setLabel(node.getSubLabel());
|
---|
| 2477 | System.out.println("�スT�スu�ス�ス�ス�ス:"+node.getLabel()+"-->"+node.getSubLabel());
|
---|
| 2478 | }
|
---|
| 2479 |
|
---|
| 2480 | // #kozaki 2008/08/13
|
---|
| 2481 | if(node instanceof NodeRH){
|
---|
| 2482 | //this.setHozoNode(((NodeRH)node).getCCNode());
|
---|
| 2483 | this.setLabel(this.getLabel()+"[RH]");
|
---|
| 2484 | this.setHozoNode(node);//#kozaki 2008/08/13
|
---|
| 2485 | // Node cc_node = ((NodeRH)node).getCCNode();
|
---|
| 2486 | // if(cc_node!=null){
|
---|
| 2487 | // node =cc_node;
|
---|
| 2488 | // }
|
---|
| 2489 | }
|
---|
| 2490 | else{
|
---|
| 2491 | this.setHozoNode(node);
|
---|
| 2492 | }
|
---|
| 2493 |
|
---|
| 2494 | this.key = key;
|
---|
| 2495 | //this.color=clr;
|
---|
| 2496 | }
|
---|
| 2497 | */
|
---|
| 2498 |
|
---|
| 2499 | //#kozaki 07/08/22
|
---|
| 2500 | //�ス@slot_role�スナ指�ス閧オ�ス�ス�スX�ス�ス�スb�スg�スフク�ス�ス�スX�ス�ス�ス�スニゑソス�ス�ス
|
---|
| 2501 | /* //�ス@�ス�ス�スハの概�スOExbpNode�ス�ス�ス�ャ�ス�ス�ス�スi�スF�スw�ス閧�ス�スj
|
---|
| 2502 | ExbpNode(Node node,Color clr,BrowsingPanel bp,String[] slot_role, String link_key){
|
---|
| 2503 | this(node.getLabel(),0,0,0,0);
|
---|
| 2504 | //#kozaki 2008/03/22�ス@�スT�スu�ス�ス�ス齒茨ソス�ス
|
---|
| 2505 | if(mapfactory.isSubLung){
|
---|
| 2506 | this.setLabel(node.getSubLabel());
|
---|
| 2507 | }
|
---|
| 2508 |
|
---|
| 2509 | if(node instanceof NodeRH){
|
---|
| 2510 | //System.out.println("this is NodeRH :" + this.getLabel());
|
---|
| 2511 | //this.setHozoNode(((NodeRH)node).getCCNode());
|
---|
| 2512 | this.setLabel(this.getLabel()+"[RH]");
|
---|
| 2513 | this.setHozoNode(node);//#kozaki 2008/08/13
|
---|
| 2514 | // Node cc_node = ((NodeRH)node).getCCNode();
|
---|
| 2515 | // if(cc_node!=null){
|
---|
| 2516 | // node =cc_node;
|
---|
| 2517 | // }
|
---|
| 2518 | }
|
---|
| 2519 | else{
|
---|
| 2520 | this.setHozoNode(node);
|
---|
| 2521 | }
|
---|
| 2522 |
|
---|
| 2523 | //#kozaki 2008/08/12
|
---|
| 2524 | if(clr==null){
|
---|
| 2525 | this.color=this.CENTER_COLOR;
|
---|
| 2526 | }else{
|
---|
| 2527 | this.color=clr;
|
---|
| 2528 | }
|
---|
| 2529 |
|
---|
| 2530 | //#kozaki�ス@2008/03/29�ス@�スo�スO�ス�ス�ス
|
---|
| 2531 | if(this.getHozoNode()==null){
|
---|
| 2532 | return;
|
---|
| 2533 | }
|
---|
| 2534 |
|
---|
| 2535 | //slot_role�スナの選�ス�ス�ス�ス�ス�ス
|
---|
| 2536 | String key_role = slot_role[0];
|
---|
| 2537 | System.out.println("KEY="+key_role);
|
---|
| 2538 | //this.key = key_role;
|
---|
| 2539 | //this.key = link_key;�ス@//#kozaki 2007/09/07
|
---|
| 2540 |
|
---|
| 2541 |
|
---|
| 2542 |
|
---|
| 2543 |
|
---|
| 2544 | //
|
---|
| 2545 | // �ス@�ス�ス�スハ概�スO�スフ抵ソス�スo
|
---|
| 2546 | // is-a
|
---|
| 2547 |
|
---|
| 2548 | if(key_role.equals(IS_A)){
|
---|
| 2549 | //#kozaki 2008/02/09�ス@�ス�ス�スフ段�スフコ�ス}�ス�ス�スh�スカ撰ソス
|
---|
| 2550 | String[] slot_role2 = slot_role;
|
---|
| 2551 | if(slot_role.length>1){
|
---|
| 2552 | slot_role2 = new String[slot_role.length-1];
|
---|
| 2553 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 2554 | slot_role2[i] = slot_role[i+1];
|
---|
| 2555 | }
|
---|
| 2556 | }
|
---|
| 2557 |
|
---|
| 2558 | Enumeration<Node> chi_en = node.childs.elements();
|
---|
| 2559 | while(chi_en.hasMoreElements()){
|
---|
| 2560 | Node chi_node = chi_en.nextElement();
|
---|
| 2561 | // #kozaki 2008/08/13�ス@RH�スヘ会ソス�スハ概�スO�スニゑソス�スト趣ソス�スo�ス�ス�スネゑソス
|
---|
| 2562 | // if(chi_node instanceof NodeRH){
|
---|
| 2563 | // continue;
|
---|
| 2564 | // }
|
---|
| 2565 | ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,"ISA");
|
---|
| 2566 | chi.key="is-a";
|
---|
| 2567 | this.addChild(chi);
|
---|
| 2568 | }
|
---|
| 2569 | //#kozaki 2008/02/09�ス@Isa�スフ�ソス�ス[�スt�スナ擾ソス�ス�ス�ス�ス�ス�ス
|
---|
| 2570 | //#kozaki 2008/08/12�ス@Isa�スフ�ソス�ス[�スt�ス�ス�ス�ス�スヘ兄�ス墲ェ�ス�ス�ス�スニゑソス�スノ鯉ソス�ス�ス
|
---|
| 2571 | if(node.parent!=null){//#kozaki 2008/08/13�ス@�スo�スO�ス�ス�ス
|
---|
| 2572 | if(node.childs.size()==0 && node.parent.childs.size()>1){
|
---|
| 2573 | ExbpNode chi = new ExbpNode(node,clr,bp,slot_role2,"ISA");
|
---|
| 2574 | chi.setDummyNode(true);
|
---|
| 2575 | this.addChild(chi);
|
---|
| 2576 | }
|
---|
| 2577 | }
|
---|
| 2578 |
|
---|
| 2579 | //#kozaki�ス@2008/08/09�ス@IS-A�スフ擾ソス�ス�ス(is-a�スニ擾ソス�ス�ス�ス�ス�スe�スヘ,�スルぼ難ソス�ス�ス)
|
---|
| 2580 | chi_en = node.extendedChilds.elements();
|
---|
| 2581 | while(chi_en.hasMoreElements()){
|
---|
| 2582 | Node chi_node = chi_en.nextElement();
|
---|
| 2583 | ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,"IS-A");
|
---|
| 2584 | chi.key="IS-A";
|
---|
| 2585 | this.addChild(chi);
|
---|
| 2586 | }
|
---|
| 2587 | }
|
---|
| 2588 |
|
---|
| 2589 | //
|
---|
| 2590 | // ?�ス�スハ概�スO�スフ抵ソス�スo
|
---|
| 2591 | // #hirota 08/08/18
|
---|
| 2592 | else if(key_role.equals("super")){
|
---|
| 2593 |
|
---|
| 2594 | System.out.println(" - super :");
|
---|
| 2595 |
|
---|
| 2596 | // #kozaki 2008/02/09�ス@�ス�ス�スフ段�スフコ�ス}�ス�ス�スh�スカ撰ソス
|
---|
| 2597 | String[] slot_role2 = slot_role;
|
---|
| 2598 | if(slot_role.length>1){
|
---|
| 2599 | slot_role2 = new String[slot_role.length-1];
|
---|
| 2600 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 2601 | slot_role2[i] = slot_role[i+1];
|
---|
| 2602 | }
|
---|
| 2603 | }
|
---|
| 2604 |
|
---|
| 2605 | // node�ス�スNode�スフとゑソス
|
---|
| 2606 | if( !(node instanceof NodeRH)){ //#kozaki 2007/12/29�ス@RH�スフ費ソス�ス�ス�ス�スC�ス�ス
|
---|
| 2607 |
|
---|
| 2608 | //System.out.println(" This is Node" );
|
---|
| 2609 | if( node.parent != null){
|
---|
| 2610 | ExbpNode chi = new ExbpNode(node.parent,clr,bp,slot_role2,"super");
|
---|
| 2611 | chi.key="super";
|
---|
| 2612 | this.addChild(chi);
|
---|
| 2613 | }
|
---|
| 2614 |
|
---|
| 2615 | }
|
---|
| 2616 | // node�ス�スRH�スフとゑソス�スARH�ス�ス�ス�ス�スo�ス�ス
|
---|
| 2617 | else{
|
---|
| 2618 |
|
---|
| 2619 | // System.out.println(" This is RH");
|
---|
| 2620 | // System.out.println(" parent:: " + ((Slot)node).getWholeNodeRoot().parent.getLabel() );
|
---|
| 2621 | if( ((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent != null){
|
---|
| 2622 | if( ((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName() ) != null){
|
---|
| 2623 | //System.out.println(" OK " + ((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName() ).getRHname() );
|
---|
| 2624 |
|
---|
| 2625 |
|
---|
| 2626 | ((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName()
|
---|
| 2627 | ).setLabel(((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName() ).getRHname());
|
---|
| 2628 | ExbpNode chi = new ExbpNode(((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName() ).getNodeRH() ,clr,bp,slot_role2,"super");
|
---|
| 2629 | chi.key="super";
|
---|
| 2630 | this.addChild(chi);
|
---|
| 2631 |
|
---|
| 2632 | }
|
---|
| 2633 | }
|
---|
| 2634 |
|
---|
| 2635 | }
|
---|
| 2636 | }
|
---|
| 2637 |
|
---|
| 2638 | else if(key_role.startsWith(":")){ //#kozaki 07/08/30 key_role�スナ指�ス閧オ�ス�ス�スN�ス�ス�スX�ス�ス�ス�ス�ス�ス�ス�スツ概�スO�ス�ス�ス�ス�スハに追会ソス
|
---|
| 2639 | //Vector nodes = bp.findReferringNodes(this.getLabel());
|
---|
| 2640 | //#kozaki 2008/03/22�ス@�スT�スu�ス�ス�ス齒茨ソス�ス
|
---|
| 2641 | Vector nodes = bp.findReferringNodes(this.getHozoNode().getLabel());
|
---|
| 2642 |
|
---|
| 2643 | //#kozaki 2008/08/17�ス@�スX�ス�ス�スb�スg�スナ関連�ス�ス�ス�ス�スT�スO�ス�スH�ス髀茨ソス�ス�スヨの包ソス�ス�ス
|
---|
| 2644 | if(key_role.indexOf("!")>0){
|
---|
| 2645 | makeSlotRelatedExbpNode(this,node,clr,bp,slot_role);
|
---|
| 2646 | key_role=key_role.replaceFirst("!", "");
|
---|
| 2647 | slot_role[0]=slot_role[0].replaceFirst("!", "");
|
---|
| 2648 | }
|
---|
| 2649 | //#kozaki 2008/08/09�ス@�ス�ス�ス�ス�ス�ス�スg�ス�ス�スQ�スニゑソス�ストゑソス�ス�スX�ス�ス�スb�スg�ス�ス�スX�スL�スb�スv�ス�ス�ス髀茨ソス�ス
|
---|
| 2650 | while(nodes.contains(node)){
|
---|
| 2651 | nodes.removeElement(node);
|
---|
| 2652 | }
|
---|
| 2653 |
|
---|
| 2654 | String[] super_node = key_role.split(":");
|
---|
| 2655 | ExbpNode[] parent_node = new ExbpNode[super_node.length];
|
---|
| 2656 | parent_node[0]=this;
|
---|
| 2657 |
|
---|
| 2658 |
|
---|
| 2659 | //�スヨ連�スT�スO�スフ階�スw�ス�ャ�ス�ス�ス�ス
|
---|
| 2660 | for(int i=1; i<super_node.length;i++){
|
---|
| 2661 | if(super_node[i].indexOf("=")>0){//�ス�ス�ス�ス�ス�ス�スフ階�スw�ス�ス�スQ�スi�スノ包ソス�ス�ス�ス髀茨ソス�ス�スi�スR�スi�スレ行�スヘ,�ス�ス�ス�スフ課托ソスノ…�スj
|
---|
| 2662 | System.out.println("super_node[i]==>"+super_node[i]);
|
---|
| 2663 | String str[] = super_node[i].split("=");
|
---|
| 2664 | if(str.length!=2){
|
---|
| 2665 | System.out.println("ERROR�スF=�スフ使�スp�ス@�ス�ス�スヤ茨ソス�ス�ストゑソス�スワゑソス�スD�ス�ス�ス�ス�ス�ス�スu�スT�スO�ス�ス=n�スi�スK�スw�ス�ス�スj�スv�スニゑソス�ストゑソス�ス�ス�ス�ス�ス�ス");
|
---|
| 2666 | return;
|
---|
| 2667 | }
|
---|
| 2668 | String super_name=str[0];
|
---|
| 2669 | int layer_num = Integer.parseInt(str[1]);
|
---|
| 2670 |
|
---|
| 2671 | //parent_node[i-1].key=super_name;
|
---|
| 2672 |
|
---|
| 2673 |
|
---|
| 2674 | int max=1;
|
---|
| 2675 | Node par_node;// = bp.editorPanel.findNode(super_name);
|
---|
| 2676 | //#kozaki 2008/05/08�ス@�スT�スu�ス�ス�ス齒茨ソス�ス�スフ修�ス�ス
|
---|
| 2677 | if(mapfactory.isSubLung){
|
---|
| 2678 | par_node = bp.editorPanel.findNodeWithSubLang(super_name);
|
---|
| 2679 | }
|
---|
| 2680 | else{
|
---|
| 2681 | par_node = bp.editorPanel.findNode(super_name);
|
---|
| 2682 | }
|
---|
| 2683 | int min= par_node.getParents().size();
|
---|
| 2684 |
|
---|
| 2685 |
|
---|
| 2686 | //�スヌ会ソス�ス�ス�ス骭ウ�ス�スNode�スフ�ソス�スX�スg�ス�ス�ス謫セ
|
---|
| 2687 | Vector<Node> addlists = new Vector<Node>();
|
---|
| 2688 | Enumeration chi_en = nodes.elements();
|
---|
| 2689 | while(chi_en.hasMoreElements()){
|
---|
| 2690 | Node chi_node = (Node)chi_en.nextElement();
|
---|
| 2691 | //#kozaki 2008/08/10�ス@�ス�ス�ス闖茨ソス�ス�ス�スchi_node.equals(par_node)�ス�ス�スヌ会ソス
|
---|
| 2692 | if(chi_node.isSubclassOf(par_node)||chi_node.equals(par_node)){
|
---|
| 2693 | //parent_node[i-1].children.addElement(new ExbpNode(chi_node,clr,""));
|
---|
| 2694 | addlists.add(chi_node);
|
---|
| 2695 | int m = chi_node.getParents().size();
|
---|
| 2696 | if(m>max){
|
---|
| 2697 | max = m;
|
---|
| 2698 | }
|
---|
| 2699 | }
|
---|
| 2700 | }
|
---|
| 2701 |
|
---|
| 2702 | //�スヌ会ソス�ス�ス�ス驛奇ソスX�スg�ス�ス�ス�スハゑソス�ス迴�ソスノ包ソス�スラ替ゑソス
|
---|
| 2703 | Vector<Node> add_nodes = new Vector<Node>();
|
---|
| 2704 | for(int k=min; k<=max; k++){
|
---|
| 2705 | Enumeration<Node> add_en = addlists.elements();
|
---|
| 2706 | while(add_en.hasMoreElements()){
|
---|
| 2707 | Node add_node = add_en.nextElement();
|
---|
| 2708 | if(add_node.getParents().size()==k){
|
---|
| 2709 | add_nodes.add(add_node);
|
---|
| 2710 | }
|
---|
| 2711 | }
|
---|
| 2712 | }
|
---|
| 2713 |
|
---|
| 2714 | //parent_node[i-1].key=super_node[i];
|
---|
| 2715 | int n=1;
|
---|
| 2716 | int org_c=add_nodes.size()/layer_num;
|
---|
| 2717 | int c=org_c;
|
---|
| 2718 | System.out.println("c="+c);
|
---|
| 2719 |
|
---|
| 2720 | Enumeration<Node> chi_en2 = add_nodes.elements();
|
---|
| 2721 | while(chi_en2.hasMoreElements()){
|
---|
| 2722 | Node chi_node = chi_en2.nextElement();
|
---|
| 2723 | System.out.println("n="+n);
|
---|
| 2724 | ExbpNode chi = null;
|
---|
| 2725 | Vector slots = chi_node.findSlotsByClassConst(this.getHozoNode().getLabel());
|
---|
| 2726 |
|
---|
| 2727 |
|
---|
| 2728 | if(n>org_c*(layer_num-1)){ //�スナ終�スi�スフ擾ソス�ス�ス
|
---|
| 2729 | System.out.println("�スナ終�スi�スフ擾ソス�ス�ス");
|
---|
| 2730 | if(i==super_node.length-1){//":"�スフ擾ソス�ス�ス�ス�ス�スナ鯉ソスフ趣ソス�スヘ,�ス�ス�スフ擾ソス�ス�ス�スノ移ゑソス
|
---|
| 2731 | System.out.println(":�スフ擾ソス�ス�ス�ス�ス�スナ鯉ソスフ趣ソス�スヘ,�ス�ス�スフ擾ソス�ス�ス�スノ移ゑソス");
|
---|
| 2732 | //�ス�ス�ス�ス�ス�スslot_role�スフ配�ス�ス�ス�ス�スツゑソス�ス轤キ�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 2733 | if(slot_role.length>1){
|
---|
| 2734 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 2735 | for(int l=0;l<slot_role2.length;l++){
|
---|
| 2736 | slot_role2[l] = slot_role[l+1];
|
---|
| 2737 | }
|
---|
| 2738 | chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_name);
|
---|
| 2739 | parent_node[i-1].addChild(chi);
|
---|
| 2740 | //#kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 2741 | // Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 2742 | // if(slot!=null){
|
---|
| 2743 | // chi.key=slot.getRoleName();
|
---|
| 2744 | // chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 2745 | // }
|
---|
| 2746 | }
|
---|
| 2747 | else{
|
---|
| 2748 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 2749 | chi = new ExbpNode(chi_node,clr,super_name);
|
---|
| 2750 | parent_node[i-1].addChild(chi);
|
---|
| 2751 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 2752 | // Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 2753 | // if(slot!=null){
|
---|
| 2754 | // chi.key=slot.getRoleName();
|
---|
| 2755 | // chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 2756 | // }
|
---|
| 2757 | }
|
---|
| 2758 | }
|
---|
| 2759 | else{
|
---|
| 2760 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 2761 | chi = new ExbpNode(chi_node,clr,super_name);
|
---|
| 2762 | parent_node[i-1].addChild(chi);
|
---|
| 2763 | addlists.add(chi_node);
|
---|
| 2764 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 2765 | // Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 2766 | // if(slot!=null){
|
---|
| 2767 | // chi.key=slot.getRoleName();
|
---|
| 2768 | // chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 2769 | // }
|
---|
| 2770 | }
|
---|
| 2771 | }
|
---|
| 2772 | else if(n!=c){
|
---|
| 2773 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 2774 | chi = new ExbpNode(chi_node,clr,super_name);
|
---|
| 2775 | parent_node[i-1].addChild(chi);
|
---|
| 2776 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 2777 | // Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 2778 | // if(slot!=null){
|
---|
| 2779 | // chi.key=slot.getRoleName();
|
---|
| 2780 | // chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 2781 | // }
|
---|
| 2782 | }
|
---|
| 2783 | else if(n==c){
|
---|
| 2784 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 2785 | chi = new ExbpNode(chi_node,clr,super_name);
|
---|
| 2786 | parent_node[i-1].addChild(chi);
|
---|
| 2787 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 2788 | // Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 2789 | // if(slot!=null){
|
---|
| 2790 | // chi.key=slot.getRoleName();
|
---|
| 2791 | // chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 2792 | // }
|
---|
| 2793 | parent_node[i-1] = parent_node[i-1].children.firstElement();
|
---|
| 2794 | c=c+c;
|
---|
| 2795 | }
|
---|
| 2796 | n++;
|
---|
| 2797 |
|
---|
| 2798 | if(slots.size()>0 && chi!=null ){
|
---|
| 2799 | Slot slot = (Slot)slots.firstElement();
|
---|
| 2800 | if(slot!=null){
|
---|
| 2801 | chi.key=slot.getRoleName();
|
---|
| 2802 | if(mapfactry.isSubLung){
|
---|
| 2803 | chi.key=slot.getSubRole();
|
---|
| 2804 | }
|
---|
| 2805 | }
|
---|
| 2806 | }
|
---|
| 2807 | if(chi!=null){
|
---|
| 2808 | chi.opt=key_role;
|
---|
| 2809 | }
|
---|
| 2810 | }
|
---|
| 2811 |
|
---|
| 2812 | nodes.removeAll(addlists);
|
---|
| 2813 |
|
---|
| 2814 | }
|
---|
| 2815 | else{//�スi�ス�ス1�スi�スフ場合�スフ関連�スT�スO�ス�ス�ス�ス
|
---|
| 2816 | parent_node[i-1].key=super_node[i];
|
---|
| 2817 | parent_node[i-1].opt=key_role; //#kozaki 2007/10/28
|
---|
| 2818 | Enumeration chi_en = nodes.elements();
|
---|
| 2819 | Vector<Node> addlists = new Vector<Node>();
|
---|
| 2820 | //#kozaki 2008/03/29�ス@�スo�スO�ス�ス�ス�スフゑソス�ス�スwhile�ス�ス�ス�ス�スC�ス�ス
|
---|
| 2821 | while(chi_en.hasMoreElements()){
|
---|
| 2822 | Node chi_node = (Node)chi_en.nextElement();
|
---|
| 2823 | ExbpNode chi = null;
|
---|
| 2824 | Vector slots = chi_node.findSlotsByClassConst(this.getHozoNode().getLabel());
|
---|
| 2825 |
|
---|
| 2826 | //#kozaki 2008/05/08�ス@�スT�スu�ス�ス�ス齒茨ソス�ス
|
---|
| 2827 | Node par_node;
|
---|
| 2828 | if(mapfactory.isSubLung){
|
---|
| 2829 | par_node=bp.editorPanel.findNodeWithSubLang(super_node[i]);
|
---|
| 2830 | }
|
---|
| 2831 | else{
|
---|
| 2832 | par_node=bp.editorPanel.findNode(super_node[i]);
|
---|
| 2833 | }
|
---|
| 2834 |
|
---|
| 2835 | //#kozaki 2008/08/10�ス@�ス�ス�ス闖茨ソス�ス�ス�スchi_node.equals(par_node)�ス�ス�スヌ会ソス
|
---|
| 2836 | if(chi_node.isSubclassOf(par_node)||chi_node.equals(par_node)){
|
---|
| 2837 | if(i==super_node.length-1){//":"�スフ擾ソス�ス�ス�ス�ス�スナ鯉ソスフ趣ソス�スヘ,�ス�ス�スフ擾ソス�ス�ス�スノ移ゑソス
|
---|
| 2838 | //�ス�ス�ス�ス�ス�スslot_role�スフ配�ス�ス�ス�ス�スツゑソス�ス轤キ�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 2839 | if(slot_role.length>1){
|
---|
| 2840 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 2841 | for(int l=0;l<slot_role2.length;l++){
|
---|
| 2842 | slot_role2[l] = slot_role[l+1];
|
---|
| 2843 | }
|
---|
| 2844 | chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
|
---|
| 2845 | parent_node[i-1].addChild(chi);
|
---|
| 2846 | }
|
---|
| 2847 | else{
|
---|
| 2848 | chi = new ExbpNode(chi_node,clr,super_node[i]);
|
---|
| 2849 | parent_node[i-1].addChild(chi);
|
---|
| 2850 | }
|
---|
| 2851 | }
|
---|
| 2852 | else{
|
---|
| 2853 | chi = new ExbpNode(chi_node,clr,super_node[i]);
|
---|
| 2854 | parent_node[i-1].addChild(chi);
|
---|
| 2855 | addlists.add(chi_node);
|
---|
| 2856 | }
|
---|
| 2857 | }
|
---|
| 2858 |
|
---|
| 2859 | if(slots.size()>0 && chi!=null ){
|
---|
| 2860 | Slot slot = (Slot)slots.firstElement();
|
---|
| 2861 | if(slot!=null){
|
---|
| 2862 | chi.key=slot.getRoleName();
|
---|
| 2863 | if(mapfactory.isSubLung){
|
---|
| 2864 | chi.key=slot.getSubRole();
|
---|
| 2865 | }
|
---|
| 2866 | }
|
---|
| 2867 | }
|
---|
| 2868 | if(chi!=null){
|
---|
| 2869 | chi.opt=key_role;
|
---|
| 2870 | }
|
---|
| 2871 | }
|
---|
| 2872 |
|
---|
| 2873 | nodes.removeAll(addlists);
|
---|
| 2874 | }
|
---|
| 2875 |
|
---|
| 2876 | if(i<super_node.length-1){
|
---|
| 2877 | if(parent_node[i-1].children.size()>0){
|
---|
| 2878 | parent_node[i]=parent_node[i-1].children.firstElement();
|
---|
| 2879 | }
|
---|
| 2880 | else{
|
---|
| 2881 | parent_node[i]=new ExbpNode("---",0,0,0,0);
|
---|
| 2882 | parent_node[i-1].addChild(parent_node[i]);
|
---|
| 2883 | }
|
---|
| 2884 | }
|
---|
| 2885 | }
|
---|
| 2886 |
|
---|
| 2887 | }
|
---|
| 2888 |
|
---|
| 2889 | // #hirota 08/08/19 �スR�ス}�ス�ス�スh�ス�ス�ス�ス
|
---|
| 2890 |
|
---|
| 2891 | //
|
---|
| 2892 | // :
|
---|
| 2893 | // (old)�ス�ス�ス[�ス�ス�スw�ス閧�ス�ス@�ス{�ス@�ス�ス�スハ概�スO�スw�ス閧�ス�ス
|
---|
| 2894 | //
|
---|
| 2895 |
|
---|
| 2896 | // #kozaki, hirota
|
---|
| 2897 | else if(key_role.startsWith(";")){
|
---|
| 2898 |
|
---|
| 2899 | //Vector nodes// = bp.findReferringNodes(this.getHozoNode().getLabel());
|
---|
| 2900 |
|
---|
| 2901 | Vector nodes;
|
---|
| 2902 | // #kozaki 2008/08/11�ス@�スT�スu�ス�ス�ス�スフ趣ソス�ス�ス�ス�ス�スフ�ソス�スx�ス�ス�スナ鯉ソス�ス�ス�ス�ス�ス�スホよい
|
---|
| 2903 | // if(mapfactory.isSubLung){
|
---|
| 2904 | // nodes = bp.findReferringNodesWithSub(this.getHozoNode().getSubLabel() );
|
---|
| 2905 | // }
|
---|
| 2906 | // else{
|
---|
| 2907 | nodes = bp.findReferringNodes(this.getHozoNode().getLabel());
|
---|
| 2908 | //nodes = bp.findReferringNodesNonrec(this.getHozoNode().getLabel());
|
---|
| 2909 | // }
|
---|
| 2910 |
|
---|
| 2911 | // #kozaki 2008/08/09�ス@�ス�ス�ス�ス�ス�ス�スg�ス�ス�スQ�スニゑソス�ストゑソス�ス�スX�ス�ス�スb�スg�ス�ス�スX�スL�スb�スv�ス�ス�ス髀茨ソス�ス
|
---|
| 2912 | while(nodes.contains(node)){
|
---|
| 2913 | nodes.removeElement(node);
|
---|
| 2914 | }
|
---|
| 2915 |
|
---|
| 2916 | String[] super_node = key_role.split(";");
|
---|
| 2917 | ExbpNode[] parent_node = new ExbpNode[super_node.length];
|
---|
| 2918 | parent_node[0]=this;
|
---|
| 2919 |
|
---|
| 2920 | // #hirota 11/29
|
---|
| 2921 | // node�ス�スCC�スノなゑソス�ストゑソス�ス�スS�スフ概�スO�ス�ス�スw�ス�スネゑソス�スナ全�スト趣ソス�スo�ス�ス
|
---|
| 2922 | if( super_node[1].equals("any")){
|
---|
| 2923 |
|
---|
| 2924 |
|
---|
| 2925 |
|
---|
| 2926 | // test print
|
---|
| 2927 | Enumeration nodes_en = nodes.elements();
|
---|
| 2928 | while( nodes_en.hasMoreElements()){
|
---|
| 2929 |
|
---|
| 2930 |
|
---|
| 2931 | Node node_temp = (Node)nodes_en.nextElement();
|
---|
| 2932 |
|
---|
| 2933 |
|
---|
| 2934 | //Node�スo�ス^�ス�ス�ス�ス
|
---|
| 2935 | if(slot_role.length>1){
|
---|
| 2936 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 2937 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 2938 | slot_role2[i] = slot_role[i+1];
|
---|
| 2939 | }
|
---|
| 2940 |
|
---|
| 2941 | if(mapfactory.isSubLung){
|
---|
| 2942 | ExbpNode chi = new ExbpNode(node_temp,clr,bp,slot_role2, ((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName() );
|
---|
| 2943 | this.addChild(chi);
|
---|
| 2944 | chi.key=((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getSubRole();
|
---|
| 2945 | chi.opt=key_role;
|
---|
| 2946 |
|
---|
| 2947 | }else{
|
---|
| 2948 | ExbpNode chi = new ExbpNode(node_temp,clr,bp,slot_role2, ((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName() );
|
---|
| 2949 | this.addChild(chi);
|
---|
| 2950 | chi.key=((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName();
|
---|
| 2951 | chi.opt=key_role;
|
---|
| 2952 | }
|
---|
| 2953 |
|
---|
| 2954 |
|
---|
| 2955 |
|
---|
| 2956 | }
|
---|
| 2957 | else{
|
---|
| 2958 |
|
---|
| 2959 | if(mapfactory.isSubLung){
|
---|
| 2960 | ExbpNode chi = new ExbpNode(node_temp,clr, ((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName());
|
---|
| 2961 | this.addChild(chi);
|
---|
| 2962 | chi.key=((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getSubRole();
|
---|
| 2963 | chi.opt=key_role;
|
---|
| 2964 | }
|
---|
| 2965 | else{
|
---|
| 2966 | ExbpNode chi = new ExbpNode(node_temp,clr, ((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName());
|
---|
| 2967 | this.addChild(chi);
|
---|
| 2968 | chi.key=((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName();
|
---|
| 2969 | chi.opt=key_role;
|
---|
| 2970 | }
|
---|
| 2971 |
|
---|
| 2972 |
|
---|
| 2973 |
|
---|
| 2974 | }
|
---|
| 2975 |
|
---|
| 2976 |
|
---|
| 2977 |
|
---|
| 2978 | }
|
---|
| 2979 |
|
---|
| 2980 |
|
---|
| 2981 | }
|
---|
| 2982 | // role�ス�ス�ス�ス�スw�ス�ス
|
---|
| 2983 | else{
|
---|
| 2984 |
|
---|
| 2985 | System.out.println(" any check role :: " + super_node[1]);
|
---|
| 2986 |
|
---|
| 2987 |
|
---|
| 2988 | // �スヨ連�スT�スO�スフ階�スw�ス�ャ�ス�ス�ス�ス
|
---|
| 2989 | for(int i=1; i<super_node.length;i++){
|
---|
| 2990 | if(super_node[i].indexOf("=")>0){//�ス�ス�ス�ス�ス�ス�スフ階�スw�ス�ス�スQ�スi�スノ包ソス�ス�ス�ス髀茨ソス�ス�スi�スR�スi�スレ行�スヘ,�ス�ス�ス�スフ課托ソスノ…�スj
|
---|
| 2991 | System.out.println("super_node[i]==>"+super_node[i]);
|
---|
| 2992 | String str[] = super_node[i].split("=");
|
---|
| 2993 | if(str.length!=2){
|
---|
| 2994 | System.out.println("ERROR�スF=�スフ使�スp�ス@�ス�ス�スヤ茨ソス�ス�ストゑソス�スワゑソス�スD�ス�ス�ス�ス�ス�ス�スu�スT�スO�ス�ス=n�スi�スK�スw�ス�ス�スj�スv�スニゑソス�ストゑソス�ス�ス�ス�ス�ス�ス");
|
---|
| 2995 | return;
|
---|
| 2996 | }
|
---|
| 2997 | String super_name=str[0];
|
---|
| 2998 | int layer_num = Integer.parseInt(str[1]);
|
---|
| 2999 |
|
---|
| 3000 | //parent_node[i-1].key=super_name;
|
---|
| 3001 |
|
---|
| 3002 | // #hirota �ス�ス�ス�スT�スO�スフ会ソス�スハ概�スO�スw�ス�スフとゑソス�スフ擾ソス�ス�ス
|
---|
| 3003 | Node par_node;
|
---|
| 3004 | String str2[] = super_name.split(";");
|
---|
| 3005 | boolean sub; //�ス�ス�スハ概�スO�スw�ス閧�ス�ス/�スネゑソス
|
---|
| 3006 |
|
---|
| 3007 | if(str2.length!=2){
|
---|
| 3008 | System.out.println("�ス�ス�スハ概�スO�スw�ス�ス@�スネゑソス");
|
---|
| 3009 | par_node = null;
|
---|
| 3010 | sub=false;
|
---|
| 3011 |
|
---|
| 3012 | }else{
|
---|
| 3013 | System.out.println("�ス�ス�スハ概�スO�スw�ス�ス@�ス�ス�ス�ス");
|
---|
| 3014 | String par_node_name=str2[1];
|
---|
| 3015 |
|
---|
| 3016 | if(mapfactory.isSubLung){
|
---|
| 3017 | par_node = bp.editorPanel.findNodeWithSubLang(super_name);
|
---|
| 3018 | }
|
---|
| 3019 | else{
|
---|
| 3020 | par_node = bp.editorPanel.findNode(super_name);
|
---|
| 3021 | }
|
---|
| 3022 | sub=true;
|
---|
| 3023 |
|
---|
| 3024 | }
|
---|
| 3025 | super_name=str2[0];
|
---|
| 3026 | int max=1;
|
---|
| 3027 |
|
---|
| 3028 |
|
---|
| 3029 | //test
|
---|
| 3030 | if( par_node != null ){
|
---|
| 3031 | System.out.println(" par_node : " + par_node.getLabel() );
|
---|
| 3032 | }
|
---|
| 3033 |
|
---|
| 3034 | int min= 0;
|
---|
| 3035 |
|
---|
| 3036 |
|
---|
| 3037 | //�スヌ会ソス�ス�ス�ス骭ウ�ス�スNode�スフ�ソス�スX�スg�ス�ス�ス謫セ
|
---|
| 3038 | Vector addlists = new Vector();
|
---|
| 3039 | Enumeration chi_en = nodes.elements();
|
---|
| 3040 | while(chi_en.hasMoreElements()){
|
---|
| 3041 |
|
---|
| 3042 | Node chi_node = (Node)chi_en.nextElement();
|
---|
| 3043 |
|
---|
| 3044 | // if( chi_node instanceof Node){
|
---|
| 3045 | // System.out.println("node : " );
|
---|
| 3046 | // }else if( chi_node instanceof Slot ){
|
---|
| 3047 | // System.out.println("slot : " ) ;
|
---|
| 3048 | // }
|
---|
| 3049 |
|
---|
| 3050 |
|
---|
| 3051 | System.out.println(" chi_node : " + chi_node.getLabel() );
|
---|
| 3052 |
|
---|
| 3053 | //if(chi_node.isSubclassOf(par_node)){
|
---|
| 3054 | if(mapfactory.isSubLung){
|
---|
| 3055 | if(chi_node.findSlotByRoleWithSubLang(super_name) != null){
|
---|
| 3056 |
|
---|
| 3057 | // #hirota �ス�ス�スハ概�スO�ス�ス�ス�スadd
|
---|
| 3058 | if(sub){
|
---|
| 3059 | if(chi_node.isSubclassOf(par_node)){
|
---|
| 3060 | addlists.add(chi_node);
|
---|
| 3061 | int m = chi_node.getParents().size();
|
---|
| 3062 | if(m>max){
|
---|
| 3063 | max = m;
|
---|
| 3064 | }
|
---|
| 3065 | }
|
---|
| 3066 | }
|
---|
| 3067 | else{
|
---|
| 3068 | addlists.add(chi_node);
|
---|
| 3069 | int m = chi_node.getParents().size();
|
---|
| 3070 | if(m>max){
|
---|
| 3071 | max = m;
|
---|
| 3072 | }
|
---|
| 3073 | }
|
---|
| 3074 |
|
---|
| 3075 | }
|
---|
| 3076 | }
|
---|
| 3077 | else{
|
---|
| 3078 | if(chi_node.findSlotByRole(super_name) != null){
|
---|
| 3079 |
|
---|
| 3080 | // #hirota �ス�ス�スハ概�スO�ス�ス�ス�スadd
|
---|
| 3081 | if(sub){
|
---|
| 3082 | if(chi_node.isSubclassOf(par_node)){
|
---|
| 3083 | addlists.add(chi_node);
|
---|
| 3084 | int m = chi_node.getParents().size();
|
---|
| 3085 | if(m>max){
|
---|
| 3086 | max = m;
|
---|
| 3087 | }
|
---|
| 3088 | }
|
---|
| 3089 | }
|
---|
| 3090 | else{
|
---|
| 3091 | addlists.add(chi_node);
|
---|
| 3092 | int m = chi_node.getParents().size();
|
---|
| 3093 | if(m>max){
|
---|
| 3094 | max = m;
|
---|
| 3095 | }
|
---|
| 3096 | }
|
---|
| 3097 |
|
---|
| 3098 | }
|
---|
| 3099 | }
|
---|
| 3100 |
|
---|
| 3101 | }
|
---|
| 3102 |
|
---|
| 3103 | //�スヌ会ソス�ス�ス�ス驛奇ソスX�スg�ス�ス�ス�スハゑソス�ス迴�ソスノ包ソス�スラ替ゑソス
|
---|
| 3104 | Vector add_nodes = new Vector();
|
---|
| 3105 | for(int k=min; k<=max; k++){
|
---|
| 3106 | Enumeration add_en = addlists.elements();
|
---|
| 3107 | while(add_en.hasMoreElements()){
|
---|
| 3108 | Node add_node = (Node)add_en.nextElement();
|
---|
| 3109 | if(add_node.getParents().size()==k){
|
---|
| 3110 | add_nodes.add(add_node);
|
---|
| 3111 | }
|
---|
| 3112 | }
|
---|
| 3113 | }
|
---|
| 3114 |
|
---|
| 3115 | //parent_node[i-1].key=super_node[i];
|
---|
| 3116 | int n=1;
|
---|
| 3117 | int org_c=add_nodes.size()/layer_num;
|
---|
| 3118 | int c=org_c;
|
---|
| 3119 | System.out.println("c="+c);
|
---|
| 3120 |
|
---|
| 3121 | Enumeration chi_en2 = add_nodes.elements();
|
---|
| 3122 | while(chi_en2.hasMoreElements()){
|
---|
| 3123 | Node chi_node = (Node)chi_en2.nextElement();
|
---|
| 3124 | System.out.println("n="+n);
|
---|
| 3125 |
|
---|
| 3126 | if(n>org_c*(layer_num-1)){ //�スナ終�スi�スフ擾ソス�ス�ス
|
---|
| 3127 | System.out.println("�スナ終�スi�スフ擾ソス�ス�ス");
|
---|
| 3128 | if(i==super_node.length-1){//":"�スフ擾ソス�ス�ス�ス�ス�スナ鯉ソスフ趣ソス�スヘ,�ス�ス�スフ擾ソス�ス�ス�スノ移ゑソス
|
---|
| 3129 | System.out.println(":�スフ擾ソス�ス�ス�ス�ス�スナ鯉ソスフ趣ソス�スヘ,�ス�ス�スフ擾ソス�ス�ス�スノ移ゑソス");
|
---|
| 3130 | //�ス�ス�ス�ス�ス�スslot_role�スフ配�ス�ス�ス�ス�スツゑソス�ス轤キ�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 3131 | if(slot_role.length>1){
|
---|
| 3132 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3133 | for(int l=0;l<slot_role2.length;l++){
|
---|
| 3134 | slot_role2[l] = slot_role[l+1];
|
---|
| 3135 | }
|
---|
| 3136 | ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_name);
|
---|
| 3137 | parent_node[i-1].addChild(chi);
|
---|
| 3138 |
|
---|
| 3139 | //#kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3140 | if(mapfactory.isSubLung){
|
---|
| 3141 | Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
|
---|
| 3142 | if(slot!=null){
|
---|
| 3143 | chi.key=slot.getRoleName();
|
---|
| 3144 | if(mapfactory.isSubLung){
|
---|
| 3145 | chi.key=slot.getSubRole();
|
---|
| 3146 | }
|
---|
| 3147 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3148 | }
|
---|
| 3149 | }
|
---|
| 3150 | else{
|
---|
| 3151 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3152 | if(slot!=null){
|
---|
| 3153 | chi.key=slot.getRoleName();
|
---|
| 3154 | if(mapfactory.isSubLung){
|
---|
| 3155 | chi.key=slot.getSubRole();
|
---|
| 3156 | }
|
---|
| 3157 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3158 | }
|
---|
| 3159 | }
|
---|
| 3160 |
|
---|
| 3161 | }
|
---|
| 3162 | else{
|
---|
| 3163 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 3164 | ExbpNode chi = new ExbpNode(chi_node,clr,super_name);
|
---|
| 3165 | parent_node[i-1].addChild(chi);
|
---|
| 3166 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3167 | if(mapfactory.isSubLung){
|
---|
| 3168 | Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
|
---|
| 3169 | if(slot!=null){
|
---|
| 3170 | chi.key=slot.getRoleName();
|
---|
| 3171 | if(mapfactory.isSubLung){
|
---|
| 3172 | chi.key=slot.getSubRole();
|
---|
| 3173 | }
|
---|
| 3174 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3175 | }
|
---|
| 3176 | }
|
---|
| 3177 | else{
|
---|
| 3178 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3179 | if(slot!=null){
|
---|
| 3180 | chi.key=slot.getRoleName();
|
---|
| 3181 | if(mapfactory.isSubLung){
|
---|
| 3182 | chi.key=slot.getSubRole();
|
---|
| 3183 | }
|
---|
| 3184 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3185 | }
|
---|
| 3186 | }
|
---|
| 3187 |
|
---|
| 3188 | }
|
---|
| 3189 | }
|
---|
| 3190 | else{
|
---|
| 3191 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 3192 | ExbpNode chi = new ExbpNode(chi_node,clr,super_name);
|
---|
| 3193 | parent_node[i-1].addChild(chi);
|
---|
| 3194 | addlists.add(chi_node);
|
---|
| 3195 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3196 | if(mapfactory.isSubLung){
|
---|
| 3197 | Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
|
---|
| 3198 | if(slot!=null){
|
---|
| 3199 | chi.key=slot.getRoleName();
|
---|
| 3200 | if(mapfactory.isSubLung){
|
---|
| 3201 | chi.key=slot.getSubRole();
|
---|
| 3202 | }
|
---|
| 3203 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3204 | }
|
---|
| 3205 | }
|
---|
| 3206 | else{
|
---|
| 3207 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3208 | if(slot!=null){
|
---|
| 3209 | chi.key=slot.getRoleName();
|
---|
| 3210 | if(mapfactory.isSubLung){
|
---|
| 3211 | chi.key=slot.getSubRole();
|
---|
| 3212 | }
|
---|
| 3213 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3214 | }
|
---|
| 3215 | }
|
---|
| 3216 |
|
---|
| 3217 | }
|
---|
| 3218 | }
|
---|
| 3219 | else if(n!=c){
|
---|
| 3220 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 3221 | ExbpNode chi = new ExbpNode(chi_node,clr,super_name);
|
---|
| 3222 | parent_node[i-1].addChild(chi);
|
---|
| 3223 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3224 | if(mapfactory.isSubLung){
|
---|
| 3225 |
|
---|
| 3226 | Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
|
---|
| 3227 | if(slot!=null){
|
---|
| 3228 | chi.key=slot.getRoleName();
|
---|
| 3229 | if(mapfactory.isSubLung){
|
---|
| 3230 | chi.key=slot.getSubRole();
|
---|
| 3231 | }
|
---|
| 3232 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3233 | }
|
---|
| 3234 | }
|
---|
| 3235 | else{
|
---|
| 3236 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3237 | if(slot!=null){
|
---|
| 3238 | chi.key=slot.getRoleName();
|
---|
| 3239 | if(mapfactory.isSubLung){
|
---|
| 3240 | chi.key=slot.getSubRole();
|
---|
| 3241 | }
|
---|
| 3242 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3243 | }
|
---|
| 3244 | }
|
---|
| 3245 |
|
---|
| 3246 | }
|
---|
| 3247 | else if(n==c){
|
---|
| 3248 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 3249 | ExbpNode chi = new ExbpNode(chi_node,clr,super_name);
|
---|
| 3250 | parent_node[i-1].addChild(chi);
|
---|
| 3251 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3252 |
|
---|
| 3253 | if(mapfactory.isSubLung){
|
---|
| 3254 | Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
|
---|
| 3255 | if(slot!=null){
|
---|
| 3256 | chi.key=slot.getRoleName();
|
---|
| 3257 | if(mapfactory.isSubLung){
|
---|
| 3258 | chi.key=slot.getSubRole();
|
---|
| 3259 | }
|
---|
| 3260 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3261 | }
|
---|
| 3262 | }
|
---|
| 3263 | else{
|
---|
| 3264 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3265 | if(slot!=null){
|
---|
| 3266 | chi.key=slot.getRoleName();
|
---|
| 3267 | if(mapfactory.isSubLung){
|
---|
| 3268 | chi.key=slot.getSubRole();
|
---|
| 3269 | }
|
---|
| 3270 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3271 | }
|
---|
| 3272 | }
|
---|
| 3273 |
|
---|
| 3274 | parent_node[i-1] = parent_node[i-1].children.firstElement();
|
---|
| 3275 | c=c+c;
|
---|
| 3276 | }
|
---|
| 3277 | n++;
|
---|
| 3278 | }
|
---|
| 3279 |
|
---|
| 3280 | nodes.removeAll(addlists);
|
---|
| 3281 |
|
---|
| 3282 | }
|
---|
| 3283 |
|
---|
| 3284 | // �スi�ス�ス1�スi�スフ場合�スフ関連�スT�スO�ス�ス�ス�ス
|
---|
| 3285 | else{
|
---|
| 3286 |
|
---|
| 3287 | System.out.println(" �スi�ス�ス1�スi�スフ場合�スフ関連�スT�スO : "+ super_node[1]);
|
---|
| 3288 |
|
---|
| 3289 | // #hirota �ス�ス�ス�スT�スO�スフ会ソス�スハ概�スO�スw�ス�スフとゑソス�スフ擾ソス�ス�ス
|
---|
| 3290 | Node par_node;
|
---|
| 3291 | String str2[] = super_node[1].split(";");
|
---|
| 3292 | boolean sub; //�ス�ス�スハ概�スO�スw�ス閧�ス�ス/�スネゑソス
|
---|
| 3293 |
|
---|
| 3294 | if(str2.length!=2){
|
---|
| 3295 | System.out.println(" �スP�スi�ス@�ス�ス�スハ概�スO�スw�ス�ス@�スネゑソス");
|
---|
| 3296 |
|
---|
| 3297 | par_node = null;
|
---|
| 3298 | sub=false;
|
---|
| 3299 |
|
---|
| 3300 | }else{
|
---|
| 3301 | System.out.println(" �スP�スi�ス@�ス�ス�スハ概�スO�スw�ス�ス@�ス�ス�ス�ス");
|
---|
| 3302 | String par_node_name=str2[1];
|
---|
| 3303 |
|
---|
| 3304 | if(mapfactory.isSubLung){
|
---|
| 3305 | par_node = bp.editorPanel.findNodeWithSubLang(par_node_name);
|
---|
| 3306 | }
|
---|
| 3307 | else{
|
---|
| 3308 | par_node = bp.editorPanel.findNode(par_node_name);
|
---|
| 3309 | }
|
---|
| 3310 | sub=true;
|
---|
| 3311 |
|
---|
| 3312 | }
|
---|
| 3313 |
|
---|
| 3314 | parent_node[i-1].key=str2[0];
|
---|
| 3315 | parent_node[i-1].opt=key_role; //#kozaki 2007/10/28
|
---|
| 3316 | Enumeration chi_en = nodes.elements();
|
---|
| 3317 | Vector addlists = new Vector();
|
---|
| 3318 |
|
---|
| 3319 | while(chi_en.hasMoreElements()){
|
---|
| 3320 |
|
---|
| 3321 | Node chi_node = (Node)chi_en.nextElement();
|
---|
| 3322 |
|
---|
| 3323 | // if( chi_node instanceof Node){
|
---|
| 3324 | // System.out.println("node : " );
|
---|
| 3325 | // }else if( chi_node instanceof Slot ){
|
---|
| 3326 | // System.out.println("slot : " ) ;
|
---|
| 3327 | //
|
---|
| 3328 | // }
|
---|
| 3329 |
|
---|
| 3330 |
|
---|
| 3331 |
|
---|
| 3332 | // �ス�ス�スハ概�スO�ス�ス�ス�ス@�スフとゑソス
|
---|
| 3333 | if(sub){
|
---|
| 3334 |
|
---|
| 3335 | if(mapfactory.isSubLung){
|
---|
| 3336 |
|
---|
| 3337 | if(chi_node.findSlotByRoleWithSubLang( str2[0]) != null && (chi_node.isSubclassOf(par_node))){
|
---|
| 3338 |
|
---|
| 3339 | System.out.println("�ス�ス�スハ概�スO�ス�ス�ス�ス@�ス�スi�ス@chi_node : " + chi_node.getLabel() );
|
---|
| 3340 |
|
---|
| 3341 | if(i==super_node.length-1){//":"�スフ擾ソス�ス�ス�ス�ス�スナ鯉ソスフ趣ソス�スヘ,�ス�ス�スフ擾ソス�ス�ス�スノ移ゑソス
|
---|
| 3342 | //�ス�ス�ス�ス�ス�スslot_role�スフ配�ス�ス�ス�ス�スツゑソス�ス轤キ�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 3343 | if(slot_role.length>1){
|
---|
| 3344 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3345 | for(int l=0;l<slot_role2.length;l++){
|
---|
| 3346 | slot_role2[l] = slot_role[l+1];
|
---|
| 3347 | }
|
---|
| 3348 |
|
---|
| 3349 | //ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
|
---|
| 3350 | ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2, super_node[i]);
|
---|
| 3351 | parent_node[i-1].addChild(chi);
|
---|
| 3352 | //
|
---|
| 3353 |
|
---|
| 3354 | //#kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3355 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3356 | if(slot!=null){
|
---|
| 3357 | chi.key=slot.getRoleName();
|
---|
| 3358 | if(mapfactory.isSubLung){
|
---|
| 3359 | chi.key=slot.getSubRole();
|
---|
| 3360 | }
|
---|
| 3361 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3362 | }
|
---|
| 3363 | }
|
---|
| 3364 | else{
|
---|
| 3365 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 3366 | ExbpNode chi = new ExbpNode(chi_node,clr, super_node[i]);
|
---|
| 3367 | parent_node[i-1].addChild(chi);
|
---|
| 3368 |
|
---|
| 3369 |
|
---|
| 3370 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3371 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3372 | if(slot!=null){
|
---|
| 3373 | chi.key=slot.getRoleName();
|
---|
| 3374 | if(mapfactory.isSubLung){
|
---|
| 3375 | chi.key=slot.getSubRole();
|
---|
| 3376 | }
|
---|
| 3377 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3378 | }
|
---|
| 3379 |
|
---|
| 3380 | }
|
---|
| 3381 | }
|
---|
| 3382 | else{
|
---|
| 3383 | ExbpNode chi = new ExbpNode(chi_node,clr,super_node[i] );
|
---|
| 3384 | parent_node[i-1].addChild(chi);
|
---|
| 3385 |
|
---|
| 3386 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3387 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3388 | if(slot!=null){
|
---|
| 3389 | chi.key=slot.getRoleName();
|
---|
| 3390 | if(mapfactory.isSubLung){
|
---|
| 3391 | chi.key=slot.getSubRole();
|
---|
| 3392 | }
|
---|
| 3393 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3394 | }
|
---|
| 3395 | addlists.add(chi_node);
|
---|
| 3396 |
|
---|
| 3397 | }
|
---|
| 3398 |
|
---|
| 3399 | }
|
---|
| 3400 | // Sub�ス�ス�ス�スネゑソス
|
---|
| 3401 | }else{
|
---|
| 3402 |
|
---|
| 3403 | if(chi_node.findSlotByRole( str2[0]) != null && (chi_node.isSubclassOf(par_node))){
|
---|
| 3404 |
|
---|
| 3405 | System.out.println("�ス�ス�スハ概�スO�ス�ス�ス�ス@�ス�スi�ス@chi_node : " + chi_node.getLabel() );
|
---|
| 3406 |
|
---|
| 3407 | if(i==super_node.length-1){//":"�スフ擾ソス�ス�ス�ス�ス�スナ鯉ソスフ趣ソス�スヘ,�ス�ス�スフ擾ソス�ス�ス�スノ移ゑソス
|
---|
| 3408 | //�ス�ス�ス�ス�ス�スslot_role�スフ配�ス�ス�ス�ス�スツゑソス�ス轤キ�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 3409 | if(slot_role.length>1){
|
---|
| 3410 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3411 | for(int l=0;l<slot_role2.length;l++){
|
---|
| 3412 | slot_role2[l] = slot_role[l+1];
|
---|
| 3413 | }
|
---|
| 3414 |
|
---|
| 3415 | //ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
|
---|
| 3416 | ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2, super_node[i]);
|
---|
| 3417 | parent_node[i-1].addChild(chi);
|
---|
| 3418 | //
|
---|
| 3419 |
|
---|
| 3420 | //#kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3421 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3422 | if(slot!=null){
|
---|
| 3423 | chi.key=slot.getRoleName();
|
---|
| 3424 | if(mapfactory.isSubLung){
|
---|
| 3425 | chi.key=slot.getSubRole();
|
---|
| 3426 | }
|
---|
| 3427 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3428 | }
|
---|
| 3429 | }
|
---|
| 3430 | else{
|
---|
| 3431 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 3432 | ExbpNode chi = new ExbpNode(chi_node,clr, super_node[i]);
|
---|
| 3433 | parent_node[i-1].addChild(chi);
|
---|
| 3434 |
|
---|
| 3435 |
|
---|
| 3436 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3437 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3438 | if(slot!=null){
|
---|
| 3439 | chi.key=slot.getRoleName();
|
---|
| 3440 | if(mapfactory.isSubLung){
|
---|
| 3441 | chi.key=slot.getSubRole();
|
---|
| 3442 | }
|
---|
| 3443 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3444 | }
|
---|
| 3445 |
|
---|
| 3446 | }
|
---|
| 3447 | }
|
---|
| 3448 | else{
|
---|
| 3449 | ExbpNode chi = new ExbpNode(chi_node,clr,super_node[i] );
|
---|
| 3450 | parent_node[i-1].addChild(chi);
|
---|
| 3451 |
|
---|
| 3452 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3453 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3454 | if(slot!=null){
|
---|
| 3455 | chi.key=slot.getRoleName();
|
---|
| 3456 | if(mapfactory.isSubLung){
|
---|
| 3457 | chi.key=slot.getSubRole();
|
---|
| 3458 | }
|
---|
| 3459 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3460 | }
|
---|
| 3461 | addlists.add(chi_node);
|
---|
| 3462 |
|
---|
| 3463 | }
|
---|
| 3464 |
|
---|
| 3465 | }
|
---|
| 3466 |
|
---|
| 3467 | }
|
---|
| 3468 |
|
---|
| 3469 |
|
---|
| 3470 | }
|
---|
| 3471 |
|
---|
| 3472 |
|
---|
| 3473 | // �ス�ス�スハ概�スO�スネゑソス�ス@�スフとゑソス
|
---|
| 3474 | else{
|
---|
| 3475 |
|
---|
| 3476 | // sub
|
---|
| 3477 | if(mapfactory.isSubLung){
|
---|
| 3478 | if(chi_node.findSlotByRoleWithSubLang( super_node[i]) != null){
|
---|
| 3479 |
|
---|
| 3480 | System.out.println(" chi_node : " + chi_node.getLabel() );
|
---|
| 3481 |
|
---|
| 3482 | if(i==super_node.length-1){//":"�スフ擾ソス�ス�ス�ス�ス�スナ鯉ソスフ趣ソス�スヘ,�ス�ス�スフ擾ソス�ス�ス�スノ移ゑソス
|
---|
| 3483 | //�ス�ス�ス�ス�ス�スslot_role�スフ配�ス�ス�ス�ス�スツゑソス�ス轤キ�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 3484 | if(slot_role.length>1){
|
---|
| 3485 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3486 | for(int l=0;l<slot_role2.length;l++){
|
---|
| 3487 | slot_role2[l] = slot_role[l+1];
|
---|
| 3488 | }
|
---|
| 3489 |
|
---|
| 3490 | //ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
|
---|
| 3491 | ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2, super_node[i]);
|
---|
| 3492 | parent_node[i-1].addChild(chi);
|
---|
| 3493 | //
|
---|
| 3494 |
|
---|
| 3495 | //#kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3496 | Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
|
---|
| 3497 | if(slot!=null){
|
---|
| 3498 | chi.key=slot.getRoleName();
|
---|
| 3499 | if(mapfactory.isSubLung){
|
---|
| 3500 | chi.key=slot.getSubRole();
|
---|
| 3501 | }
|
---|
| 3502 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3503 | }
|
---|
| 3504 | }
|
---|
| 3505 | else{
|
---|
| 3506 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 3507 | ExbpNode chi = new ExbpNode(chi_node,clr, super_node[i]);
|
---|
| 3508 | parent_node[i-1].addChild(chi);
|
---|
| 3509 |
|
---|
| 3510 |
|
---|
| 3511 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3512 | Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel() ).firstElement();
|
---|
| 3513 | if(slot!=null){
|
---|
| 3514 | chi.key=slot.getRoleName();
|
---|
| 3515 | if(mapfactory.isSubLung){
|
---|
| 3516 | chi.key=slot.getSubRole();
|
---|
| 3517 | }
|
---|
| 3518 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3519 | }
|
---|
| 3520 |
|
---|
| 3521 | }
|
---|
| 3522 | }
|
---|
| 3523 | else{
|
---|
| 3524 | ExbpNode chi = new ExbpNode(chi_node,clr,super_node[i] );
|
---|
| 3525 | parent_node[i-1].addChild(chi);
|
---|
| 3526 |
|
---|
| 3527 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3528 | Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
|
---|
| 3529 | if(slot!=null){
|
---|
| 3530 | chi.key=slot.getRoleName();
|
---|
| 3531 | if(mapfactory.isSubLung){
|
---|
| 3532 | chi.key=slot.getSubRole();
|
---|
| 3533 | }
|
---|
| 3534 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3535 | }
|
---|
| 3536 | addlists.add(chi_node);
|
---|
| 3537 |
|
---|
| 3538 | }
|
---|
| 3539 |
|
---|
| 3540 | }
|
---|
| 3541 |
|
---|
| 3542 | }
|
---|
| 3543 | // �スm�ス[�ス}�ス�ス
|
---|
| 3544 | else{
|
---|
| 3545 | if(chi_node.findSlotByRole( super_node[i]) != null){
|
---|
| 3546 |
|
---|
| 3547 | System.out.println(" chi_node : " + chi_node.getLabel() );
|
---|
| 3548 |
|
---|
| 3549 | if(i==super_node.length-1){//":"�スフ擾ソス�ス�ス�ス�ス�スナ鯉ソスフ趣ソス�スヘ,�ス�ス�スフ擾ソス�ス�ス�スノ移ゑソス
|
---|
| 3550 | //�ス�ス�ス�ス�ス�スslot_role�スフ配�ス�ス�ス�ス�スツゑソス�ス轤キ�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 3551 | if(slot_role.length>1){
|
---|
| 3552 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3553 | for(int l=0;l<slot_role2.length;l++){
|
---|
| 3554 | slot_role2[l] = slot_role[l+1];
|
---|
| 3555 | }
|
---|
| 3556 |
|
---|
| 3557 | //ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
|
---|
| 3558 | ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2, super_node[i]);
|
---|
| 3559 | parent_node[i-1].addChild(chi);
|
---|
| 3560 | //
|
---|
| 3561 |
|
---|
| 3562 | //#kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3563 | if( !(chi_node.findSlotsByClassConst(this.getLabel())).isEmpty()){
|
---|
| 3564 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3565 | if(slot!=null){
|
---|
| 3566 | chi.key=slot.getRoleName();
|
---|
| 3567 | if(mapfactory.isSubLung){
|
---|
| 3568 | chi.key=slot.getSubRole();
|
---|
| 3569 | }
|
---|
| 3570 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3571 | }
|
---|
| 3572 | }else{
|
---|
| 3573 | System.out.println(" :"+this.getLabel());
|
---|
| 3574 | }
|
---|
| 3575 | }
|
---|
| 3576 | else{
|
---|
| 3577 | //ExbpNode chi = new ExbpNode(chi_node,clr,"");
|
---|
| 3578 | ExbpNode chi = new ExbpNode(chi_node,clr, super_node[i]);
|
---|
| 3579 | parent_node[i-1].addChild(chi);
|
---|
| 3580 |
|
---|
| 3581 |
|
---|
| 3582 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3583 | if( !(chi_node.findSlotsByClassConst(this.getLabel())).isEmpty()){
|
---|
| 3584 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3585 | if(slot!=null){
|
---|
| 3586 | chi.key=slot.getRoleName();
|
---|
| 3587 | if(mapfactory.isSubLung){
|
---|
| 3588 | chi.key=slot.getSubRole();
|
---|
| 3589 | }
|
---|
| 3590 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3591 | }
|
---|
| 3592 | }
|
---|
| 3593 | }
|
---|
| 3594 | }
|
---|
| 3595 | else{
|
---|
| 3596 | ExbpNode chi = new ExbpNode(chi_node,clr,super_node[i] );
|
---|
| 3597 | parent_node[i-1].addChild(chi);
|
---|
| 3598 |
|
---|
| 3599 | // #kozaki 2007/09/07�ス@�スF�スI�スv�スV�ス�ス�ス�ス�スナ配�スu�ス�ス�ス�ス�スロゑソスKEY�ス�スSlot�スフ�ソス�ス[�ス�ス�ス�ス�スノゑソス�ス�ス
|
---|
| 3600 | Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
|
---|
| 3601 | if(slot!=null){
|
---|
| 3602 | chi.key=slot.getRoleName();
|
---|
| 3603 | if(mapfactory.isSubLung){
|
---|
| 3604 | chi.key=slot.getSubRole();
|
---|
| 3605 | }
|
---|
| 3606 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3607 | }
|
---|
| 3608 | addlists.add(chi_node);
|
---|
| 3609 |
|
---|
| 3610 | }
|
---|
| 3611 |
|
---|
| 3612 | }
|
---|
| 3613 | }
|
---|
| 3614 |
|
---|
| 3615 |
|
---|
| 3616 | }
|
---|
| 3617 | }
|
---|
| 3618 |
|
---|
| 3619 | nodes.removeAll(addlists);
|
---|
| 3620 | }
|
---|
| 3621 |
|
---|
| 3622 | if(i<super_node.length-1){
|
---|
| 3623 | if(parent_node[i-1].children.size()>0){
|
---|
| 3624 | parent_node[i]=parent_node[i-1].children.firstElement();
|
---|
| 3625 | }
|
---|
| 3626 | else{
|
---|
| 3627 | parent_node[i]=new ExbpNode("---",0,0,0,0);
|
---|
| 3628 | parent_node[i-1].addChild(parent_node[i]);
|
---|
| 3629 | }
|
---|
| 3630 | }
|
---|
| 3631 | }
|
---|
| 3632 | }
|
---|
| 3633 | }
|
---|
| 3634 |
|
---|
| 3635 | //
|
---|
| 3636 | // ? depend-on
|
---|
| 3637 | //
|
---|
| 3638 |
|
---|
| 3639 | // �ス@�ス�ス
|
---|
| 3640 | // #hirota 11/26 �ス�ス�スンの趣ソス�ス_�ス�スNode�スフとゑソス�スANode�スフス�ス�ス�スb�スg�ス�スRH�ス�ス\�ス�ス
|
---|
| 3641 | else if(key_role.equals("any-h")){
|
---|
| 3642 |
|
---|
| 3643 | System.out.println(" * any-RH :: " );
|
---|
| 3644 |
|
---|
| 3645 | // #hirota new
|
---|
| 3646 | //
|
---|
| 3647 | // //�スp�ス�ス�ス�ス�ストゑソス�ス�スX�ス�ス�スb�スg�ス�スホ象にゑソス�ス�ス
|
---|
| 3648 | // if(inh){
|
---|
| 3649 | //
|
---|
| 3650 | // System.out.println(" : inheri yes");
|
---|
| 3651 | //
|
---|
| 3652 | // // �ス�ス�スフ概�スO�スナ抵ソス`�ス�ス�ス黷ス�スA�ス�ス�ス皷サ�ス�ス�ス�ストゑソス�スネゑソス�スX�ス�ス�スb�スg�ス�ス�ス`�スF�スb�スN
|
---|
| 3653 | // Enumeration test = node.getAllSlots().elements();
|
---|
| 3654 | // while(test.hasMoreElements()){
|
---|
| 3655 | //
|
---|
| 3656 | // Slot slot = (Slot)test.nextElement();
|
---|
| 3657 | //
|
---|
| 3658 | //
|
---|
| 3659 | // // �スヌ会ソス
|
---|
| 3660 | // // 11/26 RH�ス窒フ趣ソス�スA�ス�ス�ス[�ス�ス�ス�ス�ス�ス�スg�ス�ス
|
---|
| 3661 | // String rh_label ="";
|
---|
| 3662 | // if( slot.getRHname().equals("") ){
|
---|
| 3663 | // rh_label= ((Slot)slot).getRoleName();
|
---|
| 3664 | // }
|
---|
| 3665 | // else{
|
---|
| 3666 | // rh_label= ((Slot)slot).getRHname() ;
|
---|
| 3667 | // }
|
---|
| 3668 | //
|
---|
| 3669 | //
|
---|
| 3670 | // // Node�ス@�スo�ス^�ス�ス�ス�ス
|
---|
| 3671 | // if(slot_role.length>1){
|
---|
| 3672 | // String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3673 | // for(int i=0;i<slot_role2.length;i++){
|
---|
| 3674 | // slot_role2[i] = slot_role[i+1];
|
---|
| 3675 | // }
|
---|
| 3676 | // ExbpNode chi = new ExbpNode( slot.getNodeRH(),clr,bp,slot_role2,"ISA");
|
---|
| 3677 | // //chi.setLabel(rh_label);
|
---|
| 3678 | // this.addChild(chi);
|
---|
| 3679 | // chi.key=rh_label;
|
---|
| 3680 | // chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3681 | //
|
---|
| 3682 | // }
|
---|
| 3683 | // else{
|
---|
| 3684 | // ExbpNode chi = new ExbpNode( slot.getNodeRH(),clr,"IS_A");
|
---|
| 3685 | // //chi.setLabel(rh_label);
|
---|
| 3686 | // this.addChild(chi);
|
---|
| 3687 | // chi.key=rh_label;
|
---|
| 3688 | // chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3689 | //
|
---|
| 3690 | // }
|
---|
| 3691 | //
|
---|
| 3692 | //
|
---|
| 3693 | // /*�ス@#kozaki�ス@2007/12/29�ス@�スG�ス�ス�ス[�ス�ス�スo�ス驍ゥ�ス�スR�ス�ス�ス�ス�スg�スA�スE�スg
|
---|
| 3694 | // // #hirota 12/28 -inh�ス�ス�ス�スフとゑソス�スA�スq�スg�スフク�ス�ス�スX�ス�ス�スェゑソス�スツス�ス�ス�スb�スg�ス�ス�ス\�ス�ス�ス�ス�ス�ス
|
---|
| 3695 | //
|
---|
| 3696 | // Enumeration RH_CC_Slot = slot.getCCNode().getSlots().elements();
|
---|
| 3697 | // while( RH_CC_Slot.hasMoreElements()){
|
---|
| 3698 | //
|
---|
| 3699 | // Slot temp = (Slot)RH_CC_Slot.nextElement();
|
---|
| 3700 | //
|
---|
| 3701 | // System.out.println(" Node : " + temp.getClassConst() + " :" + temp.getRoleName() );
|
---|
| 3702 | //
|
---|
| 3703 | // // Node�ス@�スo�ス^�ス�ス�ス�ス
|
---|
| 3704 | // if(slot_role.length>1){
|
---|
| 3705 | // String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3706 | // for(int i=0;i<slot_role2.length;i++){
|
---|
| 3707 | // slot_role2[i] = slot_role[i+1];
|
---|
| 3708 | // }
|
---|
| 3709 | // ExbpNode chi = new ExbpNode( temp.getCCNode() ,clr,bp,slot_role2,slot.getRoleName());
|
---|
| 3710 | // this.addChild(chi);
|
---|
| 3711 | // }
|
---|
| 3712 | // else{
|
---|
| 3713 | // ExbpNode chi = new ExbpNode( temp.getCCNode() ,clr,slot.getRoleName());
|
---|
| 3714 | // this.addChild(chi);
|
---|
| 3715 | // }
|
---|
| 3716 | //
|
---|
| 3717 | // }
|
---|
| 3718 | //
|
---|
| 3719 | //
|
---|
| 3720 | // }
|
---|
| 3721 | //
|
---|
| 3722 | // }
|
---|
| 3723 | //
|
---|
| 3724 | // //
|
---|
| 3725 | // // �スp�ス�ス�ス�ス�ストゑソス�ス�スX�ス�ス�スb�スg�ス�スホ象にゑソス�スネゑソス
|
---|
| 3726 | // else{
|
---|
| 3727 |
|
---|
| 3728 | Enumeration slot_en = node.slots.elements();
|
---|
| 3729 |
|
---|
| 3730 | while( slot_en.hasMoreElements() ){
|
---|
| 3731 | Slot slot = (Slot)slot_en.nextElement();
|
---|
| 3732 |
|
---|
| 3733 |
|
---|
| 3734 | // �スヌ会ソス
|
---|
| 3735 | // 11/26 RH�ス窒フ趣ソス�スA�ス�ス�ス[�ス�ス�ス�ス�ス�ス�スg�ス�ス
|
---|
| 3736 | String rh_label ="";
|
---|
| 3737 | if( slot.getRHname().equals("") ){
|
---|
| 3738 | rh_label= ((Slot)slot).getRoleName();
|
---|
| 3739 |
|
---|
| 3740 | }
|
---|
| 3741 | else{
|
---|
| 3742 | rh_label= ((Slot)slot).getRHname() ;
|
---|
| 3743 | }
|
---|
| 3744 | //System.out.println( rh_label);
|
---|
| 3745 |
|
---|
| 3746 | // Node�ス@�スo�ス^�ス�ス�ス�ス
|
---|
| 3747 | if(slot_role.length>1){
|
---|
| 3748 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3749 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 3750 | slot_role2[i] = slot_role[i+1];
|
---|
| 3751 | }
|
---|
| 3752 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
|
---|
| 3753 | //chi.setLabel(rh_label+"[RH]");
|
---|
| 3754 | this.addChild(chi);
|
---|
| 3755 | chi.key=rh_label;
|
---|
| 3756 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3757 |
|
---|
| 3758 | }
|
---|
| 3759 | else{
|
---|
| 3760 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr, rh_label+"[RH]");
|
---|
| 3761 | //chi.setLabel(rh_label+"[RH]");
|
---|
| 3762 | this.addChild(chi);
|
---|
| 3763 | chi.key=rh_label;
|
---|
| 3764 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3765 |
|
---|
| 3766 | }
|
---|
| 3767 |
|
---|
| 3768 |
|
---|
| 3769 | }
|
---|
| 3770 |
|
---|
| 3771 |
|
---|
| 3772 | }
|
---|
| 3773 |
|
---|
| 3774 | //
|
---|
| 3775 | // ?�ス@depend on �ス@�ス�ス
|
---|
| 3776 | // # hirota �スR�ス�ス�スe�スL�スX�スg�ス�ス�ス�ス�スo�ス�ス
|
---|
| 3777 | else if(key_role.equals("++s")){
|
---|
| 3778 |
|
---|
| 3779 | System.out.println(" ++s ::");
|
---|
| 3780 |
|
---|
| 3781 | if( node instanceof NodeRH){
|
---|
| 3782 | //node = ((NodeRH)node).getRoleSlot();
|
---|
| 3783 |
|
---|
| 3784 | if(slot_role.length>1){
|
---|
| 3785 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3786 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 3787 | slot_role2[i] = slot_role[i+1];
|
---|
| 3788 | }
|
---|
| 3789 | ExbpNode chi = new ExbpNode(((NodeRH)node).getRoleSlot().getWholeNodeRoot(),clr,bp,slot_role2,"---");
|
---|
| 3790 | this.addChild(chi);
|
---|
| 3791 | chi.key="Context";
|
---|
| 3792 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3793 |
|
---|
| 3794 | }
|
---|
| 3795 | else{
|
---|
| 3796 | ExbpNode chi = new ExbpNode(((NodeRH)node).getRoleSlot().getWholeNodeRoot(),clr,"---");
|
---|
| 3797 | this.addChild(chi);
|
---|
| 3798 | chi.key="Context";
|
---|
| 3799 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 3800 |
|
---|
| 3801 | }
|
---|
| 3802 | }
|
---|
| 3803 |
|
---|
| 3804 |
|
---|
| 3805 | }
|
---|
| 3806 |
|
---|
| 3807 |
|
---|
| 3808 | //
|
---|
| 3809 | // playable �スヨ係
|
---|
| 3810 | //
|
---|
| 3811 |
|
---|
| 3812 | //
|
---|
| 3813 | // ?�ス@�ス�ス
|
---|
| 3814 | //
|
---|
| 3815 |
|
---|
| 3816 | // #hirota 08/6/24
|
---|
| 3817 | // all
|
---|
| 3818 | else if(key_role.equals("++P")){
|
---|
| 3819 |
|
---|
| 3820 | if( ! (node instanceof NodeRH)){
|
---|
| 3821 |
|
---|
| 3822 | System.out.println(" ++P(" + node.getLabel() + ")" + " :: ");
|
---|
| 3823 |
|
---|
| 3824 | Vector nodes;
|
---|
| 3825 | // #kozaki 2008/08/11�ス@�スT�スu�ス�ス�ス�スフ趣ソス�ス�ス�ス�ス�スフ�ソス�スx�ス�ス�スナ鯉ソス�ス�ス�ス�ス�ス�スホよい
|
---|
| 3826 | // if(mapfactory.isSubLung){
|
---|
| 3827 | // nodes = bp.findReferringNodesWithSub(this.getHozoNode().getSubLabel() );
|
---|
| 3828 | // }
|
---|
| 3829 | // else{
|
---|
| 3830 | nodes = bp.findReferringNodes(this.getHozoNode().getLabel());
|
---|
| 3831 | // }
|
---|
| 3832 |
|
---|
| 3833 | Enumeration nodes_en = nodes.elements();
|
---|
| 3834 | while(nodes_en.hasMoreElements()){
|
---|
| 3835 |
|
---|
| 3836 | Node temp = (Node)nodes_en.nextElement();
|
---|
| 3837 | //System.out.println(" test :: " + temp.getLabel());
|
---|
| 3838 | Vector List = temp.findSlotsByClassConst(node.getLabel());
|
---|
| 3839 | Enumeration List_en = List.elements();
|
---|
| 3840 | while(List_en.hasMoreElements()){
|
---|
| 3841 |
|
---|
| 3842 | Slot slot = (Slot)List_en.nextElement();
|
---|
| 3843 | //System.out.println(" test_slot :: " + slot.getRoleName());
|
---|
| 3844 |
|
---|
| 3845 |
|
---|
| 3846 |
|
---|
| 3847 | // Node�スo�ス^�ス�ス�ス�ス
|
---|
| 3848 | if(slot_role.length>1){
|
---|
| 3849 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3850 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 3851 | slot_role2[i] = slot_role[i+1];
|
---|
| 3852 | }
|
---|
| 3853 |
|
---|
| 3854 | if(mapfactory.isSubLung){
|
---|
| 3855 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, ((Slot)slot).getRoleName());
|
---|
| 3856 | this.addChild(chi);
|
---|
| 3857 | //chi.setLabel(rh_label);
|
---|
| 3858 | chi.key="[playable]"+((Slot)slot).getRoleName();
|
---|
| 3859 | chi.opt=key_role;
|
---|
| 3860 |
|
---|
| 3861 | }else{
|
---|
| 3862 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, ((Slot)slot).getRoleName());
|
---|
| 3863 | this.addChild(chi);
|
---|
| 3864 | //chi.setLabel(rh_label);
|
---|
| 3865 | chi.key="[playable]"+((Slot)slot).getRoleName();
|
---|
| 3866 | chi.opt=key_role;
|
---|
| 3867 | }
|
---|
| 3868 |
|
---|
| 3869 |
|
---|
| 3870 |
|
---|
| 3871 | }
|
---|
| 3872 | else{
|
---|
| 3873 |
|
---|
| 3874 | if(mapfactory.isSubLung){
|
---|
| 3875 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,((Slot)slot).getRoleName());
|
---|
| 3876 | this.addChild(chi);
|
---|
| 3877 | //chi.setLabel(rh_label);
|
---|
| 3878 | chi.key="[playable]"+((Slot)slot).getRoleName();
|
---|
| 3879 | chi.opt=key_role;
|
---|
| 3880 | }
|
---|
| 3881 | else{
|
---|
| 3882 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr, ((Slot)slot).getRoleName());
|
---|
| 3883 | //chi.setLabel(rh_label);
|
---|
| 3884 | this.addChild(chi);
|
---|
| 3885 | chi.key="[playable]"+((Slot)slot).getRoleName();
|
---|
| 3886 | chi.opt=key_role;
|
---|
| 3887 | }
|
---|
| 3888 |
|
---|
| 3889 |
|
---|
| 3890 |
|
---|
| 3891 | }
|
---|
| 3892 | }
|
---|
| 3893 | }
|
---|
| 3894 | }
|
---|
| 3895 | }
|
---|
| 3896 | // label �スw�ス�ス
|
---|
| 3897 | else if(key_role.startsWith("++p")){
|
---|
| 3898 |
|
---|
| 3899 | String str[] = key_role.split(":");
|
---|
| 3900 | String Label = str[1];
|
---|
| 3901 | System.out.println(" ++p:Label :: " + Label);
|
---|
| 3902 |
|
---|
| 3903 | if( ! (node instanceof NodeRH)){
|
---|
| 3904 |
|
---|
| 3905 | System.out.println(" ++P(" + node.getLabel() + ")" + " :: ");
|
---|
| 3906 |
|
---|
| 3907 | Vector nodes;
|
---|
| 3908 | //
|
---|
| 3909 | // if(mapfactory.isSubLung){
|
---|
| 3910 | // nodes = bp.findReferringNodesWithSub(this.getHozoNode().getSubLabel() );
|
---|
| 3911 | // }
|
---|
| 3912 | // else{
|
---|
| 3913 | nodes = bp.findReferringNodes(this.getHozoNode().getLabel());
|
---|
| 3914 | // }
|
---|
| 3915 |
|
---|
| 3916 | Enumeration nodes_en = nodes.elements();
|
---|
| 3917 | while(nodes_en.hasMoreElements()){
|
---|
| 3918 |
|
---|
| 3919 | Node temp = (Node)nodes_en.nextElement();
|
---|
| 3920 | //System.out.println(" test :: " + temp.getLabel());
|
---|
| 3921 | Vector List = temp.findSlotsByClassConst(node.getLabel());
|
---|
| 3922 | Enumeration List_en = List.elements();
|
---|
| 3923 | while(List_en.hasMoreElements()){
|
---|
| 3924 |
|
---|
| 3925 | Slot slot = (Slot)List_en.nextElement();
|
---|
| 3926 | //System.out.println(" test_slot :: " + slot.getRoleName());
|
---|
| 3927 |
|
---|
| 3928 | if(slot.getRoleName().equals(Label)){
|
---|
| 3929 |
|
---|
| 3930 |
|
---|
| 3931 | // Node�スo�ス^�ス�ス�ス�ス
|
---|
| 3932 | if(slot_role.length>1){
|
---|
| 3933 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3934 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 3935 | slot_role2[i] = slot_role[i+1];
|
---|
| 3936 | }
|
---|
| 3937 |
|
---|
| 3938 | if(mapfactory.isSubLung){
|
---|
| 3939 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, "---");
|
---|
| 3940 | this.addChild(chi);
|
---|
| 3941 | //chi.setLabel(rh_label);
|
---|
| 3942 | chi.key="[playable]"+slot.getRoleName();
|
---|
| 3943 | chi.opt=key_role;
|
---|
| 3944 |
|
---|
| 3945 | }else{
|
---|
| 3946 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, "---");
|
---|
| 3947 | this.addChild(chi);
|
---|
| 3948 | //chi.setLabel(rh_label);
|
---|
| 3949 | chi.key="[playable]"+slot.getRoleName();
|
---|
| 3950 | chi.opt=key_role;
|
---|
| 3951 | }
|
---|
| 3952 |
|
---|
| 3953 |
|
---|
| 3954 |
|
---|
| 3955 | }
|
---|
| 3956 | else{
|
---|
| 3957 |
|
---|
| 3958 | if(mapfactory.isSubLung){
|
---|
| 3959 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,"---");
|
---|
| 3960 | this.addChild(chi);
|
---|
| 3961 | //chi.setLabel(rh_label);
|
---|
| 3962 | chi.key="[playable]"+slot.getRoleName();
|
---|
| 3963 | chi.opt=key_role;
|
---|
| 3964 | }
|
---|
| 3965 | else{
|
---|
| 3966 | ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr, "---");
|
---|
| 3967 | //chi.setLabel(rh_label);
|
---|
| 3968 | this.addChild(chi);
|
---|
| 3969 | chi.key="[playable]"+slot.getRoleName();
|
---|
| 3970 | chi.opt=key_role;
|
---|
| 3971 | }
|
---|
| 3972 |
|
---|
| 3973 |
|
---|
| 3974 |
|
---|
| 3975 | }
|
---|
| 3976 | }
|
---|
| 3977 | }
|
---|
| 3978 | }
|
---|
| 3979 | }
|
---|
| 3980 |
|
---|
| 3981 |
|
---|
| 3982 | }
|
---|
| 3983 |
|
---|
| 3984 |
|
---|
| 3985 | // ?�ス@playable �ス�ス
|
---|
| 3986 | // �スv�ス�ス�スC�ス�ス�ス[�スフ趣ソス�スo�ス�ス
|
---|
| 3987 | else if(key_role.equals("++c")){
|
---|
| 3988 |
|
---|
| 3989 | System.out.println(" ++c(player) :: ");
|
---|
| 3990 |
|
---|
| 3991 | if( node instanceof NodeRH){
|
---|
| 3992 |
|
---|
| 3993 | // Node�ス@�スo�ス^�ス�ス�ス�ス
|
---|
| 3994 |
|
---|
| 3995 | if(slot_role.length>1){
|
---|
| 3996 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 3997 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 3998 | slot_role2[i] = slot_role[i+1];
|
---|
| 3999 | }
|
---|
| 4000 | ExbpNode chi = new ExbpNode( ((NodeRH)node).getCCNode() ,clr,bp,slot_role2,"---");
|
---|
| 4001 | this.addChild(chi);
|
---|
| 4002 | chi.key="player";
|
---|
| 4003 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 4004 | }
|
---|
| 4005 | else{
|
---|
| 4006 | ExbpNode chi = new ExbpNode(((NodeRH)node).getCCNode() ,clr,"---");
|
---|
| 4007 | this.addChild(chi);
|
---|
| 4008 | chi.key="player";
|
---|
| 4009 | chi.opt=key_role; //#kozaki 2007/10/28
|
---|
| 4010 | }
|
---|
| 4011 |
|
---|
| 4012 | }
|
---|
| 4013 | else if( node instanceof Node){
|
---|
| 4014 | System.out.println(" Node instance");
|
---|
| 4015 | }
|
---|
| 4016 |
|
---|
| 4017 |
|
---|
| 4018 |
|
---|
| 4019 | }
|
---|
| 4020 |
|
---|
| 4021 | //
|
---|
| 4022 | // ?�スヨ係�スT�スO�スフ趣ソス�スo�ス�ス
|
---|
| 4023 | //
|
---|
| 4024 |
|
---|
| 4025 | // ++r:Lable
|
---|
| 4026 | else if(key_role.startsWith("++r:")){
|
---|
| 4027 |
|
---|
| 4028 | String str[] = key_role.split(":");
|
---|
| 4029 | String Label = str[1];
|
---|
| 4030 | System.out.println(" ++r:Label :: " + Label);
|
---|
| 4031 |
|
---|
| 4032 | if( node instanceof NodeRH){
|
---|
| 4033 |
|
---|
| 4034 | if( ((NodeRH)node).getRoleSlot().getLinkConst( ((NodeRH)node).getRoleSlot()) != null){
|
---|
| 4035 |
|
---|
| 4036 | Vector rel = ((NodeRH)node).getRoleSlot().getLinkConst( ((NodeRH)node).getRoleSlot());
|
---|
| 4037 |
|
---|
| 4038 | Enumeration rel_en = rel.elements();
|
---|
| 4039 | while(rel_en.hasMoreElements()){
|
---|
| 4040 |
|
---|
| 4041 | Link link = (Link)rel_en.nextElement();
|
---|
| 4042 | System.out.println(" Link :: " + link.getLabel() );
|
---|
| 4043 |
|
---|
| 4044 | Enumeration en = link.Arcs.elements();
|
---|
| 4045 | while(en.hasMoreElements()){
|
---|
| 4046 |
|
---|
| 4047 | Arc temp = (Arc)en.nextElement();
|
---|
| 4048 | System.out.println(" Link_print :: " + temp.getLabel() + " node ::" + ((Slot)temp.getNode()).getRoleName() );
|
---|
| 4049 |
|
---|
| 4050 | if(temp.getLabel().equals(Label) && !node.equals(temp.getNode())){
|
---|
| 4051 | Node node_temp = (Node)temp.getNode();
|
---|
| 4052 | //System.out.println(" Link_OK :: " + ((Slot)node_temp).getRoleName() );
|
---|
| 4053 | key = "[ "+ link.getLabel()+ " ]" + " �ス�ス "+temp.getLabel();
|
---|
| 4054 |
|
---|
| 4055 | // �スヌ会ソス
|
---|
| 4056 | // 11/26 RH�ス窒フ趣ソス�スA�ス�ス�ス[�ス�ス�ス�ス�ス�ス�スg�ス�ス
|
---|
| 4057 | String rh_label ="";
|
---|
| 4058 | if( ((Slot)node_temp).getRHname().equals("") ){
|
---|
| 4059 | rh_label= ((Slot)node_temp).getRoleName();
|
---|
| 4060 | }
|
---|
| 4061 | else{
|
---|
| 4062 | rh_label= ((Slot)node_temp).getRHname();
|
---|
| 4063 | }
|
---|
| 4064 |
|
---|
| 4065 | // Node�スo�ス^�ス�ス�ス�ス
|
---|
| 4066 | if(slot_role.length>1){
|
---|
| 4067 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 4068 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 4069 | slot_role2[i] = slot_role[i+1];
|
---|
| 4070 | }
|
---|
| 4071 |
|
---|
| 4072 | if(mapfactory.isSubLung){
|
---|
| 4073 | ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
|
---|
| 4074 | //chi.setLabel(rh_label);
|
---|
| 4075 | this.addChild(chi);
|
---|
| 4076 | chi.key=key;
|
---|
| 4077 | chi.opt=link.getLabel();
|
---|
| 4078 |
|
---|
| 4079 | }else{
|
---|
| 4080 | ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
|
---|
| 4081 | //chi.setLabel(rh_label);
|
---|
| 4082 | this.addChild(chi);
|
---|
| 4083 | chi.key=key;
|
---|
| 4084 | chi.opt=link.getLabel();
|
---|
| 4085 | }
|
---|
| 4086 |
|
---|
| 4087 |
|
---|
| 4088 |
|
---|
| 4089 | }
|
---|
| 4090 | else{
|
---|
| 4091 |
|
---|
| 4092 | if(mapfactory.isSubLung){
|
---|
| 4093 | ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr, rh_label+"[RH]");
|
---|
| 4094 | //chi.setLabel(rh_label);
|
---|
| 4095 | this.addChild(chi);
|
---|
| 4096 | chi.key=key;
|
---|
| 4097 | chi.opt=link.getLabel();
|
---|
| 4098 | }
|
---|
| 4099 | else{
|
---|
| 4100 | ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr, rh_label+"[RH]");
|
---|
| 4101 | //chi.setLabel(rh_label);
|
---|
| 4102 | this.addChild(chi);
|
---|
| 4103 | chi.key=key;
|
---|
| 4104 | chi.opt=link.getLabel();
|
---|
| 4105 | }
|
---|
| 4106 |
|
---|
| 4107 |
|
---|
| 4108 |
|
---|
| 4109 | }
|
---|
| 4110 | }
|
---|
| 4111 |
|
---|
| 4112 | }
|
---|
| 4113 |
|
---|
| 4114 |
|
---|
| 4115 |
|
---|
| 4116 | }
|
---|
| 4117 |
|
---|
| 4118 |
|
---|
| 4119 | }
|
---|
| 4120 |
|
---|
| 4121 |
|
---|
| 4122 |
|
---|
| 4123 | }
|
---|
| 4124 |
|
---|
| 4125 | }
|
---|
| 4126 |
|
---|
| 4127 | // ++R �スS�ス�ス�ス�ス�スo�ス�ス
|
---|
| 4128 | else if(key_role.equals("++R")){
|
---|
| 4129 |
|
---|
| 4130 | System.out.println(" ++R :: " );
|
---|
| 4131 |
|
---|
| 4132 | if( node instanceof NodeRH){
|
---|
| 4133 |
|
---|
| 4134 | if( ((NodeRH)node).getRoleSlot().getLinkConst( ((NodeRH)node).getRoleSlot()) != null){
|
---|
| 4135 |
|
---|
| 4136 | Vector rel = ((NodeRH)node).getRoleSlot().getLinkConst( ((NodeRH)node).getRoleSlot());
|
---|
| 4137 |
|
---|
| 4138 | Enumeration rel_en = rel.elements();
|
---|
| 4139 | while(rel_en.hasMoreElements()){
|
---|
| 4140 |
|
---|
| 4141 | Link link = (Link)rel_en.nextElement();
|
---|
| 4142 | System.out.println(" Link_OK :: " + link.getLabel() );
|
---|
| 4143 |
|
---|
| 4144 | Enumeration en = link.Arcs.elements();
|
---|
| 4145 | while(en.hasMoreElements()){
|
---|
| 4146 |
|
---|
| 4147 | Arc temp = (Arc)en.nextElement();
|
---|
| 4148 | System.out.println(" Link_print :: " + temp.getLabel() + " node ::" + ((Slot)temp.getNode()).getRoleName() );
|
---|
| 4149 |
|
---|
| 4150 | Node node_temp = (Node)temp.getNode();
|
---|
| 4151 | //System.out.println(" Link_OK :: " + ((Slot)node_temp).getRoleName() );
|
---|
| 4152 | key = "[ "+ link.getLabel()+ " ]" + " �ス�ス "+temp.getLabel();
|
---|
| 4153 |
|
---|
| 4154 | // �スヌ会ソス
|
---|
| 4155 | // 11/26 RH�ス窒フ趣ソス�スA�ス�ス�ス[�ス�ス�ス�ス�ス�ス�スg�ス�ス
|
---|
| 4156 | String rh_label ="";
|
---|
| 4157 | if( ((Slot)node_temp).getRHname().equals("") ){
|
---|
| 4158 | rh_label= ((Slot)node_temp).getRoleName();
|
---|
| 4159 | }
|
---|
| 4160 | else{
|
---|
| 4161 | rh_label= ((Slot)node_temp).getRHname();
|
---|
| 4162 | }
|
---|
| 4163 |
|
---|
| 4164 | // Node�スo�ス^�ス�ス�ス�ス
|
---|
| 4165 | if(slot_role.length>1){
|
---|
| 4166 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 4167 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 4168 | slot_role2[i] = slot_role[i+1];
|
---|
| 4169 | }
|
---|
| 4170 |
|
---|
| 4171 | if(mapfactory.isSubLung){
|
---|
| 4172 | ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
|
---|
| 4173 | //chi.setLabel(rh_label);
|
---|
| 4174 | this.addChild(chi);
|
---|
| 4175 | chi.key=key;
|
---|
| 4176 | chi.opt=link.getLabel();
|
---|
| 4177 |
|
---|
| 4178 | }else{
|
---|
| 4179 | ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
|
---|
| 4180 | //chi.setLabel(rh_label);
|
---|
| 4181 | this.addChild(chi);
|
---|
| 4182 | chi.key=key;
|
---|
| 4183 | chi.opt=link.getLabel();
|
---|
| 4184 | }
|
---|
| 4185 |
|
---|
| 4186 |
|
---|
| 4187 |
|
---|
| 4188 | }
|
---|
| 4189 | else{
|
---|
| 4190 |
|
---|
| 4191 | if(mapfactory.isSubLung){
|
---|
| 4192 | ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr, rh_label+"[RH]");
|
---|
| 4193 | //chi.setLabel(rh_label);
|
---|
| 4194 | this.addChild(chi);
|
---|
| 4195 | chi.key=key;
|
---|
| 4196 | chi.opt=link.getLabel();
|
---|
| 4197 | }
|
---|
| 4198 | else{
|
---|
| 4199 | ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr, rh_label+"[RH]");
|
---|
| 4200 | //chi.setLabel(rh_label);
|
---|
| 4201 | this.addChild(chi);
|
---|
| 4202 | chi.key=key;
|
---|
| 4203 | chi.opt=link.getLabel();
|
---|
| 4204 | }
|
---|
| 4205 |
|
---|
| 4206 |
|
---|
| 4207 |
|
---|
| 4208 | }
|
---|
| 4209 |
|
---|
| 4210 | }
|
---|
| 4211 |
|
---|
| 4212 | }
|
---|
| 4213 |
|
---|
| 4214 |
|
---|
| 4215 | }
|
---|
| 4216 |
|
---|
| 4217 |
|
---|
| 4218 |
|
---|
| 4219 | }
|
---|
| 4220 |
|
---|
| 4221 | }
|
---|
| 4222 |
|
---|
| 4223 | // #hirota 08/09/03 �スZ�ス�スT�スO�スフ趣ソス�スo�ス�ス(super+isa)
|
---|
| 4224 | else if(key_role.startsWith("super_isa")){
|
---|
| 4225 |
|
---|
| 4226 |
|
---|
| 4227 |
|
---|
| 4228 | }
|
---|
| 4229 |
|
---|
| 4230 | // �スN�ス�ス�スX�ス�ス�ス�ス�スH�ス髀茨ソス�ス�ス@#kozaki�ス@2008/08/12�スX�スV
|
---|
| 4231 | // #hirota 08/08/019 only RH add
|
---|
| 4232 | else if(key_role.startsWith("_")){
|
---|
| 4233 |
|
---|
| 4234 | key_role = key_role.substring(1);
|
---|
| 4235 |
|
---|
| 4236 |
|
---|
| 4237 | // �スN�ス�ス�スX�ス�ス�ス�ス�スH�ス髀茨ソス�ス�ス@#kozaki�ス@2008/08/12�スX�スV
|
---|
| 4238 | Vector match_data = new Vector();
|
---|
| 4239 | Vector match_slots = new Vector();
|
---|
| 4240 | Vector match_cc_nodes = new Vector();
|
---|
| 4241 | Vector match_keys = new Vector();
|
---|
| 4242 |
|
---|
| 4243 | Enumeration slot_en;
|
---|
| 4244 |
|
---|
| 4245 | if(key_role.startsWith("*") ){
|
---|
| 4246 | //#kozaki 2008/08/17�ス@�スR�ス}�ス�ス�スh�ス�スany�ス{�スホ象ゑソスRH�スフ趣ソス�スフ擾ソス�ス�ス
|
---|
| 4247 | if(key_role.equals("*any") && node instanceof NodeRH){
|
---|
| 4248 | NodeRH rh_node =(NodeRH)node;
|
---|
| 4249 | Vector rh_slots;
|
---|
| 4250 | rh_slots = rh_node.getAllSlotsWithSubSlots();
|
---|
| 4251 | rh_slots.addAll(rh_node.getRoleSlot().whole_node.getAllSlotsWithSubSlots());
|
---|
| 4252 | slot_en = rh_slots.elements();
|
---|
| 4253 | }
|
---|
| 4254 | else {
|
---|
| 4255 | slot_en = node.getAllSlotsWithSubSlots().elements();
|
---|
| 4256 | }
|
---|
| 4257 | key_role=key_role.substring(1);
|
---|
| 4258 |
|
---|
| 4259 | // System.out.println("*�スフ擾ソス�ス�ス"+this.getLabel());
|
---|
| 4260 | // //#kozaki 2008/08/16�ス@IS-A�スナ会ソス�ス�ス�ス�ス�ストゑソス�ス�ス�スニゑソス�スヘ,�ス�スハのノ�ス[�スh�ス�ス�ス辜奇ソス�ス�スN�ス�ス�スo�ス�ス�ス�ス�ス�ス�ス�スヌ会ソス
|
---|
| 4261 | // //if(this.key.equals(ExbpNode.IS_A)){
|
---|
| 4262 | // if(this.parent!=null){
|
---|
| 4263 | // System.out.println("IS-A�スナ会ソス�ス�ス�ス�ス�ストゑソス�ス�ス�スニゑソス�スヘ,�ス�スハのノ�ス[�スh�ス�ス�ス辜奇ソス�ス�スN�ス�ス�スo�ス�ス�ス�ス�ス�ス:"+this.getLabel());
|
---|
| 4264 | // if(this.parent!=null){
|
---|
| 4265 | // ExbpNode dummy = new ExbpNode(0,0,0,0);
|
---|
| 4266 | // dummy.setDummyNode(true);
|
---|
| 4267 | // this.parent.addChild(dummy);
|
---|
| 4268 | //
|
---|
| 4269 | // ExbpNode chi = new ExbpNode(node.parent,clr,bp,slot_role,"-");
|
---|
| 4270 | // chi.key=key_role.substring(1);
|
---|
| 4271 | // dummy.addChild(chi);
|
---|
| 4272 | // }
|
---|
| 4273 | // slot_en = node.slots.elements();
|
---|
| 4274 | // slot_en = node.getSlotsAll().elements();
|
---|
| 4275 | // }
|
---|
| 4276 | // else{
|
---|
| 4277 | // slot_en = node.getAllSlotsWithSubSlots().elements();
|
---|
| 4278 | // key_role=key_role.substring(1);
|
---|
| 4279 | // }
|
---|
| 4280 | }else{
|
---|
| 4281 | //#kozaki 2008/08/17�ス@�スR�ス}�ス�ス�スh�ス�スany�ス{�スホ象ゑソスRH�スフ趣ソス�スフ擾ソス�ス�ス
|
---|
| 4282 | if(key_role.equals("any") && node instanceof NodeRH){
|
---|
| 4283 | NodeRH rh_node =(NodeRH)node;
|
---|
| 4284 | Vector rh_slots;
|
---|
| 4285 | rh_slots = rh_node.getSlotsAll();
|
---|
| 4286 | rh_slots.addAll(rh_node.getRoleSlot().whole_node.getSlotsAll());
|
---|
| 4287 | slot_en = rh_slots.elements();
|
---|
| 4288 | }
|
---|
| 4289 | else{
|
---|
| 4290 | //slot_en = node.slots.elements();
|
---|
| 4291 | slot_en = node.getSlotsAll().elements();
|
---|
| 4292 | }
|
---|
| 4293 | }
|
---|
| 4294 |
|
---|
| 4295 | while(slot_en.hasMoreElements()){
|
---|
| 4296 | Slot slot = (Slot)slot_en.nextElement();
|
---|
| 4297 | //#kozaki�ス@2008/02/14�ス@�ス�スハス�ス�ス�スb�スg�ス�スH�ス�ス�スト擾ソス�ス�ス�ス�スr�ス�ス�ス髀茨ソス�ス�ス�スヌ会ソス
|
---|
| 4298 | Enumeration par_slots = slot.getParents().elements();
|
---|
| 4299 | boolean isMatch = false;
|
---|
| 4300 | String match_key =key_role;
|
---|
| 4301 | while(par_slots.hasMoreElements()){
|
---|
| 4302 | Slot par_slot = (Slot)par_slots.nextElement();
|
---|
| 4303 | //#kozaki 2008/03/22�ス@�スT�スu�ス�ス�ス齒茨ソス�ス
|
---|
| 4304 | String role_name = par_slot.getRoleName();
|
---|
| 4305 | if(mapfactory.isSubLung){
|
---|
| 4306 | role_name = par_slot.getSubRole();
|
---|
| 4307 | }
|
---|
| 4308 | //if(key_role.indexOf(role_name)>-1){
|
---|
| 4309 | if(key_role.indexOf(role_name)>-1 || key_role.equals("any")){
|
---|
| 4310 | isMatch = true;
|
---|
| 4311 | if(par_slot.equals(slot)){
|
---|
| 4312 | match_key = role_name;
|
---|
| 4313 | }
|
---|
| 4314 | else{
|
---|
| 4315 | match_key = role_name+"("+slot.getRoleName()+")";
|
---|
| 4316 | if(mapfactory.isSubLung){
|
---|
| 4317 | match_key = role_name+"("+slot.getSubRole()+")";
|
---|
| 4318 | }
|
---|
| 4319 | }
|
---|
| 4320 | break;
|
---|
| 4321 | }
|
---|
| 4322 | // if(key_role.indexOf(par_slot.getRoleName())>-1){
|
---|
| 4323 | // isMatch = true;
|
---|
| 4324 | // if(par_slot.equals(slot)){
|
---|
| 4325 | // match_key = par_slot.getRoleName();
|
---|
| 4326 | // }
|
---|
| 4327 | // else{
|
---|
| 4328 | // match_key = par_slot.getRoleName()+"("+
|
---|
| 4329 | // slot.getRoleName()+")";
|
---|
| 4330 | // }
|
---|
| 4331 | // break;
|
---|
| 4332 | // }
|
---|
| 4333 | }
|
---|
| 4334 |
|
---|
| 4335 | //#kozaki�ス@2008/08/12�ス@�ス�ス�スフ段�ス�スExbpNode�ス�ス�ス�ス�ス�ス�ス�ス�ス�スマ更
|
---|
| 4336 |
|
---|
| 4337 | if(isMatch || key_role.equals("any")){
|
---|
| 4338 |
|
---|
| 4339 | if(slot.isOrClassConst()){
|
---|
| 4340 | List orClassConstList = slot.getClassConstNodeList();
|
---|
| 4341 | for (int i = 0; i < orClassConstList.size(); i++) {
|
---|
| 4342 | Node slot_node = (Node) orClassConstList.get(i);
|
---|
| 4343 | if(slot!=null && slot_node!=null){
|
---|
| 4344 | //#kozaki 2008/08/16�ス@CC�ス�ス�ス�ス�ス�ス�スN�ス�ス�スX�スフ趣ソス�スヘ表�ス�ス�ス�ス�スネゑソス
|
---|
| 4345 | //if(!match_cc_nodes.contains(slot_node)){
|
---|
| 4346 | //if(!match_data.contains(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key)){
|
---|
| 4347 | if(!match_data.contains(slot_node.getLabel())){
|
---|
| 4348 | match_data.add(slot_node.getLabel());
|
---|
| 4349 | //match_data.add(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key);
|
---|
| 4350 | match_slots.add(slot);
|
---|
| 4351 | match_cc_nodes.add(slot_node);
|
---|
| 4352 | match_keys.add(match_key);
|
---|
| 4353 | }
|
---|
| 4354 | else{//�スハゑソスKey�スナマ�スb�ス`�ス�ス�ス�ス�スニゑソス�スノは,match_key�ス�ス�スX�スV
|
---|
| 4355 | int index = match_data.indexOf(slot_node.getLabel());
|
---|
| 4356 | //int index = match_cc_nodes.indexOf(slot_node);
|
---|
| 4357 | String key = (String)match_keys.elementAt(index);
|
---|
| 4358 | if(key.indexOf(match_key)<0){
|
---|
| 4359 | key += ","+match_key;
|
---|
| 4360 | match_keys.remove(index);
|
---|
| 4361 | match_keys.add(index, key);
|
---|
| 4362 | }
|
---|
| 4363 | }
|
---|
| 4364 | }
|
---|
| 4365 | }
|
---|
| 4366 | }else{
|
---|
| 4367 | Node slot_node = (Node)bp.editorPanel.hzeditor.findClassConstNode(slot.getClassConst());
|
---|
| 4368 | //#kozaki�ス@2008/08/12�ス@�ス�ス�スT�スO�スホ会ソス
|
---|
| 4369 | if(slot_node==null){
|
---|
| 4370 | if(slot.getClassConst().startsWith("#")){
|
---|
| 4371 | slot_node = (Node)bp.editorPanel.hzeditor.findClassConstNode(slot.getClassConst().substring(1));
|
---|
| 4372 | }
|
---|
| 4373 | }
|
---|
| 4374 | if(slot!=null && slot_node!=null){
|
---|
| 4375 | // #kozaki 2008/08/16�ス@CC�ス�ス�ス�ス�ス�ス�スN�ス�ス�スX�スフ趣ソス�スヘ表�ス�ス�ス�ス�スネゑソス
|
---|
| 4376 | //if(!match_cc_nodes.contains(slot_node)){
|
---|
| 4377 | //if(!match_data.contains(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key)){
|
---|
| 4378 | if(!match_data.contains(slot_node.getLabel())){
|
---|
| 4379 | match_data.add(slot_node.getLabel());
|
---|
| 4380 | //match_data.add(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key);
|
---|
| 4381 | match_slots.add(slot);
|
---|
| 4382 | match_cc_nodes.add(slot_node);
|
---|
| 4383 | match_keys.add(match_key);
|
---|
| 4384 | }
|
---|
| 4385 | else{//�スハゑソスKey�スナマ�スb�ス`�ス�ス�ス�ス�スニゑソス�スノは,match_key�ス�ス�スX�スV
|
---|
| 4386 | int index = match_data.indexOf(slot_node.getLabel());
|
---|
| 4387 | //int index = match_cc_nodes.indexOf(slot_node);
|
---|
| 4388 | String key = (String)match_keys.elementAt(index);
|
---|
| 4389 | if(key.indexOf(match_key)<0){
|
---|
| 4390 | key += ","+match_key;
|
---|
| 4391 | match_keys.remove(index);
|
---|
| 4392 | match_keys.add(index, key);
|
---|
| 4393 | }
|
---|
| 4394 | }
|
---|
| 4395 | }
|
---|
| 4396 | }
|
---|
| 4397 | }
|
---|
| 4398 | }
|
---|
| 4399 |
|
---|
| 4400 |
|
---|
| 4401 | Vector<String> rh_nodes = new Vector<String>();
|
---|
| 4402 | for(int i=0;i<match_slots.size();i++){
|
---|
| 4403 | Slot slot = (Slot)match_slots.elementAt(i);
|
---|
| 4404 |
|
---|
| 4405 | Node rh_node = null;
|
---|
| 4406 | // RH�ス�ス�ス�スニゑソス�スCCC�スツゑソス�ス�スネゑソス
|
---|
| 4407 | if(!slot.getRHname().equals("")){
|
---|
| 4408 |
|
---|
| 4409 | rh_node = bp.editorPanel.hzeditor.findRH(slot.getRHname());
|
---|
| 4410 | if(rh_node!=null){
|
---|
| 4411 | if(!rh_nodes.contains(slot.getRHname())
|
---|
| 4412 | && !match_data.contains(slot.getRHname()) ){
|
---|
| 4413 | makeExbpNodeCC(this, //�スe�スニなゑソスExbpNode
|
---|
| 4414 | slot, //�スH�ス�スホ象となゑソスX�ス�ス�スb�スg
|
---|
| 4415 | rh_node, //�スN�ス�ス�スX�ス�ス�ス�スニゑソス�スト参�スニゑソス�ストゑソス�ス�スm�ス[�スh
|
---|
| 4416 | node, //�スH�ス�スX�ス�ス�スb�スg�ス�ス�ス�ス�スツノ�ス[�スh
|
---|
| 4417 | key_role, //�スH�ス�スR�ス}�ス�ス�スh
|
---|
| 4418 | (String)match_keys.elementAt(i),//�ス�スv�ス�ス�ス�ス�スR�ス}�ス�ス�スh�スi�ス�スハス�ス�ス�スb�スg�スフ擾ソス�ス�ス�スp�スj
|
---|
| 4419 | slot_role, //�ス�ス�ス�ス�ス�ス�スフコ�ス}�ス�ス�スh
|
---|
| 4420 | clr, //�スm�ス[�スh�スフ色
|
---|
| 4421 | bp );
|
---|
| 4422 | }
|
---|
| 4423 | rh_nodes.addElement(slot.getRHname());
|
---|
| 4424 | }
|
---|
| 4425 | }
|
---|
| 4426 | // RH�ス�スフとゑソス�スCCCnode�ス�ャ
|
---|
| 4427 | else{
|
---|
| 4428 |
|
---|
| 4429 | makeExbpNodeCC(this, //�スe�スニなゑソスExbpNode
|
---|
| 4430 | slot, //�スH�ス�スホ象となゑソスX�ス�ス�スb�スg
|
---|
| 4431 | (Node)match_cc_nodes.elementAt(i), //�スN�ス�ス�スX�ス�ス�ス�スニゑソス�スト参�スニゑソス�ストゑソス�ス�スm�ス[�スh
|
---|
| 4432 | node, //�スH�ス�スX�ス�ス�スb�スg�ス�ス�ス�ス�スツノ�ス[�スh
|
---|
| 4433 | key_role, //�スH�ス�スR�ス}�ス�ス�スh
|
---|
| 4434 | (String)match_keys.elementAt(i), //�ス�スv�ス�ス�ス�ス�スR�ス}�ス�ス�スh�スi�ス�スハス�ス�ス�スb�スg�スフ擾ソス�ス�ス�スp�スj
|
---|
| 4435 | slot_role, //�ス�ス�ス�ス�ス�ス�スフコ�ス}�ス�ス�スh
|
---|
| 4436 | clr, //�スm�ス[�スh�スフ色
|
---|
| 4437 | bp );
|
---|
| 4438 |
|
---|
| 4439 | }
|
---|
| 4440 | }
|
---|
| 4441 |
|
---|
| 4442 |
|
---|
| 4443 |
|
---|
| 4444 | }
|
---|
| 4445 | // �スN�ス�ス�スX�ス�ス�ス�ス�スH�ス髀茨ソス�ス�ス@#kozaki�ス@2008/08/12�スX�スV
|
---|
| 4446 | // #hirota 08/08/19 �スN�ス�ス�スX�ス�ス�ス�スフみ表�ス�ス
|
---|
| 4447 | else{
|
---|
| 4448 |
|
---|
| 4449 | Vector match_data = new Vector();
|
---|
| 4450 | Vector match_slots = new Vector();
|
---|
| 4451 | Vector match_cc_nodes = new Vector();
|
---|
| 4452 | Vector match_keys = new Vector();
|
---|
| 4453 |
|
---|
| 4454 | Enumeration slot_en;
|
---|
| 4455 |
|
---|
| 4456 | if(key_role.startsWith("*") ){
|
---|
| 4457 | //#kozaki 2008/08/17�ス@�スR�ス}�ス�ス�スh�ス�スany�ス{�スホ象ゑソスRH�スフ趣ソス�スフ擾ソス�ス�ス
|
---|
| 4458 | if(key_role.equals("*any") && node instanceof NodeRH){
|
---|
| 4459 | NodeRH rh_node =(NodeRH)node;
|
---|
| 4460 | Vector rh_slots;
|
---|
| 4461 | rh_slots = rh_node.getAllSlotsWithSubSlots();
|
---|
| 4462 | rh_slots.addAll(rh_node.getRoleSlot().whole_node.getAllSlotsWithSubSlots());
|
---|
| 4463 | slot_en = rh_slots.elements();
|
---|
| 4464 | }
|
---|
| 4465 | else {
|
---|
| 4466 | slot_en = node.getAllSlotsWithSubSlots().elements();
|
---|
| 4467 | }
|
---|
| 4468 | key_role=key_role.substring(1);
|
---|
| 4469 |
|
---|
| 4470 | // System.out.println("*�スフ擾ソス�ス�ス"+this.getLabel());
|
---|
| 4471 | // //#kozaki 2008/08/16�ス@IS-A�スナ会ソス�ス�ス�ス�ス�ストゑソス�ス�ス�スニゑソス�スヘ,�ス�スハのノ�ス[�スh�ス�ス�ス辜奇ソス�ス�スN�ス�ス�スo�ス�ス�ス�ス�ス�ス�ス�スヌ会ソス
|
---|
| 4472 | // //if(this.key.equals(ExbpNode.IS_A)){
|
---|
| 4473 | // if(this.parent!=null){
|
---|
| 4474 | // System.out.println("IS-A�スナ会ソス�ス�ス�ス�ス�ストゑソス�ス�ス�スニゑソス�スヘ,�ス�スハのノ�ス[�スh�ス�ス�ス辜奇ソス�ス�スN�ス�ス�スo�ス�ス�ス�ス�ス�ス:"+this.getLabel());
|
---|
| 4475 | // if(this.parent!=null){
|
---|
| 4476 | // ExbpNode dummy = new ExbpNode(0,0,0,0);
|
---|
| 4477 | // dummy.setDummyNode(true);
|
---|
| 4478 | // this.parent.addChild(dummy);
|
---|
| 4479 | //
|
---|
| 4480 | // ExbpNode chi = new ExbpNode(node.parent,clr,bp,slot_role,"-");
|
---|
| 4481 | // chi.key=key_role.substring(1);
|
---|
| 4482 | // dummy.addChild(chi);
|
---|
| 4483 | // }
|
---|
| 4484 | // slot_en = node.slots.elements();
|
---|
| 4485 | // slot_en = node.getSlotsAll().elements();
|
---|
| 4486 | // }
|
---|
| 4487 | // else{
|
---|
| 4488 | // slot_en = node.getAllSlotsWithSubSlots().elements();
|
---|
| 4489 | // key_role=key_role.substring(1);
|
---|
| 4490 | // }
|
---|
| 4491 | }else{
|
---|
| 4492 | //#kozaki 2008/08/17�ス@�スR�ス}�ス�ス�スh�ス�スany�ス{�スホ象ゑソスRH�スフ趣ソス�スフ擾ソス�ス�ス
|
---|
| 4493 | if(key_role.equals("any") && node instanceof NodeRH){
|
---|
| 4494 | NodeRH rh_node =(NodeRH)node;
|
---|
| 4495 | Vector rh_slots;
|
---|
| 4496 | rh_slots = rh_node.getSlotsAll();
|
---|
| 4497 | rh_slots.addAll(rh_node.getRoleSlot().whole_node.getSlotsAll());
|
---|
| 4498 | slot_en = rh_slots.elements();
|
---|
| 4499 | }
|
---|
| 4500 | else{
|
---|
| 4501 | //slot_en = node.slots.elements();
|
---|
| 4502 | slot_en = node.getSlotsAll().elements();
|
---|
| 4503 | }
|
---|
| 4504 | }
|
---|
| 4505 |
|
---|
| 4506 | while(slot_en.hasMoreElements()){
|
---|
| 4507 | Slot slot = (Slot)slot_en.nextElement();
|
---|
| 4508 | //#kozaki�ス@2008/02/14�ス@�ス�スハス�ス�ス�スb�スg�ス�スH�ス�ス�スト擾ソス�ス�ス�ス�スr�ス�ス�ス髀茨ソス�ス�ス�スヌ会ソス
|
---|
| 4509 | Enumeration par_slots = slot.getParents().elements();
|
---|
| 4510 | boolean isMatch = false;
|
---|
| 4511 | String match_key =key_role;
|
---|
| 4512 | while(par_slots.hasMoreElements()){
|
---|
| 4513 | Slot par_slot = (Slot)par_slots.nextElement();
|
---|
| 4514 | //#kozaki 2008/03/22�ス@�スT�スu�ス�ス�ス齒茨ソス�ス
|
---|
| 4515 | String role_name = par_slot.getRoleName();
|
---|
| 4516 | if(mapfactory.isSubLung){
|
---|
| 4517 | role_name = par_slot.getSubRole();
|
---|
| 4518 | }
|
---|
| 4519 | // #hirota
|
---|
| 4520 | //if(key_role.indexOf(role_name)>-1 ){
|
---|
| 4521 | if(key_role.indexOf(role_name)>-1 || key_role.equals("any")){
|
---|
| 4522 | isMatch = true;
|
---|
| 4523 | if(par_slot.equals(slot)){
|
---|
| 4524 | match_key = role_name;
|
---|
| 4525 | }
|
---|
| 4526 | else{
|
---|
| 4527 | match_key = role_name+"("+slot.getRoleName()+")";
|
---|
| 4528 | if(mapfactory.isSubLung){
|
---|
| 4529 | match_key = role_name+"("+slot.getSubRole()+")";
|
---|
| 4530 | }
|
---|
| 4531 | }
|
---|
| 4532 | break;
|
---|
| 4533 | }
|
---|
| 4534 | // if(key_role.indexOf(par_slot.getRoleName())>-1){
|
---|
| 4535 | // isMatch = true;
|
---|
| 4536 | // if(par_slot.equals(slot)){
|
---|
| 4537 | // match_key = par_slot.getRoleName();
|
---|
| 4538 | // }
|
---|
| 4539 | // else{
|
---|
| 4540 | // match_key = par_slot.getRoleName()+"("+
|
---|
| 4541 | // slot.getRoleName()+")";
|
---|
| 4542 | // }
|
---|
| 4543 | // break;
|
---|
| 4544 | // }
|
---|
| 4545 | }
|
---|
| 4546 |
|
---|
| 4547 | //#kozaki�ス@2008/08/12�ス@�ス�ス�スフ段�ス�スExbpNode�ス�ス�ス�ス�ス�ス�ス�ス�ス�スマ更
|
---|
| 4548 |
|
---|
| 4549 | if(isMatch || key_role.equals("any")){
|
---|
| 4550 |
|
---|
| 4551 | if(slot.isOrClassConst()){
|
---|
| 4552 | List orClassConstList = slot.getClassConstNodeList();
|
---|
| 4553 | for (int i = 0; i < orClassConstList.size(); i++) {
|
---|
| 4554 | Node slot_node = (Node) orClassConstList.get(i);
|
---|
| 4555 | if(slot!=null && slot_node!=null){
|
---|
| 4556 | //#kozaki 2008/08/16�ス@CC�ス�ス�ス�ス�ス�ス�スN�ス�ス�スX�スフ趣ソス�スヘ表�ス�ス�ス�ス�スネゑソス
|
---|
| 4557 | //if(!match_cc_nodes.contains(slot_node)){
|
---|
| 4558 | //if(!match_data.contains(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key)){
|
---|
| 4559 | if(!match_data.contains(slot_node.getLabel())){
|
---|
| 4560 | match_data.add(slot_node.getLabel());
|
---|
| 4561 | //match_data.add(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key);
|
---|
| 4562 | match_slots.add(slot);
|
---|
| 4563 | match_cc_nodes.add(slot_node);
|
---|
| 4564 | match_keys.add(match_key);
|
---|
| 4565 | }
|
---|
| 4566 | else{//�スハゑソスKey�スナマ�スb�ス`�ス�ス�ス�ス�スニゑソス�スノは,match_key�ス�ス�スX�スV
|
---|
| 4567 | int index = match_data.indexOf(slot_node.getLabel());
|
---|
| 4568 | //int index = match_cc_nodes.indexOf(slot_node);
|
---|
| 4569 | String key = (String)match_keys.elementAt(index);
|
---|
| 4570 | if(key.indexOf(match_key)<0){
|
---|
| 4571 | key += ","+match_key;
|
---|
| 4572 | match_keys.remove(index);
|
---|
| 4573 | match_keys.add(index, key);
|
---|
| 4574 | }
|
---|
| 4575 | }
|
---|
| 4576 | }
|
---|
| 4577 | }
|
---|
| 4578 | }else{
|
---|
| 4579 | Node slot_node = (Node)bp.editorPanel.hzeditor.findClassConstNode(slot.getClassConst());
|
---|
| 4580 | //#kozaki�ス@2008/08/12�ス@�ス�ス�スT�スO�スホ会ソス
|
---|
| 4581 | if(slot_node==null){
|
---|
| 4582 | if(slot.getClassConst().startsWith("#")){
|
---|
| 4583 | slot_node = (Node)bp.editorPanel.hzeditor.findClassConstNode(slot.getClassConst().substring(1));
|
---|
| 4584 | }
|
---|
| 4585 | }
|
---|
| 4586 | if(slot!=null && slot_node!=null){
|
---|
| 4587 | // #kozaki 2008/08/16�ス@CC�ス�ス�ス�ス�ス�ス�スN�ス�ス�スX�スフ趣ソス�スヘ表�ス�ス�ス�ス�スネゑソス
|
---|
| 4588 | //if(!match_cc_nodes.contains(slot_node)){
|
---|
| 4589 | //if(!match_data.contains(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key)){
|
---|
| 4590 | if(!match_data.contains(slot_node.getLabel())){
|
---|
| 4591 | match_data.add(slot_node.getLabel());
|
---|
| 4592 | //match_data.add(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key);
|
---|
| 4593 | match_slots.add(slot);
|
---|
| 4594 | match_cc_nodes.add(slot_node);
|
---|
| 4595 | match_keys.add(match_key);
|
---|
| 4596 | }
|
---|
| 4597 | else{//�スハゑソスKey�スナマ�スb�ス`�ス�ス�ス�ス�スニゑソス�スノは,match_key�ス�ス�スX�スV
|
---|
| 4598 | int index = match_data.indexOf(slot_node.getLabel());
|
---|
| 4599 | //int index = match_cc_nodes.indexOf(slot_node);
|
---|
| 4600 | String key = (String)match_keys.elementAt(index);
|
---|
| 4601 | if(key.indexOf(match_key)<0){
|
---|
| 4602 | key += ","+match_key;
|
---|
| 4603 | match_keys.remove(index);
|
---|
| 4604 | match_keys.add(index, key);
|
---|
| 4605 | }
|
---|
| 4606 | }
|
---|
| 4607 | }
|
---|
| 4608 | }
|
---|
| 4609 | }
|
---|
| 4610 | }
|
---|
| 4611 |
|
---|
| 4612 |
|
---|
| 4613 | Vector<String> rh_nodes = new Vector<String>();
|
---|
| 4614 | for(int i=0;i<match_slots.size();i++){
|
---|
| 4615 | Slot slot = (Slot)match_slots.elementAt(i);
|
---|
| 4616 |
|
---|
| 4617 | makeExbpNodeCC(this, //�スe�スニなゑソスExbpNode
|
---|
| 4618 | slot, //�スH�ス�スホ象となゑソスX�ス�ス�スb�スg
|
---|
| 4619 | (Node)match_cc_nodes.elementAt(i), //�スN�ス�ス�スX�ス�ス�ス�スニゑソス�スト参�スニゑソス�ストゑソス�ス�スm�ス[�スh
|
---|
| 4620 | node, //�スH�ス�スX�ス�ス�スb�スg�ス�ス�ス�ス�スツノ�ス[�スh
|
---|
| 4621 | key_role, //�スH�ス�スR�ス}�ス�ス�スh
|
---|
| 4622 | (String)match_keys.elementAt(i), //�ス�スv�ス�ス�ス�ス�スR�ス}�ス�ス�スh�スi�ス�スハス�ス�ス�スb�スg�スフ擾ソス�ス�ス�スp�スj
|
---|
| 4623 | slot_role, //�ス�ス�ス�ス�ス�ス�スフコ�ス}�ス�ス�スh
|
---|
| 4624 | clr, //�スm�ス[�スh�スフ色
|
---|
| 4625 | bp );
|
---|
| 4626 |
|
---|
| 4627 | Node rh_node = null;
|
---|
| 4628 |
|
---|
| 4629 | // #hirota RH�ス�ス�ス�ス�ス@�スp�スX
|
---|
| 4630 | // if(!slot.getRHname().equals("")){
|
---|
| 4631 | // rh_node = bp.editorPanel.hzeditor.findRH(slot.getRHname());
|
---|
| 4632 | // if(rh_node!=null){
|
---|
| 4633 | // if(!rh_nodes.contains(slot.getRHname())
|
---|
| 4634 | // && !match_data.contains(slot.getRHname()) ){
|
---|
| 4635 | // makeExbpNodeCC(this, //�スe�スニなゑソスExbpNode
|
---|
| 4636 | // slot, //�スH�ス�スホ象となゑソスX�ス�ス�スb�スg
|
---|
| 4637 | // rh_node, //�スN�ス�ス�スX�ス�ス�ス�スニゑソス�スト参�スニゑソス�ストゑソス�ス�スm�ス[�スh
|
---|
| 4638 | // node, //�スH�ス�スX�ス�ス�スb�スg�ス�ス�ス�ス�スツノ�ス[�スh
|
---|
| 4639 | // key_role, //�スH�ス�スR�ス}�ス�ス�スh
|
---|
| 4640 | // (String)match_keys.elementAt(i),//�ス�スv�ス�ス�ス�ス�スR�ス}�ス�ス�スh�スi�ス�スハス�ス�ス�スb�スg�スフ擾ソス�ス�ス�スp�スj
|
---|
| 4641 | // slot_role, //�ス�ス�ス�ス�ス�ス�スフコ�ス}�ス�ス�スh
|
---|
| 4642 | // clr, //�スm�ス[�スh�スフ色
|
---|
| 4643 | // bp );
|
---|
| 4644 | // }
|
---|
| 4645 | // rh_nodes.addElement(slot.getRHname());
|
---|
| 4646 | // }
|
---|
| 4647 | // }
|
---|
| 4648 | }
|
---|
| 4649 |
|
---|
| 4650 | }
|
---|
| 4651 |
|
---|
| 4652 | }
|
---|
| 4653 | */
|
---|
| 4654 | /*
|
---|
| 4655 | // #kozaki 2008/08/17�ス@�スX�ス�ス�スb�スg�スナ関連�ス�ス�ス�ス�スT�スO�ス�スH�ス髀茨ソス�ス�スヨの包ソス�ス�ス
|
---|
| 4656 | private void makeSlotRelatedExbpNode(ExbpNode par_exbpnode, Node node,Color clr,BrowsingPanel bp,String[] slot_role){
|
---|
| 4657 | //�スI�スv�スV�ス�ス�ス�ス�スフ擾ソス�ス�ス
|
---|
| 4658 | String super_name = slot_role[0].substring(2);
|
---|
| 4659 | Node par_node;
|
---|
| 4660 | if(mapfactory.isSubLung){
|
---|
| 4661 | par_node = bp.editorPanel.findNodeWithSubLang(super_name);
|
---|
| 4662 | }
|
---|
| 4663 | else{
|
---|
| 4664 | par_node = bp.editorPanel.findNode(super_name);
|
---|
| 4665 | }
|
---|
| 4666 |
|
---|
| 4667 | //�ス�ス�スフ段�スフゑソス�ス゚のコ�ス}�ス�ス�スh�ス�ス�ス�ス�ス轤キ
|
---|
| 4668 | String[] slot_role2 = null;
|
---|
| 4669 | if(slot_role.length>1){
|
---|
| 4670 | slot_role2 = new String[slot_role.length-1];
|
---|
| 4671 | for(int l=0;l<slot_role2.length;l++){
|
---|
| 4672 | slot_role2[l] = slot_role[l+1];
|
---|
| 4673 | }
|
---|
| 4674 | }
|
---|
| 4675 |
|
---|
| 4676 | //�スホ象となゑソスNode�ス�ス�ス�ス�スツ全�スN�ス�ス�スX�ス�ス�ス�スT�スO�スフ�ソス�スX�スg�ス�ス�ス謫セ
|
---|
| 4677 | Enumeration en = node.getSlotsAll().elements();
|
---|
| 4678 | Vector<Node> cc_nodes = new Vector<Node>();
|
---|
| 4679 | while(en.hasMoreElements()){
|
---|
| 4680 | Slot slot =(Slot)en.nextElement();
|
---|
| 4681 | if(slot.isOrClassConst()){
|
---|
| 4682 | cc_nodes.addAll(slot.getClassConstNodeList());
|
---|
| 4683 | }
|
---|
| 4684 | else if(slot.getClassConstNode()!=null){
|
---|
| 4685 | cc_nodes.add(slot.getClassConstNode());
|
---|
| 4686 | }
|
---|
| 4687 | }
|
---|
| 4688 |
|
---|
| 4689 | //�スヨ連�ス�ス�ス�スNode�スフ取得
|
---|
| 4690 | Enumeration en2 = cc_nodes.elements();
|
---|
| 4691 | Vector<Node> related_nodes = new Vector<Node>();
|
---|
| 4692 | Vector<String> added_nodes = new Vector<String>();
|
---|
| 4693 | while(en2.hasMoreElements()){
|
---|
| 4694 | Node cc_node = (Node)en2.nextElement();
|
---|
| 4695 | if(cc_node.getLabel().equals("Any")){
|
---|
| 4696 | continue;
|
---|
| 4697 | }
|
---|
| 4698 | related_nodes = bp.findReferringNodes(cc_node.getLabel());
|
---|
| 4699 |
|
---|
| 4700 | Enumeration chi_en = related_nodes.elements();
|
---|
| 4701 | while(chi_en.hasMoreElements()){
|
---|
| 4702 | Node chi_node = (Node)chi_en.nextElement();
|
---|
| 4703 | if(chi_node.isSubclassOf(par_node)||chi_node.equals(par_node)){
|
---|
| 4704 | if(!added_nodes.contains(chi_node.getLabel())){
|
---|
| 4705 | added_nodes.add(chi_node.getLabel());
|
---|
| 4706 | ExbpNode chi;
|
---|
| 4707 | if(slot_role2!=null){
|
---|
| 4708 | chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_name);
|
---|
| 4709 | }
|
---|
| 4710 | else{
|
---|
| 4711 | chi = new ExbpNode(chi_node,clr,super_name);
|
---|
| 4712 | }
|
---|
| 4713 | par_exbpnode.addChild(chi);
|
---|
| 4714 | chi.key="<"+cc_node.getLabel()+">";
|
---|
| 4715 | chi.opt="<"+super_name+">";
|
---|
| 4716 | }
|
---|
| 4717 | }
|
---|
| 4718 | }
|
---|
| 4719 | }
|
---|
| 4720 | }
|
---|
| 4721 |
|
---|
| 4722 |
|
---|
| 4723 | //#kozaki 2008/08/12�ス@�スN�ス�ス�スX�ス�ス�ス�ス�スH�ス髀茨ソス�ス�ス�スニ暦ソス
|
---|
| 4724 | private void makeExbpNodeCC(ExbpNode par_exbpnode, //�スe�スニなゑソスExbpNode
|
---|
| 4725 | Slot slot, //�スH�ス�スホ象となゑソスX�ス�ス�スb�スg
|
---|
| 4726 | Node slot_node, //�スN�ス�ス�スX�ス�ス�ス�スニゑソス�スト参�スニゑソス�ストゑソス�ス�スm�ス[�スh
|
---|
| 4727 | Node node, //�スH�ス�スX�ス�ス�スb�スg�ス�ス�ス�ス�スツノ�ス[�スh
|
---|
| 4728 | String key_role, //�スH�ス�スR�ス}�ス�ス�スh
|
---|
| 4729 | String match_key, //�ス�スv�ス�ス�ス�ス�スR�ス}�ス�ス�スh�スi�ス�スハス�ス�ス�スb�スg�スフ擾ソス�ス�ス�スp�スj
|
---|
| 4730 | String[] slot_role, //�ス�ス�ス�ス�ス�ス�スフコ�ス}�ス�ス�スh
|
---|
| 4731 | Color clr, //�スm�ス[�スh�スフ色
|
---|
| 4732 | BrowsingPanel bp
|
---|
| 4733 | ){
|
---|
| 4734 |
|
---|
| 4735 | //#kozaki 2008/02/09 Any�ス�ス�スN�ス�ス�スX�ス�ス�ス�スフ趣ソス�スヘス�スL�スb�スv�ス�ス�ス髀茨ソス�ス
|
---|
| 4736 | if(slot.getClassConst().startsWith("Any")){
|
---|
| 4737 | slot_node = null;
|
---|
| 4738 | }
|
---|
| 4739 |
|
---|
| 4740 | //#kozaki 2008/08/09�ス@�ス�ス�ス�ス�ス�ス�スg�ス�ス�スQ�スニゑソス�ストゑソス�ス�スX�ス�ス�スb�スg�ス�ス�スX�スL�スb�スv�ス�ス�ス髀茨ソス�ス
|
---|
| 4741 | if(slot_node==node){
|
---|
| 4742 | slot_node = null;
|
---|
| 4743 | }
|
---|
| 4744 |
|
---|
| 4745 | if(slot_node!=null){
|
---|
| 4746 | //System.out.println("�ス�ス�ス�ス�ス�ス�ス[�スv::check"+slot_node.getLabel());
|
---|
| 4747 | //slot_role�スフ配�ス�ス�ス�ス�スツゑソス�ス轤キ�ス�ス�ス�ス
|
---|
| 4748 | if(slot_role.length>1){
|
---|
| 4749 | String[] slot_role2 = new String[slot_role.length-1];
|
---|
| 4750 | for(int i=0;i<slot_role2.length;i++){
|
---|
| 4751 | slot_role2[i] = slot_role[i+1];
|
---|
| 4752 | }
|
---|
| 4753 |
|
---|
| 4754 | //�スワゑソス�スR�ス}�ス�ス�スh�ス�ス�ス�ス�ス�ス�スニゑソス�スフ擾ソス�ス�ス
|
---|
| 4755 | //if(slot_node!=null){
|
---|
| 4756 | ExbpNode chi = new ExbpNode(slot_node,clr,bp,slot_role2,slot.getRoleName());
|
---|
| 4757 | par_exbpnode.addChild(chi);
|
---|
| 4758 | //match_key = slot.getRoleName();
|
---|
| 4759 | if(mapfactory.isSubLung){
|
---|
| 4760 | match_key = slot.getSubRole();
|
---|
| 4761 | }
|
---|
| 4762 | chi.key=match_key;
|
---|
| 4763 | chi.opt=key_role;
|
---|
| 4764 | //}
|
---|
| 4765 | }
|
---|
| 4766 | else{
|
---|
| 4767 | ExbpNode chi = new ExbpNode(slot_node,clr,slot.getRoleName());
|
---|
| 4768 | par_exbpnode.addChild(chi);
|
---|
| 4769 | //match_key = slot.getRoleName();
|
---|
| 4770 | if(mapfactory.isSubLung){
|
---|
| 4771 | match_key = slot.getSubRole();
|
---|
| 4772 | }
|
---|
| 4773 | chi.key=match_key;
|
---|
| 4774 | chi.opt=key_role;
|
---|
| 4775 | }
|
---|
| 4776 | }
|
---|
| 4777 | }
|
---|
| 4778 |
|
---|
| 4779 | */
|
---|
| 4780 |
|
---|
| 4781 | public void setOrgNode(Object n){
|
---|
| 4782 | this.org_node = n;
|
---|
| 4783 | }
|
---|
| 4784 |
|
---|
| 4785 | public Object getOrgNode(){
|
---|
| 4786 | // if(this.org_node instanceof NodeRH){
|
---|
| 4787 | // return (NodeRH)this.org_node;
|
---|
| 4788 | // }
|
---|
| 4789 | // if(this.org_node instanceof Node){
|
---|
| 4790 | // return (Node)this.org_node;
|
---|
| 4791 | // }
|
---|
| 4792 | return this.org_node;
|
---|
| 4793 | }
|
---|
| 4794 |
|
---|
| 4795 | // layer�スナ指�ス閧オ�ス�ス�スi�ス�ス�スワでの葉�スフ搾ソス�スv�ス�ス�ス�スヤゑソス
|
---|
| 4796 | int getLeafNum(int layer){
|
---|
| 4797 | int leaf_num = 0;
|
---|
| 4798 | Vector<ExbpNode> nodes = new Vector<ExbpNode>();
|
---|
| 4799 | nodes.addElement(this);
|
---|
| 4800 | for(int i=1;i<=layer;i++){
|
---|
| 4801 | Enumeration<ExbpNode> en = nodes.elements();
|
---|
| 4802 | Vector<ExbpNode> nodes2 = new Vector<ExbpNode>();
|
---|
| 4803 | while(en.hasMoreElements()){
|
---|
| 4804 | ExbpNode node = en.nextElement();
|
---|
| 4805 | //Leaf�ス�ス�ス�ス�ス�ス�ス逅費ソス�ス�スP�スJ�スE�ス�ス�スg�ス�ス�ス�ス �スD�ス�ス�ス�ス�ス�ス�スナ終�スw�スii==layer�スj�スネらす�スラてカ�スE�ス�ス�スg
|
---|
| 4806 | if(node.getVisbleChildren().isEmpty() || i==layer){
|
---|
| 4807 | leaf_num++;
|
---|
| 4808 | //System.out.println("Leaf:::"+node.getLabel());
|
---|
| 4809 | }
|
---|
| 4810 | else{
|
---|
| 4811 | nodes2.addAll(node.getVisbleChildren());
|
---|
| 4812 | }
|
---|
| 4813 | }
|
---|
| 4814 | //�ス�ス�スフ段�スノ擾ソス�ス�ス�ス�ス�スレ行�ス�ス�ス驍ス�ス゚デ�ス[�ス^�ス�スn�ス�ス
|
---|
| 4815 | nodes = nodes2;
|
---|
| 4816 | }
|
---|
| 4817 |
|
---|
| 4818 | return leaf_num;
|
---|
| 4819 | }
|
---|
| 4820 |
|
---|
| 4821 |
|
---|
| 4822 |
|
---|
| 4823 |
|
---|
| 4824 |
|
---|
| 4825 | /* static void setColors(){
|
---|
| 4826 | node_color[0]=Color.yellow;
|
---|
| 4827 | node_color[1]=Color.orange;
|
---|
| 4828 | node_color[2]=Color.magenta;
|
---|
| 4829 | node_color[3]=Color.cyan;
|
---|
| 4830 | node_color[4]=Color.blue;
|
---|
| 4831 | node_color[5]=Color.green;
|
---|
| 4832 | node_color[6]=Color.pink;
|
---|
| 4833 | node_color[7]=Color.red;
|
---|
| 4834 | //node_color[]=Color.darkGray;
|
---|
| 4835 | node_color[8]=Color.lightGray;
|
---|
| 4836 | node_color[9]=Color.gray;
|
---|
| 4837 | }*/
|
---|
| 4838 |
|
---|
| 4839 | void setColorFont(Color c,Font f){
|
---|
| 4840 | color=c;
|
---|
| 4841 | font=f;
|
---|
| 4842 | }
|
---|
| 4843 |
|
---|
| 4844 | void setChildrenColor(Color c){
|
---|
| 4845 | this.color=c;
|
---|
| 4846 | Enumeration en = this.children.elements();
|
---|
| 4847 | while(en.hasMoreElements()){
|
---|
| 4848 | ExbpNode chi = (ExbpNode)en.nextElement();
|
---|
| 4849 | chi.setChildrenColor(c);
|
---|
| 4850 | }
|
---|
| 4851 |
|
---|
| 4852 | }
|
---|
| 4853 |
|
---|
| 4854 | void setChildrenVisible(boolean v){
|
---|
| 4855 | Enumeration en = this.children.elements();
|
---|
| 4856 | while(en.hasMoreElements()){
|
---|
| 4857 | ExbpNode chi = (ExbpNode)en.nextElement();
|
---|
| 4858 | chi.setVisbleChildren(v);
|
---|
| 4859 | }
|
---|
| 4860 |
|
---|
| 4861 | }
|
---|
| 4862 |
|
---|
| 4863 | void setRestrictedViewByTopic(ExtendBP exbp){
|
---|
| 4864 | this.setVisible(false);
|
---|
| 4865 | for(int i=0;i<this.topicColorList.size();i++){
|
---|
| 4866 | if(exbp.topicColorList.contains(topicColorList.get(i))){
|
---|
| 4867 | this.setVisibleTrueWithParent();
|
---|
| 4868 | break;
|
---|
| 4869 | }
|
---|
| 4870 | }
|
---|
| 4871 |
|
---|
| 4872 | Enumeration en = this.children.elements();
|
---|
| 4873 | while(en.hasMoreElements()){
|
---|
| 4874 | ExbpNode chi = (ExbpNode)en.nextElement();
|
---|
| 4875 | chi.setRestrictedViewByTopic(exbp);
|
---|
| 4876 | }
|
---|
| 4877 |
|
---|
| 4878 | }
|
---|
| 4879 | // void setChildrenColor_sus(){
|
---|
| 4880 | // this.color=c;
|
---|
| 4881 | // Enumeration en = this.children.elements();
|
---|
| 4882 | // while(en.hasMoreElements()){
|
---|
| 4883 | // ExbpNode chi = (ExbpNode)en.nextElement();
|
---|
| 4884 | // chi.setChildrenColor(c);
|
---|
| 4885 | // }
|
---|
| 4886 | //
|
---|
| 4887 | // }
|
---|
| 4888 |
|
---|
| 4889 | // �ス`�ス�スF�ス�ス�ス謫セ�ス�ス�ス�ス
|
---|
| 4890 | protected Color getColor() {
|
---|
| 4891 | return color;
|
---|
| 4892 | }
|
---|
| 4893 |
|
---|
| 4894 | //#kozaki 2008/10/05
|
---|
| 4895 | String getColorString(){
|
---|
| 4896 | if(this.getColor().equals(Color.orange)){
|
---|
| 4897 | return "orange";
|
---|
| 4898 | }
|
---|
| 4899 | else if(this.getColor().equals(Color.cyan)){
|
---|
| 4900 | return "cyan";
|
---|
| 4901 | }
|
---|
| 4902 | else if(this.getColor().equals(Color.pink)){
|
---|
| 4903 | return "pink";
|
---|
| 4904 | }
|
---|
| 4905 | else if(this.getColor().equals(Color.yellow)){
|
---|
| 4906 | return "yellow";
|
---|
| 4907 | }
|
---|
| 4908 | else if(this.getColor().equals(Color.green)){
|
---|
| 4909 | return "green";
|
---|
| 4910 | }
|
---|
| 4911 | else if(this.getColor().equals(Color.magenta)){
|
---|
| 4912 | return "magenta";
|
---|
| 4913 | }
|
---|
| 4914 | else if(this.getColor().equals(Color.lightGray)){
|
---|
| 4915 | return "lightGray";
|
---|
| 4916 | }
|
---|
| 4917 | else if(this.getColor().equals(Color.red)){
|
---|
| 4918 | return "red";
|
---|
| 4919 | }
|
---|
| 4920 | else if(this.getColor().equals(Color.blue)){
|
---|
| 4921 | return "blue";
|
---|
| 4922 | }
|
---|
| 4923 | else if(this.getColor().equals(Color.gray)){
|
---|
| 4924 | return "gray";
|
---|
| 4925 | }
|
---|
| 4926 |
|
---|
| 4927 | return "orange";
|
---|
| 4928 | }
|
---|
| 4929 |
|
---|
| 4930 | String getHighlitColorString(){
|
---|
| 4931 | if(this.highligjtColor==null){
|
---|
| 4932 | return "NULL";
|
---|
| 4933 | }
|
---|
| 4934 | if(this.highligjtColor.equals(Color.white)){
|
---|
| 4935 | return "NULL";
|
---|
| 4936 | }
|
---|
| 4937 | if(this.highligjtColor.equals(Color.orange)){
|
---|
| 4938 | return "orange";
|
---|
| 4939 | }
|
---|
| 4940 | else if(this.highligjtColor.equals(Color.cyan)){
|
---|
| 4941 | return "cyan";
|
---|
| 4942 | }
|
---|
| 4943 | else if(this.highligjtColor.equals(Color.pink)){
|
---|
| 4944 | return "pink";
|
---|
| 4945 | }
|
---|
| 4946 | else if(this.highligjtColor.equals(Color.yellow)){
|
---|
| 4947 | return "yellow";
|
---|
| 4948 | }
|
---|
| 4949 | else if(this.highligjtColor.equals(Color.green)){
|
---|
| 4950 | return "green";
|
---|
| 4951 | }
|
---|
| 4952 | else if(this.highligjtColor.equals(Color.magenta)){
|
---|
| 4953 | return "magenta";
|
---|
| 4954 | }
|
---|
| 4955 | else if(this.highligjtColor.equals(Color.lightGray)){
|
---|
| 4956 | return "lightGray";
|
---|
| 4957 | }
|
---|
| 4958 | else if(this.highligjtColor.equals(Color.red)){
|
---|
| 4959 | return "red";
|
---|
| 4960 | }
|
---|
| 4961 | else if(this.highligjtColor.equals(Color.blue)){
|
---|
| 4962 | return "blue";
|
---|
| 4963 | }
|
---|
| 4964 | else if(this.highligjtColor.equals(Color.gray)){
|
---|
| 4965 | return "gray";
|
---|
| 4966 | }
|
---|
| 4967 |
|
---|
| 4968 | return "NULL";
|
---|
| 4969 | }
|
---|
| 4970 |
|
---|
| 4971 |
|
---|
| 4972 | String getLinkHighlitColorString(){
|
---|
| 4973 | if(this.link_highligjtColor==null){
|
---|
| 4974 | return "NULL";
|
---|
| 4975 | }
|
---|
| 4976 | if(this.link_highligjtColor.equals(Color.white)){
|
---|
| 4977 | return "NULL";
|
---|
| 4978 | }
|
---|
| 4979 | if(this.link_highligjtColor.equals(Color.orange)){
|
---|
| 4980 | return "orange";
|
---|
| 4981 | }
|
---|
| 4982 | else if(this.link_highligjtColor.equals(Color.cyan)){
|
---|
| 4983 | return "cyan";
|
---|
| 4984 | }
|
---|
| 4985 | else if(this.link_highligjtColor.equals(Color.pink)){
|
---|
| 4986 | return "pink";
|
---|
| 4987 | }
|
---|
| 4988 | else if(this.link_highligjtColor.equals(Color.yellow)){
|
---|
| 4989 | return "yellow";
|
---|
| 4990 | }
|
---|
| 4991 | else if(this.link_highligjtColor.equals(Color.green)){
|
---|
| 4992 | return "green";
|
---|
| 4993 | }
|
---|
| 4994 | else if(this.link_highligjtColor.equals(Color.magenta)){
|
---|
| 4995 | return "magenta";
|
---|
| 4996 | }
|
---|
| 4997 | else if(this.link_highligjtColor.equals(Color.lightGray)){
|
---|
| 4998 | return "lightGray";
|
---|
| 4999 | }
|
---|
| 5000 | else if(this.link_highligjtColor.equals(Color.red)){
|
---|
| 5001 | return "red";
|
---|
| 5002 | }
|
---|
| 5003 | else if(this.link_highligjtColor.equals(Color.blue)){
|
---|
| 5004 | return "blue";
|
---|
| 5005 | }
|
---|
| 5006 | else if(this.link_highligjtColor.equals(Color.gray)){
|
---|
| 5007 | return "gray";
|
---|
| 5008 | }
|
---|
| 5009 |
|
---|
| 5010 | return "NULL";
|
---|
| 5011 | }
|
---|
| 5012 |
|
---|
| 5013 |
|
---|
| 5014 | // void paint(Graphics g){
|
---|
| 5015 | // Font font = new Font("Times", Font.PLAIN, 12);
|
---|
| 5016 | // FontMetrics fm = g.getFontMetrics(font);
|
---|
| 5017 | // setSize(
|
---|
| 5018 | // new Dimension(fm.stringWidth(label) +5, fm.getHeight() + 5));
|
---|
| 5019 | //
|
---|
| 5020 | // g.setColor(Color.yellow);
|
---|
| 5021 | // g.fillRect(this.x, this.y,this.width,this.height);
|
---|
| 5022 | // g.setColor(Color.black);
|
---|
| 5023 | // g.drawRect(this.x, this.y,this.width,this.height);
|
---|
| 5024 | // //g.drawString(label, this.x, this.y);
|
---|
| 5025 | // g.setFont(font);
|
---|
| 5026 | // g.drawString(
|
---|
| 5027 | // label,
|
---|
| 5028 | // x + 2,
|
---|
| 5029 | // y +fm.getAscent()+2);
|
---|
| 5030 | // }
|
---|
| 5031 |
|
---|
| 5032 | void paint(Graphics g,ExtendBP exbp){
|
---|
| 5033 | //Graphics g =exbp.getGraphics();
|
---|
| 5034 |
|
---|
| 5035 | //#kozaki 2008/02/09�ス@�ス�ス�ス[�スt�ス�ス�ス�ス�スp�スフダ�ス~�ス[�スm�ス[�スh�スヘ描�ス謔オ�スネゑソス
|
---|
| 5036 | if(this.isDummy)return;
|
---|
| 5037 |
|
---|
| 5038 |
|
---|
| 5039 | //Font font = new Font("Times", Font.PLAIN, 12);
|
---|
| 5040 | Graphics2D g2 = (Graphics2D)g;
|
---|
| 5041 | //Stroke defaultS = g2.getStroke();
|
---|
| 5042 | Paint defaultP = g2.getPaint();
|
---|
| 5043 | //BasicStroke wideS = new BasicStroke(3.0f);
|
---|
| 5044 |
|
---|
| 5045 | FontMetrics fm = g.getFontMetrics(font);
|
---|
| 5046 | setSize(new Dimension(fm.stringWidth(label) +5, fm.getHeight() + 5));
|
---|
| 5047 | g2.setPaint(new GradientPaint(x+width/4, y+height/4, color,
|
---|
| 5048 | x+width*3/4, y+height*3/4,Color.white, false));
|
---|
| 5049 |
|
---|
| 5050 |
|
---|
| 5051 | ArrayList<Color> topic_colors = new ArrayList<Color>();
|
---|
| 5052 | for(int i=0;i<this.topicColorList.size();i++){
|
---|
| 5053 | if(exbp.topicColorList.contains(topicColorList.get(i))){
|
---|
| 5054 | topic_colors.add(topicColorList.get(i));
|
---|
| 5055 | }
|
---|
| 5056 | }
|
---|
| 5057 |
|
---|
| 5058 | if (topic_colors.size() == 1) {
|
---|
| 5059 | g2.setPaint(new GradientPaint(x+width/4, y+height/4, topic_colors.get(0),
|
---|
| 5060 | x+width*3/4, y+height*3/4,Color.white, false));
|
---|
| 5061 |
|
---|
| 5062 | }
|
---|
| 5063 | else if (topic_colors.size() > 1) {
|
---|
| 5064 |
|
---|
| 5065 | // System.out.println(highLightColorList.get(1));
|
---|
| 5066 | float[] dist = new float[topic_colors.size()];
|
---|
| 5067 |
|
---|
| 5068 | //float[] dist ={0.0f,0.3f,0.6f,1.0f};
|
---|
| 5069 |
|
---|
| 5070 | //Color[] colors = {Color.RED, Color.WHITE, Color.BLUE, Color.GREEN};
|
---|
| 5071 | for (int i = 0;i < topic_colors.size() ; i++) {
|
---|
| 5072 | dist[i] = ((float)i )/ ((float)topic_colors.size()-1);
|
---|
| 5073 | };
|
---|
| 5074 |
|
---|
| 5075 | Color[] colors = (Color[])topic_colors.toArray(new Color[0]);
|
---|
| 5076 |
|
---|
| 5077 |
|
---|
| 5078 | LinearGradientPaint gradient = new LinearGradientPaint(
|
---|
| 5079 | x+width/4, y+height/4,
|
---|
| 5080 | x+width*3/4, y+height*3/4,
|
---|
| 5081 | dist,
|
---|
| 5082 | colors,
|
---|
| 5083 | MultipleGradientPaint.CycleMethod.NO_CYCLE
|
---|
| 5084 | );
|
---|
| 5085 |
|
---|
| 5086 | g2.setPaint(gradient);
|
---|
| 5087 | }
|
---|
| 5088 |
|
---|
| 5089 | if(MapFactory.isGrayView){
|
---|
| 5090 | g2.setColor(Color.white);
|
---|
| 5091 | g2.fillRect(this.x, this.y,this.width,this.height);
|
---|
| 5092 | }
|
---|
| 5093 | else{
|
---|
| 5094 | g2.fillRect(this.x, this.y,this.width,this.height);
|
---|
| 5095 | }
|
---|
| 5096 | g2.setPaint(defaultP);
|
---|
| 5097 | if(this.highlight==true){
|
---|
| 5098 | //BasicStroke wideStroke = new BasicStroke(3.0f);
|
---|
| 5099 | float dash[] = {10.0f, 3.0f};
|
---|
| 5100 | BasicStroke wideStroke = new BasicStroke(3.0f,
|
---|
| 5101 | BasicStroke.CAP_BUTT,
|
---|
| 5102 | BasicStroke.JOIN_MITER,
|
---|
| 5103 | 10.0f,
|
---|
| 5104 | dash,
|
---|
| 5105 | 0.0f);
|
---|
| 5106 | g2.setStroke(wideStroke);
|
---|
| 5107 | //g2.setColor(Color.red);
|
---|
| 5108 | g2.setColor(this.highligjtColor);
|
---|
| 5109 | }
|
---|
| 5110 | else{
|
---|
| 5111 | BasicStroke wideStroke = new BasicStroke(1.0f);
|
---|
| 5112 | g2.setStroke(wideStroke);
|
---|
| 5113 | g2.setColor(Color.black);
|
---|
| 5114 | }
|
---|
| 5115 | g2.drawRect(this.x, this.y,this.width,this.height);
|
---|
| 5116 |
|
---|
| 5117 | g2.setColor(Color.black);
|
---|
| 5118 | g.setFont(font);
|
---|
| 5119 |
|
---|
| 5120 | //�ス]�ス�ス�スL�ス�スマみは,�ス�ス�ス�ス�ス�スヤゑソス�ス�ス�ス�スi�スb�ス闖茨ソス�ス�スj
|
---|
| 5121 | if(this.evaluation!=0){
|
---|
| 5122 | g2.setColor(Color.red);
|
---|
| 5123 | }
|
---|
| 5124 | if(this.evaluation==-1){
|
---|
| 5125 | g2.setColor(Color.orange);
|
---|
| 5126 | }
|
---|
| 5127 |
|
---|
| 5128 | //#kozaki 2008/08/16
|
---|
| 5129 | if(this.children.size()!=this.getVisbleChildren().size()){
|
---|
| 5130 | g.drawString(
|
---|
| 5131 | label+" [+]",
|
---|
| 5132 | x + 2,
|
---|
| 5133 | y +fm.getAscent()+2);
|
---|
| 5134 | }
|
---|
| 5135 | else{
|
---|
| 5136 | g.drawString(
|
---|
| 5137 | label,
|
---|
| 5138 | x + 2,
|
---|
| 5139 | y +fm.getAscent()+2);
|
---|
| 5140 | }
|
---|
| 5141 |
|
---|
| 5142 | }
|
---|
| 5143 |
|
---|
| 5144 | void paint2(Graphics g){
|
---|
| 5145 | //#kozaki 2008/02/09�ス@�ス�ス�ス[�スt�ス�ス�ス�ス�スp�スフダ�ス~�ス[�スm�ス[�スh�スヘ描�ス謔オ�スネゑソス
|
---|
| 5146 | if(this.isDummy)return;
|
---|
| 5147 |
|
---|
| 5148 |
|
---|
| 5149 | //Font font = new Font("Times", Font.PLAIN, 12);
|
---|
| 5150 | Graphics2D g2 = (Graphics2D)g;
|
---|
| 5151 | //Stroke defaultS = g2.getStroke();
|
---|
| 5152 | Paint defaultP = g2.getPaint();
|
---|
| 5153 | //BasicStroke wideS = new BasicStroke(3.0f);
|
---|
| 5154 |
|
---|
| 5155 | FontMetrics fm = g.getFontMetrics(font);
|
---|
| 5156 | setSize(new Dimension(fm.stringWidth(label) +5, fm.getHeight() + 5));
|
---|
| 5157 | g2.setPaint(new GradientPaint(x+width/4, y+height/4, color,
|
---|
| 5158 | x+width*3/4, y+height*3/4,Color.white, false));
|
---|
| 5159 |
|
---|
| 5160 |
|
---|
| 5161 | if (this.topicColorList.size() == 1) {
|
---|
| 5162 | g2.setPaint(new GradientPaint(x+width/4, y+height/4, topicColorList.get(0),
|
---|
| 5163 | x+width*3/4, y+height*3/4,Color.white, false));
|
---|
| 5164 |
|
---|
| 5165 | }
|
---|
| 5166 | else if (this.topicColorList.size() > 1) {
|
---|
| 5167 |
|
---|
| 5168 | // System.out.println(highLightColorList.get(1));
|
---|
| 5169 | float[] dist = new float[topicColorList.size()];
|
---|
| 5170 |
|
---|
| 5171 | //float[] dist ={0.0f,0.3f,0.6f,1.0f};
|
---|
| 5172 |
|
---|
| 5173 | //Color[] colors = {Color.RED, Color.WHITE, Color.BLUE, Color.GREEN};
|
---|
| 5174 | for (int i = 0;i < topicColorList.size() ; i++) {
|
---|
| 5175 | dist[i] = ((float)i )/ ((float)topicColorList.size()-1);
|
---|
| 5176 | };
|
---|
| 5177 |
|
---|
| 5178 | Color[] colors = (Color[])topicColorList.toArray(new Color[0]);
|
---|
| 5179 |
|
---|
| 5180 |
|
---|
| 5181 | LinearGradientPaint gradient = new LinearGradientPaint(
|
---|
| 5182 | x+width/4, y+height/4,
|
---|
| 5183 | x+width*3/4, y+height*3/4,
|
---|
| 5184 | dist,
|
---|
| 5185 | colors,
|
---|
| 5186 | MultipleGradientPaint.CycleMethod.NO_CYCLE
|
---|
| 5187 | );
|
---|
| 5188 |
|
---|
| 5189 | g2.setPaint(gradient);
|
---|
| 5190 | }
|
---|
| 5191 |
|
---|
| 5192 | if(MapFactory.isGrayView){
|
---|
| 5193 | g2.setColor(Color.white);
|
---|
| 5194 | g2.fillRect(this.x, this.y,this.width,this.height);
|
---|
| 5195 | }
|
---|
| 5196 | else{
|
---|
| 5197 | g2.fillRect(this.x, this.y,this.width,this.height);
|
---|
| 5198 | }
|
---|
| 5199 | g2.setPaint(defaultP);
|
---|
| 5200 | if(this.highlight==true){
|
---|
| 5201 | //BasicStroke wideStroke = new BasicStroke(3.0f);
|
---|
| 5202 | float dash[] = {10.0f, 3.0f};
|
---|
| 5203 | BasicStroke wideStroke = new BasicStroke(3.0f,
|
---|
| 5204 | BasicStroke.CAP_BUTT,
|
---|
| 5205 | BasicStroke.JOIN_MITER,
|
---|
| 5206 | 10.0f,
|
---|
| 5207 | dash,
|
---|
| 5208 | 0.0f);
|
---|
| 5209 | g2.setStroke(wideStroke);
|
---|
| 5210 | //g2.setColor(Color.red);
|
---|
| 5211 | g2.setColor(this.highligjtColor);
|
---|
| 5212 | }
|
---|
| 5213 | else{
|
---|
| 5214 | BasicStroke wideStroke = new BasicStroke(1.0f);
|
---|
| 5215 | g2.setStroke(wideStroke);
|
---|
| 5216 | g2.setColor(Color.black);
|
---|
| 5217 | }
|
---|
| 5218 | g2.drawRect(this.x, this.y,this.width,this.height);
|
---|
| 5219 |
|
---|
| 5220 | g2.setColor(Color.black);
|
---|
| 5221 | g.setFont(font);
|
---|
| 5222 |
|
---|
| 5223 | //�ス]�ス�ス�スL�ス�スマみは,�ス�ス�ス�ス�ス�スヤゑソス�ス�ス�ス�スi�スb�ス闖茨ソス�ス�スj
|
---|
| 5224 | if(this.evaluation!=0){
|
---|
| 5225 | g2.setColor(Color.red);
|
---|
| 5226 | }
|
---|
| 5227 | if(this.evaluation==-1){
|
---|
| 5228 | g2.setColor(Color.orange);
|
---|
| 5229 | }
|
---|
| 5230 |
|
---|
| 5231 | //#kozaki 2008/08/16
|
---|
| 5232 | if(this.children.size()!=this.getVisbleChildren().size()){
|
---|
| 5233 | g.drawString(
|
---|
| 5234 | label+" [+]",
|
---|
| 5235 | x + 2,
|
---|
| 5236 | y +fm.getAscent()+2);
|
---|
| 5237 | }
|
---|
| 5238 | else{
|
---|
| 5239 | g.drawString(
|
---|
| 5240 | label,
|
---|
| 5241 | x + 2,
|
---|
| 5242 | y +fm.getAscent()+2);
|
---|
| 5243 | }
|
---|
| 5244 | }
|
---|
| 5245 |
|
---|
| 5246 | //#kozaki 2008/02/10�ス@�スn�スC�ス�ス�スC�スg�ス\�ス�ス�スフ描�ス�スi�スm�ス[�スh�スp�スj
|
---|
| 5247 | void paintHilighit(Graphics g, Color h_color){
|
---|
| 5248 | if(this.isDummy)return;
|
---|
| 5249 |
|
---|
| 5250 | //Font font = new Font("Times", Font.PLAIN, 12);
|
---|
| 5251 | Graphics2D g2 = (Graphics2D)g;
|
---|
| 5252 | //Stroke defaultS = g2.getStroke();
|
---|
| 5253 | Paint defaultP = g2.getPaint();
|
---|
| 5254 | //BasicStroke wideS = new BasicStroke(3.0f);
|
---|
| 5255 |
|
---|
| 5256 | FontMetrics fm = g.getFontMetrics(font);
|
---|
| 5257 | setSize(new Dimension(fm.stringWidth(label) +5, fm.getHeight() + 5));
|
---|
| 5258 | g2.setPaint(new GradientPaint(x+width/4, y+height/4, color,
|
---|
| 5259 | x+width*3/4, y+height*3/4,Color.white, false));
|
---|
| 5260 |
|
---|
| 5261 |
|
---|
| 5262 |
|
---|
| 5263 |
|
---|
| 5264 |
|
---|
| 5265 | if(MapFactory.isGrayView){
|
---|
| 5266 | g2.setColor(Color.white);
|
---|
| 5267 | g2.fillRect(this.x, this.y,this.width,this.height);
|
---|
| 5268 | }
|
---|
| 5269 | else{
|
---|
| 5270 | g2.fillRect(this.x, this.y,this.width,this.height);
|
---|
| 5271 | }
|
---|
| 5272 | g2.setPaint(defaultP);
|
---|
| 5273 | g2.setColor(Color.black);
|
---|
| 5274 | g.setFont(font);
|
---|
| 5275 |
|
---|
| 5276 | //�ス]�ス�ス�スL�ス�スマみは,�ス�ス�ス�ス�ス�スヤゑソス�ス�ス�ス�スi�スb�ス闖茨ソス�ス�スj
|
---|
| 5277 | if(this.evaluation!=0){
|
---|
| 5278 | g2.setColor(Color.red);
|
---|
| 5279 | }
|
---|
| 5280 | if(this.evaluation==-1){
|
---|
| 5281 | g2.setColor(Color.orange);
|
---|
| 5282 | }
|
---|
| 5283 |
|
---|
| 5284 | g.drawString(
|
---|
| 5285 | label,
|
---|
| 5286 | x + 2,
|
---|
| 5287 | y +fm.getAscent()+2);
|
---|
| 5288 |
|
---|
| 5289 |
|
---|
| 5290 | BasicStroke wideStroke = new BasicStroke(3.0f);
|
---|
| 5291 | g2.setStroke(wideStroke);
|
---|
| 5292 | g2.setColor(h_color);
|
---|
| 5293 | g2.drawRect(this.x, this.y,this.width,this.height);
|
---|
| 5294 |
|
---|
| 5295 | if(this.highlight==true){
|
---|
| 5296 | //BasicStroke wideStroke = new BasicStroke(3.0f);
|
---|
| 5297 | float dash[] = {10.0f, 3.0f};
|
---|
| 5298 | wideStroke = new BasicStroke(3.0f,
|
---|
| 5299 | BasicStroke.CAP_BUTT,
|
---|
| 5300 | BasicStroke.JOIN_MITER,
|
---|
| 5301 | 10.0f,
|
---|
| 5302 | dash,
|
---|
| 5303 | 0.0f);
|
---|
| 5304 | g2.setStroke(wideStroke);
|
---|
| 5305 | //g2.setColor(Color.red);
|
---|
| 5306 | g2.setColor(this.highligjtColor);
|
---|
| 5307 | }
|
---|
| 5308 | g2.drawRect(this.x, this.y,this.width,this.height);
|
---|
| 5309 |
|
---|
| 5310 | }
|
---|
| 5311 |
|
---|
| 5312 | //#kozaki 2008/02/10�ス@�スn�スC�ス�ス�スC�スg�ス\�ス�ス�スフ描�ス�スi�ス�ス�ス�ス�スN�スp�スj
|
---|
| 5313 | void paintHilighitLink(Graphics g, Color h_color){
|
---|
| 5314 | if(this.parent==null){
|
---|
| 5315 | return;
|
---|
| 5316 | }
|
---|
| 5317 |
|
---|
| 5318 | //#kozaki 2008/05/09�ス@Dummy�ス�ス2�スi�スネ擾ソスフ趣ソス�スフ擾ソス�ス�ス
|
---|
| 5319 | ExbpNode parentNode = this.getParent();
|
---|
| 5320 | // ExbpNode parentNode = this.parent;
|
---|
| 5321 | // if(parentNode.isDummy){
|
---|
| 5322 | // parentNode=parentNode.parent;
|
---|
| 5323 | // if(parentNode==null){
|
---|
| 5324 | // return;
|
---|
| 5325 | // }
|
---|
| 5326 | // }
|
---|
| 5327 |
|
---|
| 5328 |
|
---|
| 5329 | int px = parentNode.x + parentNode.width / 2;
|
---|
| 5330 | int py = parentNode.y + parentNode.height / 2;
|
---|
| 5331 | int cx = this.x + this.width / 2;
|
---|
| 5332 | int cy = this.y + this.height / 2;
|
---|
| 5333 |
|
---|
| 5334 | Graphics2D g2 = (Graphics2D)g;
|
---|
| 5335 | BasicStroke wideStroke = new BasicStroke(3.0f);
|
---|
| 5336 | g2.setStroke(wideStroke);
|
---|
| 5337 | g2.setColor(h_color);
|
---|
| 5338 | g2.drawLine(px, py, cx, cy);
|
---|
| 5339 |
|
---|
| 5340 | int sx = (px + cx) / 2;
|
---|
| 5341 | int sy = (py + cy) / 2;
|
---|
| 5342 | g.setFont(ExtendBP.fontLink);
|
---|
| 5343 | g.setColor(Color.red);
|
---|
| 5344 | g.drawString(this.key, sx+5, sy);
|
---|
| 5345 | }
|
---|
| 5346 |
|
---|
| 5347 | void adjustLoc(Graphics g){
|
---|
| 5348 | if(this.isDummy)return;
|
---|
| 5349 | FontMetrics fm = g.getFontMetrics(font);
|
---|
| 5350 | setSize(
|
---|
| 5351 | new Dimension(fm.stringWidth(label) +5, fm.getHeight() + 5));
|
---|
| 5352 |
|
---|
| 5353 | //this.setLocation(this.x-this.width/2, this.y-this.height/2);
|
---|
| 5354 | int nx = this.x-this.width/2;
|
---|
| 5355 | if (nx < 0) nx = 0;
|
---|
| 5356 | this.setLocation(nx, this.y);
|
---|
| 5357 | }
|
---|
| 5358 |
|
---|
| 5359 | /* #kozaki 2009/01/20�ス@paint2(Graphics g)�スヨ茨ソス{�ス�ス
|
---|
| 5360 | void paint3(Graphics g){
|
---|
| 5361 | //#kozaki 2008/02/09�ス@�ス�ス�ス[�スt�ス�ス�ス�ス�スp�スフダ�ス~�ス[�スm�ス[�スh�スヘ描�ス謔オ�スネゑソス
|
---|
| 5362 | if(this.isDummy)return;
|
---|
| 5363 |
|
---|
| 5364 | //Font font = new Font("Times", Font.PLAIN, 12);
|
---|
| 5365 | Graphics2D g2 = (Graphics2D) g;
|
---|
| 5366 | //Stroke defaultS = g2.getStroke();
|
---|
| 5367 | Paint defaultP = g2.getPaint();
|
---|
| 5368 | //BasicStroke wideS = new BasicStroke(3.0f);
|
---|
| 5369 |
|
---|
| 5370 | FontMetrics fm = g.getFontMetrics(font);
|
---|
| 5371 | setSize(
|
---|
| 5372 | new Dimension(fm.stringWidth(label) +5, fm.getHeight() + 5));
|
---|
| 5373 |
|
---|
| 5374 | //this.setLocation(this.x-this.width/2, this.y-this.height/2);
|
---|
| 5375 | int nx = this.x-this.width/2;
|
---|
| 5376 | if (nx < 0) nx = 0;
|
---|
| 5377 | this.setLocation(nx, this.y);
|
---|
| 5378 |
|
---|
| 5379 | //g.setColor(color);
|
---|
| 5380 | //g.fillRect(this.x, this.y,this.width,this.height);
|
---|
| 5381 |
|
---|
| 5382 | g2.setPaint(new GradientPaint(x+width/4, y+height/4, color,
|
---|
| 5383 | x+width*3/4, y+height*3/4,Color.white, false));
|
---|
| 5384 | g2.fillRect(this.x, this.y,this.width,this.height);
|
---|
| 5385 | g2.setPaint(defaultP);
|
---|
| 5386 | BasicStroke wideStroke = new BasicStroke(1.0f);
|
---|
| 5387 | g2.setStroke(wideStroke);
|
---|
| 5388 | g2.setColor(Color.black);
|
---|
| 5389 | g2.drawRect(this.x, this.y,this.width,this.height);
|
---|
| 5390 |
|
---|
| 5391 | //g.setColor(Color.black);
|
---|
| 5392 | //g.drawRect(this.x, this.y,this.width,this.height);
|
---|
| 5393 |
|
---|
| 5394 | g.setFont(font);
|
---|
| 5395 | g.drawString(
|
---|
| 5396 | label,
|
---|
| 5397 | x + 2,
|
---|
| 5398 | y +fm.getAscent()+2);
|
---|
| 5399 | }*/
|
---|
| 5400 |
|
---|
| 5401 | void setLabel(String str){
|
---|
| 5402 | this.label=str;
|
---|
| 5403 | }
|
---|
| 5404 |
|
---|
| 5405 | protected String getLabel(){
|
---|
| 5406 | return this.label;
|
---|
| 5407 | }
|
---|
| 5408 |
|
---|
| 5409 | // �スq�スm�ス[�スh�ス�ス�ス謫セ�ス�ス�スワゑソス
|
---|
| 5410 | protected Vector<ExbpNode> getChildExbpNodes() {
|
---|
| 5411 | return children;
|
---|
| 5412 | }
|
---|
| 5413 |
|
---|
| 5414 | //#koazaki 2008/08/11�ス@�スm�ス[�スh�スフ抵ソス�スS�ス�ス�スW�ス�スヤゑソス
|
---|
| 5415 | public Point getCenterPoint(){
|
---|
| 5416 | int px = this.x + this.width / 2;
|
---|
| 5417 | int py = this.y + this.height / 2;
|
---|
| 5418 | return new Point(px,py);
|
---|
| 5419 | }
|
---|
| 5420 |
|
---|
| 5421 | // #kozaki 2007/10/28�ス@�スI�ス�ス�ス�ス�ス�ス�スm�ス[�スh�スノゑソス�ス�ス�ス�スp�スX�ス�スヤゑソス
|
---|
| 5422 | public String getPath(){
|
---|
| 5423 | String path="["+this.getLabel()+"]";
|
---|
| 5424 | for(ExbpNode n = this ; n.parent!=null ; n=n.parent ) {
|
---|
| 5425 | path="["+n.parent.getLabel()+"]"+ "\n-"+ n.key +"->"+path;
|
---|
| 5426 | }
|
---|
| 5427 |
|
---|
| 5428 | return path;
|
---|
| 5429 | }
|
---|
| 5430 |
|
---|
| 5431 | //#kozaki�ス@2008/02/10�ス@�スI�ス�ス�ス�ス�ス�ス�スm�ス[�スh�スノ趣ソス�ス�スp�スX�ス�ス�ス�ス�ス�ス�ス\�ス�ス
|
---|
| 5432 | public void painthilightPath(Graphics g,Color h_color){
|
---|
| 5433 | if(this.parent==null){
|
---|
| 5434 | return;
|
---|
| 5435 | }
|
---|
| 5436 | this.paintHilighitLink(g, h_color);
|
---|
| 5437 |
|
---|
| 5438 | for(ExbpNode n = this.parent ; n.parent!=null ; n=n.parent ) {
|
---|
| 5439 | if(!n.isDummy){
|
---|
| 5440 | n.paintHilighitLink(g, h_color);
|
---|
| 5441 | n.paintHilighit(g, h_color);
|
---|
| 5442 | }
|
---|
| 5443 | }
|
---|
| 5444 | }
|
---|
| 5445 |
|
---|
| 5446 | //#kozaki�ス@2008/02/10�ス@�スI�ス�ス�ス�ス�ス�ス�スm�ス[�スh�スノ趣ソス�ス�スp�スX�ス�ス�ス�ス�ス�ス�ス\�ス�ス
|
---|
| 5447 | public void paintInfluencePath(ExtendBP exbp,Graphics g,Color color){
|
---|
| 5448 |
|
---|
| 5449 | paintHilighit(g, color);
|
---|
| 5450 |
|
---|
| 5451 | // Vector childs = new Vector();
|
---|
| 5452 | // Iterator it = this.children.iterator();
|
---|
| 5453 | // while (it.hasNext()) {
|
---|
| 5454 | // ExbpNode childNode = (ExbpNode) it.next();
|
---|
| 5455 | // if(childNode.isDummy){
|
---|
| 5456 | // childs.addAll(childNode.children);
|
---|
| 5457 | // }
|
---|
| 5458 | // else{
|
---|
| 5459 | // childs.add(childNode);
|
---|
| 5460 | // }
|
---|
| 5461 | // }
|
---|
| 5462 |
|
---|
| 5463 | //#kozaki 2008/05/09�ス@Dummy�ス�ス2�スi�スネ擾ソスフ趣ソス�スフ擾ソス�ス�ス�ス�ス�スC�ス�ス
|
---|
| 5464 | Vector<ExbpNode> childs = this.getChildren();
|
---|
| 5465 | Iterator<ExbpNode> it = childs.iterator();
|
---|
| 5466 |
|
---|
| 5467 | while (it.hasNext()) {
|
---|
| 5468 | ExbpNode childNode = it.next();
|
---|
| 5469 | if(exbp.nodes.contains(childNode) && childNode.visible){
|
---|
| 5470 | childNode.paintHilighitLink(g, color);
|
---|
| 5471 | childNode.parent.paintHilighit(g, color);
|
---|
| 5472 | childNode.paintInfluencePath(exbp,g,color);
|
---|
| 5473 | }
|
---|
| 5474 | }
|
---|
| 5475 | }
|
---|
| 5476 |
|
---|
| 5477 | //#kozaki 2008/06/26�ス@�ス`�ス謦イ�ス�ス�スp�スフダ�ス~�ス[�スm�ス[�スh�ス�ス�スZ�スb�スg�ス�ス�ス�ス
|
---|
| 5478 | public void setDummyNodes(int num_of_layer){
|
---|
| 5479 | //�スq�スm�ス[�スh�ス�ス�ス�ス�ス�ス�ス鼾�ソスC�スK�スw�ス�ス�ス�ス�ス�ス�ス_�ス~�ス[�スm�ス[�スh�ス�ス�スq�スノ托ソス�ス�ス
|
---|
| 5480 | if(this.children.size()==0){
|
---|
| 5481 | ExbpNode parent=this;
|
---|
| 5482 | ExbpNode dummy;
|
---|
| 5483 | for(int i=0;i<num_of_layer;i++){
|
---|
| 5484 | dummy = new ExbpNode("dummy_for_layout",0,0,0,0);
|
---|
| 5485 | dummy.setDummyNode(true);
|
---|
| 5486 | parent.addChild(dummy);
|
---|
| 5487 | parent=dummy;
|
---|
| 5488 | }
|
---|
| 5489 | }
|
---|
| 5490 | else{
|
---|
| 5491 | Iterator<ExbpNode> it = this.children.iterator();
|
---|
| 5492 | while (it.hasNext()) {
|
---|
| 5493 | ExbpNode childNode = it.next();
|
---|
| 5494 | childNode.setDummyNodes(num_of_layer-1);
|
---|
| 5495 | }
|
---|
| 5496 | }
|
---|
| 5497 |
|
---|
| 5498 | }
|
---|
| 5499 |
|
---|
| 5500 | //#kozaki 2008/06/26�ス@�ス`�ス謦イ�ス�ス�スp�スフダ�ス~�ス[�スm�ス[�スh�ス�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 5501 | public void removeDummyNodes(){
|
---|
| 5502 | if(this.children.size()>0){
|
---|
| 5503 | Iterator<ExbpNode> it = this.children.iterator();
|
---|
| 5504 | Vector<ExbpNode> remove_nodes= new Vector<ExbpNode>();
|
---|
| 5505 | while (it.hasNext()) {
|
---|
| 5506 | ExbpNode childNode = it.next();
|
---|
| 5507 | if(childNode.isDummy && childNode.getLabel().equals("dummy_for_layout")){
|
---|
| 5508 | remove_nodes.addElement(childNode);
|
---|
| 5509 | }
|
---|
| 5510 | else{
|
---|
| 5511 | childNode.removeDummyNodes();
|
---|
| 5512 | }
|
---|
| 5513 | }
|
---|
| 5514 |
|
---|
| 5515 | if(remove_nodes.size()>0){
|
---|
| 5516 | this.children.removeAll(remove_nodes);
|
---|
| 5517 | }
|
---|
| 5518 | }
|
---|
| 5519 |
|
---|
| 5520 | }
|
---|
| 5521 |
|
---|
| 5522 | //#kozaki 2008/06/26�ス@�ス�ス�スラてのダ�ス~�ス[�スm�ス[�スh�ス�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 5523 | public void removeDummyNodesAll(){
|
---|
| 5524 | if(this.children.size()>0){
|
---|
| 5525 | Iterator<ExbpNode> it = this.children.iterator();
|
---|
| 5526 | Vector<ExbpNode> remove_nodes= new Vector<ExbpNode>();
|
---|
| 5527 | while (it.hasNext()) {
|
---|
| 5528 | ExbpNode childNode = it.next();
|
---|
| 5529 | if(childNode.isDummy){
|
---|
| 5530 | remove_nodes.addElement(childNode);
|
---|
| 5531 | }
|
---|
| 5532 | else{
|
---|
| 5533 | childNode.removeDummyNodes();
|
---|
| 5534 | }
|
---|
| 5535 | }
|
---|
| 5536 |
|
---|
| 5537 | if(remove_nodes.size()>0){
|
---|
| 5538 | this.children.removeAll(remove_nodes);
|
---|
| 5539 | }
|
---|
| 5540 | }
|
---|
| 5541 |
|
---|
| 5542 | }
|
---|
| 5543 |
|
---|
| 5544 | //#kozaki 2011/01/256�ス@�スs�スツ趣ソス�スフノ�ス[�スh�ス�ス�ス�ス�ス�ス�ス�ス�ス�ス
|
---|
| 5545 | public void removeUnmatchNodes(){
|
---|
| 5546 | if(this.children.size()>0){
|
---|
| 5547 | for (int i=0;i<children.size();i++) {
|
---|
| 5548 | ExbpNode childNode = children.elementAt(i);
|
---|
| 5549 | //System.out.println("--->childNode:"+childNode.getLabel()+":Match="+childNode.match);
|
---|
| 5550 |
|
---|
| 5551 | if(childNode.match){
|
---|
| 5552 | childNode.removeUnmatchNodes();
|
---|
| 5553 | }
|
---|
| 5554 | else{
|
---|
| 5555 | children.remove(i);
|
---|
| 5556 | i--;
|
---|
| 5557 | //System.out.println(">>>>>Removed");
|
---|
| 5558 | }
|
---|
| 5559 | }
|
---|
| 5560 | Iterator<ExbpNode> it3 = children.iterator();
|
---|
| 5561 | while (it3.hasNext()) {
|
---|
| 5562 | ExbpNode chiNode = it3.next();
|
---|
| 5563 | //System.out.println("===chiNode:"+chiNode.getLabel()+":Match="+chiNode.match);
|
---|
| 5564 | }
|
---|
| 5565 | }
|
---|
| 5566 | }
|
---|
| 5567 |
|
---|
| 5568 |
|
---|
| 5569 | // /**
|
---|
| 5570 | // *
|
---|
| 5571 | // * �ス�ス�スC�ス�ス�スK�スw�ス�ス�ス�ス�ス謫セ�ス�ス�ス�ス
|
---|
| 5572 | // *
|
---|
| 5573 | // * @return �ス�ス�スC�ス�ス�スK�スw�ス�ス�ス�ス゚ゑソス�スワゑソス�スB
|
---|
| 5574 | // */
|
---|
| 5575 | // public int getLayer() {
|
---|
| 5576 | // return _layer;
|
---|
| 5577 | // }
|
---|
| 5578 | //
|
---|
| 5579 | // /**
|
---|
| 5580 | // *
|
---|
| 5581 | // * �ス�ス�スC�ス�ス�スK�スw�ス�ス�ス�スン定す�ス�ス
|
---|
| 5582 | // *
|
---|
| 5583 | // * @param _layer �ス�ス�スC�ス�ス�スK�スw�ス�ス�ス�スン定す�ス�スB
|
---|
| 5584 | // */
|
---|
| 5585 | // public void setLayer(int layer) {
|
---|
| 5586 | // this._layer = layer;
|
---|
| 5587 | // }
|
---|
| 5588 | }
|
---|
| 5589 |
|
---|
| 5590 | //�スR�ス}�ス�ス�スhTree�ス�ャ�スp�スフコ�ス}�ス�ス�スh�スヌ暦ソス�スpExbpNode
|
---|
| 5591 | class ExbpNodeTemp extends ExbpNode{
|
---|
| 5592 | String command;
|
---|
| 5593 |
|
---|
| 5594 | ExbpNodeTemp(String lbl){
|
---|
| 5595 | super(lbl);
|
---|
| 5596 | }
|
---|
| 5597 |
|
---|
| 5598 | public ExbpNodeTemp(ExbpNode exbpnode, String cmd) {
|
---|
| 5599 | this(exbpnode.getLabel());
|
---|
| 5600 | this.command=cmd;
|
---|
| 5601 | this.setOrgNode(exbpnode.getOrgNode());
|
---|
| 5602 | }
|
---|
| 5603 |
|
---|
| 5604 | Vector<ExbpNode> getCopyChildren(){
|
---|
| 5605 | Vector<ExbpNode> copy_children = new Vector<ExbpNode>();
|
---|
| 5606 | Enumeration en = this.children.elements();
|
---|
| 5607 | while(en.hasMoreElements()){
|
---|
| 5608 | ExbpNode chi = (ExbpNode)en.nextElement();
|
---|
| 5609 | //ExbpNode copy= new ExbpNode(chi.getLabel());
|
---|
| 5610 | copy_children.add(chi.copy());
|
---|
| 5611 | }
|
---|
| 5612 | return copy_children;
|
---|
| 5613 | }
|
---|
| 5614 |
|
---|
| 5615 | //#kozaki�ス@�ス墲エ�スニ茨ソスv�ス�ス�ス�ス�ス�スノゑソス�スン定し�ストゑソス�ス�ス
|
---|
| 5616 | public boolean equals(Object obj) {
|
---|
| 5617 | if (!(obj instanceof ExbpNodeTemp)) {
|
---|
| 5618 | return false;
|
---|
| 5619 | }
|
---|
| 5620 |
|
---|
| 5621 | ExbpNodeTemp other = (ExbpNodeTemp)obj;
|
---|
| 5622 |
|
---|
| 5623 | //�スR�ス}�ス�ス�スh�スウ趣ソス�ス�ス�スト費ソスr�スナゑソス�ス�ス謔、�スネ隠�ス�ス�スI�スv�スV�ス�ス�ス�ス
|
---|
| 5624 | if("*".equals(this.command)){
|
---|
| 5625 | return other.label == this.label &&
|
---|
| 5626 | other.org_node == this.org_node;
|
---|
| 5627 | }
|
---|
| 5628 |
|
---|
| 5629 | return other.label == this.label &&
|
---|
| 5630 | other.org_node == this.org_node &&
|
---|
| 5631 | other.command == this.command;
|
---|
| 5632 | }
|
---|
| 5633 |
|
---|
| 5634 |
|
---|
| 5635 | }
|
---|
| 5636 |
|
---|
| 5637 | // BrowsingGP�ス�ス�スフマ�スE�スX�ス�ス�スX�スi�ス[�スフク�ス�ス�スX
|
---|
| 5638 | class ExbpMouseListener implements MouseListener, MouseMotionListener {
|
---|
| 5639 |
|
---|
| 5640 | ExtendBP _exbp;
|
---|
| 5641 | public final int WHEEL_SCROLL_RATE = 50; // �ス}�スE�スX�スz�スC�ス[�ス�ス�スフス�スN�ス�ス�ス[�ス�ス�ス�ス
|
---|
| 5642 | public final int MOVE_RATE = 1; // �ス}�スE�スX�スz�スC�ス[�ス�ス�スフス�スN�ス�ス�ス[�ス�ス�ス�ス
|
---|
| 5643 | private Point _tmpPoint = new Point();
|
---|
| 5644 |
|
---|
| 5645 | private Toolkit _toolkit;
|
---|
| 5646 | private Image _imageHandOpen = null;
|
---|
| 5647 | private Image _imageHandClose = null;
|
---|
| 5648 | private Image _imageDanger = null;
|
---|
| 5649 | private static final int HAND_OPEN = 0;
|
---|
| 5650 | private static final int HAND_CLOSE = 1;
|
---|
| 5651 |
|
---|
| 5652 | private boolean isMouseDragged = false; // �ス}�スE�スX�ス�ス�スh�ス�ス�スb�スN�ス�ス�ス�ストゑソス�ス驍ゥ�スヌゑソス�ス�ス
|
---|
| 5653 | private boolean isMouseExited = false; // �ス}�スE�スX�ス�ス�スO�ス�ストゑソス�ス驍ゥ�スヌゑソス�ス�ス
|
---|
| 5654 |
|
---|
| 5655 | ExbpNode exbpnode; //#kozaki�ス@2008/08/11�ス@�スI�ス�フノ�ス[�スh
|
---|
| 5656 | Point press_point;
|
---|
| 5657 |
|
---|
| 5658 |
|
---|
| 5659 |
|
---|
| 5660 | // �スR�ス�ス�スX�スg�ス�ス�スN�ス^
|
---|
| 5661 | protected ExbpMouseListener(ExtendBP bpgp) {
|
---|
| 5662 | super();
|
---|
| 5663 | _exbp = bpgp;
|
---|
| 5664 |
|
---|
| 5665 | // _toolkit = Toolkit.getDefaultToolkit();
|
---|
| 5666 | // _imageHandOpen = _toolkit.getImage(this.getClass().getResource("handopen_ss.gif"));
|
---|
| 5667 | // _imageHandClose = _toolkit.getImage(this.getClass().getResource("handclose_ss.gif"));
|
---|
| 5668 | // _imageDanger = _toolkit.getImage(this.getClass().getResource("danger_s.gif"));
|
---|
| 5669 | }
|
---|
| 5670 |
|
---|
| 5671 | // �ス}�スE�スX�ス�ス�スh�ス�ス�スb�スN�ス�ス�ス�ストゑソス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定す�ス�ス
|
---|
| 5672 | private void setMouseDragged(boolean isDragged) {
|
---|
| 5673 | isMouseDragged = isDragged;
|
---|
| 5674 | }
|
---|
| 5675 | // �ス}�スE�スX�ス�ス�スO�ス�ストゑソス�ス驍ゥ�スヌゑソス�ス�ス�ス�スン定す�ス�ス
|
---|
| 5676 | private void setMouseExited(boolean isExited) {
|
---|
| 5677 | isMouseExited = isExited;
|
---|
| 5678 | }
|
---|
| 5679 |
|
---|
| 5680 | // �スX�スe�ス[�ス^�スX�スo�ス[�スノ表�ス�ス�ス�ス�ス�ス
|
---|
| 5681 | /* private void dispPointStatus(Point pt) {
|
---|
| 5682 | // �スX�スe�ス[�ス^�スX�スo�ス[�スノ表�ス�ス�ス�ス�ス�ス
|
---|
| 5683 | //_bpGraphicPanel.bp.editorPanel.hzeditor._hzMainFrame.setStatusBarPosition(_tmpPoint);
|
---|
| 5684 | double dsize = (double) 100.0 / _bpGraphicPanel.bp.editorPanel.hzeditor.getViewSize();
|
---|
| 5685 | int tx = (int) ((pt.getLocation().x + _bpGraphicPanel.bp.SCB_horz.getValue()) * dsize);
|
---|
| 5686 | int ty = (int) ((pt.getLocation().y + _bpGraphicPanel.bp.SCB_vert.getValue()) * dsize);
|
---|
| 5687 | //System.out.println(_bpGraphicPanel.bp.editorPanel.hzeditor.getViewSize() + " : " + dsize + " : (" + tx + ", " + ty + ") : (" + pt.getLocation().x + ", " + pt.getLocation().y + ")");
|
---|
| 5688 | _tmpPoint.setLocation(tx, ty);
|
---|
| 5689 | _bpGraphicPanel.bp.editorPanel.hzeditor._hzMainFrame.setStatusBarPosition(_tmpPoint);
|
---|
| 5690 | }*/
|
---|
| 5691 |
|
---|
| 5692 | // �ス}�スE�スX�ス�ス�スh�ス�ス�スb�スO�ス�ス�ス�ス�スニゑソス�スフ擾ソス�ス�ス
|
---|
| 5693 | public void mouseDragged(MouseEvent e) {
|
---|
| 5694 |
|
---|
| 5695 | Point pp = e.getPoint();
|
---|
| 5696 | if(exbpnode!=null && !exbpnode.equals(_exbp.exbp_node_center)){
|
---|
| 5697 | exbpnode.x += pp.x - press_point.x ;
|
---|
| 5698 | exbpnode.y += pp.y - press_point.y ;
|
---|
| 5699 | press_point = pp;
|
---|
| 5700 | }
|
---|
| 5701 | else{
|
---|
| 5702 | Point viewPoint = _exbp._extendFrame.jsp_exbp.getViewport().getViewPosition();
|
---|
| 5703 | Point cntPoint = e.getPoint();
|
---|
| 5704 | cntPoint.translate(-press_point.x, -press_point.y);
|
---|
| 5705 | viewPoint.translate(-cntPoint.x, -cntPoint.y);
|
---|
| 5706 | _exbp.scrollRectToVisible(new Rectangle(viewPoint, _exbp._extendFrame.jsp_exbp.getViewport().getSize()));
|
---|
| 5707 | }
|
---|
| 5708 |
|
---|
| 5709 |
|
---|
| 5710 | _exbp.repaint();
|
---|
| 5711 | }
|
---|
| 5712 |
|
---|
| 5713 | public void mouseMoved(MouseEvent e) {
|
---|
| 5714 |
|
---|
| 5715 | }
|
---|
| 5716 |
|
---|
| 5717 | public void mouseClicked(MouseEvent e) {
|
---|
| 5718 | // Point pp = e.getPoint();
|
---|
| 5719 | // if((e.isMetaDown() || e.isControlDown())){
|
---|
| 5720 | // System.out.println("_exbp._popupMenu.show(_exbp, pp.x, pp.y);");
|
---|
| 5721 | // if(exbpnode!=null){
|
---|
| 5722 | // _exbp._popupMenu.setPopupMenu(exbpnode);
|
---|
| 5723 | // }
|
---|
| 5724 | // _exbp._popupMenu.show(_exbp, pp.x, pp.y);
|
---|
| 5725 | // }
|
---|
| 5726 | }
|
---|
| 5727 | public void mouseClicked2(MouseEvent e) {
|
---|
| 5728 | Point pp = e.getPoint();
|
---|
| 5729 | ExbpNode old_pick = exbpnode;
|
---|
| 5730 | ExbpNode new_pick = this._exbp.getPick(pp);
|
---|
| 5731 | if(new_pick!=exbpnode){
|
---|
| 5732 | _exbp.mapfactory.selectedClear();
|
---|
| 5733 | }
|
---|
| 5734 |
|
---|
| 5735 | exbpnode = new_pick;
|
---|
| 5736 | if(new_pick!=null){
|
---|
| 5737 | System.out.println(
|
---|
| 5738 | new_pick.getLabel()+":Match="+
|
---|
| 5739 | new_pick.match)
|
---|
| 5740 | ;
|
---|
| 5741 |
|
---|
| 5742 | }
|
---|
| 5743 |
|
---|
| 5744 | if(exbpnode!=null){
|
---|
| 5745 | Path path = (Path)exbpnode.getOrgNode();
|
---|
| 5746 | int num = exbpnode.getLocatedLayer();
|
---|
| 5747 | System.out.println("setSPARQL num==>"+num);
|
---|
| 5748 |
|
---|
| 5749 | try {
|
---|
| 5750 | this._exbp.getMapFactory().spBuilder.setSPARQL(path,num);
|
---|
| 5751 | } catch (Exception e1) {
|
---|
| 5752 | // TODO Auto-generated catch block
|
---|
| 5753 | e1.printStackTrace();
|
---|
| 5754 | }
|
---|
| 5755 |
|
---|
| 5756 | }
|
---|
| 5757 | //this._exbp.getPick(pp);
|
---|
| 5758 |
|
---|
| 5759 | // if(exbpnode!=null){
|
---|
| 5760 | // if(exbpnode.evaluation!=0){
|
---|
| 5761 | // System.out.println("�ス�ス�ス�ス�ス]�ス�ス�ス�ス"+exbpnode.evaluation);
|
---|
| 5762 | // System.out.println("�ス墲ゥ�ス�ス竄キ�ス�ス�ス�ス"+exbpnode.evaluation_1);
|
---|
| 5763 | // System.out.println("�ス�ス�ス�ス�スフ再鯉ソス�ス�ス�スE�ステ難ソス�ス�ス�スE�スK�スリ撰ソス�ス�ス"+exbpnode.evaluation_2);
|
---|
| 5764 | // System.out.println("�ス�ス�スユ撰ソス�スE�スヤ暦ソス�ス�ス�スE�ス��ソス�ス�ス�ス"+exbpnode.evaluation_3);
|
---|
| 5765 | // System.out.println("�ス�ス�スz�スE�ス�ス�ス�ス�スx�ス�ス�スi�スh�ス�ス�スj�ス�ス"+exbpnode.evaluation_4);
|
---|
| 5766 | // System.out.println("�スR�ス�ス�ス�ス�スg�ス�ス"+exbpnode.evaluation_comment);
|
---|
| 5767 | // }
|
---|
| 5768 | // }
|
---|
| 5769 |
|
---|
| 5770 |
|
---|
| 5771 | // _exbp._popupMenu.setVisible(false);
|
---|
| 5772 |
|
---|
| 5773 | if(e.isShiftDown()){
|
---|
| 5774 | if(exbpnode!=null){
|
---|
| 5775 | //#kozaki�ス@2008/02/14�ス@�スQ�スツめ選�ス�ス�ス�ス�ス�ス�スm�ス[�スh�スノ趣ソス�ス�スp�スX�ス�ス�ス�ス�ス�ス�ス\�ス�ス
|
---|
| 5776 | this._exbp.paint2ndHighlit(exbpnode);
|
---|
| 5777 | return;
|
---|
| 5778 | }
|
---|
| 5779 | }
|
---|
| 5780 | else if(exbpnode!=null){
|
---|
| 5781 | this._exbp.exbp_node_pick=exbpnode; //#kozaki 2008/02/14
|
---|
| 5782 | // �スナ擾ソスハに趣ソス�ス�ス�ストゑソス�ス�ス
|
---|
| 5783 | this._exbp.reentryExbpNode(exbpnode);
|
---|
| 5784 | // OE�スフ描�ス�スy�スC�ス�ス�スノ選�ス�ス�ス�スヤに費ソス�スf
|
---|
| 5785 | // if(exbpnode.getHozoNode()!=null){
|
---|
| 5786 | // _exbp.mapfactory.selected(exbpnode);
|
---|
| 5787 | //// if(this._exbp._hzeditor!=null){
|
---|
| 5788 | //// this._exbp._hzeditor.WCEditor.browsingPanel.Jump(exbpnode.getHozoNode());
|
---|
| 5789 | //// }
|
---|
| 5790 | // }
|
---|
| 5791 |
|
---|
| 5792 | //
|
---|
| 5793 | // 09/11/5 #hirota �スハウ�スC�ス�ス�スh�スE�ス\�ス�ス
|
---|
| 5794 | // if(exbpnode.getOrgNode() instanceof Node){
|
---|
| 5795 | // _exbp.mapfactory.minibp.setNode((Node)exbpnode.getOrgNode());
|
---|
| 5796 | // }else if(exbpnode.getOrgNode() instanceof NodeRH){
|
---|
| 5797 | // _exbp.mapfactory.minibp.setNode( ((NodeRH)exbpnode.getOrgNode()) );
|
---|
| 5798 | // }
|
---|
| 5799 | // fin
|
---|
| 5800 |
|
---|
| 5801 |
|
---|
| 5802 | //#kozaki 2007/10/28�ス@�スI�ス�ス�ス�ス�ス�ス�スm�ス[�スh�スノゑソス�ス�ス�ス�スp�スX�ス�ス\�ス�ス
|
---|
| 5803 | if(e.isControlDown()){
|
---|
| 5804 | JOptionPane.showMessageDialog(_exbp, exbpnode.getPath());
|
---|
| 5805 |
|
---|
| 5806 | }
|
---|
| 5807 | System.out.println(exbpnode.getPath());
|
---|
| 5808 | //this._exbp.repaint();
|
---|
| 5809 | // Graphics g = this._exbp.getGraphics();
|
---|
| 5810 | // g.setColor(Color.red);
|
---|
| 5811 | // g.drawRect(exbpnode.x-1, exbpnode.y-1, exbpnode.width+2, exbpnode.height+2);
|
---|
| 5812 | // g.drawRect(exbpnode.x-2, exbpnode.y-2, exbpnode.width+4, exbpnode.height+4);
|
---|
| 5813 | // g.drawRect(exbpnode.x, exbpnode.y, exbpnode.width, exbpnode.height);
|
---|
| 5814 | // �スE�スN�ス�ス�スb�スN
|
---|
| 5815 | if(e.isMetaDown() || e.isControlDown()){
|
---|
| 5816 | // ExtendBPPopupMenu newPopupMenu = new ExtendBPPopupMenu(_exbp, exbpnode);
|
---|
| 5817 | // newPopupMenu.setVisible(false);
|
---|
| 5818 | // newPopupMenu.show(_exbp, pp.x, pp.y);
|
---|
| 5819 | }
|
---|
| 5820 | else if(exbpnode.equals(old_pick) && e.getClickCount()>1){//�ス_�スu�ス�ス�スN�ス�ス�スb�スN�ス�ス�ス�ス
|
---|
| 5821 | //System.out.println("Dobule Clike!! ::"+exbpnode.getLabel());
|
---|
| 5822 | /*if(exbpnode.equals(this._exbp.exbp_node_center)){
|
---|
| 5823 | //#kozaki �スo�スO�ス�ス�スナゑソスフでとりあ�ス�ス�ス�ス�ス�ス�ス�ス�ス�ス�スO�ス�ス�ス�ス�スy�スv�ス�ス�ス�ス�スz
|
---|
| 5824 | }
|
---|
| 5825 | else *///if(exbpnode.getChildren().size()==exbpnode.getVisbleChildren().size()){
|
---|
| 5826 | /*if(exbpnode.open_sub){
|
---|
| 5827 | exbpnode.setVisbleChildren(false);
|
---|
| 5828 | //System.out.println("exbpnode.setVisbleChildren(false)::"+exbpnode.getLabel());
|
---|
| 5829 | //System.out.println("--->Children Size = "+exbpnode.children.size());
|
---|
| 5830 |
|
---|
| 5831 | }else{
|
---|
| 5832 | exbpnode.setVisbleChildren(true);
|
---|
| 5833 | //System.out.println("exbpnode.setVisbleChildren(true)::"+exbpnode.getLabel());
|
---|
| 5834 | //System.out.println("--->Children Size = "+exbpnode.children.size());
|
---|
| 5835 | }*/
|
---|
| 5836 | //#kozaki 2009/02/13�ス@�スT�スu�スm�ス[�スh�スフ開�スツの�ソス�ス\�スb�スh�ス�スマ更
|
---|
| 5837 | exbpnode.changeOpenSub();
|
---|
| 5838 | _exbp.repaint();
|
---|
| 5839 | this._exbp._extendFrame.RefreshExbp();
|
---|
| 5840 | }
|
---|
| 5841 | }else{
|
---|
| 5842 | this._exbp.exbp_node_pick=null; //#kozaki 2008/02/14
|
---|
| 5843 | // this._exbp.repaint();
|
---|
| 5844 | }
|
---|
| 5845 |
|
---|
| 5846 |
|
---|
| 5847 |
|
---|
| 5848 |
|
---|
| 5849 | this._exbp.repaint();
|
---|
| 5850 |
|
---|
| 5851 |
|
---|
| 5852 | boolean skip=false;
|
---|
| 5853 | //#kozaki 2008/10/28�ス@�スN�ス�ス�スb�スN�ス�ス�ス�ス�ス�ス�ス_�スナコ�ス}�ス�ス�スhTree�ス�ス�スN�ス�ス�スA
|
---|
| 5854 | //if(exbpnode!=null){
|
---|
| 5855 | //_exbp.cmd_dialog.setCommandOptions(exbpnode);
|
---|
| 5856 | //#kozaki 2009/01/08�ス@�スX�ス�ス�スb�スh�ス�ス�ス�ス�スノ変更 �ス�ス�ス�ス�ス�ス�スハゑソスヤゑソス�スニゑソス�スノは擾ソス�ス�ス�ス�ス�スX�スL�スb�スv�ス�ス�ス�ス
|
---|
| 5857 | // if(exbpnode==null){
|
---|
| 5858 | // if(_exbp.cmd_dialog.thread_waitng){
|
---|
| 5859 | // _exbp.cmd_dialog.selected_exbp=null;
|
---|
| 5860 | // }else{
|
---|
| 5861 | // _exbp.cmd_dialog.resetCommandOptions();
|
---|
| 5862 | // }
|
---|
| 5863 | // }
|
---|
| 5864 | // else if(exbpnode.equals(_exbp.cmd_dialog.selected_exbp)){
|
---|
| 5865 | // //return;
|
---|
| 5866 | // }
|
---|
| 5867 | // else{
|
---|
| 5868 | // if(_exbp.cmd_dialog.selected_exbp!=null){
|
---|
| 5869 | // if(_exbp.cmd_dialog.all_node.isSelected() &&
|
---|
| 5870 | // exbpnode.getLocatedLayer()==_exbp.cmd_dialog.selected_exbp.getLocatedLayer()){
|
---|
| 5871 | // skip = true;
|
---|
| 5872 | // }
|
---|
| 5873 | // }
|
---|
| 5874 | //
|
---|
| 5875 | // if(!skip){
|
---|
| 5876 | // if(_exbp.cmd_dialog.thread_waitng){
|
---|
| 5877 | // _exbp.cmd_dialog.setCommandOptionsForNext(exbpnode);
|
---|
| 5878 | // }else{
|
---|
| 5879 | // _exbp.cmd_dialog.setCommandOptionsAsThread(exbpnode);
|
---|
| 5880 | // }
|
---|
| 5881 | // }
|
---|
| 5882 | // }
|
---|
| 5883 |
|
---|
| 5884 | // �スE�スN�ス�ス�スb�スN
|
---|
| 5885 | if((e.isMetaDown() || e.isControlDown())){
|
---|
| 5886 | //System.out.println("_exbp._popupMenu.show(_exbp, pp.x, pp.y);");
|
---|
| 5887 | // if(exbpnode!=null){
|
---|
| 5888 | // _exbp._popupMenu.setPopupMenu(exbpnode);
|
---|
| 5889 | // _exbp._popupMenu.show(_exbp, pp.x, pp.y);
|
---|
| 5890 | // }
|
---|
| 5891 | // else{
|
---|
| 5892 | // _exbp._popupMenu.show(_exbp, pp.x, pp.y);
|
---|
| 5893 | // }
|
---|
| 5894 | }
|
---|
| 5895 |
|
---|
| 5896 |
|
---|
| 5897 |
|
---|
| 5898 |
|
---|
| 5899 |
|
---|
| 5900 | // if(exbpnode==null || _exbp.cmd_dialog.selected_node_only.isSelected()){
|
---|
| 5901 | // _exbp.cmd_dialog.setCommandOptions(exbpnode);
|
---|
| 5902 | // }
|
---|
| 5903 | // else if(exbpnode.equals(_exbp.cmd_dialog.selected_exbp)){
|
---|
| 5904 | // return;
|
---|
| 5905 | // }
|
---|
| 5906 | // else if(_exbp.cmd_dialog.selected_exbp==null){
|
---|
| 5907 | // if(_exbp.cmd_dialog.thread_waitng){
|
---|
| 5908 | // _exbp.cmd_dialog.setCommandOptionsForNext(exbpnode);
|
---|
| 5909 | // }else{
|
---|
| 5910 | // _exbp.cmd_dialog.setCommandOptionsAsThread(exbpnode);
|
---|
| 5911 | // }
|
---|
| 5912 | // }else if(exbpnode.getLocatedLayer()!=_exbp.cmd_dialog.selected_exbp.getLocatedLayer()){
|
---|
| 5913 | // if(_exbp.cmd_dialog.thread_waitng){
|
---|
| 5914 | // _exbp.cmd_dialog.setCommandOptionsForNext(exbpnode);
|
---|
| 5915 | // }else{
|
---|
| 5916 | // _exbp.cmd_dialog.setCommandOptionsAsThread(exbpnode);
|
---|
| 5917 | // }
|
---|
| 5918 | // }
|
---|
| 5919 |
|
---|
| 5920 |
|
---|
| 5921 | //}
|
---|
| 5922 |
|
---|
| 5923 |
|
---|
| 5924 | //this._exbp.repaint();�ス@#kozaki�スb�ス�ス
|
---|
| 5925 | }
|
---|
| 5926 |
|
---|
| 5927 | public void mouseEntered(MouseEvent e) {
|
---|
| 5928 | }
|
---|
| 5929 |
|
---|
| 5930 | public void mouseExited(MouseEvent e) {
|
---|
| 5931 | }
|
---|
| 5932 |
|
---|
| 5933 | // �ス}�スE�スX�ス�ス�ス�ス�ス�ス�ス黷ス�スニゑソス�スフイ�スx�ス�ス�スg
|
---|
| 5934 | public void mousePressed(MouseEvent e) {
|
---|
| 5935 | press_point = e.getPoint();
|
---|
| 5936 | mouseClicked2(e);
|
---|
| 5937 | }
|
---|
| 5938 |
|
---|
| 5939 | // �ス}�スE�スX�ス」ゑソス�ス�ス�スニゑソス�スフア�スN�スV�ス�ス�ス�ス
|
---|
| 5940 | public void mouseReleased(MouseEvent e) {
|
---|
| 5941 | //System.out.println("mouseReleased ...");
|
---|
| 5942 | /* if (exbpnode != null && !exbpnode.equals(_exbp.exbp_node_center)) {
|
---|
| 5943 | // exbpnode.x = e.getX();
|
---|
| 5944 | // exbpnode.y = e.getY();
|
---|
| 5945 | // //pick.fixed = pickfixed;
|
---|
| 5946 | exbpnode = null;
|
---|
| 5947 | }
|
---|
| 5948 | _exbp.repaint();
|
---|
| 5949 | e.consume();*/
|
---|
| 5950 | }
|
---|
| 5951 |
|
---|
| 5952 | // �ス}�スE�スX�ス�ス�スz�スC�ス[�ス�ス�ス�ス�ス�ス�スニゑソス�スフア�スN�スV�ス�ス�ス�ス
|
---|
| 5953 | /* public void mouseWheelMoved (MouseWheelEvent e) {
|
---|
| 5954 | // System.out.println("MouseWheel Moved ...");
|
---|
| 5955 | int amount = e.getWheelRotation();
|
---|
| 5956 |
|
---|
| 5957 | try {
|
---|
| 5958 | // Ctrl�スL�ス[�ス�ス�ス�ス�ス�ス�ス�ストゑソス�ス�スホ、�ス�ス�スX�スN�ス�ス�ス[�ス�ス�スi�スハ擾ソスA�スc�スX�スN�ス�ス�ス[�ス�ス�スj
|
---|
| 5959 | if(e.isControlDown()) {
|
---|
| 5960 | _bpGraphicPanel.bp.SCB_horz.setValue(
|
---|
| 5961 | _bpGraphicPanel.bp.SCB_horz.getValue()
|
---|
| 5962 | + amount * WHEEL_SCROLL_RATE);
|
---|
| 5963 | } else {
|
---|
| 5964 | _bpGraphicPanel.bp.SCB_vert.setValue(
|
---|
| 5965 | _bpGraphicPanel.bp.SCB_vert.getValue()
|
---|
| 5966 | + amount * WHEEL_SCROLL_RATE);
|
---|
| 5967 | }
|
---|
| 5968 | } catch (NullPointerException ne) {
|
---|
| 5969 | // �ス�ス�ス�ス�ス�ス�スネゑソス
|
---|
| 5970 | } finally {
|
---|
| 5971 |
|
---|
| 5972 | }
|
---|
| 5973 | }*/
|
---|
| 5974 |
|
---|
| 5975 |
|
---|
| 5976 |
|
---|
| 5977 |
|
---|
| 5978 | public void mouseWheelMoved(MouseWheelEvent arg0) {
|
---|
| 5979 |
|
---|
| 5980 | }
|
---|
| 5981 |
|
---|
| 5982 | } // end BPMouseListener
|
---|
| 5983 |
|
---|
| 5984 | /*
|
---|
| 5985 | class RoleLists_old {
|
---|
| 5986 |
|
---|
| 5987 | Vector<String> roles = new Vector<String>();
|
---|
| 5988 |
|
---|
| 5989 | RoleLists(){
|
---|
| 5990 | }
|
---|
| 5991 |
|
---|
| 5992 | Vector<String> getRoleLists(){
|
---|
| 5993 | return roles;
|
---|
| 5994 | }
|
---|
| 5995 |
|
---|
| 5996 | void addRole(String role){
|
---|
| 5997 | if(roles.contains(role)){
|
---|
| 5998 | return;
|
---|
| 5999 | }
|
---|
| 6000 | else{
|
---|
| 6001 | roles.add(role);
|
---|
| 6002 | }
|
---|
| 6003 | }
|
---|
| 6004 |
|
---|
| 6005 | void clearRoles(){
|
---|
| 6006 | roles.removeAllElements();
|
---|
| 6007 | }
|
---|
| 6008 | }*/
|
---|
| 6009 |
|
---|
| 6010 | //#kozaki 2008/10/25�ス@�スq�スb�スg�ス�ス�ス�スRole�ス�ス�スi�スネど)�スニヒ�スb�スg�ス�ス�ス�ス�スワとめて管暦ソス�ス�ス�ス�ス謔、�スノ拡�ス�ス
|
---|
| 6011 | class RoleLists {
|
---|
| 6012 |
|
---|
| 6013 | Vector<String> roles = new Vector<String>();
|
---|
| 6014 | Vector<Integer> hit_num = new Vector<Integer>();
|
---|
| 6015 |
|
---|
| 6016 | RoleLists(){
|
---|
| 6017 | }
|
---|
| 6018 |
|
---|
| 6019 | Vector<String> getRoleLists(){
|
---|
| 6020 | return roles;
|
---|
| 6021 | }
|
---|
| 6022 |
|
---|
| 6023 | Vector<Integer> getHitNumLists(){
|
---|
| 6024 | return hit_num;
|
---|
| 6025 | }
|
---|
| 6026 |
|
---|
| 6027 |
|
---|
| 6028 | //#kozaki�ス@2009/01/22 �スヌ会ソス�ス�ス�ス�ス�ス�スTRUE�ス�スヤゑソス
|
---|
| 6029 | boolean addRole(String role){
|
---|
| 6030 | if(roles.contains(role)){
|
---|
| 6031 | int index = roles.indexOf(role);
|
---|
| 6032 | Integer num = hit_num.elementAt(index);
|
---|
| 6033 | Integer new_num =new Integer((num.intValue())+1);
|
---|
| 6034 | hit_num.set(index,new_num);
|
---|
| 6035 | //hit_num.removeElement(num);
|
---|
| 6036 | //System.out.println("addRole++:::"+role);
|
---|
| 6037 | return false;
|
---|
| 6038 | }
|
---|
| 6039 | else{
|
---|
| 6040 | roles.add(role);
|
---|
| 6041 | hit_num.add(new Integer(1));
|
---|
| 6042 | return true;
|
---|
| 6043 | }
|
---|
| 6044 | }
|
---|
| 6045 |
|
---|
| 6046 | void clearRoles(){
|
---|
| 6047 | roles.removeAllElements();
|
---|
| 6048 | hit_num.removeAllElements();
|
---|
| 6049 | }
|
---|
| 6050 | }
|
---|
| 6051 |
|
---|
| 6052 |
|
---|
| 6053 | //class ChangeViewFrame extends JFrame {}
|
---|
| 6054 |
|
---|
| 6055 | // #hirota 09/5/14 �スヌ会ソス #kozaki�ス@2009/05/26�ス@�スマ更
|
---|
| 6056 | //class ChangeViewFrameRole_at extends JFrame {}
|
---|
| 6057 |
|
---|
| 6058 | //#kozaki 2010/07/04
|
---|
| 6059 | //class ChangeViewFrameByTopic extends JFrame{}
|
---|
| 6060 |
|
---|
| 6061 | //#kozaki 2011/01/26
|
---|
| 6062 | //class ChangeViewFrameTopicColor extends JFrame{}
|
---|
| 6063 |
|
---|
| 6064 |
|
---|
| 6065 |
|
---|
| 6066 | //class ChangeViewFrameRole extends JFrame {}
|
---|
| 6067 |
|
---|
| 6068 |
|
---|
| 6069 |
|
---|
| 6070 |
|
---|
| 6071 | // #kozaki�ス@2009/05/27�ス@�スマ更
|
---|
| 6072 | //class MatrixViewFrame extends JFrame {}
|
---|
| 6073 |
|
---|
| 6074 |
|
---|
| 6075 | //#kozaki 2010/01/25
|
---|
| 6076 | //class ChangeViewFrameClass_at extends JFrame {}
|
---|
| 6077 |
|
---|
| 6078 |
|
---|
| 6079 |
|
---|