Index: BH13SPARQLBuilder/src/hozo/maptool/ExtendFrame.java
===================================================================
--- BH13SPARQLBuilder/src/hozo/maptool/ExtendFrame.java (revision 7)
+++ BH13SPARQLBuilder/src/hozo/maptool/ExtendFrame.java (revision 7)
@@ -0,0 +1,1707 @@
+package hozo.maptool;
+
+import java.awt.BorderLayout;
+import java.awt.Checkbox;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.GridLayout;
+import java.awt.Image;
+import java.awt.Point;
+import java.awt.Toolkit;
+import java.awt.event.*;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.util.*;
+import java.io.*;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JCheckBoxMenuItem;
+import javax.swing.JComboBox;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+import javax.swing.JList;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import java.beans.*;
+
+public class ExtendFrame extends JFrame {
+
+	private static final long serialVersionUID = 1L;
+
+	//#kozaki 2008/10/05�ｽ@GUI�ｽﾌア�ｽN�ｽZ�ｽX�ｽ�ｽprivate�ｽ�ｽ�ｽ�ｽﾏ更
+	private ExtendBP _exbp = null;
+	JScrollPane jsp_exbp;
+	JTextField jtf_nodesize = new JTextField("12",5);
+	JTextField jtf_layer = new JTextField("4",5);
+	JTextField jtf_width = new JTextField("100",5);
+    JTextField jtf_scale = new JTextField("10",5);
+    JTextField jtf_rotation = new JTextField("0",5);
+    JCheckBox jCB_VisibleCenter;
+    JCheckBox jCB_VisibleInflu;
+    JCheckBox jCB_VisibleLink;
+    JCheckBox jCB_VisibleLayer;
+    JCheckBox jCB_VisibleBorder;
+    JTextField jTF_Option;
+
+    private JComboBox jCB_LayoputOption;
+
+    private JComboBox jCB_LocalPath;
+    private String _localProjectRootPath;
+    private List _localPathList;
+    private static final int MAX_HISTORY_SIZE = 10;
+    private static String HISTORY_PATH = "temp";
+    private static String LOCAL_HISTORY_FILE_NAME = "map.his";
+	
+    private static final String DEFAULT_TITLE = "Hozo2Map";
+    
+    private static final String SERVICE_URL_FILE = "extools.ini";
+    protected static final String DEFAULT_SERVICE_URL = "http://localhost:8080";
+
+	protected static String SERVICE_URL = DEFAULT_SERVICE_URL;
+    
+    private JButton select_option = new JButton("...");
+//    EtendBPSelectDialog select_dialog;
+    
+    JCheckBox jCB_stop;
+    JCheckBox jCB_PlaceOnLayer;
+    JCheckBox jCB_showEdges;
+    
+    public int rotation = 0;
+    Double arc = 1.0; 
+
+    JCheckBox jCB_stoplist;
+    String[] stoplist_string={
+    		"process","object","quantity","flow","agent","value",
+    		"attribute","natural construction","substance","Artificial object",
+    		"action","activity","situation","substrate","Big","Speed","direction of change",
+    		"�ｽv�ｽ�ｽ�ｽZ�ｽX","�ｽ�ｽ","�ｽl�ｽH�ｽ�ｽ","�ｽ�ｽ�ｽ�ｽ","�ｽ�ｽ�ｽ�ｽ","�ｽ�ｽ","�ｽ�ｽ�ｽ�ｽ","�ｽG�ｽ[�ｽW�ｽF�ｽ�ｽ�ｽg","�ｽl"};
+    JMenuItem JMI_stoplist = new JMenuItem("Edit Stop List");
+    
+    JMenuBar menubar = new JMenuBar();
+    JMenu filemenu = new JMenu("File");
+    JMenu viewmenu = new JMenu("View");		//#ohta 2008/11/18 View�ｽ�ｽ�ｽj�ｽ�ｽ�ｽ[�ｽﾌ追会ｿｽ
+    JMenuItem JMI_OpenMap = new JMenuItem("OpenMap");
+    JMenuItem JMI_SaveMap = new JMenuItem("SaveMap");
+    JMenuItem JMI_MergeMap = new JMenuItem("MergeMap");
+    JMenuItem JMI_CompareMap = new JMenuItem("Compare Maps");
+    JMenuItem JMI_ShowAspects = new JMenuItem("show Aspect Dialog");
+    JMenuItem JMI_ChangeView = new JMenuItem("Change View");
+    JMenuItem JMI_SerachPath = new JMenuItem("Search Path");
+    JMenuItem JMI_SerachPathEasy = new JMenuItem("<html><font color=red><b>Search Path (Easy)");
+    JMenuItem JMI_ChangeViewRole = new JMenuItem("Change View(by Role)");
+    JCheckBoxMenuItem JCMI_isSublang = new JCheckBoxMenuItem("Sub Langage");
+    
+    // #hirota 09/5/14
+    JMenuItem JMI_ChangeViewRole_at = new JMenuItem("Change View(by Role_attribute)");
+    
+    //	#kozaki�ｽ@2010/01/25�ｽ@�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ�ｽMAP�ｽ�ｽ�ｽ�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽl�ｽi�ｽ�ｽ�ｽ�ｽ�ｽj�ｽ�ｽ�ｽ�ｽ�ｽﾂノ�ｽ[�ｽh�ｽ�ｽ�ｽn�ｽC�ｽ�ｽ�ｽC�ｽg
+    JMenuItem JMI_ChangeViewClass_at = new JMenuItem("Change View(by Class_attribute)");
+    
+    // #kozaki�ｽ@2009/05/27
+    JMenuItem JMI_MatrixView = new JMenuItem("Matrix View");
+          
+    public ExtendFrame compare_map; //#kozaki 2008/08/18
+    
+    //#hirota mappath�ｽ�ｽr�ｽp
+    int max_node_tensuu=0,max_link_tensuu=0;
+    public Vector path_list = new Vector(); // �ｽ�ｽ�ｽﾏ撰ｿｽ
+    public Vector subpath_list = new Vector(); // 
+    
+	
+	/**
+	 * This is the default constructor
+	 */
+	public ExtendFrame(MapFactory fac) {
+		super();
+		_exbp = new ExtendBP(fac);
+		_exbp._extendFrame=this;
+		_exbp.setPreferredSize(new Dimension(2000,2000));
+		
+		// #hirota 09/4/27 add
+//		_exbp._extendFrame.setLocation(_exbp.cmd_dialog.getWidth(), 0);
+		 //new DockingListener(_exbp._extendFrame, _exbp.cmd_dialog);
+		 
+		initialize();
+	
+        this._localPathList = new ArrayList();
+        
+        this.setLocalPathHistory();     // �ｽq�ｽX�ｽg�ｽ�ｽ�ｽ[�ｽﾌ読搾ｿｽ
+        this.updateDisplay();    // �ｽ�ｽﾊゑｿｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽ
+        this.getServiceURL();    // URL�ｽﾌ趣ｿｽ闕橸ｿｽ�ｽ
+        
+        
+    }
+
+	
+	public static void main (String[] args) {
+		ExtendFrame exfm = new ExtendFrame(null);
+        //exfm.setHZEditor(_hzEditor);
+		exfm._exbp.exbp_node_center=new ExbpNode(0,0,0,0);
+        exfm.setVisible(true);
+        //exfm.RefreshExbp();    
+        
+		
+		
+	}
+	
+	
+	
+	//#kozaki 2008/08/18
+	//#hirota 08/20 
+	void setCompare(){
+		//System.out.println("setCompare:::");
+		if(this._exbp.mapfactory.getMapVec().size() == 1){
+			System.out.println("not Compare!!!");
+			return;
+		}
+		
+		// Map_vec dialog �ｽ\�ｽ�ｽ
+		Vector tmp = new Vector();// select_name�ｽﾇ暦ｿｽ
+		Vector Exf = new Vector();
+		Enumeration e = this._exbp.mapfactory.getMapVec().elements();
+		while(e.hasMoreElements()){
+			ExtendFrame f = (ExtendFrame)e.nextElement();
+			if(!this.equals(f)) {
+				tmp.add(f._exbp.exbp_node_center.getLabel() + ":" + f.getOption());
+				Exf.add(f);
+			}
+		}
+		JList jlist = new JList(tmp);
+		
+		JScrollPane jsc = new JScrollPane(jlist);
+		int ans = JOptionPane.showConfirmDialog(this,jsc,"Compare ",JOptionPane.YES_NO_CANCEL_OPTION );
+		
+		this._exbp.topicColorList.add(Color.red);
+		this._exbp.topicColorList.add(Color.blue);
+		
+		ExtendFrame comp=null;
+		if(ans==JOptionPane.YES_OPTION ){
+
+
+			comp = (ExtendFrame)Exf.elementAt(jlist.getSelectedIndex());
+
+			comp._exbp.topicColorList.add(Color.red);
+			comp._exbp.topicColorList.add(Color.blue);
+
+			System.out.println("select ::"+ comp._exbp.exbp_node_center.getLabel() + ":" + comp.getOption());		
+		
+		
+			// check
+			Enumeration en = this.getExtendBP().nodes.elements();
+			while(en.hasMoreElements()){
+				ExbpNode node = (ExbpNode)en.nextElement();
+								
+				// ROOT�ｽﾍ擾ｿｽ�ｽO
+				if(node.getOrgNode() != null/* && !(node.getHozoNode() instanceof NodeRH)*/){
+					Object hozonode = node.getOrgNode();
+					//System.out.println("Check:::"+hozonode.getLabel());
+					
+					Enumeration en_comp = comp._exbp.nodes.elements();
+					while(en_comp.hasMoreElements()){
+						ExbpNode node_comp = (ExbpNode)en_comp.nextElement();
+								
+						//ROOT�ｽﾍ擾ｿｽ�ｽO
+						if( node_comp.getOrgNode() != null/* && !(node_comp.getOrgNode() instanceof NodeRH)*/){
+							
+							if(node_comp.getOrgNode().equals(hozonode)){
+								//node.highlight=true;
+								//node_comp.highlight=true;
+								node.setHighLight(true, Color.darkGray);
+								/*node.color=Color.white;
+								node_comp.setHighLight(true, Color.darkGray);
+								node_comp.color=Color.white;*/
+								node.addTopicColor(Color.red);
+								node.addTopicColor(Color.blue);
+								node_comp.addTopicColor(Color.red);
+								node_comp.addTopicColor(Color.blue);
+								
+								
+								System.out.println("March:::"+node.getLabel());
+								//break;
+							}
+						}
+					}							
+					
+				}else{
+					// ozonode = null;
+				}
+			}
+			
+			this.getExtendBP().repaint();		
+		}
+	}
+	
+	int addTopicColorToALLNode(Color clr){
+		int count=0;
+		Enumeration en = this.getExtendBP().nodes.elements();
+		while(en.hasMoreElements()){
+			ExbpNode node = (ExbpNode)en.nextElement();
+			if(node.open_sub=false){
+				node.setChildrenVisible(false);
+			}
+		}
+		
+		en = this.getExtendBP().nodes.elements();
+		while(en.hasMoreElements()){
+			ExbpNode node = (ExbpNode)en.nextElement();
+			if(node.visible){
+				node.addTopicColor(clr);
+				count++;
+			}
+			else{
+				node.color=Color.white;
+			}
+		}					
+		return count;
+	}
+	
+	int compareMaps(ExtendFrame exf1, Color clr1, 
+					ExtendFrame exf2, Color clr2){
+		//System.out.println("setCompare:::");
+		int count=0;
+//		this._exbp.topicColorList.add(Color.red);
+//		this._exbp.topicColorList.add(Color.blue);
+//		
+//		comp = (ExtendFrame)Exf.elementAt(jlist.getSelectedIndex());
+//
+//			comp._exbp.topicColorList.add(Color.red);
+//			comp._exbp.topicColorList.add(Color.blue);
+//
+//			System.out.println("select ::"+ comp._exbp.exbp_node_center.getLabel() + ":" + comp.getOption());		
+		
+		
+			// check
+			Enumeration en = exf1.getExtendBP().nodes.elements();
+			while(en.hasMoreElements()){
+				ExbpNode node = (ExbpNode)en.nextElement();
+								
+				// ROOT�ｽﾍ擾ｿｽ�ｽO
+				if(node.visible && node.getOrgNode() != null/* && !(node.getHozoNode() instanceof NodeRH)*/){
+					Object hozonode = node.getOrgNode();
+					//System.out.println("Check:::"+hozonode.getLabel());
+					
+					Enumeration en_comp = exf2._exbp.nodes.elements();
+					while(en_comp.hasMoreElements()){
+						ExbpNode node_comp = (ExbpNode)en_comp.nextElement();
+								
+						//ROOT�ｽﾍ擾ｿｽ�ｽO
+						if(node_comp.visible && node_comp.getOrgNode() != null/* && !(node_comp.getOrgNode() instanceof NodeRH)*/){
+							
+							if(node_comp.getOrgNode().equals(hozonode)){
+								count++;
+								//node.highlight=true;
+								//node_comp.highlight=true;
+								node.setHighLight(true, Color.darkGray);
+								/*node.color=Color.white;
+								node_comp.setHighLight(true, Color.darkGray);
+								node_comp.color=Color.white;*/
+								node.addTopicColor(clr2);
+								//node.addTopicColor(Color.blue);
+								node_comp.addTopicColor(clr1);
+								//node_comp.addTopicColor(Color.blue);
+								
+								
+								//System.out.println("March:::"+node.getLabel());
+								//break;
+							}
+						}else{
+							//System.out.println("exf2:HOZO-NODE=NULL");
+						}
+					}							
+					
+				}else{
+					//System.out.println("exf1:HOZO-NODE=NULL");
+					// ozonode = null;
+				}
+			
+			
+		}
+	return count;
+	}
+	
+	
+	// #hirota 09/12/17 
+	void ComparePath(ExbpNode _exbpNode){
+		//System.out.println("setCompare:::");
+		if(this._exbp.mapfactory.getMapVec().size() == 1){
+			System.out.println("not Compare!!!");
+			return;
+		}
+		
+		// Map_vec dialog �ｽ\�ｽ�ｽ
+		Vector tmp = new Vector();// select_name�ｽﾇ暦ｿｽ
+		Vector Exf = new Vector();
+		Enumeration e = this._exbp.mapfactory.getMapVec().elements();
+		while(e.hasMoreElements()){
+			ExtendFrame f = (ExtendFrame)e.nextElement();
+			if(!this.equals(f)) {
+				tmp.add(f._exbp.exbp_node_center.getLabel() + ":" + f.getOption());
+				Exf.add(f);
+			}
+		}
+		JList jlist = new JList(tmp);
+		
+		JScrollPane jsc = new JScrollPane(jlist);
+		int ans = JOptionPane.showConfirmDialog(this,jsc,"Compare ",JOptionPane.YES_NO_CANCEL_OPTION );
+		
+		ExtendFrame comp=null;
+		if(ans==JOptionPane.YES_OPTION ){
+			
+			comp = (ExtendFrame)Exf.elementAt(jlist.getSelectedIndex());
+
+			System.out.println("select ::"+ comp._exbp.exbp_node_center.getLabel() + ":" + comp.getOption());		
+		
+		
+			// check
+			Enumeration en = this.getExtendBP().nodes.elements();
+			while(en.hasMoreElements()){
+				ExbpNode node = (ExbpNode)en.nextElement();
+								
+				// ROOT�ｽﾍ擾ｿｽ�ｽO
+				if(node.getOrgNode() != null/* && !(node.getHozoNode() instanceof NodeRH)*/){
+					Object hozonode = node.getOrgNode();
+					//System.out.println("Check:::"+hozonode.getLabel());
+					
+					Enumeration en_comp = comp._exbp.nodes.elements();
+					while(en_comp.hasMoreElements()){
+						ExbpNode node_comp = (ExbpNode)en_comp.nextElement();
+								
+						//ROOT�ｽﾍ擾ｿｽ�ｽO
+						if( node_comp.getOrgNode() != null/* && !(node_comp.getOrgNode() instanceof NodeRH)*/){
+							
+							if(node_comp.getOrgNode().equals(hozonode)){
+								//node.highlight=true;
+								//node_comp.highlight=true;
+								//System.out.println("March:::"+node.getLabel());
+								//break;
+							}
+						}
+					}							
+					
+				}else{
+					// ozonode = null;
+				}
+			}
+			
+			this.getExtendBP().repaint();	
+			
+			// #hirota 09/12/17 path�ｽ�ｽr�ｽ�ｽ�ｽ�ｽ
+			// 
+			
+			      
+			      
+		      // �ｽ�ｽ�ｽﾛの擾ｿｽ�ｽ�ｽ
+		      // _exbpNode:�ｽ�ｽ�ｽﾆ選�ｽ�ｽ�ｽp�ｽX�ｽC_exbp:�ｽ�ｽ�ｽ�ｽ�ｽ}�ｽb�ｽv
+		      ExbpNode _exbpNode_moto = _exbpNode;
+		      Enumeration nodes_en =comp._exbp.nodes.elements();
+				while(nodes_en.hasMoreElements()){
+					ExbpNode exnode = (ExbpNode)nodes_en.nextElement();
+					int tensuu=0;
+					if(exnode.visible == true){
+						
+						//
+						// �ｽ�ｽ�ｽﾆ選�ｽ�ｽ�ｽp�ｽX�ｽ@�ｽ�ｽi�ｽ�ｽ�ｽﾂゑｿｽ�ｽ轤ｷ
+						while(_exbpNode != null ){
+							
+							// System.out.println("�ｽ�ｽ�ｽ�ｽ:"+  _exbpNode.label );
+							//	�ｽ�ｽ�ｽx�ｽ�ｽ�ｽ�ｽv�ｽ�ｽ�ｽ�ｽﾆ，�ｽ�ｽ�ｽs�ｽC
+							if(exnode.getLabel().equals(_exbpNode.getLabel())) {
+								
+								// �ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽv�ｽ�ｽ�ｽ�ｽ�ｽ+1�ｽ_
+								if( exnode.key.equals(_exbpNode.key)){
+									//tensuu++;
+								}
+								//System.out.println("�ｽ�ｽ selected_path :"+ "("+ _exbpNode.label + ")" + exnode.getPath());
+								//String str = "�ｽ�ｽ selected_path :"+ "("+ _exbpNode.label + ")" + exnode.getPath();
+								String str = "�ｽ�ｽ selected_path :";
+								System.out.println(str);
+								
+								// old
+								//exnode.tracepath(_exbpNode, tensuu, str);		
+								
+//								// new �ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽI�ｽI
+//								str = tracepath(_exbpNode,_exbpNode, tensuu, str);	
+//								System.out.println(str);
+								
+							}else{
+								
+							}
+							
+							_exbpNode = _exbpNode.parent;								
+						}
+						_exbpNode = _exbpNode_moto ;
+						
+					}					
+					else{
+						
+					}
+					
+				}
+				//
+				
+		}
+	}
+
+	// #hirota 09/12/21 new 
+	void CompareAllMAP_Path(ExbpNode _exbpNode){}
+	
+	void CompareAllMAP_Path_sub(ExbpNode _exbpNode){}
+	
+	public void tracepath(ExbpNode target_node, ExbpNode _exbpNode,int node_tensuu, int link_tensuu, String s){
+		
+		if(target_node.parent != null){
+			if(_exbpNode != null ){
+				if(target_node.visible == true){
+					
+					if(target_node.label.equals(_exbpNode.label)){
+						
+						node_tensuu++;
+						if(target_node.key.equals(_exbpNode.key) ){
+							link_tensuu++;
+						}				
+						
+						
+						//	System.out.println("*** :"+ this.label + ", �ｽ�ｽ " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
+						// max�ｽ�ｽ�ｽﾜゑｿｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽﾈゑｿｽ�ｽ鼾�ｿｽﾌ擾ｿｽ�ｽ�ｽ cast�ｽG�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽﾅるた�ｽ�ｽ
+						String str = null;
+						if(max_node_tensuu == 0 && max_link_tensuu == 0){
+							str = " *"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+							+ target_node.parent.label+ ","+node_tensuu+","+link_tensuu;
+						}else{
+							String[] s_tmp = s.split(","); // s_tmp[0]:path
+							str = s_tmp[0] + "\n  *"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+							+ target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;						
+//							str = " :"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+//							+ target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;
+						}						
+						System.out.println(str);						
+						
+						//target_node.setColorFont(Color.red,font);
+						path_list.add(str);
+						subpath_list.add(target_node);
+						//path_list.add(s+"\n"+str);
+						//tracepath(target_node.parent,_exbpNode.parent,node_tensuu,link_tensuu,s+"\n"+str);					
+						tracepath(target_node.parent,_exbpNode.parent,node_tensuu,link_tensuu,str);
+					
+					}else{
+						// #hirota 09/12/24 �ｽm�ｽ[�ｽh�ｽ�ｽv�ｽ�ｽ�ｽﾄゑｿｽ�ｽﾈゑｿｽ�ｽﾄゑｿｽ�ｽC�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾂづゑｿｽ�ｽ�ｽ@�ｽ�ｽ�ｽﾆ難ｿｽ�ｽ�ｽ�ｽ@�ｽ�ｽ�ｽ_�ｽﾍゑｿｽ�ｽﾈゑｿｽ
+						if(target_node.key.equals(_exbpNode.key) ){
+							link_tensuu++;
+						}				
+						
+						
+						// System.out.println("*** :"+ this.label + ", �ｽ�ｽ " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
+						// max�ｽ�ｽ�ｽﾜゑｿｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽﾈゑｿｽ�ｽ鼾�ｿｽﾌ擾ｿｽ�ｽ�ｽ cast�ｽG�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽﾅるた�ｽ�ｽ
+						String str = null;
+						if(max_node_tensuu == 0 && max_link_tensuu == 0){
+							str = " **"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+							+ target_node.parent.label+ ","+node_tensuu+","+link_tensuu;
+						}else{
+							String[] s_tmp = s.split(","); // s_tmp[0]:path
+							str = s_tmp[0] + "\n  **"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+							+ target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;					
+
+						}						
+						System.out.println(str);					
+						path_list.add(str);	
+						subpath_list.add(target_node);
+						tracepath(target_node.parent,_exbpNode.parent,node_tensuu,link_tensuu,str);
+						
+						// System.out.println("*** error");
+						// return null;
+					}
+				}
+				
+			}
+			
+		}else{
+		 // OK			
+		}		
+		//return null;		
+	}
+	
+	// 09/12/25 �ｽ�ｽ�ｽ
+	//	 #hirota 09/12/17 �ｽ�ｽ�ｽ�ｽ�ｽﾌパ�ｽX�ｽ]�ｽ�ｽ�ｽp�ｽ�ｽ�ｽ�ｽ
+	public void tracepathToTarget(ExbpNode target_node, ExbpNode _exbpNode,int node_tensuu, int link_tensuu, String s){
+		
+		// �ｽI�ｽ�ｽ�ｽ�ｽ�ｽ黷ｽ�ｽ�ｽ�ｽﾔ目的�ｽm�ｽ[�ｽh�ｽﾅはなゑｿｽ�ｽ鼾�
+		if( ! _exbpNode.equals(target_node) ){
+			
+			if(_exbpNode != null ){
+				if(target_node.visible == true){
+					
+					if(target_node.label.equals(_exbpNode.label)){
+						
+						node_tensuu++;
+						if(target_node.key.equals(_exbpNode.key) ){
+							link_tensuu++;
+						}				
+						
+						
+						//	System.out.println("*** :"+ this.label + ", �ｽ�ｽ " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
+						// max�ｽ�ｽ�ｽﾜゑｿｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽﾈゑｿｽ�ｽ鼾�ｿｽﾌ擾ｿｽ�ｽ�ｽ cast�ｽG�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽﾅるた�ｽ�ｽ
+						String str = null;
+						if(max_node_tensuu == 0 && max_link_tensuu == 0){
+							str = " *"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+							+ target_node.parent.label+ ","+node_tensuu+","+link_tensuu;
+						}else{
+							String[] s_tmp = s.split(","); // s_tmp[0]:path
+							str = s_tmp[0] + "\n  *"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+							+ target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;						
+//							str = " :"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+//							+ target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;
+						}						
+						System.out.println(str);						
+						
+						//target_node.setColorFont(Color.red,font);
+						path_list.add(str);
+						subpath_list.add(target_node);
+						//path_list.add(s+"\n"+str);
+						//tracepath(target_node.parent,_exbpNode.parent,node_tensuu,link_tensuu,s+"\n"+str);					
+						tracepathToTarget(target_node,_exbpNode.parent,node_tensuu,link_tensuu,str);
+					
+					}else{
+						// #hirota 09/12/24 �ｽm�ｽ[�ｽh�ｽ�ｽv�ｽ�ｽ�ｽﾄゑｿｽ�ｽﾈゑｿｽ�ｽﾄゑｿｽ�ｽC�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾂづゑｿｽ�ｽ�ｽ@�ｽ�ｽ�ｽﾆ難ｿｽ�ｽ�ｽ�ｽ@�ｽ�ｽ�ｽ_�ｽﾍゑｿｽ�ｽﾈゑｿｽ
+						if(target_node.key.equals(_exbpNode.key) ){
+							link_tensuu++;
+						}				
+						
+						
+						// System.out.println("*** :"+ this.label + ", �ｽ�ｽ " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
+						// max�ｽ�ｽ�ｽﾜゑｿｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽﾈゑｿｽ�ｽ鼾�ｿｽﾌ擾ｿｽ�ｽ�ｽ cast�ｽG�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽﾅるた�ｽ�ｽ
+						String str = null;
+						if(max_node_tensuu == 0 && max_link_tensuu == 0){
+							str = " **"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+							+ target_node.parent.label+ ","+node_tensuu+","+link_tensuu;
+						}else{
+							String[] s_tmp = s.split(","); // s_tmp[0]:path
+							str = s_tmp[0] + "\n  **"+ target_node.label + "�ｽ�ｽ "+ "(" +target_node.key + "):" 
+							+ target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;					
+
+						}						
+						System.out.println(str);					
+						path_list.add(str);	
+						subpath_list.add(target_node);
+						tracepathToTarget(target_node,_exbpNode.parent,node_tensuu,link_tensuu,str);
+						
+						// System.out.println("*** error");
+						// return null;
+					}
+				}
+				
+			}
+			
+		}else{
+		 // OK			
+		}		
+		//return null;		
+	}
+	
+	void saveMap(){
+		if(this._exbp.mapfactory.isSubLung){
+			Object[] msg={"Do you save this MAP in Sub Language?",
+					      "(*Warning* Some data may be lost!)"};
+			int ans = JOptionPane.showConfirmDialog(this._exbp._extendFrame, msg, 
+					"Save Map Data in Sub-Language", 
+					JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
+			if(ans!=JOptionPane.YES_OPTION){
+				return;
+			}
+		}
+		
+		
+		String OPEN_DIRECTORY = "./data3/mapdata/";
+		File dir = new File(OPEN_DIRECTORY);
+		if(!dir.exists()){
+			File ont_file = this._exbp.mapfactory.getFile();
+			if(ont_file!=null){
+				OPEN_DIRECTORY= ont_file.getParentFile().getAbsolutePath();
+			}
+		}
+		JFileChooser  fd = new JFileChooser(OPEN_DIRECTORY);
+		fd.showSaveDialog(this);
+		File file = fd.getSelectedFile(); 
+		
+		this.getExtendBP().saveMAPinXML(file);
+		return;
+	}
+	
+	void saveMap_old(){
+				
+		// Map_vec dialog �ｽ\�ｽ�ｽ
+		Vector tmp = new Vector();// select_name�ｽﾇ暦ｿｽ
+		Vector Exf = new Vector();
+		String chi_str="";
+		
+		Enumeration e = this._exbp.mapfactory.getMapVec().elements();
+		while(e.hasMoreElements()){
+			ExtendFrame f = (ExtendFrame)e.nextElement();
+			//if(!this.equals(f)) {
+			
+			//ROOT�ｽﾌとゑｿｽ�ｽC�ｽq�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽt�ｽ@�ｽC�ｽ�ｽ�ｽﾉ保托ｿｽ
+			if(f._exbp.exbp_node_center.getLabel().equals("(ROOT)")){
+				
+				
+				Enumeration node_en = f._exbp.exbp_node_center.children.elements();
+	            while(node_en.hasMoreElements()){
+					ExbpNode chi = (ExbpNode)node_en.nextElement();
+					chi_str = chi_str+chi.getLabel()+",";					
+				}
+	            tmp.add("(ROOT)"+chi_str + ":" + f.getOption());
+			}
+			// center �ｽ�ｽﾂのとゑｿｽ
+			else{
+				tmp.add(f._exbp.exbp_node_center.getLabel() + ":" + f.getOption());
+			}
+			
+			
+			Exf.add(f);
+			//}
+		}
+		JList jlist = new JList(tmp);
+		
+		JScrollPane jsc = new JScrollPane(jlist);
+		
+		//#kozaki 
+		JCheckBox saveAsAnother = new JCheckBox("Save as Another File");
+		Object[] msg = {jsc,saveAsAnother};
+		
+		
+		
+		int ans = JOptionPane.showConfirmDialog(this,msg,"SAVE MAP_file ",JOptionPane.YES_NO_CANCEL_OPTION );
+		
+		ExtendFrame comp=null;
+		if(ans==JOptionPane.YES_OPTION ){
+
+			//2008/10/03�ｽ@#kozaki Save�ｽ�ｽ�ｽ�ｽMAP�ｽ�ｽ�ｽI�ｽ�ｽ�ｽﾅゑｿｽ�ｽ驍ｱ�ｽﾆゑｿｽh�ｽ�ｽ
+			if(jlist.getSelectedIndex()<0){
+				comp=(ExtendFrame)Exf.elementAt(0);
+			}
+			else{
+				comp = (ExtendFrame)Exf.elementAt(jlist.getSelectedIndex());
+			}
+			
+
+			System.out.println("select ::"+ comp._exbp.exbp_node_center.getLabel() + ":" + comp.getOption());	
+			
+			//#kozaki 2008/10/03�ｽ@�ｽﾊのフ�ｽ@�ｽC�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾄ保托ｿｽ�ｽ�ｽ�ｽ�ｽ
+			if(saveAsAnother.isSelected()){
+				String OPEN_DIRECTORY = "./data3/mapdata/";
+				JFileChooser  fd = new JFileChooser(OPEN_DIRECTORY);
+				fd.showSaveDialog(this);
+				File file = fd.getSelectedFile(); 
+				
+				this.getExtendBP().saveMAPinXML(file);
+				return;
+			}
+			
+			//
+			//save �ｽ�ｽ�ｽ�ｽ
+			String fileName = "";
+	        String directoryName = "";
+
+	        // �ｽt�ｽ@�ｽC�ｽ�ｽ�ｽ�ｽ�ｽ繽托ｿｽ�ｽ�ｽﾛ托ｿｽ�ｽ�ｽ�ｽ�ｽ
+	        if(this._exbp.mapfactory != null) {
+	            //_hzEditor.getOEManager().saveData_XML(_hzEditor.getFile(), true);
+	            //Command cmd = new CommandSave(this._exbp._hzeditor);
+	            //cmd.execute();
+
+	            fileName = this._exbp.mapfactory.getFile().getName();
+	            directoryName =this._exbp.mapfactory.getFile().getAbsolutePath();
+	            //directoryName =hozo.oe.command.CommandExportText.OPEN_DIRECTORY;
+	            
+	        }
+
+	        try {
+
+	        	String map_command ="";
+	        	// center�ｽP�ｽﾂのとゑｿｽ
+	        	if(chi_str.equals("")){
+	        		map_command =  fileName +"::"+ comp._exbp.exbp_node_center.getLabel() + "::" + comp.getOption();
+	        	}
+	        	//�ｽ@center�ｽ�ｽ�ｽ�ｽ�ｽﾌとゑｿｽ
+	        	else{
+	        		map_command =  fileName +"::"+ "(ROOT)"+ chi_str + "::" + comp.getOption();
+	        	}
+	        	System.out.println("write::"+map_command);
+
+	            
+	            File map_file = new File(directoryName+fileName+".hozo_map");
+	            FileOutputStream os = null;
+	            
+	            //�ｽ@�ｽﾇ会ｿｽ�ｽ�ｽ�ｽ�ｽ
+	            if(map_file.exists()){ 	os = new FileOutputStream(map_file,true); }
+	            
+	            // �ｽO�ｽﾉ搾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾈゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽC�ｽV�ｽK�ｽ�ｬ
+	            else{   os = new FileOutputStream(map_file); }   
+	            
+	            OutputStreamWriter osw = new OutputStreamWriter(os , "MS932");
+	            BufferedWriter bw = new BufferedWriter(osw);
+	            bw.write(map_command);
+	            bw.newLine();
+	            
+	            bw.close();
+	            osw.close();
+	            os.close();
+	            
+	        } catch (IOException ioe) {
+	            System.out.println(ioe.getStackTrace());
+	        }
+		
+		
+		
+		}
+	}
+	
+	/**
+	 * This method initializes this
+	 * 
+	 * @return void
+	 */
+	private void initialize() {
+		//this.setSize(650, 600); //#kozaki 2008/06/26
+		this.setSize(920, 800); //#hirota 2009/11/5
+		this.getContentPane().setLayout(new BorderLayout());
+		this.jsp_exbp = new JScrollPane(_exbp);
+		this.getContentPane().add(jsp_exbp,BorderLayout.CENTER );
+		//this.getContentPane().add(new JScrollPane(new JTextArea(100,100)),BorderLayout.CENTER );
+		//this.setContentPane(getJContentPane());
+		JPanel panel_buttons=new JPanel();
+		this.getContentPane().add(panel_buttons,BorderLayout.SOUTH);
+		JLabel j;
+			
+		
+		// #hirota 08/08/20
+		this.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {
+            	System.out.println("fin_Map :: "+ _exbp.exbp_node_center.getLabel() + ":"+_exbp._extendFrame.getOption());
+            	if(_exbp.mapfactory!=null){
+            		_exbp.mapfactory.getMapVec().removeElement(_exbp._extendFrame);
+            	}
+//            	if(_exbp._hzeditor!=null){
+//            		_exbp._hzeditor.Map_vec.removeElement(_exbp._extendFrame);
+//            	}
+//            	_exbp.cmd_dialog.dispose();
+            	dispose();            	
+            }
+        });
+		    
+        
+		//#kozaki 2008/10/04�ｽ@�ｽ�ｽ�ｽj�ｽ�ｽ�ｽ[�ｽo�ｽ[�ｽﾌ追会ｿｽ
+		this.setJMenuBar(menubar);
+		menubar.add(filemenu);
+		filemenu.add(JMI_OpenMap);
+		JMI_OpenMap.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+                OpenMAPinXML(false);
+            }
+        });
+		
+		// #hirota 08/10/21 
+		filemenu.add(JMI_SaveMap);
+		JMI_SaveMap.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+                saveMap();
+            }
+        });
+		
+		filemenu.addSeparator();
+		filemenu.add(JMI_MergeMap);
+		JMI_MergeMap.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+                OpenMAPinXML(true);
+            }
+        });
+		//JMI_CompareMap
+		filemenu.add(JMI_CompareMap);
+		JMI_CompareMap.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+                OpenMapsToCompare();
+            }
+        });
+		
+		//#ohta 2008/11/18 Aspect�ｽ_�ｽC�ｽA�ｽ�ｽ�ｽO�ｽﾌ表�ｽ�ｽ�ｽ�ｽ�ｽj�ｽ�ｽ�ｽ[�ｽﾌ追会ｿｽ
+		menubar.add(viewmenu);
+		viewmenu.add(JMI_ShowAspects);
+		JMI_ShowAspects.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+//            	_exbp.cmd_dialog.setVisible(true);
+            }
+        });
+		
+		//#kozaki�ｽ@2009/01/04�ｽ@�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ�ｽMAP�ｽ�ｽ�ｽ�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ�ｽX�ｽﾌ会ｿｽ�ｽﾊ概�ｽO�ｽﾌゑｿｽ�ｽn�ｽC�ｽ�ｽ�ｽC�ｽg
+		viewmenu.add(JMI_ChangeView);
+		JMI_ChangeView.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+            	//String[] cls_lists =  _exbp.mapfactory.getSelectedClass(new String[0]);
+//            	Node[] cls_lists =  _exbp.mapfactory.getSelectedClassNodes(null);
+            	//String opt = _exbp._extendFrame.select_dialog.commands[0].getSelectedClass();
+//            	if(opt==null){
+//					opt="Any";
+//				}
+//		    	String[] cls_lists = opt.split(" "+"\\" + Slot.OR_DELIMITER+" ");
+		    	//_exbp.setClassRestrictedView(cls_lists);
+//		    	new ChangeViewFrame(_exbp,cls_lists);
+            }
+        });
+		
+		//#kozaki�ｽ@2009/01/21�ｽ@�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ�ｽMAP�ｽ�ｽ�ｽ�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽRole�ｽﾌパ�ｽX�ｽ�ｽ�ｽn�ｽC�ｽ�ｽ�ｽC�ｽg
+		viewmenu.add(JMI_ChangeViewRole);
+		JMI_ChangeViewRole.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+//            	ChangeViewFrameRole frame = new ChangeViewFrameRole(_exbp);
+            	
+            	//Vector roles =  _exbp.mapfactory.getRoleList();
+            /*	Vector roles =  _exbp.getLinkList();
+            	String[] list = new String[roles.size()];
+            	roles.copyInto(list);
+            	JList jlist = new JList(list);
+                JScrollPane jsp = new JScrollPane(jlist);
+                //jlist.setPreferredSize(new Dimension(100,300));
+            	JOptionPane.showMessageDialog(null,jsp);
+            	//jsp.setPreferredSize(new Dimension(100,300));
+            	int[] indexes =jlist.getSelectedIndices();
+            	String[] values = new String[indexes.length];
+            	for(int i=0;i<indexes.length;i++){
+            		values[i]=list[indexes[i]];
+            	}
+            	_exbp.setRoleRestrictedView(values);*/
+            	}
+        });
+		
+		//	#hirota�ｽ@2009/05/14�ｽ@�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ�ｽMAP�ｽ�ｽ�ｽ�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽRole_at�ｽﾌパ�ｽX�ｽ�ｽ�ｽn�ｽC�ｽ�ｽ�ｽC�ｽg
+		viewmenu.add(JMI_ChangeViewRole_at);
+		JMI_ChangeViewRole_at.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+//            	ChangeViewFrameRole_at frame = new ChangeViewFrameRole_at(_exbp);
+            	            	
+            }
+        });
+		
+		//	#kozaki�ｽ@2010/01/25�ｽ@�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ�ｽMAP�ｽ�ｽ�ｽ�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽl�ｽi�ｽ�ｽ�ｽ�ｽ�ｽj�ｽ�ｽ�ｽ�ｽ�ｽﾂノ�ｽ[�ｽh�ｽ�ｽ�ｽn�ｽC�ｽ�ｽ�ｽC�ｽg
+		viewmenu.add(JMI_ChangeViewClass_at);
+		JMI_ChangeViewClass_at.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+//            	ChangeViewFrameClass_at frame = new ChangeViewFrameClass_at(_exbp);
+            	            	
+            }
+        });
+		
+		//#kozaki 2009/05/27
+		viewmenu.add(JMI_MatrixView);
+		JMI_MatrixView.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+//            	MatrixViewFrame frame = new MatrixViewFrame(_exbp);            	            	
+            }
+        });
+		
+		JMenuItem JMI_ChangeViewTopic = new JMenuItem("Change View By Topic");
+		viewmenu.add(JMI_ChangeViewTopic);
+		JMI_ChangeViewTopic.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+//            	ChangeViewFrameByTopic frame = new ChangeViewFrameByTopic(_exbp);
+            	            	
+            }
+        });
+		viewmenu.addSeparator();
+		
+		
+		//#kozaki 2009/01/04�ｽ@�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ�ｽX�ｽﾉ趣ｿｽ�ｽ�ｽp�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽMAP�ｽ�ｽ\�ｽ�ｽ
+		viewmenu.add(JMI_SerachPath);
+		JMI_SerachPath.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+            	
+            }
+        });
+		
+		/*
+		viewmenu.add(JMI_SerachPathEasy);
+		JMI_SerachPathEasy.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+		    	//String[] cls_lists =  _exbp.mapfactory.getSelectedClass(new String[0]);            	
+		    	Node[] cls_lists =  null;//_exbp.mapfactory.getSelectedClassNodes(null);
+		    	ExbpNode[] target_nodes;
+		    	if(_exbp.exbp_node_pick==null){
+		    		if("ROOT".equals(_exbp.exbp_node_center.getLabel())){
+		    			target_nodes = new ExbpNode[_exbp.exbp_node_center.children.size()];
+		    			_exbp.exbp_node_center.children.copyInto(target_nodes);			    			
+		    		}
+		    		else{
+		    			target_nodes = new ExbpNode[1];
+		    			target_nodes[0]=_exbp.exbp_node_center; 			
+		    		}    		
+		    	}
+		    	else if(_exbp.cmd_dialog.all_node.isSelected()){
+		    		int layer = _exbp.exbp_node_pick.getLocatedLayer();
+		    		target_nodes = _exbp.getExbpNodesAtLear(layer,true);
+            	}
+            	else{
+		    		target_nodes = new ExbpNode[1];
+		    		target_nodes[0]=_exbp.exbp_node_pick;
+		    	}
+		    	new ChangeViewFrame(_exbp, target_nodes, cls_lists);
+            }
+        });*/
+		
+		//	 #hirota 2009/7/31 �ｽX�ｽg�ｽb�ｽv�ｽ�ｽ�ｽX�ｽg�ｽﾌ表�ｽ�ｽ�ｽE�ｽﾒ集
+		viewmenu.add(JMI_stoplist);
+		JMI_stoplist.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+            	JTextArea at = new JTextArea();
+            	//JOptionPane.showInputDialog(this,at);
+            	JOptionPane.showConfirmDialog(null, at, "Stop LIST", JOptionPane.INFORMATION_MESSAGE);
+            	//Editstoplist list = new Editstoplist(_exbp);
+            }
+        });
+		
+		//#kozaki�ｽ@2009/02/15
+		viewmenu.addSeparator();
+		JCMI_isSublang.setSelected(this._exbp.mapfactory.isSubLung);
+		viewmenu.add(JCMI_isSublang);
+		JCMI_isSublang.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+//            	_exbp.mapfactory.setSubLang(JCMI_isSublang.isSelected());
+            	RefreshExbp();
+            	}
+        });
+		
+		// #hirota a08/08/20
+		jtf_nodesize = new JTextField("12",3);
+		jtf_nodesize.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+                RefreshExbp();
+            }
+        });
+        
+		jtf_layer = new JTextField("6",3);
+        jtf_layer.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+                RefreshExbp();
+            }
+        });
+		jtf_width = new JTextField("80",3);
+        jtf_width.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+                RefreshExbp();
+            }
+        });
+        jtf_rotation = new JTextField("0",3);
+        jtf_rotation.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+                RefreshExbp();
+            }
+        });
+//        jtf_scale = new JTextField("100",3);
+//        jtf_scale.addActionListener(new java.awt.event.ActionListener() {
+//            public void actionPerformed (ActionEvent e) {
+//                RefreshExbp();
+//            }
+//        });
+		JButton jb_refresh = new JButton("Refresh");
+		jb_refresh.addActionListener(new java.awt.event.ActionListener() {
+			public void actionPerformed (ActionEvent e) {
+				RefreshExbp();
+			}
+		});
+		
+		// #hirota 08/08/20 
+		JButton jb_compare = new JButton("Compare");
+		jb_compare.addActionListener(new java.awt.event.ActionListener() {
+			public void actionPerformed (ActionEvent e) {
+				setCompare();
+			}
+		});
+		
+        jCB_VisibleCenter = new JCheckBox("Root");
+        jCB_VisibleCenter.setSelected(true);
+        jCB_VisibleCenter.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                _exbp.setVisibleCenter(jCB_VisibleCenter.isSelected());
+                getExtendBP().repaint();
+            }
+        });
+        //#kozak 2008/02/10i 
+        jCB_VisibleInflu = new JCheckBox("Influ.");
+        jCB_VisibleInflu.setSelected(true);
+        jCB_VisibleInflu.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                _exbp.setVisibleInflu(jCB_VisibleInflu.isSelected());
+                getExtendBP().repaint();
+            }
+        });
+        jCB_VisibleLink = new JCheckBox("Link");
+        jCB_VisibleLink.setSelected(true);//#kozaki�ｽ@2008/06/26�ｽ@Link�ｽ\�ｽ�ｽ�ｽﾍデ�ｽt�ｽH�ｽ�ｽ�ｽgON�ｽﾉ変更
+        jCB_VisibleLink.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                _exbp.setVisibleLink(jCB_VisibleLink.isSelected());
+                getExtendBP().repaint();
+            }
+        });
+        jCB_VisibleLayer = new JCheckBox("Layer");
+        jCB_VisibleLayer.setSelected(true);
+        jCB_VisibleLayer.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                _exbp.setVisibleLevel(jCB_VisibleLayer.isSelected());
+                getExtendBP().repaint();
+            }
+        });
+        jCB_VisibleBorder = new JCheckBox("Border");
+        jCB_VisibleBorder.setSelected(true);
+        jCB_VisibleBorder.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                _exbp.setVisibleBorder(jCB_VisibleBorder.isSelected());
+                getExtendBP().repaint();
+            }
+        });
+        jTF_Option = new JTextField("",30);
+        jTF_Option.setPreferredSize(new Dimension(200, jTF_Option.getPreferredSize().height));
+        jTF_Option.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed (ActionEvent e) {
+                String opt = jTF_Option.getText();
+                System.out.println("action:"+opt);
+                _exbp.setNodes(opt);
+                RefreshExbp();
+            }
+        });
+        
+        //#kozaki�ｽ@2008/06/26�ｽ@�ｽ�ｽ�ｽC�ｽA�ｽE�ｽg�ｽ�ｽ@�ｽﾘゑｿｽﾖゑｿｽ
+        jCB_LayoputOption = new JComboBox();
+        jCB_LayoputOption.addItem("Link Centric Layout");
+        jCB_LayoputOption.addItem("Node Centric Layout");
+        jCB_LayoputOption.addItem("Link Centric Layout2");
+        jCB_LayoputOption.setEditable(true); 
+        jCB_LayoputOption.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                String text = (String) jCB_LayoputOption.getSelectedItem();
+                if (text != null) {
+                    if(text.equals("Link Centric Layout")){
+                    	_exbp.setLayoutOption(_exbp.LinkCentricLayout);
+                    }
+                    else if(text.equals("Node Centric Layout")){
+                    	_exbp.setLayoutOption(_exbp.NodeCentricLayout);
+                    }
+                    else if(text.equals("Link Centric Layout2")){
+                    	_exbp.setLayoutOption(_exbp.LinkCentricLayout2);
+                    }   	                   
+                    RefreshExbp();
+                    updateHsitoryPath();    // �ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽ
+                    updateDisplay();    // �ｽ�ｽﾊゑｿｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽ
+                }
+                
+            }
+        });
+        
+        jCB_LocalPath = new JComboBox();
+        jCB_LocalPath.setEditable(true); 
+        jCB_LocalPath.setMinimumSize(new Dimension(100, 12));
+        jCB_LocalPath.setMaximumSize(new Dimension(250, 12));//#kozaki2008/06/26
+        jCB_LocalPath.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                String text = (String) jCB_LocalPath.getSelectedItem();
+                if (text != null) {
+                    _localProjectRootPath = text;
+                } else {
+                    _localProjectRootPath 
+                            = jCB_LocalPath.getEditor().getItem().toString();
+                }
+                                
+                if(_localProjectRootPath.length() > 0 
+                        && getExtendBP() != null 
+                        && getExtendBP().exbp_node_center != null) {
+                    _exbp.setNodes(_localProjectRootPath);
+                    RefreshExbp();
+                    
+                    updateHsitoryPath();    // �ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽ
+                    updateDisplay();    // �ｽ�ｽﾊゑｿｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽ
+                }
+                
+            }
+        });
+        
+		// #hirota 08/08/25
+		JButton jb_save = new JButton("SAVE");
+		jb_save.addActionListener(new java.awt.event.ActionListener() {
+			public void actionPerformed (ActionEvent e) {
+				
+				saveMap();
+				//System.out.println("save_Map :: "+ _exbp.exbp_node_center.getLabel() + ":"+_exbp._extendFrame.getOption());
+				
+			}
+		});
+		
+        //#kozaki 2008/08/12�ｽ@�ｽo�ｽl�ｽ�ｽ�ｽf�ｽ�ｽ�ｽp�ｽ�ｽ�ｽ�ｽ
+        jCB_stop = new JCheckBox("Stop");
+        jCB_stop.setSelected(_exbp.stop);
+        jCB_PlaceOnLayer = new JCheckBox("Place on Layers");
+        jCB_PlaceOnLayer.setSelected(_exbp.stopOnLayer);
+        jCB_showEdges = new JCheckBox("Show Edges");
+        jCB_showEdges.setSelected(_exbp.showEdges);
+        jCB_stop.addItemListener(new ItemListener(){
+        	public void itemStateChanged(ItemEvent e) {
+        		_exbp.stop=jCB_stop.isSelected();
+            }
+        });
+        jCB_PlaceOnLayer.addItemListener(new ItemListener(){
+        	public void itemStateChanged(ItemEvent e) {
+        		_exbp.stopOnLayer=jCB_PlaceOnLayer.isSelected();
+            }
+        });
+        jCB_showEdges.addItemListener(new ItemListener(){
+        	public void itemStateChanged(ItemEvent e) {
+        		_exbp.showEdges=jCB_showEdges.isSelected();
+            }
+        });
+        
+//      #hirota 2009/07/31 stopList�ｽ�ｽ�ｽ�ｽ
+        jCB_stoplist = new JCheckBox("Stop_List");
+        jCB_stoplist.setSelected(true);
+        jCB_stoplist.addItemListener(new ItemListener(){
+        	public void itemStateChanged(ItemEvent e) {
+        		
+        		Enumeration nodes_en = _exbp.nodes.elements();
+        		while(nodes_en.hasMoreElements()){
+        			ExbpNode node = (ExbpNode)nodes_en.nextElement();
+        			        			
+        			for(int i=0;i<stoplist_string.length;i++){
+        				if(stoplist_string[i].equals(node.getLabel())){
+        					node.setVisibleWithChildren(!jCB_stoplist.isSelected()); // �ｽm�ｽ[�ｽh�ｽ�ｽ�ｽ�ｽ
+        					//node.setVisbleChildren(!jCB_stoplist.isSelected());// �ｽm�ｽ[�ｽh�ｽc�ｽ�ｽ
+        				}        				
+        			}       			
+        		}
+        		//RefreshExbp();
+        		getExtendBP().repaint();
+            }
+        });
+        JButton jb_zoomINfont = new JButton("+");
+        jb_zoomINfont.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+            	int width = Integer.parseInt(jtf_nodesize.getText());
+            	jtf_nodesize.setText(Integer.toString(width+1));
+            	RefreshExbp();
+            }
+        });
+        JButton jb_zoomOUTfont = new JButton("-");
+        jb_zoomOUTfont.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+            	int width = Integer.parseInt(jtf_nodesize.getText());
+            	jtf_nodesize.setText(Integer.toString(width-1));
+            	RefreshExbp();
+            }
+        });
+        
+        panel_buttons.setLayout(new GridLayout(2,1));//#kozaki 2008/08/12
+        JPanel panel1 = new JPanel();
+        JPanel panel2 = new JPanel();
+        //JPanel panel3 = new JPanel();//#kozaki 2008/08/12
+        panel_buttons.add(panel1);
+        panel_buttons.add(panel2);
+        //panel_buttons.add(panel3);//#kozaki 2008/08/12
+        panel1.add(jb_zoomINfont);
+        panel1.add(jb_zoomOUTfont);
+        panel1.add(new JLabel("node_size"));
+        panel1.add(jtf_nodesize);	
+        panel1.add(new JLabel("Number of Layer"));
+        panel1.add(jtf_layer);		
+        panel1.add(new JLabel("Width"));
+        panel1.add(jtf_width);
+//        panel_buttons.add(new JLabel("Scale"));
+//        panel_buttons.add(jtf_scale);
+        panel1.add(jCB_VisibleCenter);
+        panel1.add(jCB_VisibleInflu);
+        panel1.add(jCB_VisibleLink);
+        panel1.add(jCB_VisibleLayer);
+        panel1.add(jCB_VisibleBorder);
+        panel1.add(jCB_LayoputOption); //#kozaki 2008/06/26
+        //panel_buttons.add(jTF_Option);
+        
+        
+       
+        JButton jb_zoomIN = new JButton("+");
+        jb_zoomIN.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+            	int width = Integer.parseInt(jtf_width.getText());
+            	jtf_width.setText(Integer.toString(width+10));
+            	RefreshExbp();
+            }
+        });
+        JButton jb_zoomOUT = new JButton("-");
+        jb_zoomOUT.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+            	int width = Integer.parseInt(jtf_width.getText());
+            	jtf_width.setText(Integer.toString(width-10));
+            	RefreshExbp();
+            }
+        });
+        JButton jb_rotation1 = new JButton("�ｽ�ｽ");
+        jb_rotation1.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+            	//_exbp.rotation=_exbp.rotation+1;
+            	arc += 1.0;
+            	RefreshExbp();
+            }
+        });
+        
+        JButton jb_rotation2 = new JButton("�ｽ�ｽ");
+        jb_rotation1.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+            	//_exbp.rotation=_exbp.rotation-1;
+            	arc -= 1.0;
+            	RefreshExbp();
+            }
+        });
+        
+        
+        panel2.add(jb_zoomIN);
+        panel2.add(jb_zoomOUT);
+        panel2.add(new JLabel("Rotation"));
+        panel2.add(this.jtf_rotation);
+        
+      /*  panel2.add(jCB_LocalPath);
+        panel2.add(select_option);
+        select_option.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+            	           	
+            	// #hirota 08/10/21 update
+            	//select_dialog.setcenter(_exbp.mapfactory.hzEditor.findNode(_exbp.exbp_node_center.getLabel()));
+            	
+            	//String opt = _exbp._extendFrame.getOption();
+            	String opt = jTF_Option.getText();
+            	System.out.println("rebutton_opt::"+opt);
+            	select_dialog.setCommandtoCommandPanel(opt);
+            	select_dialog.setVisible(true);
+            	
+            }
+        });*/
+        
+        panel2.add(jb_refresh);
+        panel2.add(jb_compare); // #hirota 08/08/20
+        panel2.add(jCB_stop);//#kozaki 2008/08/12
+        panel2.add(jCB_PlaceOnLayer);//#kozaki 2008/08/12
+        panel2.add(jCB_showEdges);//#kozaki 2008/08/12
+        // panel2.add(jb_save); // #hirota 08/10/21
+        panel2.add(jCB_stoplist); // #hirota 09/2009/07/31
+        
+		this.setTitle(DEFAULT_TITLE);
+	}
+
+	public boolean checkStopList(ExbpNode node){
+		for(int i=0;i<stoplist_string.length;i++){
+			if(stoplist_string[i].equals(node.getLabel())){
+				return true;
+				}        				
+		}       
+		
+		return false;
+	}
+	
+	//#kozaki 2008/10/04�ｽ@XML�ｽ`�ｽ�ｽ�ｽﾅ保托ｿｽ�ｽ�ｽ�ｽ�ｽMAP�ｽ�ｽOPEN
+	// #hirota protected �ｽ�ｽ�ｽ@public �ｽ�ｽ
+	public void OpenMAPinXML(boolean merge) {
+		String OPEN_DIRECTORY = "./data3/mapdata/";
+		File dir = new File(OPEN_DIRECTORY);
+		if(!dir.exists()){
+			File ont_file = this._exbp.mapfactory.getFile();
+			if(ont_file!=null){
+				OPEN_DIRECTORY= ont_file.getParentFile().getAbsolutePath();
+			}
+		}
+		
+		JFileChooser  fd = new JFileChooser(OPEN_DIRECTORY);
+
+		if(merge){
+			fd.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+		}
+		fd.showOpenDialog(this);
+		File file = fd.getSelectedFile(); 
+//		ExtendBPManager exbpmanager = new ExtendBPManager(this._exbp);
+		//exbpmanager.openMAPinXML(file);
+//		if(merge){
+//			exbpmanager.mergeMAP(file);
+//			_exbp.exbp_node_center.removeUnmatchNodes();
+//			_exbp.exbp_node_center.setVisibleWithChildren(true);
+//			
+//		}
+//		else{
+//			exbpmanager.openMAPinXML(file);
+//		}
+//		
+//		
+//		// #hirota 08/10/23
+//		exbpmanager.exbp.mapfactory.exbpframe.RefreshExbp();
+	}
+	
+	
+	// #kozaki 2013/07/23�ｽ@�ｽ�ｽ�ｽ�ｽ�ｽ}�ｽb�ｽv�ｽ�ｽ�ｽr�ｽp�ｽﾉ開�ｽ�ｽ
+	public void OpenMapsToCompare() {}
+
+	//#kozaki 2008/07/31
+	int getLayerNum(){
+		int layer;
+		String layer_str = jtf_layer.getText();
+		if(layer_str.indexOf(",")>0){
+			String[] str = layer_str.split(",");
+			layer = Integer.parseInt(str[1]);
+		}else{
+			layer = Integer.parseInt(jtf_layer.getText());
+		}
+		return layer;
+	}
+
+	//#kozaki 2008/07/31
+	void setLayerNum(int i){
+		jtf_layer.setText(Integer.toString(i));
+	}
+	
+    // �ｽ`�ｽ�ｽ�ｽ�ｽ�ｽ�ｽt�ｽ�ｽ�ｽb�ｽV�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+	public void RefreshExbp(){
+		int layer;
+		Double arc = 1.0; //#kozaki 2008/03/25�ｽ@�ｽ�ｽ`�ｽﾌ角�ｽx�ｽﾝ抵ｿｽ
+		String layer_str = jtf_layer.getText();
+		if(layer_str.indexOf(",")>0){
+			String[] str = layer_str.split(",");
+			arc = Double.parseDouble(str[0]);
+			layer = Integer.parseInt(str[1]);
+		}else{
+			layer = Integer.parseInt(jtf_layer.getText());
+		}
+		
+		System.out.println("center::"+ getExtendBP().exbp_node_center.getLabel());
+		
+		// #hirota 08/08/19 node_size�ｽﾏ更
+		int node_size = Integer.parseInt(jtf_nodesize.getText());
+		ExtendBP.fontLink = new Font("Times", Font.PLAIN, node_size); //#kozaki 2008/08/19
+		//exbp_node_center.color = ExbpNode.CENTER_COLOR;
+		getExtendBP().exbp_node_center.font = new Font("Times", Font.BOLD, 
+				(int)(node_size*(ExbpNode.Font_node_center)));
+
+				
+		int width = Integer.parseInt(jtf_width.getText());
+        int scale = Integer.parseInt(jtf_scale.getText());
+               
+                
+		getExtendBP().setNodesLoc(layer, width,arc, node_size);//#kozaki 2008/03/25�ｽ@�ｽ�ｽ`�ｽﾌ角�ｽx�ｽﾝ抵ｿｽ
+        //getExtendBP().setCanvasScale(scale);
+        getExtendBP().setNodesLoc();   // �ｽﾊ置�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+        getExtendBP().setEdgesForSpringModel();//#kozaki�ｽ@2008/08/13�ｽ@
+//		getExtendBP().repaint();
+        
+        // �ｽ^�ｽC�ｽg�ｽ�ｽ�ｽ�ｽﾏ更
+        String subTitle = getExtendBP().exbp_node_center.getLabel();
+        if (subTitle == ExtendBP.DEFAULT_NAME) {
+            subTitle = getExtendBP().mapfactory.getFile().getName();
+        }
+        
+        //#kozaki�ｽ@2008/08/18
+    	if(compare_map==null){
+    		this.setTitle(DEFAULT_TITLE, subTitle);
+    		}
+    	else{
+    		this.setTitle(DEFAULT_TITLE, subTitle+"<Compare>");
+   		 	//#kozaki 2008/08/18�ｽ@�ｽ}�ｽb�ｽv�ｽﾌ費ｿｽr�ｽ�ｽ�ｽ�ｽ
+            this.setCompare();
+    	}
+    	
+    	getExtendBP().repaint();
+	}
+	
+    // �ｽ^�ｽC�ｽg�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽ
+    private void setTitle(String mainTitle, String subTitle) {
+        if (subTitle == null) {
+            subTitle = "";
+        }
+        super.setTitle(mainTitle + " - [" + subTitle + "]");
+    }
+    
+	/**
+	 * This method initializes jContentPane
+	 * 
+	 * @return javax.swing.JPanel
+	 */
+/*	private ExtendBP getJContentPane() {
+		if (_exbp == null) {
+			//_exbp = new ExtendBP();
+			_exbp = new ExtendBP(this);
+			_exbp.setLayout(new BorderLayout());
+		}
+		return _exbp;
+	}*/
+	
+	public ExtendBP getExtendBP(){
+		return _exbp;
+	}
+
+//    public void setHZEditor(HZEditor hze){
+//    	this._exbp.setHZEditor(hze);
+//    	select_dialog = new EtendBPSelectDialog(this._exbp,this);
+//    	hze.Map_vec.add(this);
+//    }
+  
+    //#enegate# 08/07/07 �ｽI�ｽ�ｽ�ｽ_�ｽC�ｽA�ｽ�ｽ�ｽO�ｽ�ｽOK�ｽ{�ｽ^�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ黷ｽ�ｽ�ｽ�ｽﾇゑｿｽ�ｽ�ｽ�ｽH
+//    public boolean isOK() {
+//    	return this.select_dialog.isOK();
+//    }
+    
+//    public HZEditor getHZEditor() {
+//        if (this._exbp == null) {
+//            return null;
+//        }
+//        return this._exbp.getHZEditor();
+//    }
+    
+    //#kozaki 2008/01/04
+    void setOption(String opt){
+    	this.jTF_Option.setText(opt);
+        this.jCB_LocalPath.getEditor().setItem(opt);
+    }
+    
+    //#kozaki 2008/07/31
+    String getOption(){
+    	return this.jTF_Option.getText();
+    }
+    
+   
+    
+    /**
+     * 
+     * �ｽp�ｽX�ｽ�ｽ�ｽX�ｽg�ｽ謫ｾ
+     * 
+     * @param logPath   �ｽ�ｽ�ｽO�ｽp�ｽX
+     * @return
+     */
+    private List loadPathList(String path) {
+        ArrayList rtnList = new ArrayList();
+        
+        //�ｽp�ｽX�ｽt�ｽ@�ｽC�ｽ�ｽ
+        File pathFile = new File(path);
+        
+        //�ｽt�ｽ@�ｽC�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾝゑｿｽ�ｽﾈゑｿｽ�ｽ鼾�ｿｽﾍ擾ｿｽ�ｽ�ｽ�ｽﾈゑｿｽ
+        if (!pathFile.exists()) {
+            return rtnList;
+        }
+
+        //�ｽp�ｽX�ｽ�ｽ�ｽe�ｽ�ｽﾇみ趣ｿｽ�ｽ
+        try {
+            BufferedReader bReader = new BufferedReader(
+                    new InputStreamReader(
+                            new FileInputStream(pathFile.getAbsolutePath()),
+                            "SJIS"));   
+            try {
+                String line;
+                while((line = bReader.readLine()) != null){
+                    rtnList.add(line);
+                }
+            } finally {
+                bReader.close();
+            }
+        } catch(Exception e) {
+            e.printStackTrace();
+        }
+        
+        //return (String[]) rtnList.toArray(new String[rtnList.size()]);
+        return rtnList;
+    }
+    
+    /**
+     * 
+     * �ｽp�ｽX�ｽ�ｽ�ｽX�ｽg�ｽﾛ托ｿｽ
+     * 
+     * @return
+     */
+    private void savePathList(String path, String name, List pathList) {
+        //�ｽp�ｽX�ｽt�ｽ@�ｽC�ｽ�ｽ
+        File pathFile = new File(path);
+        //�ｽt�ｽH�ｽ�ｽ�ｽ_�ｽ�ｽ�ｽ�ｽ�ｽﾝゑｿｽ�ｽﾈゑｿｽ�ｽ鼾�ｿｽﾍフ�ｽH�ｽ�ｽ�ｽ_�ｽ�ｬ
+        if (!pathFile.exists()) {
+            pathFile.mkdir();
+        }
+        String filePath = path + "/" + name;
+        File filePathFile = new File(filePath);
+        //�ｽt�ｽH�ｽ�ｽ�ｽ_�ｽ�ｽ�ｽ�ｽ�ｽﾝゑｿｽ�ｽﾈゑｿｽ�ｽ鼾�ｿｽﾍフ�ｽH�ｽ�ｽ�ｽ_�ｽ�ｬ
+        if (!filePathFile.exists()) {
+            try {
+                filePathFile.createNewFile();
+            } catch(Exception e) {
+                e.printStackTrace();
+            }
+        }
+        
+        try {
+            FileWriter out = new FileWriter(filePathFile);
+            Iterator it = pathList.iterator();
+            while(it.hasNext()) {
+                out.write(it.next().toString());
+                out.write("\n");
+            }
+            out.close();
+        } catch(Exception e) {
+            e.printStackTrace();
+        } finally {
+        
+        }
+    }
+    
+    /**
+     * 
+     * �ｽ�ｽ�ｽ[�ｽJ�ｽ�ｽ�ｽﾌパ�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾝ定し�ｽﾜゑｿｽ�ｽB
+     * 
+     */
+    private void setLocalPathHistory() {
+        this._localPathList.clear();
+        String path = HISTORY_PATH + "/" + LOCAL_HISTORY_FILE_NAME;
+        this._localPathList.addAll(this.loadPathList(path));
+    }
+    
+    /**
+     * 
+     * �ｽ�ｽ�ｽ[�ｽJ�ｽ�ｽ�ｽﾌパ�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ謫ｾ�ｽ�ｽ�ｽﾜゑｿｽ�ｽB
+     * 
+     */
+    public List getLocalPathHistory() {
+        return this._localPathList;
+    }
+    
+    /**
+     * 
+     * �ｽ�ｽ�ｽ[�ｽJ�ｽ�ｽ�ｽﾌパ�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾇ会ｿｽ�ｽ�ｽ�ｽﾜゑｿｽ�ｽB
+     * 
+     */
+    public void appendLocalPathHistory(String path) {
+        if(_localPathList != null && path != null 
+                && _localPathList.contains(path)) {
+            _localPathList.remove(path);
+        }
+        _localPathList.add(0, path);    // �ｽ謫ｪ�ｽﾉ追会ｿｽ
+        
+        // �ｽﾅ托ｿｽl�ｽｴゑｿｽ�ｽ�ｽﾎ厄ｿｽ�ｽ[�ｽﾜで擾ｿｽ�ｽ�ｽ
+        while (_localPathList.size() > MAX_HISTORY_SIZE) {
+            int lastIndex = _localPathList.size() - 1;
+            _localPathList.remove(lastIndex);
+        }
+    }
+    
+    /**
+     * 
+     * �ｽ�ｽ�ｽ[�ｽJ�ｽ�ｽ�ｽﾌパ�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾛ托ｿｽ�ｽ�ｽ�ｽﾜゑｿｽ�ｽB
+     * 
+     */
+    public void saveLocalPathHistory() {
+        this.savePathList(HISTORY_PATH, LOCAL_HISTORY_FILE_NAME, this._localPathList);
+    }
+    
+    /**
+     * 
+     * �ｽp�ｽX�ｽ�ｽ�ｽX�ｽV�ｽ�ｽ�ｽﾜゑｿｽ�ｽB
+     * 
+     */
+    public boolean updateHsitoryPath() {
+        try {
+            // �ｽp�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾇ会ｿｽ
+            this.appendLocalPathHistory(this._localProjectRootPath);
+            
+            // �ｽp�ｽX�ｽ�ｽﾛ托ｿｽ�ｽ�ｽ�ｽ�ｽ
+            this.saveLocalPathHistory();
+             
+            return true;
+            
+        } catch (Exception e) {
+            e.printStackTrace();
+            
+            return false;
+        }
+    }
+    
+    /**
+     * 
+     * �ｽ�ｽﾊ更�ｽV�ｽ�ｽ�ｽﾜゑｿｽ�ｽB
+     * 
+     */
+    protected void updateDisplay() {
+        if (_localProjectRootPath == null) _localProjectRootPath = "";
+         // �ｽ�ｽ�ｽ�ｽ�ｽﾜゑｿｽ
+        jCB_LocalPath.removeAllItems();
+        // �ｽp�ｽX�ｽﾌ表�ｽ�ｽ�ｽ�ｽ�ｽX�ｽV�ｽ�ｽ�ｽ�ｽ
+        jCB_LocalPath.addItem(_localProjectRootPath);
+         // �ｽq�ｽX�ｽg�ｽ�ｽ�ｽ[�ｽ謫ｾ
+        List localPathList = this.getLocalPathHistory();
+        Iterator it = localPathList.iterator();
+        while (it.hasNext()) {
+            String tmpLocalURL = (String) it.next();
+            if (!tmpLocalURL.equals(_localProjectRootPath)) {
+                jCB_LocalPath.addItem(tmpLocalURL);
+            }
+        }
+    }
+    
+    // �ｽT�ｽ[�ｽr�ｽXURL�ｽﾌ読み搾ｿｽ�ｽ�ｽ
+    private void getServiceURL() {
+        try {
+            BufferedReader br = new BufferedReader(new FileReader(SERVICE_URL_FILE));
+            SERVICE_URL = br.readLine();
+            br.close();
+            String name = null;
+        } catch(IOException f) {
+            SERVICE_URL = DEFAULT_SERVICE_URL;
+        }
+    }
+}
+
+// #hirota 09/4/27 �ｽE�ｽC�ｽ�ｽ�ｽh�ｽE�ｽ�ｽ�ｽ�ｽ
+class DockingListener implements ComponentListener {
+    private final JFrame frame1;
+    private final JFrame frame2;
+
+    public DockingListener(JFrame f1, JFrame f2) {
+        frame1 = f1;
+        frame1.addComponentListener(this);
+        frame2 = f2;
+        frame2.addComponentListener(this);
+    }
+    public void componentResized(ComponentEvent e) {
+        positionFrames(e);
+    }
+    public void componentMoved(ComponentEvent e) {
+        positionFrames(e);
+    }
+    public void componentShown(ComponentEvent e) {
+        positionFrames(e);
+    }
+    public void componentHidden(ComponentEvent e) {
+        positionFrames(e);
+    }
+    private void positionFrames(ComponentEvent e) {
+        if(e.getComponent().equals(frame1)) {
+            int x = frame1.getBounds().x - frame2.getWidth(); // + frame1.getBounds().width;
+            int y = frame1.getBounds().y ;//+ frame1.getBounds().height;
+            frame2.removeComponentListener(this);
+            frame2.setLocation(x, y);
+            frame2.addComponentListener(this);
+        }else{
+            int x = frame2.getBounds().x +  frame2.getWidth(); // - frame1.getBounds().width;
+            int y = frame2.getBounds().y; //- frame1.getBounds().height;
+            frame1.removeComponentListener(this);
+            frame1.setLocation(x, y);
+            frame1.addComponentListener(this);
+        }
+    }
+}
Index: BH13SPARQLBuilder/src/hozo/maptool/MapFactory.java
===================================================================
--- BH13SPARQLBuilder/src/hozo/maptool/MapFactory.java (revision 7)
+++ BH13SPARQLBuilder/src/hozo/maptool/MapFactory.java (revision 7)
@@ -0,0 +1,648 @@
+package hozo.maptool;
+
+
+import java.awt.Color;
+import java.awt.Font;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Vector;
+
+import javax.swing.JOptionPane;
+
+import jp.ac.osaka_u.sanken.sparql.gui.SparqlBuilderPanel;
+
+import org.biohackathon.SPARQLBuilder.OWL.ClassLink;
+import org.biohackathon.SPARQLBuilder.OWL.Direction;
+import org.biohackathon.SPARQLBuilder.OWL.Path;
+
+/***縲2008/10/18縲#kozaki
+縲MAP逕滓�縺ｮ縺溘ａ縺ｫ�梧ｳ暮繧ОWL縺ｮAPI縺九ｉ�後�繝��逕ｨ縺ｮ繝��繧ｿ繧剃ｽ懈�縺吶ｋ縺溘ａ縺ｮ
+縲繝｡繧ｽ繝�ラ鬘槭ｒ縺薙�繧ｯ繝ｩ繧ｹ縺ｫ縺ｾ縺ｨ繧√ｋ��
+
+***/
+public class MapFactory implements Runnable{
+
+	ExtendBP exbp;
+	public ExtendFrame exbpframe;
+	Vector focal_points;//譛蛻昴↓驕ｸ謚槭＠縺櫻ode(縺ｪ縺ｩ)繧剃ｿ晄戟縺吶ｋ
+	boolean isSubLung;
+	static boolean isGrayView=false;
+	Vector<String> checked_nodes;
+	boolean search_shortest=true;//繧ｵ繝ｼ繝√ヱ繧ｹ縺ｧ譛遏ｭ繝代せ繧呈､懃ｴ｢縺吶ｋ
+	int serch_depth = 10;//繧ｵ繝ｼ繝√ヱ繧ｹ縺ｧ譛遏ｭ繝代せ繧呈､懃ｴ｢縺吶ｋ豺ｱ縺包ｼ域怙遏ｭ繝代せ讀懃ｴ｢繧偵＠縺ｪ縺�→縺阪�蠢�★菴ｿ縺�ｼ�
+	Vector<ExbpNodeTemp> temp_nodes;
+	
+	SparqlBuilderPanel spBuilder;
+ 	
+	public static void main (String[] args) {
+		MapFactory map = new MapFactory();
+		//map.loadPathList(map.getDummyPathList());
+	}
+	
+	public List<Path> getDummyPathList(){
+		ArrayList pathlist = new ArrayList();
+		ArrayList class_link_list = new ArrayList<ClassLink>() {{
+			add(new ClassLink("propertyURI", "linkedClassURI2", Direction.forward));
+			add(new ClassLink("propertyURI2", "linkedClassURI3", Direction.forward));
+			add(new ClassLink("propertyURI3", "linkedClassURI4", Direction.forward));
+		    }};
+		Path path = new Path("StartClass1", class_link_list);
+		pathlist.add(path);
+		
+		return pathlist; 
+	}
+	
+	public void setSPARQLbuilder(SparqlBuilderPanel builder){
+		this.spBuilder = builder;
+	}
+	
+//	void setSPARQLquery(Path path){
+//		this.spBuilder;
+//	}
+	
+	public MapFactory() {
+		exbpframe = new ExtendFrame(this);
+		exbp = exbpframe.getExtendBP();
+		focal_points = new Vector<Object>();
+		temp_nodes = new Vector<ExbpNodeTemp>();
+		
+//		focal_points.add("TEST");
+//		focal_points.add("TEST2");
+		
+//		isSubLung=hze.isSubLang;
+//		isGrayView=hze.isGrayView;//#kozaki 2009/07/28
+//		exbp.setHZEditor(hze);
+//		exbpframe.select_dialog = new EtendBPSelectDialog(exbp,exbpframe);
+		exbpframe.setVisible(true);
+    	exbpframe.RefreshExbp();
+    	
+//    	if(focal_points.size()==1){
+//    		exbp.cmd_dialog.setCommandOptions(exbp.exbp_node_center);
+//    	}
+//    	
+//    	treeSelectDialog = new TreeSelectDialog(true);
+//	    treeSelectDialog.setHZEditor(this.hzEditor);
+//	    treeSelectDialog.setSubLang(this.isSubLung);
+//	    treeSelectDialog.setSize(450, 600);
+//	    
+    		}
+	
+	public void loadPathList(Path[] pathlist){
+		Path path = pathlist[0];
+		
+		this.exbp.exbp_node_center = new ExbpNode(path.getStartClass());
+
+		for(int i = 0; i<pathlist.length; i++){
+			addPath(pathlist[i]);
+		}
+		this.exbpframe.RefreshExbp();
+//		this.exbp.exbp_node_center = exbpnode;
+//		exbpnode= new ExbpNode("Center");;
+//		exbpnode.setChildrenColor(Color.red);
+//		exbpnode.key="prop1";
+//		this.exbp_node_center.addChild(exbpnode);
+//		this.exbp_node_center.addChild(new ExbpNode("TEST2"));
+//		this.exbp_node_center.addChild(new ExbpNode("TEST3"));
+//		this.exbp_node_center.addChild(new ExbpNode("TEST4"));
+		
+		
+	}
+
+	
+	
+	void addPath(Path path){
+		System.out.println("addPath"+path.getStartClass()+"--->"+path.getClassLinks().size());
+		String target_class = path.getStartClass();
+		ExbpNode node = this.exbp.findExbpNode(target_class);
+		
+		
+		List<ClassLink> links = path.getClassLinks();
+		for(ClassLink link : links){
+			String next_class = link.getLinkedClassURI();
+			System.out.println("==>"+next_class);
+			ExbpNode next_node = new ExbpNode(next_class);
+			next_node.setOrgNode(path);
+
+			node.addChild(next_node);
+			node = next_node;
+			String prop = link.getPropertyURI();
+			
+			if(link.getDirection().equals(Direction.reverse)){
+				prop += "[<=]";
+			}
+			else if(link.getDirection().equals(Direction.both)){
+				prop += "[<=>]";
+			}
+			next_node.key = prop;			
+		}
+			
+		
+	}
+
+	//蜈�→縺ｪ繧畿ditor遲峨〒MapTool繧堤ｮ｡逅�＠縺ｦ縺�ｋVector繧定ｿ斐☆縲食ozo莉･螟悶〒縺ｯ繧ｪ繝ｼ繝舌�繝ｩ繧､繝峨☆繧九�
+	Vector getMapVec(){
+		return null;	
+	}
+	
+	//蜈�→縺ｪ繧九が繝ｳ繝医Ο繧ｸ繝ｼ縺ｮ繝輔ぃ繧､繝ｫ繧定ｿ斐☆縲食ozo莉･螟悶〒縺ｯ繧ｪ繝ｼ繝舌�繝ｩ繧､繝峨☆繧九�
+	File getFile(){
+		return null;	
+	}
+	
+	//縺吶∋縺ｦ縺ｮ繝ｭ繝ｼ繝ｫ縺ｮ荳隕ｧ繧定ｿ斐☆
+	Vector getRoleList(){
+		Vector roles = new Vector();
+/*		Enumeration en = this.hzEditor.WCEditor.browsingPanel.node_lists.elements();
+		while(en.hasMoreElements()){
+			Node n =(Node)en.nextElement();
+			Enumeration slot_en = n.getSlots().elements();
+			while(slot_en.hasMoreElements()){
+				Slot slot =(Slot)slot_en.nextElement();
+				if(!roles.contains(slot.getRoleName())){
+					roles.addElement(slot.getRoleName());
+				}
+			}
+		}
+			*/
+		return roles;
+	}
+
+	//蜈�→縺ｪ繧九が繝ｳ繝医Ο繧ｸ繝ｼ縺ｧ縺ｮ驕ｸ謚橸ｼ医け繝ｪ繝�け�牙�逅�食ozo莉･螟悶〒縺ｯ繧ｪ繝ｼ繝舌�繝ｩ繧､繝峨☆繧九�
+	void selected(ExbpNode exbpnode){
+//		this.hzEditor.WCEditor.browsingPanel.Jump(exbpnode.getHozoNode());	
+	}
+
+	//蜈�→縺ｪ繧九が繝ｳ繝医Ο繧ｸ繝ｼ縺ｧ縺ｮ驕ｸ謚橸ｼ医け繝ｪ繝�け�牙�逅�食ozo莉･螟悶〒縺ｯ繧ｪ繝ｼ繝舌�繝ｩ繧､繝峨☆繧九�
+	void selectedClear(){
+//		this.hzEditor.WCEditor.definitionPanel.uncursel();
+//		this.hzEditor.WCEditor.browsingPanel.pick(null, false);
+	}
+	//Open縺励◆MAP縺ｨ繧ｪ繝ｳ繝医Ο繧ｸ繝ｼ縺ｮ蜈�ョ繝ｼ繧ｿ縺ｮ蟇ｾ蠢懊▼縺�
+	void setOrgNodes(){
+		/*
+		if (this.hzEditor==null) {
+			System.out.println("ERROR!!:::HzEditor is NOT FOUND!");
+			return;
+		}
+		
+		Enumeration en =exbp.nodes.elements();
+		while(en.hasMoreElements()){
+			ExbpNode node =(ExbpNode)en.nextElement();
+			String lbl = node.getLabel();
+			Node org_node;
+			if(lbl.endsWith("[RH]")){
+				lbl=lbl.substring(0,lbl.indexOf("[RH]"));
+				//System.out.println(node.getLabel()+"====>"+lbl);
+				if(this.isSubLung){
+					org_node = this.hzEditor.WCEditor.findNodeWithSubLang(lbl);
+				}
+				else{
+					org_node = this.hzEditor.findRH(lbl);
+				}
+			}
+			else{
+				if(this.isSubLung){
+					org_node = this.hzEditor.WCEditor.findNodeWithSubLang(lbl);
+				}
+				else{
+					org_node = this.hzEditor.findNode(lbl);
+				}
+			}
+			node.setOrgNode(org_node);
+			if(org_node!=null){
+				//System.out.println("setOrgNodes:::"+lbl+"<=>"+org_node.getLabel());
+			}else{
+				//System.out.println("setOrgNodes:::"+lbl+"<=>NOT FOUND!");
+			}
+		}
+			*/
+	}
+	
+	//蜈�→縺ｪ繧軌bject縺九ｉFocalPoint縺ｨ縺ｪ繧畿xbpNode繧剃ｽ懊ｋ縲食ozo莉･螟悶〒縺ｯ繧ｪ繝ｼ繝舌�繝ｩ繧､繝峨☆繧九�
+	ExbpNode[] setFocalPoints(){
+//		if (this.hzEditor==null) return null;
+		
+		ExbpNode[] exbpnodes = null;
+
+		exbp.nodes.removeAllElements();
+		
+//		Vector<Node> chi_nodes;		
+//		GraphicObject gobj=null;
+//		Object ob=null;
+
+		if (focal_points.size() == 1) {//�代▽縺ｮNode繧帝∈謚槭＠縺滄圀縺ｮ蜃ｦ逅�
+			Object gobj = focal_points.firstElement(); 
+            //gobj =(GraphicObject) focal_points.firstElement(); 
+            
+			if(gobj instanceof String){
+				exbp.exbp_node_center =new ExbpNode((String)gobj);
+				exbp.exbp_node_center.setOrgNode(gobj);
+				exbp.nodes.add(exbp.exbp_node_center);
+				exbpnodes = new ExbpNode[1];
+				exbpnodes[0]=exbp.exbp_node_center;
+			}
+			else if(gobj instanceof Object){
+				System.out.println("*** ERROR:Node繧帝∈謚槭☆繧句ｿ�ｦ√′縺ゅｊ縺ｾ縺�:" );
+			}
+			else{//驕ｸ謚槭↑縺励�蝣ｴ蜷医��後お繝ｩ繝ｼ繧貞�縺励※邨ゆｺ�
+				
+				JOptionPane.showMessageDialog(exbpframe, 
+						"You Have to select [Node]!",
+						"ERROR",
+						JOptionPane.ERROR_MESSAGE);
+				System.out.println("ERROR:Node繧帝∈謚槭☆繧句ｿ�ｦ√′縺ゅｊ縺ｾ縺�:" );
+				exbpframe.dispose();
+			}				
+		}
+        else {//隍�焚Node繧帝∈謚槭＠縺滄圀縺ｮ蜃ｦ逅�
+			if(focal_points.size() > 1){
+	            exbp.exbp_node_center = new ExbpNode("(ROOT)");
+	            exbp.nodes.addElement(exbp.exbp_node_center);
+
+	            Vector chi_nodes = new Vector();
+				Enumeration node_en = focal_points.elements();
+	            while(node_en.hasMoreElements()){
+					Object gobj2 = node_en.nextElement();
+					if(gobj2 instanceof String){
+						ExbpNode chinode = new ExbpNode((String)gobj2);
+						chinode.setOrgNode(gobj2);
+						exbp.exbp_node_center.addChild(chinode);
+						exbp.nodes.add(chinode);
+					}
+					
+					exbpnodes = new ExbpNode[exbp.exbp_node_center.children.size()];
+					for(int i=0;i<exbp.exbp_node_center.children.size();i++){
+						exbpnodes[i]=(ExbpNode)exbp.exbp_node_center.children.elementAt(i);
+					}
+				}
+			}		
+		else{//Node繧定ｦ矩∈謚槭�髫帙�蜃ｦ逅�
+			JOptionPane.showMessageDialog(exbpframe, 
+					"You Have to select [Node]!",
+					"ERROR",
+					JOptionPane.ERROR_MESSAGE);
+			System.out.println("ERROR:Node繧帝∈謚槭☆繧句ｿ�ｦ√′縺ゅｊ縺ｾ縺�);
+			exbpframe.dispose();			
+			}			
+       }
+		
+		return exbpnodes;
+	}
+	
+	/*
+	//蜈�→縺ｪ繧軌bject縺九ｉExbpNode繧剃ｽ懊ｋ縲食ozo莉･螟悶〒縺ｯ繧ｪ繝ｼ繝舌�繝ｩ繧､繝峨☆繧九�
+	ExbpNode makeExbpNode(Object obj){
+		if(!(obj instanceof String)){
+			//System.out.println("ERROR@makeChildNodes():obj is NOT Node!");
+			return null;
+		}
+		
+		Node node =(Node)obj;
+		ExbpNode exbpnode;
+		
+		
+		//#kozaki 2009/08/19縲Slot縺ｮ蜃ｦ逅�ｒ霑ｽ蜉
+		if(node instanceof hozo.oe.gobj.Slot){
+			if(!((Slot)node).getRHname().equals("")){
+				node = this.hzEditor.findRH(((Slot)node).getRHname());
+			}
+			else{
+				
+			}	
+		}
+		
+		if(node instanceof hozo.oe.gobj.NodeRH){
+			if(this.isSubLung){
+				exbpnode= new ExbpNode(node.getSubLabel()+"[RH]");
+				}
+			else{
+				exbpnode= new ExbpNode(node.getLabel()+"[RH]");
+			}			
+		}
+		else{
+			if(this.isSubLung){
+				exbpnode= new ExbpNode(node.getSubLabel());
+				}
+			else{
+				exbpnode= new ExbpNode(node.getLabel());
+			}			
+		}
+		
+		exbpnode.setOrgNode(obj);
+		//exbp.nodes.add(exbpnode);
+		
+		return exbpnode;
+	}*/
+	
+	
+	//�代▽縺ｮExbpNode縺ｫ繧ｳ繝槭Φ繝峨ｒ驕ｩ蠢懊＠縺ｦ荳倶ｽ孔xbpNode繧定ｿｽ蜉縺吶ｋ縲食ozo莉･螟悶〒縺ｮ繧ｪ繝ｼ繝舌�繝ｩ繧､繝峨�蠢�ｦ√↑縺励�
+	//縲繧ｳ繝槭Φ繝画ｯ弱↓繝｡繧ｽ繝�ラ繧偵が繝ｼ繝舌�繝ｩ繧､繝峨☆繧�
+	void makeChildNodes(ExbpNode exbpnode, String command){
+	/*	if(!(exbpnode.getOrgNode() instanceof Node)){
+			//System.out.println("ERROR@makeChildNodes():orgnode is NOT Node!");
+			return;
+		}
+		
+//		exbpnode.children.removeAllElements();	
+//		System.out.println("makeChildNodes():::command="+command);
+		removeAllChildren(exbpnode);	
+		
+			
+		if(command.equals("isa")){ // ?縲荳倶ｽ肴ｦょｿｵ縺ｮ謚ｽ蜃ｺ is-a
+			makeChildNodeISA(exbpnode);
+			}
+		else if(command.equals("super")){// ?荳贋ｽ肴ｦょｿｵ縺ｮ謚ｽ蜃ｺ
+			makeChildNodeSuper(exbpnode);
+			}			
+		else if(command.startsWith(":")){// 蜿ら�蜈��謚ｽ蜃ｺ縲Refereed to
+			makeChildNodeRefered(exbpnode,command);
+			}
+		// #hirota 08/08/19 繧ｳ繝槭Φ繝臥ｵ仙粋
+		else if(command.startsWith(";")){ // (old)繝ｭ繝ｼ繝ｫ謖�ｮ壹≠繧翫�九荳倶ｽ肴ｦょｿｵ謖�ｮ壹≠繧�
+			makeChildNodeRoleSub(exbpnode,command);
+			}
+		else if(command.equals("any-h")){ // ? depend-on 竊� #hirota 11/26  迴ｾ蝨ｨ縺ｮ隕也せ縺君ode縺ｮ縺ｨ縺阪¨ode縺ｮ繧ｹ繝ｭ繝�ヨ縺ｮRH繧定｡ｨ遉ｺ
+			makeChildNodeDependOnRH(exbpnode,command); 
+			}
+		else if(command.equals("++s")){// ?縲depend on 縲竊舌さ繝ｳ繝�く繧ｹ繝医ｒ蜿悶ｊ蜃ｺ縺�
+			makeChildNodeDependOnContext(exbpnode,command); 	
+			}
+		else if(command.equals("++P")){//  playable 髢｢菫�?縲竊�all
+			makeChildNodePlayable(exbpnode);
+		}
+		else if(command.startsWith("++p")){// playable 髢｢菫�?縲竊�label 謖�ｮ�
+			makeChildNodePlayableByLabel(exbpnode, command);
+			}
+		else if(command.equals("++c")){ // ?縲playable 竊�繝励Ξ繧､繝､繝ｼ縺ｮ蜿悶ｊ蜃ｺ縺�
+			makeChildNodePlayer(exbpnode);
+			}
+		else if(command.startsWith("++r:")){// ?髢｢菫よｦょｿｵ縺ｮ蜿悶ｊ蜃ｺ縺� ++r:Lable 
+			makeChildNodeRelationConcept(exbpnode,command); 
+		}
+		else if(command.equals("++R")){ // ++R  蜈ｨ驛ｨ蜿悶ｊ蜃ｺ縺�
+			makeChildNodeRelationAll(exbpnode);
+			}	
+		else if(command.startsWith("super_isa")){ // #hirota 08/09/03 蜈�ｼ滓ｦょｿｵ縺ｮ蜿悶ｊ蜃ｺ縺�super+isa)
+			makeChildNodeBrothers(exbpnode);
+			}
+		else if(command.startsWith("_")){//		繧ｯ繝ｩ繧ｹ蛻ｶ邏�ｒ霎ｿ繧句�逅�only RH
+			makeChildNodeCConlyRH(exbpnode,command);
+			}
+		else{
+			makeChildNodeReferringTo(exbpnode,command);// 繧ｯ繝ｩ繧ｹ蛻ｶ邏�ｒ霎ｿ繧句�逅�
+			}
+			*/
+		}
+	
+	public void run(){
+		//SerachPath(target_nodes,target_cls); 
+	}
+	
+	public void stop(){
+//		pbar_frame.stop();
+//		pbar_frame=null;			
+	}
+	
+	ExbpNode[] target_nodes;
+//	Node[] target_cls;
+	int[] match_num;
+//	ProgressFrame pbar_frame;
+	
+/*	
+	public void SearchPathAsThread(ExbpNode[] nodes, Node[] cls){
+		pbar_frame = new ProgressFrame("Serach Path","Now,Searching..., Please wait.");
+		pbar_frame.frame.setAlwaysOnTop(true);
+		pbar_frame.frame.setLocation(exbp.cmd_dialog.getWidth(),100);
+		
+		
+		target_nodes = nodes;
+		target_cls =cls;
+		match_num = new int[cls.length];
+		for(int i=0;i<match_num.length;i++){
+			match_num[i]=0;
+		}
+		
+		Thread thread = new Thread(this);
+		thread.start();	
+		
+
+	}*/
+	/*
+	
+	void checkMatchCount(){
+		match_num = new int[target_cls.length];
+		for(int i=0;i<match_num.length;i++){
+			match_num[i]=0;
+		}
+		
+		Enumeration en = this.exbp.nodes.elements();
+		while(en.hasMoreElements()){
+			ExbpNode node = (ExbpNode)en.nextElement();
+			Object obj = node.getOrgNode();
+			if(obj instanceof Node){
+				Node hozonode=(Node)obj;
+				for(int i=0;i<target_cls.length;i++){
+					if(target_cls[i] instanceof Node){
+						if(hozonode.isSubclassOf((Node)target_cls[i])
+								|| hozonode.equals(target_cls[i])){
+							match_num[i]++;
+						}
+					}
+				}
+			}
+		}
+		
+		for(int i=0;i<target_cls.length;i++){
+			System.out.println(
+					target_cls[i].getLabel()+" = "+
+					match_num[i]);
+		}
+	}
+	*/
+	
+	//#kozaki縲2009/02/13縲蟇ｾ雎｡繝弱�繝峨ｒ隍�焚縺ｫ諡｡蠑ｵ	
+//	public void SerachPath(ExbpNode[] nodes, Node[] target_cls/*String[] cls_lists*/){}
+
+//	private Vector<ExbpNode> SerachPath(Vector<ExbpNode> nodes,
+//			Node[] cls_lists,Vector<ExbpNode> match_nodes){}
+	
+	void removeAllChildren(ExbpNode exbpnode){
+		this.exbp.nodes.removeAll(exbpnode.children);
+		exbpnode.children.removeAllElements();	
+	}
+
+	//谺｡縺ｫ縺溘←繧九ヮ繝ｼ繝峨�繝ｪ繧ｹ繝医ｒ蜿門ｾ励☆繧�
+	//窶ｻ荳蠎ｦ縺溘←縺｣縺溘％縺ｨ縺ｮ縺ゅｋ繝��繧ｿ縺ｯ�荊emp_nodes縺ｫ菫晄戟縺輔ｌ�後◎縺｡繧峨ｒ霑斐☆
+//	Vector<ExbpNode> getChildNodeFromTemp(ExbpNode exbpnode, String cmd){}
+
+	
+	void explore(ExbpNode exbpnode, boolean all, String cmd){
+	/*	ExbpNode[] exbpnodes=new ExbpNode[1];
+		
+		if(!all){
+			exbpnodes=new ExbpNode[1];
+			exbpnodes[0]=exbpnode;
+		}
+		else{
+			int layer = exbpnode.getLocatedLayer();
+			exbpnodes=exbp.getExbpNodesAtLear(layer,true);
+		}
+		
+		for(int l=0;l<exbpnodes.length;l++){
+			if(exbpnodes[l].visible){
+				this.makeChildNodeReferringToDirectly(exbpnodes[l], cmd);
+				this.makeChildNodeRefered(exbpnodes[l], ":Any");
+				
+				//exbpnodes[l].children.removeAllElements();
+//				Vector temp_children = getChildNodeFromTemp(exbpnodes[l],cmd);
+//				Enumeration en = temp_children.elements();
+//				while(en.hasMoreElements()){
+//					ExbpNode chi = (ExbpNode)en.nextElement();
+//					exbpnodes[l].addChild(chi);
+//					chi.setVisible(true);
+//				}
+			}
+		}*/
+		
+	}
+
+	void clearSubPath(ExbpNode exbpnode){
+		ExbpNode[] exbpnodes=new ExbpNode[1];
+		
+		int layer = exbpnode.getLocatedLayer();
+		exbpnodes=exbp.getExbpNodesAtLear(layer,true);
+		
+		
+		for(int l=0;l<exbpnodes.length;l++){
+			if(exbpnodes[l].visible){
+				this.removeAllChildren(exbpnodes[l]);
+			}
+		}
+		
+	}
+
+	
+	//蜷�さ繝槭Φ繝峨ｒ驕ｩ逕ｨ縺励◆縺ｨ縺阪↓縺溘←繧九ヮ繝ｼ繝峨ｒ縺励ｉ縺ｹ縺ｦ�卦ree縺ｮ繧ｳ繝槭Φ繝峨Μ繧ｹ繝医↓蜈･繧後ｋ��
+//	void setCommandsTree(ExbpNode[] exbpnodes){}
+	
+public void makeChildNodeSuper(ExbpNode exbpnode) {}
+
+
+private void makeSlotRelatedExbpNode(ExbpNode exbpnode, String command) {}
+
+//	#kozaki 2008/08/17縲繧ｹ繝ｭ繝�ヨ縺ｧ髢｢騾｣縺励◆讎ょｿｵ繧定ｾｿ繧句�逅�∈縺ｮ蛻�ｲ�
+//	private void makeSlotRelatedExbpNode(ExbpNode par_exbpnode, Node node, String command){}
+	
+	
+	//#kozaki 2008/08/12縲繧ｯ繝ｩ繧ｹ蛻ｶ邏�ｒ霎ｿ繧句�逅�ｒ迢ｬ遶�
+//	private void makeExbpNodeCC(ExbpNode par_exbpnode,	//隕ｪ縺ｨ縺ｪ繧畿xbpNode
+//								Slot slot,				//霎ｿ繧句ｯｾ雎｡縺ｨ縺ｪ繧九せ繝ｭ繝�ヨ
+//								Node slot_node,			//繧ｯ繝ｩ繧ｹ蛻ｶ邏�→縺励※蜿ら�縺励※縺�ｋ繝弱�繝�
+//								Node node,				//霎ｿ繧九せ繝ｭ繝�ヨ繧呈戟縺､繝弱�繝�
+//								String command,		//霎ｿ繧九さ繝槭Φ繝�
+//								String match_key		//荳閾ｴ縺励◆繧ｳ繝槭Φ繝会ｼ井ｸ贋ｽ阪せ繝ｭ繝�ヨ縺ｮ蜃ｦ逅�畑��
+//								){}
+	
+//	public void makeChildNodeISA(ExbpNode exbpnode){}
+
+	
+	// ?
+//	private void makeChildNodeRefered(ExbpNode exbpnode, String command) {}
+
+	//	?窶�(old)繝ｭ繝ｼ繝ｫ謖�ｮ壹≠繧翫�九荳倶ｽ肴ｦょｿｵ謖�ｮ壹≠繧�
+//	public void makeChildNodeRoleSub(ExbpNode exbpnode,String command) {}
+
+	// ? depend-on 竊� #hirota 11/26  迴ｾ蝨ｨ縺ｮ隕也せ縺君ode縺ｮ縺ｨ縺阪¨ode縺ｮ繧ｹ繝ｭ繝�ヨ縺ｮRH繧定｡ｨ遉ｺ
+//	public void makeChildNodeDependOnRH(ExbpNode exbpnode,String NodeCC) {}
+	
+	
+	
+	// ?縲depend on 縲竊舌さ繝ｳ繝�く繧ｹ繝医ｒ蜿悶ｊ蜃ｺ縺�#hirota add 09/11/09
+//	public void makeChildNodeDependOnContext(ExbpNode exbpnode,String command) {}
+	
+//  playable 髢｢菫�?縲竊�all
+//	public void makeChildNodePlayable(ExbpNode exbpnode) {}
+
+	// playable 髢｢菫�?縲竊�label 謖�ｮ�
+//	private void makeChildNodePlayableByLabel(ExbpNode exbpnode,String command) {}
+
+	 // ?縲playable 竊�繝励Ξ繧､繝､繝ｼ縺ｮ蜿悶ｊ蜃ｺ縺�
+//	public void makeChildNodePlayer(ExbpNode exbpnode) {}	
+//	private void makeChildNodeRelationConcept(ExbpNode exbpnode,String command) {}	
+	
+//	 ++R  蜈ｨ驛ｨ蜿悶ｊ蜃ｺ縺�邯呎価繧ｪ繝励す繝ｧ繝ｳ縺ゅｊ縺ｮ縺ｨ縺搾ｼ�
+//	public void makeChildNodeRelationAllToDirectry(ExbpNode exbpnode) {}
+	// ++R  蜈ｨ驛ｨ蜿悶ｊ蜃ｺ縺�
+//	public void makeChildNodeRelationAll(ExbpNode exbpnode) {}	
+	
+	// #hirota 08/09/03 蜈�ｼ滓ｦょｿｵ縺ｮ蜿悶ｊ蜃ｺ縺�super+isa)
+//	private void makeChildNodeBrothers(ExbpNode exbpnode) {}	
+	
+	//	繧ｯ繝ｩ繧ｹ蛻ｶ邏�ｒ霎ｿ繧句�逅�only RH
+//	private void makeChildNodeCConlyRH(ExbpNode exbpnode,String command) {}	
+	
+	//	繧ｯ繝ｩ繧ｹ蛻ｶ邏�ｒ霎ｿ繧句�逅�
+//	private void makeChildNodeReferringTo(ExbpNode exbpnode,String command) {}	
+
+//	繧ｯ繝ｩ繧ｹ蛻ｶ邏�ｒ霎ｿ繧句�逅��繧ｵ繝悶せ繝ｭ繝�ヨ繧貞性縺ｾ縺ｪ縺�#kozaki縲2009/08/19
+//	private void makeChildNodeReferringToDirectly(ExbpNode exbpnode,String command) {}	
+
+	
+//	String[] getOtionLists(Vector<ExbpNode> exbpnodes){}
+	
+	
+/*	public String[] getSelectedClass(String[] labels){
+		TreeSelectDialog treeSelectDialog = new TreeSelectDialog(true);
+	    treeSelectDialog.setHZEditor(this.hzEditor);
+	    treeSelectDialog.setSubLang(this.isSubLung);
+	    treeSelectDialog.updateTree();
+	    //treeSelectDialog.setSize(320, 450);
+	    if(labels.length>0){
+		   	String label = labels[0];
+		   	for(int i=1;i<labels.length;i++){
+		   		label +=" "+"\\" + Slot.OR_DELIMITER+" "+labels[i];
+		   	}
+		   	treeSelectDialog.setSelectedTreeDialog(labels, label);
+	    }
+	    treeSelectDialog.setVisible(true);
+        if (treeSelectDialog.isOK()) {
+        	String[] cls_lists = treeSelectDialog.getSelectedHozoNodesByLabel();
+//        	String opt = treeSelectDialog.getSelected();
+//        	if(opt==null){
+//				opt="Any";
+//			}
+//	    	String[] cls_lists = opt.split(" "+"\\" + Slot.OR_DELIMITER+" ");
+            return cls_lists;
+        }
+        return null;
+	}*/
+	
+//	public Object[] getSelectedClasses(String target_cls){}
+	
+//	public Node[] getSelectedClassesAsNode(String target_cls){}
+
+//	public Node getHozoNode(String lbl){}	
+	
+//	public boolean isSubClassOfSelectedClasses(Object node, Object[] target_classes){}
+	
+//	public boolean isSubClass(Object node, Object target){}
+
+	//#kozaki 2009/02/13縲Node[]繧担tring[]縺ｫ螟画鋤
+//	public String[] NodesToStrings(Node[] nodes){}
+	
+	//#kozaki 2009/02/13縲繧ｯ繝ｩ繧ｹ荳隕ｧ繧誰ode[]縺ｧ蜿門ｾ�
+//	public Node[] getSelectedClassNodes(Node[] nodes){}
+
+	//#hirota 2009/05/18縲髢｢菫よｦょｿｵ荳隕ｧ繧誰ode[]縺ｧ蜿門ｾ�
+//	public Node[] getSelectedClassNodes2(Node[] nodes){
+//	 return null;	
+//	}
+	
+	//#kozaki 09/02/15
+//	public void setSubLang(boolean b){}
+	
+}
+
+
Index: BH13SPARQLBuilder/src/hozo/maptool/ExtendBP.java
===================================================================
--- BH13SPARQLBuilder/src/hozo/maptool/ExtendBP.java (revision 7)
+++ BH13SPARQLBuilder/src/hozo/maptool/ExtendBP.java (revision 7)
@@ -0,0 +1,6079 @@
+package hozo.maptool;
+
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.GridBagLayout;
+import java.awt.List;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.swing.DefaultListModel;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComponent;
+import javax.swing.JDialog;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextField;
+import javax.swing.border.*;
+
+import org.biohackathon.SPARQLBuilder.OWL.Path;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.Toolkit;
+import java.io.*;
+import java.util.Iterator;
+
+//import hozo.oe.util.*;
+
+class Edge {
+    ExbpNode from;
+    ExbpNode to;
+
+    double len;
+//    String key = "";
+//    
+//    boolean isVisible=true;
+    
+}
+
+
+public class ExtendBP extends JPanel implements Runnable{
+
+	private static final long serialVersionUID = 1L;
+	ExbpNode exbp_node_center; //�ｽ�ｽ�ｽS�ｽﾌ（Root�ｽﾌ）E�ｽ�ｽ�ｽ�ｽ�ｽ�ｽNode
+	ExbpNode exbp_node_pick;  //  @jve:decl-index=0:
+	Vector<ExbpNode> nodes;  //  @jve:decl-index=0:
+	
+	ArrayList<Color> topicColorList = new ArrayList<Color>(10);
+	
+    
+//	HZEditor _hzeditor; 
+	ExtendFrame _extendFrame; //#kozaki 2008/07/31
+//	ExtendBPPopupMenu _popupMenu;
+
+    private int currentLayerNum = 6;
+    private int currentLayerLength = 80;
+    private boolean isVisibleCenter = true;
+    private boolean isVisibleInflu = true;
+    private boolean isVisibleLink = true; //#kozaki�ｽ@2008/06/14�ｽ@�ｽf�ｽt�ｽH�ｽ�ｽ�ｽg�ｽ�ｽLink�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ謔､�ｽﾉ変更
+    private boolean isVisibleLevel = false;
+    private boolean isVisibleBorder = true;
+    
+    public boolean skip_repetition = true;//#kozaki�ｽ@2009/11/30�ｽ@�ｽJ�ｽ�ｽﾔゑｿｽ�ｽ�ｽ
+    
+    private static int WIDTH_MARGIN = 80;
+    private static int HEIGHT_MARGIN = 50;
+    private static int FONT_MARGIN = 10;
+    
+    private int layoutOption = 0;
+    public static int LinkCentricLayout = 0;
+    public static int NodeCentricLayout = 1;
+    public static int LinkCentricLayout2= 2;
+    
+    
+    protected static final String DEFAULT_NAME = "(ROOT)";
+    public static Font fontLink = new Font("Times", Font.PLAIN, 12);
+    Font fontBorder = new Font("Times", Font.BOLD, 18);
+    
+    private static String DASH_PATURN = "0.0f, 5.0f, 5.0f, 0.0f";
+    
+    public String command; //#kozaki�ｽ@2008/10/03�ｽ@�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽ�ｽString�ｽﾅ保趣ｿｽ�ｽ�ｽ�ｽ�ｽ
+    public String[] optionList = new String[4];
+    
+    
+    //#kozaki 2008/10/19�ｽ@�ｽg�ｽ�ｽ�ｽﾄゑｿｽ�ｽﾈゑｿｽ�ｽﾌで削除
+    //public Vector tempGobjList = new Vector(20); // �ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽI�ｽu�ｽW�ｽF�ｽN�ｽg�ｽ�ｽ�ｽi�ｽ[�ｽ�ｽ�ｽ�ｽR�ｽ�ｽ�ｽN�ｽV�ｽ�ｽ�ｽ�ｽ
+    
+    Vector<RoleLists> role_lists = new Vector<RoleLists>(10); //#kozaki 2008/01/02�ｽ@�ｽe�ｽw�ｽﾅの�ｿｽ�ｽ[�ｽ�ｽ�ｽﾌ趣ｿｽﾞ格�ｽ[
+    
+    RoleLists link_list = new RoleLists();
+    
+    
+    //#kozaki 2008/03/22 �ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ�ｽp�ｽﾌ変撰ｿｽ
+//    static boolean isSubLung = false;
+    
+//    private int scale;                      // �ｽ`�ｽ�ｽ{�ｽ�ｽ
+    private JFrame _ownerFrame = null;			// �ｽ�ｽ�ｽ�ｽ�ｽt�ｽ�ｽ�ｽ[�ｽ�ｽ
+    
+    //#kozaki�ｽ@�ｽo�ｽl�ｽ�ｽ�ｽf�ｽ�ｽ�ｽp
+	private Thread relaxer;
+//	private boolean random;
+	public boolean stop = true;
+	public boolean stopOnLayer = true;
+	public boolean showEdges = false;
+	Vector<Edge> edges = new Vector<Edge>();
+	
+	public MapFactory mapfactory;
+
+//	public MapCommandDialog cmd_dialog;
+	
+//	ChangeViewFrame changeView;
+	
+//	public ArrayList<ArrayList<Node>> hilight_nodes=new ArrayList<ArrayList<Node>>();
+	
+	 static Color[] hilight_color = {
+		 Color.red,
+		 Color.blue,
+		 Color.green,
+		 Color.cyan,
+		 Color.magenta,
+		 new Color(153,0,153)
+		/* Color.orange/*,
+	        
+	        Color.pink,		//#kozaki�ｽ@2008/08/18�ｽ@�ｽ�ｽ�ｽﾔゑｿｽﾏ更
+	        Color.yellow,
+	        
+	        new Color(255,102,255), // Color.magenta,	//#kozaki�ｽ@2008/08/18�ｽ@�ｽ�ｽ�ｽﾔゑｿｽﾏ更
+	        Color.lightGray,
+	        new Color(255,51,102),//      //
+	        new Color(50,155,255),   //     //
+			Color.gray*/
+		};
+	 
+	 static String[] hilight_color_str = {
+		 "red","blue","green","aqua","fuchsia","purple"};
+
+	
+	/**
+	 * This is the default constructor
+	 */
+	public ExtendBP(MapFactory fac) {
+		super();
+		mapfactory = fac;
+		ExbpNode exbpnode= new ExbpNode("Center");;
+		this.exbp_node_center = exbpnode;
+//		exbpnode = new ExbpNode("TEST");
+//		exbpnode= new ExbpNode("Center");;
+//		exbpnode.setChildrenColor(Color.red);
+//		exbpnode.key="prop1";
+//		this.exbp_node_center.addChild(exbpnode);
+//		this.exbp_node_center.addChild(new ExbpNode("TEST2"));
+//		this.exbp_node_center.addChild(new ExbpNode("TEST3"));
+//		this.exbp_node_center.addChild(new ExbpNode("TEST4"));
+		
+//		cmd_dialog = new MapCommandDialog(this);
+//		_popupMenu = new ExtendBPPopupMenu(this, null);
+//		
+//		new MapCommandEasy(this);
+		
+ 		initialize();
+	}
+	
+/*	public ExtendBP(JFrame owner) {
+		this();
+ 		initialize();
+ 		this._ownerFrame = owner;
+	}*/
+	
+
+	// #hirota 08/10/21
+	public MapFactory getMapFactory(){
+		return this.mapfactory;		
+	}
+	
+	public void setcenternode(ExbpNode center){
+		this.exbp_node_center = center;		
+	}
+	
+	public int getlength(ExbpNode from, ExbpNode to){
+		return (int)Math.abs(Math.sqrt((from.getCenterPoint().x-to.getCenterPoint().x)*(from.getCenterPoint().x-to.getCenterPoint().x)
+				+ (from.getCenterPoint().y-to.getCenterPoint().y)*(from.getCenterPoint().y-to.getCenterPoint().y)) );
+	}
+	
+
+    void addEdge(ExbpNode from, ExbpNode to, int len, boolean isv) {
+		Edge e = new Edge();
+		e.from = from;
+		e.to = to;
+		e.len = len;
+//		e.key = from.exbpnode.key;
+//		e.isVisible = isv;
+//		if(e.key.equals("")){
+//			e.key = "is_a";
+//		}
+//		
+		
+		edges.addElement(e);
+		
+    }
+    public void start() {
+		relaxer = new Thread(this);
+		relaxer.start();
+    }
+
+    public void stop() {
+	relaxer = null;
+    }
+
+	   public void run() {
+	    	
+	    	Thread me = Thread.currentThread();
+			while (relaxer == me) {
+			    relax();
+			    
+//			    if (random && (Math.random() < 0.03)) {
+//			    	Node1 n = nodes[(int)(Math.random() * nnodes)];
+//			    	
+//					if (!n.fixed) {
+//					    n.x += 100*Math.random() - 50;
+//					    n.y += 100*Math.random() - 50;
+//					}
+//			    }
+
+			    try {
+			    	Thread.sleep(100);
+			    } catch (InterruptedException e) {
+			    	break;
+			    }
+			}
+	    }
+
+	    synchronized void relax() {	    	
+	    	//#kozaki
+	    	int cx = this.exbp_node_center.getCenterPoint().x;
+	    	int cy = this.exbp_node_center.getCenterPoint().y;
+	    	
+	    	
+	    	if( stop ){	    		
+	    	}
+	    	else{
+	    		// #hirota 8/1 
+	    		int sikii = 0;
+	    		Enumeration<Edge> en_edges = this.edges.elements();
+	    		while(en_edges.hasMoreElements()){
+				//for (int i = 0 ; i < nedges ; i++) {
+	    			Edge e = en_edges.nextElement();
+	    			//Edge e = edges[i];
+				    double vx = e.to.getCenterPoint().x - e.from.getCenterPoint().x;
+				    double vy = e.to.getCenterPoint().y - e.from.getCenterPoint().y;
+				    double len = Math.sqrt(vx * vx + vy * vy);
+			        len = (len == 0) ? .0001 : len;
+				    double f = (e.len - len) / (len * 3);
+				    double dx = f * vx;
+				    double dy = f * vy;
+			
+				    e.to.dx += dx;
+				    e.to.dy += dy;
+				    e.from.dx += -dx;
+				    e.from.dy += -dy;
+				}
+			
+				
+				Enumeration<ExbpNode> en = this.nodes.elements();
+				while(en.hasMoreElements()){
+				//for (int i = 0 ; i < nnodes ; i++) {
+					ExbpNode n1 = en.nextElement();
+					if(this.exbp_node_center.equals(n1)){
+						continue;
+					}
+				    //Node1 n1 = nodes[i];
+				    double dx = 0;
+				    double dy = 0;
+			
+				    Enumeration<ExbpNode> en2 = this.nodes.elements();
+					while(en2.hasMoreElements()){
+				    //for (int j = 0 ; j < nnodes ; j++) {
+						ExbpNode n2 = en2.nextElement();
+						//if (i == j) {
+						if (n1.equals(n2)) {
+							continue;
+						}
+						//Node1 n2 = nodes[j];
+						double vx = n1.getCenterPoint().x - n2.getCenterPoint().x;
+						double vy = n1.getCenterPoint().y - n2.getCenterPoint().y;
+						double len = vx * vx + vy * vy;
+						if (len == 0) {
+						    dx += Math.random();
+						    dy += Math.random();
+						} else if (len < 100*100) {
+						    dx += vx / len;
+						    dy += vy / len;
+						}
+				    }
+				    double dlen = dx * dx + dy * dy;
+				    if (dlen > 0) {
+						dlen = Math.sqrt(dlen) / 2;
+						n1.dx += dx / dlen;
+						n1.dy += dy / dlen;
+				    }
+				}
+			
+				Dimension d = getSize();
+				
+				Enumeration<ExbpNode> en3 = this.nodes.elements();
+				while(en3.hasMoreElements()){
+				//for (int i = 0 ; i < nnodes ; i++) {
+				    //Node1 n = nodes[i];
+					ExbpNode n = en3.nextElement();
+					int layer = n.getLocatedLayer();
+					if(this.exbp_node_center.equals(n)){
+						continue;
+					}
+					
+				    //  stop�ｽ�ｽ�ｽﾄゑｿｽ�ｽﾈゑｿｽ�ｽﾆゑｿｽ
+					if(! n.n_stop ){
+				    	if (!n.fixed) {
+							n.x += Math.max(-5, Math.min(5, n.dx));
+							n.y += Math.max(-5, Math.min(5, n.dy));
+				        }
+			            if (n.x < 0) {
+			                n.x = 0;
+			            } else if (n.x > d.width) {
+			                n.x = d.width;
+			            }
+			            if (n.y < 0) {
+			                n.y = 0;
+			            } else if (n.y > d.height) {
+			                n.y = d.height;
+			            }
+			            
+			            
+			            
+					    n.dx /= 2;
+					    n.dy /= 2;
+					
+					    
+					    
+					    //  #hirota 08/8/1
+			            // �ｽ�ｽ�ｽa�ｽv�ｽZ
+					    // 閾値�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ黷ｽ�ｽﾆゑｿｽ length_of_layer
+					    if(stopOnLayer){
+//						    double rx = ( this.graph.cx - n.x );
+//						    double ry = ( this.graph.cy - n.y );
+					    	//double rx = (  n.x - this.graph.cx);
+						    //double ry = (  n.y - this.graph.cy);
+						    double rx = (  n.getCenterPoint().x - cx);
+						    double ry = (  n.getCenterPoint().y - cy);
+						    if( Math.abs( (Math.sqrt( rx*rx + ry*ry) - (layer*currentLayerLength)) ) > sikii  ){
+						    	//System.out.println( "layer :" + n.layer + " label  ::" + n.lbl + "  r:" + (int)(Math.sqrt( n.x*n.x + n.y*n.y)) );
+						    	
+						    	//n.n_stop = true;
+						    	
+						    	// #hirota 8/7 test
+						    	
+						    	// �ｽp�ｽx�ｽﾌ搾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ
+						    	//double theta = Math.atan2(rx, ry);
+//						    	double theta = Math.atan2(rx, ry);
+						    	double theta = Math.atan2(ry, rx);
+						    	
+						    	// �ｽﾅ適(x,y)�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+						    	double ddx = (layer*currentLayerLength)*Math.cos(theta);
+						    	double ddy = (layer*currentLayerLength)*Math.sin(theta);
+						    	//System.out.println(" node : ddx ddy :" + n.lbl + ddx + ", "+ddy);
+						    	
+						    	//n.x=  this.graph.cx  + ddx; 
+						    	//n.y=  this.graph.cy  + ddy;
+						    	n.x=  cx  + (new Double(ddx)).intValue() -n.width/2; 
+						    	n.y=  cy  + (new Double(ddy)).intValue() -n.height/2;
+						    	
+						    }
+					    }
+					    
+					    
+					    
+					}
+					// stop�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽﾆゑｿｽ
+					else{
+						//				  #hirota 08/8/1
+						//double rx = Math.abs( this.graph.cx - n.x );
+					    //double ry = Math.abs( this.graph.cy - n.y );
+					    double rx = Math.abs( cx - n.getCenterPoint().x );
+					    double ry = Math.abs( cy - n.getCenterPoint().y );
+			            if( Math.abs( (Math.sqrt( rx*rx + ry*ry) - (layer*currentLayerLength) ) )<= sikii ){
+			            	
+			            	n.n_stop = false;
+			            }
+					}
+				}
+				repaint();
+	    	}
+	    }
+	
+	
+	//#kozaki�ｽ@2008/06/26�ｽ@�ｽ�ｽ�ｽC�ｽA�ｽE�ｽg�ｽﾝ抵ｿｽ
+	public void setLayoutOption(int layout){
+		this.layoutOption = layout;
+	}
+	
+//	public ExtendBP(HZEditor hze) {
+//		super();
+//		initialize();
+//		//ExbpNode.setColors();
+//		this.setHZEditor(hze);		
+//	}
+
+//	#kozaki 2007/10/28�ｽ@ExbpNode�ｽﾖゑｿｽpath�ｽｲべゑｿｽ
+	// #hirota 09/11/19 path�ｽ�ｽvector�ｽﾅ返ゑｿｽ
+	public Vector getPath2(ExbpNode node){
+		System.out.println(node.getPath());
+		
+		Vector path = new Vector();//String path="";//"["+node.getLabel()+"]";
+    	Vector<ExbpNode> nodes = new Vector<ExbpNode>();
+		for(ExbpNode n = node ; n.parent!=null ; n=n.parent ) {
+			nodes.insertElementAt(n,0);
+    		//path="["+n.parent.getLabel()+"]"+ "\n-"+ n.key +"->"+path;
+    	}
+    	ExbpNode n =nodes.firstElement();
+    	
+    	path.add(this.exbp_node_center); //path +="["+this.exbp_node_center.getLabel()+"]\n"; //Root
+    	Enumeration<ExbpNode> en = nodes.elements();  	
+    	while(en.hasMoreElements()){
+    		n =en.nextElement();
+    		
+    		path.add(n);
+    		
+    		if(n.opt.equals("")){
+    			n.opt="isa";
+    		}
+    		//#kozaki 2009/01/20�ｽ@�ｽ�ｽ�ｽ�ｽﾇ会ｿｽ
+    		if(n.opt.startsWith(":!")){
+    			//path +="("+n.opt+")->"+n.key+"<- ["+ n.getLabel()+"]\n";
+    		}
+    		else if(n.opt.startsWith(":")){
+    			//path +="("+n.opt+")<-"+n.key+"-- ["+ n.getLabel()+"]\n";
+    		}
+    		else{
+    			//path +="("+n.opt+")--"+n.key+"-> ["+ n.getLabel()+"]\n";
+    		}
+    	}
+		return path;
+	}
+	
+	//#kozaki 2007/10/28�ｽ@ExbpNode�ｽﾖゑｿｽpath�ｽｲべゑｿｽ
+	public String getPath(ExbpNode node){
+		System.out.println(node.getPath());
+		
+		String path="";//"["+node.getLabel()+"]";
+    	Vector<ExbpNode> nodes = new Vector<ExbpNode>();
+		for(ExbpNode n = node ; n.parent!=null ; n=n.parent ) {
+			nodes.insertElementAt(n,0);
+    		//path="["+n.parent.getLabel()+"]"+ "\n-"+ n.key +"->"+path;
+    	}
+    	ExbpNode n =nodes.firstElement();
+    	
+    	path +="["+this.exbp_node_center.getLabel()+"]\n"; //Root
+    	Enumeration<ExbpNode> en = nodes.elements();  	
+    	while(en.hasMoreElements()){
+    		n =en.nextElement();
+    		if(n.opt.equals("")){
+    			n.opt="isa";
+    		}
+    		//#kozaki 2009/01/20�ｽ@�ｽ�ｽ�ｽ�ｽﾇ会ｿｽ
+    		if(n.opt.startsWith(":!")){
+    			path +="("+n.opt+")->"+n.key+"<- ["+ n.getLabel()+"]\n";
+    		}
+    		else if(n.opt.startsWith(":")){
+    			path +="("+n.opt+")<-"+n.key+"-- ["+ n.getLabel()+"]\n";
+    		}
+    		else{
+    			path +="("+n.opt+")--"+n.key+"-> ["+ n.getLabel()+"]\n";
+    		}
+    	}
+		return path;
+	}
+	//#kozaki 2007/10/28�ｽ@ExbpNode�ｽﾖゑｿｽpath�ｽｲべゑｿｽ
+	public void showPath(ExbpNode node){
+		//JOptionPane.showMessageDialog(this, getPath(node));
+		// #enegate# 08/07/07 �ｽt�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾉ配�ｽu�ｽ�ｽ�ｽ�ｽ
+		//JOptionPane.showMessageDialog(this._ownerFrame, getPath(node),"The detail of the conceptual chain",JOptionPane.OK_OPTION);
+		
+		// #hirota save�ｽp�ｽ@ // �ｽy�ｽQ�ｽl�ｽzsave_maps�ｽ�ｽ�ｽ�ｽ
+		int ans = JOptionPane.showConfirmDialog(this._ownerFrame, getPath(node),"�ｽp�ｽX�ｽﾌ詳細　�ｽﾛ托ｿｽ�ｽ�ｽ�ｽﾜゑｿｽ�ｽ�ｽ�ｽH",
+				JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
+		if(ans!=JOptionPane.YES_OPTION){
+			return;
+		}
+		else{
+			String OPEN_DIRECTORY = "./data3/mapdata/";
+			File dir = new File(OPEN_DIRECTORY);
+			if(!dir.exists()){
+				File ont_file = this.mapfactory.getFile();
+				if(ont_file!=null){
+					OPEN_DIRECTORY= ont_file.getParentFile().getAbsolutePath();
+				}
+			}
+			JFileChooser  fd = new JFileChooser(OPEN_DIRECTORY);
+			fd.showSaveDialog(this);
+			File file = fd.getSelectedFile(); 
+			
+			this.saveMAPinXML(file,node);// this.saveMAPinXML(file);
+			return;			
+		}
+		
+		
+	}
+	
+//	void setRoles(boolean inh){
+//		
+//	}
+	
+	
+	//#kozaki 2011/01/25 �ｽ�ｽ�ｽS�ｽ�ｽ�ｽ辜会ｿｽx�ｽ�ｽ�ｽ�ｽ�ｽ�ｽv�ｽ�ｽ�ｽ�ｽExbpNode�ｽ�ｽT�ｽ�ｽ�ｽﾄ返ゑｿｽ�ｽD
+	public ExbpNode findExbpNode(String lbl){
+		ExbpNode node;// = this.exbp_node_center;
+		Vector<ExbpNode> nodes = new Vector<ExbpNode>();
+		nodes.add(this.exbp_node_center);
+		
+		for(int i=0;i<nodes.size();i++){
+			node = nodes.elementAt(i);
+			if(node.getLabel().equals(lbl)){
+				return node;
+			}
+			else{
+				nodes.addAll(node.children);
+			}
+		}
+		
+		return null;
+	}
+	
+	public void paint(Graphics g){
+		
+//		this.setForeground(Color.white);
+		Dimension d = this.getSize();
+		g.setColor(Color.WHITE);
+		g.fillRect(0,0, d.width,d.height);
+
+		//#kozaki�ｽ@�ｽo�ｽl�ｽﾌ描�ｽ�ｽi�ｽf�ｽo�ｽb�ｽO�ｽp�ｽj
+		if(showEdges){
+			Enumeration<Edge> en_edges = this.edges.elements();
+			while(en_edges.hasMoreElements()){
+				Edge e = en_edges.nextElement();
+			    g.setColor(Color.red);
+	//		    g.drawLine(e.to.x, e.to.y, e.from.x, e.from.y);
+			    g.drawLine(e.to.getCenterPoint().x, e.to.getCenterPoint().y, e.from.getCenterPoint().x, e.from.getCenterPoint().y);
+			}
+		}
+
+		
+//        // �ｽ`�ｽ�ｽ{�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽ
+//        double dScale = getScaledCanvasScale();
+//        ((Graphics2D) g).scale(dScale, dScale);
+
+        // �ｽ�ｽ�ｽE�ｽ�ｽﾌ円�ｽﾊゑｿｽ`�ｽ�ｽ
+        if (this.isVisibleBorder) {
+            this.drawBorderCircle(g);
+        }
+		
+        // �ｽK�ｽw�ｽﾌ円�ｽﾊゑｿｽ`�ｽ�ｽ
+        if (this.isVisibleLevel) {
+            this.drawLayerCircle(g);
+        }
+        
+        // �ｽm�ｽ[�ｽh�ｽﾔの撰ｿｽ�ｽ�ｽ�ｽ
+        if (this.isVisibleLink) {
+            this.drawLink(g);
+        }
+        
+        // �ｽm�ｽ[�ｽh�ｽ�ｽ`�ｽ�ｽ
+		Enumeration<ExbpNode> en_nodes = this.nodes.elements();
+		int node_num=0;
+		while(en_nodes.hasMoreElements()){			
+			ExbpNode node = en_nodes.nextElement();
+			//System.out.println("PAINT:"+node.getLabel());
+			//node.paint2(g);
+            // �ｽ�ｽ�ｽ[�ｽg�ｽm�ｽ[�ｽh�ｽﾌ描�ｽ�ｽ
+            if (node.equals(this.exbp_node_center)) {
+                if (this.isVisibleCenter) {
+                    //node.paint2(g);
+                    node.paint(g,this);
+                }
+            } 
+            else if(!node.visible){//#kozaki 2008/08/15
+            	continue;
+			}
+			else {
+                //node.paint2(g);
+                node.paint(g,this);
+            }
+            
+//            g.setColor(Color.blue);
+//            g.drawString(Integer.toString(node_num), node.x-5, node.y-5);
+//            node_num++;
+			//#kozaki 2007/09/07�ｽ@�ｽ�ｽ�ｽ�ｽ�ｽT�ｽO�ｽ�ｽ�ｽw�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ
+//			if(node.getHozoNode()!=null){
+//			if(node.getHozoNode().isPicked){
+//				node.paintHilighit(g,Color.green);
+////				g.setColor(Color.green);
+////				g.drawRect(node.x-1, node.y-1, node.width+2, node.height+2);
+////				g.drawRect(node.x-2, node.y-2, node.width+4, node.height+4);
+////				g.drawRect(node.x, node.y, node.width, node.height);
+//			}}
+            
+			//�ｽI�ｽ�ｽ�ｽ�ｽ�ｽﾌ具ｿｽ�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽi�ｽ{�ｽ�ｽ�ｽ�ｽExbpNode�ｽN�ｽ�ｽ�ｽX�ｽﾉ移行�ｽ�ｽ�ｽﾗゑｿｽ�ｽj
+			if(node.equals(this.exbp_node_pick)){
+			/*#kozaki 2009/06/12�ｽ@�ｽ�ｽ�ｽ黹鯉ｿｽC�ｽ�ｽ�ｽ[�ｽﾌハ�ｽC�ｽ�ｽ�ｽC�ｽg�ｽ�ｽ�ｽ�ｽﾟゑｿｽy�ｽb�ｽ�ｽz
+			 * 	if(this.cmd_dialog.all_node.isSelected()){
+					int layer = exbp_node_pick.getLocatedLayer();
+		    		ExbpNode[] target_nodes = getExbpNodesAtLear(layer,true);
+		    		for(int i=0;i<target_nodes.length;i++){
+		    			if(target_nodes[i].getOrgNode()==exbp_node_pick.getOrgNode()){
+		    				target_nodes[i].paintHilighit(g,Color.red);
+		    			}else{
+		    				target_nodes[i].paintHilighit(g,Color.pink);
+		    			}
+		    		}
+				}*/
+				
+				//#kozaki�ｽ@2008/02/10�ｽ@�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽﾉ趣ｿｽ�ｽ�ｽp�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ
+				node.painthilightPath(g,Color.red);
+				//node.painthilightPath(g,Color.pink);
+			    if(this.isVisibleInflu){
+			    	node.paintInfluencePath(this,g,Color.orange);
+			    }
+				node.paintHilighit(g,Color.red);
+				//�ｽ�ｽ�ｽ[�ｽg�ｽm�ｽ[�ｽh�ｽﾌ描�ｽ�ｽ
+				if (this.isVisibleCenter) {
+					//exbp_node_center.paint2(g);
+					exbp_node_center.paint2(g);
+	            }
+//				g.setColor(Color.red);
+//				g.drawRect(node.x-1, node.y-1, node.width+2, node.height+2);
+//				g.drawRect(node.x-2, node.y-2, node.width+4, node.height+4);
+//				g.drawRect(node.x, node.y, node.width, node.height);
+			}
+			
+            
+            // �ｽZ�ｽ�ｽ�ｽ^�ｽ[�ｽm�ｽ[�ｽh�ｽﾌみ具ｿｽ�ｽ�ｽ�ｽ\�ｽ�ｽ
+            g.setColor(Color.BLUE);
+            if (node.equals(this.exbp_node_center) && this.isVisibleCenter) {
+                g.drawRect(node.x-1, node.y-1, node.width+2, node.height+2);
+                g.drawRect(node.x-2, node.y-2, node.width+4, node.height+4);
+                g.drawRect(node.x, node.y, node.width, node.height);               
+            }
+		}
+	}
+	
+	
+	public void paint2ndHighlit(ExbpNode node){
+		Graphics g=this.getGraphics();
+	    node.painthilightPath(g,Color.magenta);
+	    if(this.isVisibleInflu){
+	    	node.paintInfluencePath(this,g,Color.yellow);
+	    }
+		node.paintHilighit(g,Color.pink);
+
+		if (this.isVisibleCenter) {
+			//exbp_node_center.paint2(g);
+			exbp_node_center.paint(g,this);
+			
+        }
+	}
+
+	
+	
+	public void setRoleRestrictedView(String[] role_lists, boolean rest_visble){
+		//View�ｽﾌク�ｽ�ｽ�ｽA
+		setRoleRestrictedViewClear();
+		
+		if(role_lists.length==0){
+			//setRoleRestrictedViewClear();
+			return;
+		}
+		//�ｽ�ｽ�ｽﾗてのノ�ｽ[�ｽh�ｽ�ｽs�ｽﾂ趣ｿｽ�ｽﾉゑｿｽ�ｽ�ｽ
+		if(rest_visble){
+			this.exbp_node_center.setVisbleChildren(false);
+		}
+		
+
+		Enumeration<ExbpNode> en = this.nodes.elements();
+		while(en.hasMoreElements()){
+			ExbpNode node = (ExbpNode)en.nextElement();
+			if (node.equals(this.exbp_node_center)) {
+
+	            }
+			else {
+				//node.setHighLight(false, Color.red);
+				node.setLinkHighLight(false, Color.white);
+				for(int i=0;i<role_lists.length;i++){
+					//Node n = (Node)node.getOrgNode();
+					if(node.key.equals(role_lists[i])){
+						//�ｽ}�ｽb�ｽ`�ｽ�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽﾍ擾ｿｽﾊゑｿｽ�ｽﾜめて可趣ｿｽ�ｽﾉゑｿｽ�ｽ�ｽ
+						if(rest_visble){
+							node.setVisibleTrueWithParent();
+						}
+							if(i==0){ 
+								  node.setLinkHighLight(true, Color.red);
+							} 
+							else if(i==1){
+								  node.setLinkHighLight(true, Color.blue);
+							}
+							else if(i==2){
+								  node.setLinkHighLight(true, Color.green);
+							}
+							else if(i==3){
+								  node.setLinkHighLight(true, Color.cyan);
+							}
+							else{
+								node.setLinkHighLight(true, Color.pink);
+							}
+							break;
+					}
+				}            
+            }
+		}		
+		//new ChangeViewFrame(this,cls_lists);
+		this.repaint();
+	}
+	
+	//#hirota 09/5/22 �ｽ�ｽ�ｽﾅは，node.key�ｽﾌみの費ｿｽ�ｽ�ｽﾈので，�ｽ{�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽﾌ具ｿｽﾊまでゑｿｽ�ｽ�ｽ
+	public void setRoleRestrictedViewWithClassConst(Vector role_lists, boolean rest_visble){
+		
+	}
+	
+
+	public void setRoleRestrictedViewClear(){
+		//this.exbp_node_center.setVisbleChildren(true);
+		Enumeration<ExbpNode> en = this.nodes.elements();
+		while(en.hasMoreElements()){
+			ExbpNode node = (ExbpNode)en.nextElement();
+			node.setLinkHighLight(false, Color.red);
+			}
+		this.repaint();
+	}
+	
+	
+//	public void setClassRestrictedView(Node[] target_cls/*String[] cls_lists*/){}
+	
+	public void setClassRestrictedViewClear(){
+		//this.exbp_node_center.setVisbleChildren(true);
+		Enumeration<ExbpNode> en = this.nodes.elements();
+		while(en.hasMoreElements()){
+			ExbpNode node = (ExbpNode)en.nextElement();
+			//node.setHighLight(false, Color.red);
+			node.setHighLight(false, Color.white);
+			node.clearHighLightColorList();
+		}
+		this.repaint();
+	}
+
+	//#kozaki 2009/02/13�ｽ@�ｽs�ｽﾂ趣ｿｽ�ｽﾉゑｿｽ�ｽ�ｽﾍ囲ゑｿｽ�ｽC�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽﾈ会ｿｽ�ｽﾉ鯉ｿｽ�ｽ�ｽ
+//	public void setClassRestrictedView2(ExbpNode[] target_nodes, Node[] target_cls/*String[] cls_lists*/){}
+	
+	
+	public void setClassRestrictedView2(ExbpNode ceter_node, String[] cls_lists){}
+	
+
+
+	private float[] getDashList() {
+        StringTokenizer st = new StringTokenizer(DASH_PATURN, ",");
+        float[] list = new float[st.countTokens()];
+        int i = 0;
+        try {
+            while (st.hasMoreTokens()) {
+                list[i] = (new Float(st.nextToken())).floatValue();
+                i++;
+            }
+        } catch (final NumberFormatException nfe) {
+            float[] fd = { 1.0f };
+            return fd;
+        }
+        return list;
+    }
+    
+    private void drawBorderCircle(Graphics g) {
+        Graphics2D g2 = (Graphics2D) g;
+        //super.paintComponent(g2);
+        BasicStroke dashedStroke
+                = new BasicStroke(2.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, getDashList(), 0.0f);
+        Stroke currentStroke = g2.getStroke();
+        g2.setStroke(dashedStroke);
+        
+        // �ｽ�ｽ�ｽS�ｽ_
+        Point pt = getCenterPosition();
+        int cx = pt.x;
+        int cy = pt.y;
+        
+        Vector<String> draw_option = new Vector<String>();
+        if(optionList!=null){
+        for(int k=0; k<optionList.length;k++){
+        	if(optionList[k]!=null){//#kozaki�ｽo�ｽO�ｽ�ｽ�ｽ
+        	if(optionList[k].startsWith(":")){
+        		String[] sub_option = optionList[k].split(":");
+        		for(int l=1;l<sub_option.length;l++){
+        			if(sub_option[l].indexOf("=")>0){
+        				String[] subsub_opt = sub_option[l].split("=");
+        				draw_option.add("["+subsub_opt[0]+"]");//#kozaki�ｽ@2007/09/07�ｽ@:�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾌ際ゑｿｽKey�ｽ�ｽ[]�ｽﾅ囲ゑｿｽ
+        				int num = Integer.parseInt(subsub_opt[1]); 
+        				for(int m=1;m<num;m++){
+        					draw_option.add(ExbpNode.IS_A);
+        				}
+        			}
+        			else{
+        				draw_option.add("["+sub_option[l]+"]");//#kozaki�ｽ@2007/09/07�ｽ@:�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾌ際ゑｿｽKey�ｽ�ｽ[]�ｽﾅ囲ゑｿｽ
+        			}
+        		}
+        	}
+        	else{
+				draw_option.add(optionList[k]);
+        	}
+        	}
+        }
+        }
+        
+        for (int i = 0; i < currentLayerNum + 1; i++) {
+            boolean canDraw = false;
+            String option = null;
+            int len = currentLayerLength * i +  currentLayerLength / 2;
+            /*if (i == 0 && this.isVisibleCenter) {
+                //canDraw = true;
+                canDraw = false;
+            } else */if (i == currentLayerNum) {
+                canDraw = true;
+            } else if (optionList != null && i > 0 && draw_option.size() > i-1) {
+                //option = optionList[i-1];
+            	//#kozaki 2008/08/12�ｽ@�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽ\�ｽL�ｽﾌ抵ｿｽ�ｽ�ｽ
+            	if(this.exbp_node_center.getLabel().contains("ROOT") && draw_option.size() > i-1){
+            		option = draw_option.elementAt(i-1);
+                }else if(draw_option.size() > i){
+                	option = draw_option.elementAt(i);
+                }
+                else{
+                	option ="";
+                }
+                //System.out.println("drawBorderCircle:"+i+option);
+                if (option.indexOf(ExbpNode.IS_A) == 0
+                        && option.length() == ExbpNode.IS_A.length()) {
+                    canDraw = false;
+                } else {
+                    canDraw = true;
+                }
+            } 
+            
+            if (canDraw) {
+                g2.setColor(Color.BLACK);
+                g2.drawOval(cx-len, cy-len, len*2, len*2);
+                if (option != null) {
+                    g.setFont(fontBorder);
+                    g.setColor(Color.BLACK);
+                    String s = "<" + option + ">";
+                    g.drawString(s, 
+                                cx - FONT_MARGIN, 
+                                cy - len - FONT_MARGIN);
+                }
+            }
+        }
+        
+        g2.setStroke(currentStroke);
+    }
+    
+    // �ｽK�ｽw�ｽﾌ円�ｽﾊゑｿｽ`�ｽ�ｽ
+    private void drawLayerCircle(Graphics g) {
+//        // �ｽ�ｽ�ｽS�ｽm�ｽ[�ｽh�ｽﾌ包ｿｽ�ｽﾆ搾ｿｽ�ｽ�ｽ
+//        int nw = this.exbp_node_center.width;
+//        int nh = this.exbp_node_center.height;
+//        // �ｽ�ｽ�ｽS�ｽ_
+//        //int cx = currentLayerLength * currentLayerNum + 30 + (nw / 2);
+//        int cx = currentLayerLength * currentLayerNum + WIDTH_MARGIN;
+//        int cy = currentLayerLength * currentLayerNum + HEIGHT_MARGIN + (nh / 2);
+        Point pt = getCenterPosition();
+        int cx = pt.x;
+        int cy = pt.y;
+        
+        for (int i = 1; i < currentLayerNum + 1; i++) {
+            int len = currentLayerLength * i;
+            g.setColor(Color.LIGHT_GRAY);
+            g.drawOval(cx-len, cy-len, len*2, len*2);
+        }
+    }
+    
+//    public Color getHilightColor(Node n){
+//    	int clr=0;
+//    	for(int i=0;i<hilight_nodes.size();i++){
+//    		if(hilight_nodes.get(i).contains(n)){
+//    			clr=i;
+//    			while(clr>=6){
+//    				clr-=6;
+//    			}
+//    			return hilight_color[clr];
+//    		}
+//    	}
+//    	
+//    	
+//    	return Color.yellow;
+//    }
+    
+    private Point getCenterPosition() {
+        Point pt = new Point(0,0);
+        // �ｽ�ｽ�ｽS�ｽm�ｽ[�ｽh�ｽﾌ包ｿｽ�ｽﾆ搾ｿｽ�ｽ�ｽ
+        int nw = this.exbp_node_center.width;
+        int nh = this.exbp_node_center.height;
+        // �ｽ�ｽ�ｽS�ｽ_
+        //int cx = currentLayerLength * currentLayerNum + 30 + (nw / 2);
+        int cx = currentLayerLength * currentLayerNum + WIDTH_MARGIN;
+        int cy = currentLayerLength * currentLayerNum + HEIGHT_MARGIN + (nh / 2);
+        // �ｽ�ｽ�ｽ�ｽ�ｽ`�ｽF�ｽb�ｽN
+        if (cx < 0) cx = 0;
+        if (cy < 0) cy = 0;
+        pt.setLocation(cx, cy);
+        return pt;
+    }
+    
+    // �ｽm�ｽ[�ｽh�ｽﾔの撰ｿｽ�ｽ�ｽ�ｽ
+    private void drawLink(Graphics g) {
+        ExbpNode rootNode = this.exbp_node_center;
+        // �ｽq�ｽm�ｽ[�ｽh�ｽﾉ対ゑｿｽ�ｽﾄ撰ｿｽ�ｽ�ｽ�ｽ
+        this.drawLinkNode(g, rootNode);
+    }
+    
+    // �ｽq�ｽm�ｽ[�ｽh�ｽﾉ対ゑｿｽ�ｽﾄ撰ｿｽ�ｽ�ｽ�ｽ
+    private void drawLinkNode(Graphics g, ExbpNode node) {		
+        ExbpNode parentNode = node;
+        int px = parentNode.x + parentNode.width / 2;
+        int py = parentNode.y + parentNode.height / 2;
+//        Vector<ExbpNode> childNodes = parentNode.getChildExbpNodes();
+//        Iterator it = childNodes.iterator();
+        
+//      #kozaki 2008/02/09�ｽ@�ｽ�ｽ�ｽ[�ｽt�ｽ�ｽ�ｽ�ｽ�ｽp�ｽﾌダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽﾍ描�ｽ謔ｵ�ｽﾈゑｿｽ
+//        Vector childs = new Vector();
+//        while (it.hasNext()) {
+//        	ExbpNode childNode = (ExbpNode) it.next();
+//        	if(childNode.isDummy){
+//        		childs.addAll(childNode.children);
+//        	}
+//        	else{
+//        		childs.add(childNode);
+//        	}
+//        }
+        //#kozaki 2008/05/09�ｽ@Dummy�ｽ�ｽ2�ｽi�ｽﾈ擾ｿｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾎ会ｿｽ�ｽ�ｽ�ｽ\�ｽb�ｽh�ｽﾉ変更
+        Vector<ExbpNode> childs = parentNode.getChildren();
+        Iterator<ExbpNode> it = childs.iterator();
+        
+        while (it.hasNext()) {
+            ExbpNode childNode = it.next();
+            if(!childNode.visible){//#kozaki 2008/08/15
+            	continue;
+            }
+        	Graphics2D g2 = (Graphics2D)g;
+        	BasicStroke wideStroke = new BasicStroke(1.0f);
+			g2.setStroke(wideStroke);
+			
+            int cx = childNode.x + childNode.width / 2;
+            int cy = childNode.y + childNode.height / 2;
+            // �ｽ�ｽ�ｽ�ｽl�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽﾎ象外�ｽﾅゑｿｽ�ｽ�ｽﾎ表�ｽ�ｽ�ｽ�ｽ�ｽﾈゑｿｽ
+            //if (cx == 0 && cy == 0) {
+            if (nodes.contains(childNode)) {
+            	g.setColor(Color.blue);
+                
+            	if(childNode.opt.startsWith("isa")){
+            		g.setColor(Color.green);
+                	drawArrow(g,px,py,cx,cy);
+                }
+            	else if(childNode.opt.startsWith("super")){
+            		g.setColor(Color.green);
+                	drawArrow(g,cx,cy,px,py);
+                }
+            	else if(childNode.opt.startsWith(":!")){
+            		g.setColor(Color.orange);
+                }
+            	else if(childNode.opt.startsWith(":")){
+            		g.setColor(Color.red);
+            		drawArrow(g,cx,cy,px,py);
+                }
+            	else{
+            		drawArrow(g,px,py,cx,cy);
+            	}
+                
+                
+            	if (parentNode.equals(this.exbp_node_center)) {
+                    if (this.isVisibleCenter) {
+                    	if(childNode.link_highlight==true){
+                			float dash[] = {10.0f, 3.0f};
+                			 wideStroke = new BasicStroke(3.0f, 
+                			                                           BasicStroke.CAP_BUTT, 
+                			                                           BasicStroke.JOIN_MITER, 
+                			                                           10.0f, 
+                			                                           dash, 
+                			                                           0.0f);
+                			g2.setStroke(wideStroke);
+                			g2.setColor(childNode.link_highligjtColor);
+                			g2.drawLine(px, py, cx, cy);
+                		}
+                		else{
+                			g.drawLine(px, py, cx, cy);
+                		}
+                        drawLinkName(g,childNode, px, py, cx, cy);
+                        
+                    }
+                } else {
+                	if(childNode.link_highlight==true){
+            			float dash[] = {10.0f, 3.0f};
+            			 wideStroke = new BasicStroke(3.0f, 
+            			                                           BasicStroke.CAP_BUTT, 
+            			                                           BasicStroke.JOIN_MITER, 
+            			                                           10.0f, 
+            			                                           dash, 
+            			                                           0.0f);
+            			g2.setStroke(wideStroke);
+            			g2.setColor(childNode.link_highligjtColor);
+            			g2.drawLine(px, py, cx, cy);
+            		}
+            		else{
+            			g.drawLine(px, py, cx, cy);
+                    }
+                    drawLinkName(g,childNode, px, py, cx, cy);
+                    }
+                // �ｽq�ｽm�ｽ[�ｽh�ｽﾉ対ゑｿｽ�ｽﾄ撰ｿｽ�ｽ�ｽ�ｽ
+                this.drawLinkNode(g, childNode);
+            }
+        }
+    }
+    
+    void drawArrow(Graphics g,int px,int py, int cx, int cy){
+    	int r = 10;
+    	double arc = java.lang.Math.atan2(py-cy, px-cx);//-Math.PI;	
+        double arc_1 = arc-Math.PI/6;
+        double arc_2 = arc+Math.PI/6;
+        int arc_x = px + (cx-px)*3/4;
+        int arc_y = py + (cy-py)*3/4;
+        g.drawLine(arc_x+(int)(Math.cos(arc_1)*r),arc_y+(int)(Math.sin(arc_1)*r), arc_x, arc_y);
+        g.drawLine(arc_x+(int)(Math.cos(arc_2)*r),arc_y+(int)(Math.sin(arc_2)*r), arc_x, arc_y);
+
+    }
+    
+    private void drawLinkName(Graphics g, ExbpNode node, 
+                                int px, int py, int cx, int cy) {
+        int sx = (px + cx) / 2;
+        int sy = (py + cy) / 2;
+        g.setFont(fontLink);
+        g.setColor(Color.GRAY);
+        g.drawString(node.key, sx+5, sy);
+    }
+
+/*	public void update(Graphics g){
+		this.setForeground(Color.white);
+		
+		Enumeration en_nodes = this.nodes.elements();
+		while(en_nodes.hasMoreElements()){			
+			ExbpNode node = (ExbpNode)en_nodes.nextElement();
+			node.paint2(g);			
+		}
+	}*/
+	
+	
+	/**
+	 * This method initializes this
+	 * 
+	 * @return void
+	 */
+	private void initialize() {
+		this.setSize(300, 200);
+		this.setLayout(new GridBagLayout());
+		this.nodes = new Vector<ExbpNode>();
+		//#kozaki 2008/08/11
+		ExbpMouseListener mouseL = new ExbpMouseListener(this);
+		this.addMouseListener(mouseL);
+		this.addMouseMotionListener(mouseL);
+		//setNodes();
+        //this.tempGobjList = null;
+		
+
+	}
+	
+	//�ｽw�ｽ閧ｵ�ｽ�ｽ�ｽK�ｽw�ｽﾉゑｿｽ�ｽ�ｽExbpNode�ｽ�ｽﾔゑｿｽ #kozaki 2009/01/22�ｽ@skipUnVisible:�ｽ�ｽ�ｽs�ｽﾂ趣ｿｽ�ｽﾌノ�ｽ[�ｽh�ｽ�ｽ�ｽX�ｽL�ｽb�ｽv�ｽ�ｽ�ｽ�ｽ
+	ExbpNode[] getExbpNodesAtLear(int layer, boolean skipUnVisible){
+		if(this.exbp_node_center==null)return null;
+
+		Vector<ExbpNode> nodes = new Vector<ExbpNode>();
+		nodes.addElement(this.exbp_node_center);
+		for(int i=1;i<=layer;i++){
+			Enumeration<ExbpNode>  en = nodes.elements();
+			Vector<ExbpNode> nodes2 = new Vector<ExbpNode>();
+			while(en.hasMoreElements()){
+				ExbpNode node = en.nextElement();
+				//#kozaki 2009/01/08�ｽ@Leaf�ｽﾅ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ謔､�ｽﾉダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽ�ｽﾇ会ｿｽ�ｽ�ｽ�ｽ髀茨ｿｽ�ｽ
+					if(node.key.equals(ExbpNode.IS_A)||node.key.equals(ExbpNode.IS_A_L)){
+						if(node.getChildren().size()==0){
+							node.removeDummyNodesAll();
+							ExbpNode dummy = new ExbpNode(node.getLabel());
+							dummy.setDummyNode(true);
+							dummy.setOrgNode(node.getOrgNode());
+							dummy.key=node.key;
+							node.addChild(dummy);
+							//nodes2.add(dummy);
+						}
+					}
+					
+					//�ｽs�ｽﾂ趣ｿｽ�ｽﾌノ�ｽ[�ｽh�ｽ�ｽ�ｽﾎゑｿｽ�ｽ�ｽ�ｽ�ｽ
+					if(!skipUnVisible){
+						nodes2.addAll(node.getChildrenWithISADummy(false));
+					}
+					else{
+						nodes2.addAll(node.getChildrenWithISADummy(true));
+					}	
+					
+			}
+			//�ｽ�ｽ�ｽﾌ段�ｽﾉ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾚ行�ｽ�ｽ�ｽ驍ｽ�ｽﾟデ�ｽ[�ｽ^�ｽ�ｽn�ｽ�ｽ
+			nodes = nodes2;
+		}
+		
+		ExbpNode[] exbpnodes = new ExbpNode[nodes.size()]; 
+		nodes.copyInto(exbpnodes);
+		return exbpnodes;
+	}
+
+
+	
+	//#kozaki 2008/10/25�ｽ@�ｽ�ｽ�ｽ�ｽ�ｽﾓ擾ｿｽ�ｽﾉゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ\�ｽb�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾉ難ｿｽ�ｽ�ｽ
+	String getSelectedRoles(int i){
+		RoleLists roles =(RoleLists) role_lists.elementAt(i);
+//		Enumeration en = roles.getRoleLists().elements();
+		List list = new List(roles.getRoleLists().size(),true);
+//		while(en.hasMoreElements()){
+//			String role = (String)en.nextElement();
+//			list.add(role);
+//		}
+		
+		Vector<String> rolelists = roles.getRoleLists();
+		Vector<Integer> hit_num_lists = roles.getHitNumLists();
+		for(int l=0;l<rolelists.size();l++){
+			String role = rolelists.elementAt(l);
+			int num = hit_num_lists.elementAt(l).intValue();
+			list.add(role+","+num);
+		}
+		
+		
+		JScrollPane jsc = new JScrollPane(list);
+		int ans = JOptionPane.showConfirmDialog(this,jsc,"Select Roles",JOptionPane.YES_NO_CANCEL_OPTION );
+		
+		String selected_role="";
+		if(ans==JOptionPane.YES_OPTION ){
+			String[] selected = list.getSelectedItems();
+			for(int k=0;k<selected.length;k++){
+				if(k>0){
+					selected_role+="|";
+				}
+				selected_role+=selected[k].split(",")[0];				
+			}
+			
+			return selected_role;
+		}
+		
+		return null;
+	}
+	
+	//�ｽeLink�ｽﾌ撰ｿｽ�ｽ�ｽ�ｽ齬暦ｿｽﾅ返ゑｿｽ
+	Vector getLinkListCount(){
+		return link_list.getHitNumLists();
+	}
+	//�ｽ�ｽ�ｽﾗてゑｿｽLink�ｽﾌ一覧�ｽ�ｽﾔゑｿｽ
+	Vector getLinkList(){
+		link_list.clearRoles();
+		Enumeration en = this.nodes.elements();
+		while(en.hasMoreElements()){
+			ExbpNode n =(ExbpNode)en.nextElement();
+			link_list.addRole(n.key);
+		}
+		return link_list.getRoleLists();
+//		
+//		Vector links = new Vector();
+//		this.link_count.removeAllElements();
+//		
+//		Enumeration en = this.nodes.elements();
+//		while(en.hasMoreElements()){
+//			ExbpNode n =(ExbpNode)en.nextElement();
+//			int index = links.indexOf(n.key);
+//			if(index<0){
+//					links.addElement(n.key);
+//					this.link_count.add(1);
+//				}
+//			else{
+//				Integer c = (Integer)link_count.elementAt(index);
+//				c++;
+//			}
+//		}
+//		link_list=links;
+//				
+//		return links;
+	}
+	
+	//#kozaki �ｽ�ｽ�ｽ�ｽ`�ｽ謗橸ｿｽﾌ位置�ｽﾌ費ｿｽ�ｽ�ｽ�ｽ�ｽ
+	public void setNodesLoc(){
+		Graphics g = this.getGraphics();
+		Enumeration<ExbpNode> en_nodes = this.nodes.elements();
+		while(en_nodes.hasMoreElements()){			
+			ExbpNode node = en_nodes.nextElement();
+            if (node != null) {
+            	node.adjustLoc(g);//#kozaki 2009/01/20�ｽ@paint�ｽ�ｽ�ｽ\�ｽb�ｽh�ｽﾌ茨ｿｽ{�ｽ�ｽ�ｽﾌゑｿｽ�ｽﾟ抵ｿｽ�ｽ�ｽ
+                //node.paint3(g);
+                //node.paint2(g);
+            	node.paint(g,this);
+            }
+		}
+		repaint();
+	}
+	
+	void setNodes(String opt){}
+	
+	public void refreshExbp(){
+		
+		int num_of_layer = currentLayerNum;
+		int length_of_layer=currentLayerLength;
+		
+		//�ｽ�ｽ�ｽS�ｽ�ｽ�ｽW�ｽ�ｽﾝ抵ｿｽ
+		int cx=length_of_layer*num_of_layer + WIDTH_MARGIN;
+		int cy=length_of_layer*num_of_layer + HEIGHT_MARGIN;
+		
+
+		//�ｽ�ｽ�ｽﾌゑｿｽ�ｽ�ｽ�ｽ�ｽﾌ描�ｽ諠�ｿｽ\�ｽb�ｽh�ｽﾍ，ExtendBP�ｽN�ｽ�ｽ�ｽX�ｽﾅ設抵ｿｽ\�ｽ�ｽ
+		exbp_node_center.color = ExbpNode.CENTER_COLOR;
+		exbp_node_center.font =  new Font("Times", Font.BOLD, (int)((ExbpNode.Font_node_size)*(ExbpNode.Font_node_center )));
+		exbp_node_center.setLocation(cx,cy);
+		
+		//�ｽ�ｽ�ｽﾊノ�ｽ[�ｽh�ｽﾌ色�ｽw�ｽ�ｽ
+		Enumeration<ExbpNode> chi_en = exbp_node_center.children.elements();
+		int color = 0;
+		while(chi_en.hasMoreElements()){
+			ExbpNode chi_node = chi_en.nextElement();
+			if(color>9){
+				color-=10; 
+			}
+			if(chi_node!=null){
+				
+				//	 #hirota 09/11/19
+//				if(chi_node.getParentHozoNode() != null){
+//					//System.out.println("** parent_test:"+chi_node.getParentHozoNode().getLabel());
+//				}else{
+//					//System.out.println("** parent_test:Error");
+//				}
+				
+				chi_node.setChildrenColor(ExbpNode.node_color[color]);
+				color++;
+			}
+		}
+ 
+		
+		//�ｽ�ｽ�ｽﾊノ�ｽ[�ｽh�ｽﾌ配�ｽu�ｽ�ｽ�ｽ�ｽ
+		this.setNodesLoc(num_of_layer, length_of_layer, 1,12);
+		setNodesLoc();   // �ｽﾊ置�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+        
+//		nodes.addAll(exbp_node_center.getVisbleChildren());
+		
+		//#kozaki 2008/08/11�ｽ@�ｽo�ｽl�ｽ�ｽ�ｽf�ｽ�ｽ�ｽp�ｽﾌ�ｿｽ�ｽ�ｽ�ｽN�ｽﾇ会ｿｽ
+		setEdgesForSpringModel();
+		this.start();	
+	}
+		
+	
+	//#kozaki 2008/08/13�ｽo�ｽl�ｽ�ｽ�ｽf�ｽ�ｽ�ｽp�ｽﾌ�ｿｽ�ｽ�ｽ�ｽN�ｽﾇ会ｿｽ
+	void setEdgesForSpringModel(){
+		this.edges.removeAllElements();
+		System.out.println("�ｽo�ｽl�ｽ�ｽ�ｽf�ｽ�ｽ�ｽp�ｽﾌ�ｿｽ�ｽ�ｽ�ｽN�ｽﾇ会ｿｽ:currentLayerNum"+currentLayerNum);
+		Enumeration en = this.nodes.elements();
+		while(en.hasMoreElements()){
+			ExbpNode n = (ExbpNode)en.nextElement();
+			if(n.getParent()!=null && n.visible){
+				//this.addEdge(n.getParent(), n, this.currentLayerLength*3/2, false);
+				this.addEdge(n.getParent(), n, this.getlength(n.getParent(), n), false);
+			}
+		}
+		Vector<ExbpNode>[] chi_n = new Vector[this.currentLayerNum+1];
+//		chi_n[0] = this.exbp_node_center.children; #kozaki 2009/02/13�ｽ@ROOT�ｽ�ｽﾂゑｿｽ�ｽ�ｽﾆゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾈゑｿｽo�ｽO�ｽC�ｽ�ｽ
+		chi_n[0] = new Vector();
+		chi_n[0].addAll(this.exbp_node_center.children); 
+		
+		for(int i=0;i<currentLayerNum;i++){
+			if(chi_n[i]!=null){
+				Enumeration en_chi = chi_n[i].elements();
+				chi_n[i+1] = new Vector();
+				while(en_chi.hasMoreElements()){
+					ExbpNode n = (ExbpNode)en_chi.nextElement();
+					chi_n[i+1].addAll(n.children);					}
+			}
+		}
+		
+		//#kozaki 2008/08/15�ｽ@�ｽs�ｽﾂ趣ｿｽ�ｽﾌノ�ｽ[�ｽh�ｽ�ｽ�ｽO�ｽ�ｽ
+		ExbpNode n;
+		for(int i=0;i<currentLayerNum+1;i++){
+			if(chi_n[i]!=null){
+				Enumeration en_chi = chi_n[i].elements();
+				Vector remove=new Vector();
+				while(en_chi.hasMoreElements()){
+					n = (ExbpNode)en_chi.nextElement();
+					if(!n.visible)remove.addElement(n);
+					}
+				chi_n[i].removeAll(remove);
+				}
+		}		
+		
+		for(int i=0;i<currentLayerNum+1;i++){
+			if(chi_n[i]!=null && chi_n[i].size()>=2){
+				System.out.println("addEdge:Layer=="+i);
+				Enumeration en_chi = chi_n[i].elements();
+				ExbpNode n0 = (ExbpNode)en_chi.nextElement();
+				ExbpNode n1 = null;
+				while(en_chi.hasMoreElements()){
+					n1 = (ExbpNode)en_chi.nextElement();
+					this.addEdge(n0, n1, this.getlength(n0, n1), false);
+					//System.out.println(" ==>"+n0.getLabel()+":::"+n1.getLabel());
+					n0 = n1;
+					}
+				ExbpNode n_0 = (ExbpNode)chi_n[i].firstElement();
+				ExbpNode n_1 = (ExbpNode)chi_n[i].lastElement();
+				this.addEdge(n_1, n_0, this.getlength(n_1, n_0), false);
+				
+			}
+		}	
+	}
+
+	void setNodesLoc(int num_of_layer,int length_of_layer, double arc, int node_size){
+		this.nodes.removeAllElements();
+		this.nodes.addElement(exbp_node_center);
+
+		//#kozaki 2008/06/26�ｽ@�ｽﾊ置�ｽ�ｽ�ｽ�ｽ�ｽp�ｽﾌダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽ�ｽﾇ会ｿｽ�ｽ�ｽ�ｽ�ｽ
+		if(this.layoutOption==LinkCentricLayout2){
+			exbp_node_center.setDummyNodes(num_of_layer);
+		}
+		else{
+			exbp_node_center.removeDummyNodes();
+		}
+		
+        currentLayerNum = num_of_layer;
+        currentLayerLength = length_of_layer;
+        
+		//�ｽ�ｽ�ｽS�ｽ�ｽ�ｽW�ｽ�ｽﾝ抵ｿｽ
+		int cx=length_of_layer * num_of_layer + WIDTH_MARGIN;
+		int cy=length_of_layer * num_of_layer + HEIGHT_MARGIN;
+
+        if (exbp_node_center == null) return;  // �ｽG�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽ
+        
+		exbp_node_center.setLocation(cx,cy);
+		//�ｽ�ｽ�ｽﾊノ�ｽ[�ｽh�ｽﾌ配�ｽu�ｽ�ｽ�ｽ�ｽ
+				
+		//�ｽp�ｽx�ｽ�ｽ�ｽ�ｽﾌ奇ｿｽﾆなゑｿｽS�ｽﾄの葉�ｽﾌ撰ｿｽ�ｽﾌ搾ｿｽ�ｽv�ｽ�ｽ�ｽ�ｽ�ｽﾟゑｿｽ
+		int leaf_num_all = exbp_node_center.getLeafNum(num_of_layer+1);
+		System.out.println("Leaf NUM = "+leaf_num_all);
+
+		//�ｽe�ｽﾊ厄ｿｽ�ｽﾉ配�ｽu�ｽ�ｽ�ｽ�ｽ
+		//�ｽJ�ｽn�ｽ_�ｽ�ｽﾛ趣ｿｽ�ｽ�ｽ�ｽ驍ｽ�ｽﾟの変撰ｿｽ
+		double start_arc=0;//Math.PI*3;
+		if(arc<1){
+			start_arc = (Math.PI-2*arc*Math.PI)/2;//#kozaki 2008/03/25�ｽ@�ｽ�ｽ`�ｽﾌ角�ｽx�ｽﾝ抵ｿｽ
+		}
+		double r;
+//		int scale = Integer.parseInt(_extendFrame.jtf_scale.getText());
+		
+		double rt =Double.parseDouble( this._extendFrame.jtf_rotation.getText());
+		
+	    start_arc=Math.PI * rt;
+		System.out.println("rotation="+rt+"  start_arc="+start_arc);  
+		//�ｽJ�ｽn�ｽ_�ｽCLeaf�ｽ�ｽ�ｽv�ｽCLayer�ｽ�ｽ�ｽ�ｽ�ｽw�ｽ閧ｵ�ｽﾄ各�ｽﾊの配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽs�ｽ�ｽ�ｽI�ｽ�ｽ�ｽp�ｽx�ｽ�ｽﾔゑｿｽ
+		Enumeration chi_en = exbp_node_center.getVisbleChildren().elements();
+		while(chi_en.hasMoreElements()){
+			ExbpNode node = (ExbpNode) chi_en.nextElement();
+			r = 2*Math.PI*node.getLeafNum(num_of_layer)/leaf_num_all*arc;//#kozaki 2008/03/25�ｽ@�ｽ�ｽ`�ｽﾌ角�ｽx�ｽﾝ抵ｿｽ
+			//#kozaki 2008/06/26�ｽ@�ｽ�ｽ�ｽC�ｽA�ｽE�ｽg�ｽﾌ切ゑｿｽﾖゑｿｽ
+			if(this.layoutOption==LinkCentricLayout || this.layoutOption==LinkCentricLayout2){
+				setLayerArcNew(node,cx,cy,length_of_layer,start_arc,r,num_of_layer, node_size);
+			}
+			else{
+				setLayerArc(node,cx,cy,length_of_layer,start_arc,r,num_of_layer, node_size);
+			}
+			start_arc += r;
+		}
+	}
+
+	//#kozaki�ｽ@2008/08/12�ｽ@�ｽz�ｽu�ｽ�ｽ�ｽ�ｽ�ｽ轤ｷ�ｽ�ｽ�ｽ�ｽ
+	void setNodesLocRandom(int num_of_layer,int length_of_layer, double arc, int node_size){
+		//�ｽ�ｽ�ｽS�ｽ�ｽ�ｽW�ｽ�ｽﾝ抵ｿｽ
+		if (exbp_node_center == null) return;  // �ｽG�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽ
+        
+		int cx=exbp_node_center.getCenterPoint().x;
+		int cy=exbp_node_center.getCenterPoint().y;
+
+		//�ｽ�ｽ�ｽﾊノ�ｽ[�ｽh�ｽﾌ配�ｽu�ｽ�ｽ�ｽ�ｽ
+				
+		//�ｽp�ｽx�ｽ�ｽ�ｽ�ｽﾌ奇ｿｽﾆなゑｿｽS�ｽﾄの葉�ｽﾌ撰ｿｽ�ｽﾌ搾ｿｽ�ｽv�ｽ�ｽ�ｽ�ｽ�ｽﾟゑｿｽ
+		int leaf_num_all = exbp_node_center.getLeafNum(num_of_layer+1);
+				//�ｽe�ｽﾊ厄ｿｽ�ｽﾉ配�ｽu�ｽ�ｽ�ｽ�ｽ
+		//�ｽJ�ｽn�ｽ_�ｽ�ｽﾛ趣ｿｽ�ｽ�ｽ�ｽ驍ｽ�ｽﾟの変撰ｿｽ
+		double start_arc=0;
+		if(arc<1){
+			start_arc = (Math.PI-2*arc*Math.PI)/2;//#kozaki 2008/03/25�ｽ@�ｽ�ｽ`�ｽﾌ角�ｽx�ｽﾝ抵ｿｽ
+		}
+		double r;
+
+		//�ｽJ�ｽn�ｽ_�ｽCLeaf�ｽ�ｽ�ｽv�ｽCLayer�ｽ�ｽ�ｽ�ｽ�ｽw�ｽ閧ｵ�ｽﾄ各�ｽﾊの配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽs�ｽ�ｽ�ｽI�ｽ�ｽ�ｽp�ｽx�ｽ�ｽﾔゑｿｽ
+		Enumeration chi_en = exbp_node_center.getVisbleChildren().elements();
+		while(chi_en.hasMoreElements()){
+			ExbpNode node = (ExbpNode) chi_en.nextElement();
+			r = 2*Math.PI*node.getLeafNum(num_of_layer)/leaf_num_all*arc;//#kozaki 2008/03/25�ｽ@�ｽ�ｽ`�ｽﾌ角�ｽx�ｽﾝ抵ｿｽ
+			//#kozaki 2008/06/26�ｽ@�ｽ�ｽ�ｽC�ｽA�ｽE�ｽg�ｽﾌ切ゑｿｽﾖゑｿｽ
+			if(this.layoutOption==LinkCentricLayout || this.layoutOption==LinkCentricLayout2){
+				setLayerArcNew(node,cx,cy,length_of_layer,start_arc,r,num_of_layer,node_size);
+			}
+			else{
+				setLayerArc(node,cx,cy,length_of_layer,start_arc,r,num_of_layer,node_size);
+			}
+			start_arc += r;
+		}
+	}
+	
+
+
+	ExbpNode getPick(Point pp){
+		Enumeration<ExbpNode> node_en = this.nodes.elements();
+		while(node_en.hasMoreElements()){
+			ExbpNode node =node_en.nextElement();
+			if(node.visible){
+				if(node.contains(pp.x, pp.y)){
+					System.out.println("Clicked!!"+node.getLabel());
+					//exbp_node_pick=node; #kozaki 08/02/14
+					return node;				
+				}
+			}
+		}
+		//exbp_node_pick=null; #kozaki 08/02/14
+		return null;
+	}
+	
+	//�ｽ�ｽ�ｽS�ｽ_�ｽC�ｽ�ｽ�ｽS�ｽ�ｽ�ｽ�ｽﾌ具ｿｽ�ｽ�ｽ�ｽC�ｽz�ｽu�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽiVector�ｽj�ｽ�ｽ�ｽw�ｽ閧ｵ�ｽﾄ円�ｽ�ｽ�ｽExbpNode�ｽ�ｽz�ｽu�ｽ�ｽ�ｽ�ｽ
+	void setLayer(Vector layer_nodes,int cx,int cy,int l){
+		int size = layer_nodes.size();
+		int i=0;
+		Enumeration wc = layer_nodes.elements();
+		while(wc.hasMoreElements()){
+			ExbpNode wnode = (ExbpNode)wc.nextElement();
+			//Node wnode = (Node)wc.nextElement();
+			Double dx =new Double(l*java.lang.Math.sin(java.lang.Math.PI*2*i/size));
+			Double dy =new Double(l*java.lang.Math.cos(java.lang.Math.PI*2*i/size));
+			wnode.setLocation(cx+dx.intValue(),cy+dy.intValue());
+//			System.out.print("x="+cx+dx.intValue());
+//			System.out.println("y="+cy+dy.intValue());
+
+			nodes.addElement(wnode);
+			i++;
+		}	
+	}
+	
+	//	�ｽJ�ｽn�ｽ_�ｽCLeaf�ｽ�ｽ�ｽv�ｽCLayer�ｽ�ｽ�ｽ�ｽ�ｽw�ｽ閧ｵ�ｽﾄ各�ｽﾊの配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽs�ｽ�ｽ�ｽI�ｽ�ｽ�ｽp�ｽx�ｽ�ｽﾔゑｿｽ
+	void setLayerArc(ExbpNode node,int cx,int cy,int l,double start_arc,double r,int layer_num, int node_size){
+		Vector<ExbpNode> arc_nodes = new Vector<ExbpNode>();
+		arc_nodes.addElement(node);
+		
+		for(int layer=1;layer<=layer_num;layer++){
+			Vector<ExbpNode> arc_nodes2 = new Vector<ExbpNode>();
+			
+			int size = arc_nodes.size();
+			int i=0;
+			Enumeration<ExbpNode> arc_en = arc_nodes.elements();
+			while(arc_en.hasMoreElements()){
+				ExbpNode arc_node = arc_en.nextElement();
+				//�ｽ�ｽi�ｽﾚは擾ｿｽ�ｽ�ｽ�ｽ蛯ｫ�ｽﾟのフ�ｽH�ｽ�ｽ�ｽg�ｽﾉゑｿｽ�ｽ�ｽ
+				if(layer==1){
+					// #hirota 08/08/19
+					arc_node.font = new Font("Times", Font.BOLD, (int)(node_size*(ExbpNode.Font_node_layer2)));
+				}
+				else{
+					arc_node.font = new Font("Times", Font.PLAIN, node_size);
+				}
+				Double dx =new Double(l*layer*java.lang.Math.cos(start_arc+r*i/size+r*0.5/size)); //#kozaki 2008/06/26
+				Double dy =new Double(l*layer*java.lang.Math.sin(start_arc+r*i/size+r*0.5/size)); //#kozaki 2008/06/26
+//				Double dx =new Double(l*layer*java.lang.Math.sin(start_arc+r*i/size+r*0.5/size));
+//				Double dy =new Double(l*layer*java.lang.Math.cos(start_arc+r*i/size+r*0.5/size));
+				arc_node.setLocation(cx+dx.intValue(),cy+dy.intValue());
+				
+				
+				
+	//			System.out.print("x="+cx+dx.intValue());
+	//			System.out.println("y="+cy+dy.intValue());
+				nodes.addElement(arc_node);
+				i++;
+				
+				arc_nodes2.addAll(arc_node.getVisbleChildren());
+			}
+			arc_nodes = arc_nodes2;
+		}
+		
+	}
+	
+	//#kozaki�ｽ@2008/06/14�ｽ@�ｽz�ｽu�ｽA�ｽ�ｽ�ｽS�ｽ�ｽ�ｽY�ｽ�ｽ�ｽﾌ会ｿｽ�ｽ
+	//	�ｽJ�ｽn�ｽ_�ｽCLeaf�ｽ�ｽ�ｽv�ｽCLayer�ｽ�ｽ�ｽ�ｽ�ｽw�ｽ閧ｵ�ｽﾄ各�ｽﾊの配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽs�ｽ�ｽ�ｽI�ｽ�ｽ�ｽp�ｽx�ｽ�ｽﾔゑｿｽ
+	void setLayerArcNew(ExbpNode node,int cx,int cy,int l,double start_arc,double r,int layer_num, int node_size){
+		Vector<ExbpNode> arc_nodes = new Vector<ExbpNode>();
+		arc_nodes.addElement(node);
+		
+		//�ｽeLayer�ｽﾌノ�ｽ[�ｽh�ｽﾌ�ｿｽ�ｽX�ｽg�ｽ�ｽﾛ趣ｿｽ�ｽ�ｽ�ｽ�ｽ
+		Vector<ExbpNode>[] layer_nodes = new Vector[layer_num+1];
+		layer_nodes[0] = new Vector<ExbpNode>();
+		layer_nodes[0].addElement(node);
+		
+		for(int layer=0;layer<layer_num;layer++){
+			layer_nodes[layer+1] = new Vector<ExbpNode>();
+			
+			int size = layer_nodes[layer].size();
+			int i=0;
+			Enumeration arc_en = layer_nodes[layer].elements();
+			while(arc_en.hasMoreElements()){
+				ExbpNode arc_node = (ExbpNode)arc_en.nextElement();
+				//�ｽ�ｽi�ｽﾚは擾ｿｽ�ｽ�ｽ�ｽ蛯ｫ�ｽﾟのフ�ｽH�ｽ�ｽ�ｽg�ｽﾉゑｿｽ�ｽ�ｽ
+				if(layer==0){
+					
+					// #hirota 08/08/19
+					arc_node.font = new Font("Times", Font.PLAIN, (int)(node_size*(ExbpNode.Font_node_layer2)));
+					//arc_node.font=ExbpNode.font_2;
+				}else{
+					arc_node.font = new Font("Times", Font.PLAIN, node_size);
+				}
+				Double dx =new Double(l*(layer+1)*java.lang.Math.cos(start_arc+r*i/size+r*0.5/size));
+				Double dy =new Double(l*(layer+1)*java.lang.Math.sin(start_arc+r*i/size+r*0.5/size));
+				//Double dx =new Double(l*(layer+1)*java.lang.Math.sin(start_arc+r*i/size+r*0.5/size));
+				//Double dy =new Double(l*(layer+1)*java.lang.Math.cos(start_arc+r*i/size+r*0.5/size));
+				arc_node.setLocation(cx+dx.intValue(),cy+dy.intValue());
+				
+				
+				nodes.addElement(arc_node);
+				i++;
+				
+				layer_nodes[layer+1].addAll(arc_node.getVisbleChildren());
+			}
+			
+		
+			
+			//arc_nodes = arc_nodes2;
+		}
+		
+		
+//		#kozaki �ｽV�ｽ�ｽ�ｽ�ｽ�ｽz�ｽu�ｽA�ｽ�ｽ�ｽS�ｽ�ｽ�ｽY�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾔ外�ｽ�ｽ�ｽﾌＬ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌ位置�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌ位置�ｽ�ｽ�ｽ�ｽ�ｽﾟゑｿｽ
+		for(int k=layer_num-2;k>0;k--){//#kozaki 2011/01/26 k=0�ｽﾌとゑｿｽ�ｽﾍ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽO�ｽ�ｽ�ｽ�ｽ]�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾉゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾈるか�ｽ�ｽ@
+			if(layer_nodes[k]!=null){
+				//Enumeration en = layer_nodes[k].elements();
+				double start0 = start_arc;//�ｽq�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ鼾�ｿｽitmp_node�ｽj�ｽ�ｽ�ｽ�ｽ�ｽp
+				double center = start_arc + r;
+				
+				Vector<ExbpNode> tmp_node = new Vector<ExbpNode>();
+				for(int index=0; index<layer_nodes[k].size();index++){
+					ExbpNode node2 = (ExbpNode)layer_nodes[k].elementAt(index);
+					//System.out.println(node2.getLabel());
+					if(node2.getVisbleChildren().size()>0){
+						ExbpNode chi_start = (ExbpNode)node2.getVisbleChildren().firstElement();
+						ExbpNode chi_end = (ExbpNode)node2.getVisbleChildren().lastElement();
+						double start = java.lang.Math.atan2(chi_start.getY()-cy, chi_start.getX()-cx);
+						double end = java.lang.Math.atan2(chi_end.getY()-cy, chi_end.getX()-cx);
+						if(start<0){
+							start +=2*Math.PI;
+						}
+						if(end<0){
+							end +=2*Math.PI;
+						}
+						center = (start+end)/2;
+						
+//						System.out.println("start: "+chi_start.getLabel()+java.lang.Math.toDegrees(start));
+//						System.out.print("end  :"+chi_end.getLabel()+java.lang.Math.toDegrees(end)+"\n");
+//						System.out.println("===>> "+java.lang.Math.toDegrees(center));
+						
+						
+						Double dx =new Double(l*(k+1)*java.lang.Math.cos(center));
+						Double dy =new Double(l*(k+1)*java.lang.Math.sin(center));
+						node2.setLocation(cx+dx.intValue(),cy+dy.intValue());
+						
+						if(tmp_node.size()>0){
+							double arc = Math.abs(center-start0)/(tmp_node.size()+1);
+							Enumeration<ExbpNode> arc_en = tmp_node.elements();
+							int i=1;
+							while(arc_en.hasMoreElements()){
+								ExbpNode n = arc_en.nextElement();
+								Double dx2 =new Double(l*(k+1)*Math.cos(start0+arc*i));
+								Double dy2 =new Double(l*(k+1)*Math.sin(start0+arc*i));
+								n.setLocation(cx+dx2.intValue(),cy+dy2.intValue());
+								//System.out.println("TMP"+n.getLabel()+Math.toDegrees(start0+arc*i));
+								i++;
+								}
+							tmp_node.removeAllElements();							
+							}
+						
+						start0=center;
+						}
+					else{//�ｽq�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾈゑｿｽ�ｽ鼾�ｿｽﾍ，�ｽ�ｽﾅ位置�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ驛奇ｿｽX�ｽg�ｽﾉ難ｿｽ�ｽ�ｽ
+						tmp_node.addElement(node2);
+						}
+					}
+			if(tmp_node.size()>0){//�ｽﾅ鯉ｿｽﾉ厄ｿｽ�ｽz�ｽu�ｽﾌノ�ｽ[�ｽh�ｽ�ｽ�ｽc�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽﾆゑｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+				double arc = java.lang.Math.abs(start_arc + r-start0)/(tmp_node.size()+1);
+				Enumeration<ExbpNode> arc_en = tmp_node.elements();
+				int i=1;
+				//System.out.println("center:"+Math.toDegrees(center));
+				//System.out.println("start0:"+Math.toDegrees(start0));
+				
+				while(arc_en.hasMoreElements()){
+					ExbpNode n = arc_en.nextElement();
+					Double dx2 =new Double(l*(k+1)*Math.cos(start0+arc*i));
+					Double dy2 =new Double(l*(k+1)*Math.sin(start0+arc*i));
+//					Double dx2 =new Double(l*(k+1)*java.lang.Math.cos(start_arc+r/2+arc*i));
+//					Double dy2 =new Double(l*(k+1)*java.lang.Math.sin(start_arc+r/2+arc*i));
+					n.setLocation(cx+dx2.intValue(),cy+dy2.intValue());
+					//System.out.println("TMP:"+n.getLabel()+Math.toDegrees(start0+arc*i));
+					i++;
+					}
+				}
+			}
+		}
+		/*		for(int k=layer_num-2;k>=0;k--){
+			if(layer_nodes[k]!=null){
+				Enumeration en = layer_nodes[k].elements();
+				double start0 = start_arc;
+				Vector<ExbpNode> tmp_node = new Vector<ExbpNode>();
+			while(en.hasMoreElements()){
+				ExbpNode node2 = (ExbpNode)en.nextElement();
+				System.out.println(node2.getLabel());
+				if(node2.children.size()>0){
+					ExbpNode chi_start = (ExbpNode)node2.children.firstElement();
+					ExbpNode chi_end = (ExbpNode)node2.children.lastElement();
+					double start = java.lang.Math.atan2(chi_start.getY()-cy, chi_start.getX()-cx);
+					double end = java.lang.Math.atan2(chi_end.getY()-cy, chi_end.getX()-cx);
+					if(start<0){
+						start +=2*Math.PI;
+					}
+					if(end<0){
+						end +=2*Math.PI;
+					}
+					double center = (start+end)/2;
+//					if(java.lang.Math.abs(end-start)>java.lang.Math.PI){
+//						center = center + java.lang.Math.PI;
+//					}
+					
+					System.out.println("start: "+chi_start.getLabel()+java.lang.Math.toDegrees(start));
+					System.out.print("end  :"+chi_end.getLabel()+java.lang.Math.toDegrees(end)+"\n");
+					System.out.println("===>> "+java.lang.Math.toDegrees(center));
+					
+					
+					Double dx =new Double(l*(k+1)*java.lang.Math.cos(//start));
+							center));
+					Double dy =new Double(l*(k+1)*java.lang.Math.sin(//start));
+							//2*java.lang.Math.PI+
+							center));
+					
+//					dx = new Double(l*(k+1)*((chi_start.getX()-cx)/(l*(k+2))));
+//					dy = new Double(l*(k+1)*((chi_start.getY()-cy)/(l*(k+2))));
+					node2.setLocation(cx+dx.intValue(),cy+dy.intValue());
+					//node2.label+="*";
+					
+					if(tmp_node.size()>0){
+						double arc = java.lang.Math.abs(center-start0)/(tmp_node.size());
+						Enumeration arc_en = tmp_node.elements();
+						int i=0;
+						while(arc_en.hasMoreElements()){
+							ExbpNode n = (ExbpNode)arc_en.nextElement();
+							Double dx2 =new Double(l*(k+1)*java.lang.Math.cos(start0+arc*i));
+							Double dy2 =new Double(l*(k+1)*java.lang.Math.sin(start0+arc*i));
+							//n.setLocation(cx+dx2.intValue(),cy+dy2.intValue());
+							i++;
+							}
+						tmp_node.removeAllElements();
+						start0=center;
+						}
+					}
+				else{//�ｽq�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾈゑｿｽ�ｽ鼾�ｿｽﾍ，�ｽ�ｽﾅ位置�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ驛奇ｿｽX�ｽg�ｽﾉ難ｿｽ�ｽ�ｽ
+					tmp_node.addElement(node2);
+					}
+				}
+			if(tmp_node.size()>0){//�ｽﾅ鯉ｿｽﾉ厄ｿｽ�ｽz�ｽu�ｽﾌノ�ｽ[�ｽh�ｽ�ｽ�ｽc�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽﾆゑｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+				double arc = java.lang.Math.abs(start_arc+r/2-start0)/(tmp_node.size());
+				Enumeration arc_en = tmp_node.elements();
+				int i=1;
+				while(arc_en.hasMoreElements()){
+					ExbpNode n = (ExbpNode)arc_en.nextElement();
+					Double dx2 =new Double(l*(k+1)*java.lang.Math.cos(start_arc+r/2+arc*i));
+					Double dy2 =new Double(l*(k+1)*java.lang.Math.sin(start_arc+r/2+arc*i));
+					//n.setLocation(cx+dx2.intValue(),cy+dy2.intValue());
+					i++;
+					}
+				}
+			}
+		}*/
+		
+	}
+    
+    
+    /**
+     * 
+     * �ｽ�ｽ�ｽ[�ｽg�ｽm�ｽ[�ｽh�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定し�ｽﾜゑｿｽ�ｽB
+     * 
+     * @return �ｽ�ｽ�ｽ[�ｽg�ｽm�ｽ[�ｽh�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾟゑｿｽ�ｽﾜゑｿｽ�ｽB
+     */
+    public boolean isVisibleCenter() {
+        return isVisibleCenter;
+    }
+
+    /**
+     * 
+     * �ｽ�ｽ�ｽ[�ｽg�ｽm�ｽ[�ｽh�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定し�ｽﾜゑｿｽ�ｽB
+     * 
+     * @param isVisibleCenter �ｽ�ｽ�ｽ[�ｽg�ｽm�ｽ[�ｽh�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽB
+     */
+    public void setVisibleCenter(boolean isVisibleCenter) {
+        this.isVisibleCenter = isVisibleCenter;
+    }  
+    
+    //#kozaki 2008/02/10�ｽ@�ｽe�ｽ�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ
+    public void setVisibleInflu(boolean isVisibleInflu) {
+        this.isVisibleInflu = isVisibleInflu;
+    }  
+    
+    /**
+     * 
+     * �ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定し�ｽﾜゑｿｽ�ｽB
+     * 
+     * @return �ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾟゑｿｽ�ｽﾜゑｿｽ�ｽB
+     */
+    public boolean isVisibleLink() {
+        return isVisibleLink;
+    }
+
+    /**
+     * 
+     * �ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定し�ｽﾜゑｿｽ�ｽB
+     * 
+     * @param isVisibleLink �ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽB
+     */
+    public void setVisibleLink(boolean isVisibleLink) {
+        this.isVisibleLink = isVisibleLink;
+    }   
+    
+    /**
+     * 
+     * �ｽ�ｽ�ｽx�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定し�ｽﾜゑｿｽ�ｽB
+     * 
+     * @return �ｽ�ｽ�ｽx�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾟゑｿｽ�ｽﾜゑｿｽ�ｽB
+     */
+    public boolean isVisibleLevel() {
+        return isVisibleLevel;
+    }
+
+    /**
+     * 
+     * �ｽ�ｽ�ｽx�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定し�ｽﾜゑｿｽ�ｽB
+     * 
+     * @param isVisibleLink �ｽ�ｽ�ｽx�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽB
+     */
+    public void setVisibleLevel(boolean isVisibleLevel) {
+        this.isVisibleLevel = isVisibleLevel;
+    }
+    
+    
+    /**
+     * 
+     * �ｽ�ｽ�ｽE�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定し�ｽﾜゑｿｽ�ｽB
+     * 
+     * @return �ｽ�ｽ�ｽE�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾟゑｿｽ�ｽﾜゑｿｽ�ｽB
+     */
+    public boolean isVisibleBorder() {
+        return isVisibleBorder;
+    }
+
+    /**
+     * 
+     * �ｽ�ｽ�ｽE�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定し�ｽﾜゑｿｽ�ｽB
+     * 
+     * @param isVisibleLink �ｽ�ｽ�ｽE�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽB
+     */
+    public void setVisibleBorder(boolean isVisibleBorder) {
+        this.isVisibleBorder = isVisibleBorder;
+    }
+    
+    /**
+     * 
+     * �ｽm�ｽ[�ｽh�ｽ�ｽ�ｽﾄ登�ｽ^�ｽ�ｽ�ｽﾜゑｿｽ�ｽB
+     * 
+     * @param node �ｽﾄ登�ｽ^�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽw�ｽ閧ｷ�ｽ�ｽB
+     */
+    protected void reentryExbpNode(ExbpNode node) {
+        if (node != null && this.nodes.contains(node)) {
+            this.nodes.remove(node);
+            this.nodes.add(node);
+        }
+    }
+    
+    //#kozaki 2008/10/03�ｽ@XML�ｽ`�ｽ�ｽ�ｽﾌ別フ�ｽ@�ｽC�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾄマ�ｽb�ｽv�ｽ�ｽﾛ托ｿｽ
+    public void saveMAPinXML(java.io.File save_file){}
+    public void saveMAPinXML(java.io.File save_file,ExbpNode selected_node){}
+}
+
+
+
+class ExbpNode extends Rectangle{
+    
+	public static String IS_A = "is-a";
+	public static String IS_A_L = "IS-A";
+	
+	String label = "label";
+	ExbpNode parent;
+	Vector<ExbpNode> children = new Vector<ExbpNode>();
+//	Node hozo_node;
+	Object org_node;//#kozaki 2008/10/19�ｽ@Hozo�ｽﾈ外�ｽﾉゑｿｽ�ｽﾎ会ｿｽ�ｽ�ｽ�ｽ驍ｽ�ｽ�ｽ
+	
+     // #hirota 08/08/19 node_size�ｽﾏ更	
+	  public Font font = new Font("Times", Font.PLAIN, 12);
+	 
+	 static int Font_node_size = 12;
+	 static double Font_node_center = 1.6;
+	 static double Font_node_layer2 = 1.3;
+//	 static  Font font_1 = new Font("Times", Font.BOLD, 18);
+//	 static  Font font_2 = new Font("Times", Font.BOLD, 14);
+//	 static  Font font_3 = new Font("Times", Font.PLAIN, 12);
+
+	 int evaluation = 0;//0:=�ｽ�ｽ�ｽL�ｽ�ｽ
+	 int evaluation_1 = 0;//0:=�ｽ�ｽ�ｽL�ｽ�ｽ
+	 int evaluation_2 = 0;//0:=�ｽ�ｽ�ｽL�ｽ�ｽ
+	 int evaluation_3 = 0;//0:=�ｽ�ｽ�ｽL�ｽ�ｽ
+	 int evaluation_4 = 0;//0:=�ｽ�ｽ�ｽL�ｽ�ｽ
+	 String evaluation_comment = "";
+
+	 
+	 
+/*		public boolean equals(Object obj) {
+			if (!(obj instanceof ExbpNode)) {
+	                return false;
+	        }
+	        
+			ExbpNode other = (ExbpNode)obj;
+	        
+			if(this.org_node==null || other.org_node==null){
+				return false;
+			}			
+			
+	        return this.org_node.equals(other.org_node);
+		}*/
+	
+	 
+	 
+	 static Color[] node_color = {
+        Color.orange,
+        Color.cyan,
+        Color.pink,		//#kozaki�ｽ@2008/08/18�ｽ@�ｽ�ｽ�ｽﾔゑｿｽﾏ更
+        Color.yellow,
+        Color.green,
+        new Color(255,102,255), // Color.magenta,	//#kozaki�ｽ@2008/08/18�ｽ@�ｽ�ｽ�ｽﾔゑｿｽﾏ更
+        Color.lightGray,
+        new Color(255,51,102),//Color.red,      //
+        new Color(50,155,255),   //Color.blue,     //
+		Color.gray
+	};
+	 
+	 // #hirota 09/11/19 �ｽT�ｽX�ｽe�ｽi�ｽp�ｽF�ｽﾝ抵ｿｽ
+	 // �ｽS�ｽ[�ｽ�ｽ�ｽC�ｽ�ｽ�ｽﾊ撰ｿｽ�ｽE�ｽC�ｽﾎ搾ｿｽC�ｽ]�ｽ�ｽworld�ｽC�ｽ�ｽ�ｽC�ｽ�ｽ�ｽﾌ托ｿｽ
+	 String[] parent_nodes = {"�ｽS�ｽ[�ｽ�ｽ","�ｽ�ｽ�ｽﾊ撰ｿｽ�ｽE","�ｽﾎ搾ｿｽ","�ｽ]�ｽ�ｽworld","�ｽ�ｽ�ｽ","�ｽ�ｽ�ｽﾌ托ｿｽ"};
+	 static Color[] node_color_sus = {
+	        Color.orange, // �ｽS�ｽ[�ｽ�ｽ
+	        Color.cyan,   //�ｽ@�ｽ�ｽ�ｽﾊ撰ｿｽ�ｽE
+	        Color.pink,	  //�ｽ@�ｽﾎ搾ｿｽ
+	        Color.yellow, //�ｽ@�ｽ]�ｽ�ｽworld
+	        Color.green,  //�ｽ@�ｽ�ｽ�ｽ
+	        Color.gray    //�ｽ@�ｽ�ｽ�ｽﾌ托ｿｽ
+		};
+	
+	 
+	public static final Color CENTER_COLOR = new Color(200,200,255);   //#kozaki 2008/08/18�ｽ@�ｽ�ｽ�ｽ�ｽﾌ色�ｽﾉ変更
+	//public static final Color CENTER_COLOR = new Color(100,0,255);   // �ｽ�ｽ�ｽF
+	
+	Color color = Color.yellow;
+	                                 
+	//Font font = new Font("Times", Font.PLAIN, 12);
+    
+    protected String key = "";
+    protected String opt = "";//#kozaki�ｽ@2007/10/28�ｽ@�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽ�ｽ�ｽL�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+    
+    protected boolean isDummy = false;//#kozaki 2008/02/09�ｽ@is-a�ｽﾌ�ｿｽ�ｽ[�ｽt�ｽﾅ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ驍ｽ�ｽﾟのダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽﾉ設定す�ｽ�ｽ
+    
+    //#kozaki�ｽ@�ｽo�ｽl�ｽ�ｽ�ｽf�ｽ�ｽ�ｽp
+    double dx;
+    double dy;
+    boolean n_stop=false;
+    boolean fixed;
+    
+    boolean visible = true; //#kozaki 2008/08/15
+    boolean match = false; //#kozaki 2011/01/25 SeracPath�ｽ�ｽ�ｽ�ｽ�ｽp5
+    boolean highlight = false; //#kozaki�ｽ@2009/01/05�ｽ@compare�ｽ�ｽ�ｽ�ｽﾏ更
+    Color highligjtColor = Color.white;
+    boolean link_highlight = false;
+    Color link_highligjtColor = Color.white;
+    
+    boolean isDobule = false;//#kozaki 2009/01/22�ｽ@�ｽd�ｽ�ｽNode�ｽ`�ｽF�ｽb�ｽN�ｽp
+    
+    boolean open_sub = true;//#kozaki 2008/10/25
+	boolean not_focus = false;
+	
+	ArrayList<Color> topicColorList = new ArrayList<Color>(10);
+	
+   
+//    private int _layer = 0;
+    
+	// #hirota 09/12/17 �ｽ�ｽ�ｽ�ｽ�ｽﾌパ�ｽX�ｽ]�ｽ�ｽ�ｽp�ｽ�ｽ�ｽ�ｽ
+	public ExbpNode tracepath(ExbpNode _exbpNode,int tensuu, String s){
+		
+		if(this.parent != null){
+			if(_exbpNode != null ){
+				if(this.visible == true){
+					
+					if(this.label.equals(_exbpNode.label)){
+						
+						if(this.key.equals(_exbpNode.key) ){
+							tensuu++;
+						}				
+						
+						//	System.out.println("*** :"+ this.label + ", �ｽ�ｽ " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
+						String str = " :"+ this.label + "�ｽ�ｽ "+ "(" +this.key + "):" + this.parent.label+ ",  tensuu:"+tensuu;
+						System.out.println(str);
+						
+						this.setColorFont(Color.red,font);
+						this.parent.tracepath(_exbpNode.parent,tensuu,s+"\n"+str);					
+						
+					
+					}else{
+						System.out.println("*** error");
+						return null;
+					}
+				}
+				
+			}
+			
+		}else{
+			
+			try{
+				
+//				PrintWriter out = new PrintWriter(new  BufferedWriter(
+//						new FileWriter("./091221-path.txt",true)));
+				PrintWriter out = new PrintWriter(new  BufferedWriter(
+						new FileWriter("C:\\�ｽy�ｽﾅ新�ｽz�ｽ�ｽ�ｽ�ｽ�ｽ}�ｽb�ｽv\\091221-path.txt",true)));
+			   	out.println(s);
+			    System.out.println(s);
+			    System.out.println("*** OK!!");
+			    
+			    
+			    out.close();
+			    
+			}
+			catch(Exception e){
+				e.printStackTrace();
+			}
+			
+		}
+		
+		
+		return null;
+		
+	}
+// #ohta 2011/01/15 
+	public void clearHighLightColorList() {
+		this.topicColorList.clear();
+	}
+	
+	public void addTopicColor(Color clr) {
+		if (!this.topicColorList.contains(clr)) {
+			topicColorList.add(clr);
+		}
+	}
+
+	
+    public void setHighLight(boolean b, Color clr){
+    	this.highlight=b;
+    	if(clr==null){
+    		this.highligjtColor=Color.white;
+    	}
+    	else{
+    		this.highligjtColor=clr;
+//    		// #ohta 2011/01/15    		
+//    		if (!this.topicColorList.contains(clr)) {
+//    			topicColorList.add(clr);
+//    		}
+    	}
+    }
+
+    public void setLinkHighLight(boolean b, Color clr){
+    	this.link_highlight=b;
+    	if(clr==null){
+    		this.link_highligjtColor=Color.white;
+    	}
+    	else{
+    		this.link_highligjtColor=clr;
+    	}
+    }
+    
+
+    //  #kozaki 2008/10/03�ｽ@XML�ｽf�ｽ[�ｽ^�ｽﾆゑｿｽ�ｽﾄ保托ｿｽ�ｽ�ｽ�ｽ�ｽﾌに暦ｿｽ�ｽp�ｽ�ｽ�ｽ�ｽ
+    //  #hirota 09/11/19 �ｽI�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽﾂゑｿｽ
+	void SaveInXML(PrintWriter prt,Vector selected_nodes ){}
+	
+	//#kozaki 2008/10/03�ｽ@XML�ｽf�ｽ[�ｽ^�ｽﾆゑｿｽ�ｽﾄ保托ｿｽ�ｽ�ｽ�ｽ�ｽﾌに暦ｿｽ�ｽp�ｽ�ｽ�ｽ�ｽ
+	//#kozaki 2010/02/21�ｽ@�ｽﾏ更
+	void SaveInXML(PrintWriter prt){}
+	
+	private String saveEValuation(){		
+		if(this.evaluation!=0){
+			return 
+				"<EVAL ev=\""+this.evaluation
+				 +"\" ev1=\""+this.evaluation_1
+				 +"\" ev2=\""+this.evaluation_2
+				 +"\" ev3=\""+this.evaluation_3
+				 +"\" ev4=\""+this.evaluation_4
+				 +"\" >"+this.evaluation_comment+"</EVAL>";
+		}
+		
+		return "";
+	}
+    
+    //#kozaki�ｽ@2008/08/15
+    void setVisibleWithChildren(boolean b){
+    	this.visible = b;
+//    	if(!b){
+//    		this.setBounds(0,0,0,0);
+//    	}
+//    	
+    	Enumeration en = this.children.elements();
+	    	while(en.hasMoreElements()){
+	    		ExbpNode node = (ExbpNode)en.nextElement();
+	    		node.setVisibleWithChildren(b);
+	    	}
+    }
+    
+    void setVisible(boolean b){
+    	this.visible = b;
+    	}
+
+    //#kozaki 2009/01/05�ｽ@�ｽe�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽﾜめて可趣ｿｽ�ｽﾉゑｿｽ�ｽ�ｽ
+    void setVisibleTrueWithParent(){
+    	this.visible = true;
+    	this.not_focus=false;
+    	if(this.parent!=null){
+    		this.parent.open_sub=true;
+    		this.parent.setVisibleTrueWithParent();
+    	}
+    }    
+    
+    void setMatchTrueWithParent(){
+    	this.match = true;
+    	if(this.parent!=null){
+    		this.parent.setMatchTrueWithParent();
+    	}
+    }    
+    
+    void clearMatchWithChildren(){
+    	this.match = false;
+    	Enumeration en = this.children.elements();
+	    	while(en.hasMoreElements()){
+	    		ExbpNode node = (ExbpNode)en.nextElement();
+	    		node.clearMatchWithChildren();
+	    	}
+    }
+    
+    
+    //#kozaki 2009/01/05�ｽ@�ｽe�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽﾜめて可趣ｿｽ�ｽﾉゑｿｽ�ｽ�ｽ
+    void setVisiblefalseWithParent(){
+    	this.visible = false;
+    	this.not_focus=false;
+    	if(this.parent!=null){
+    		this.parent.open_sub=false;
+    		this.parent.setVisiblefalseWithParent();
+    	}
+    }
+ 
+    //#kozaki 2010/07/04�ｽ@�ｽe�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽﾜめて色�ｽ�ｽﾏゑｿｽ�ｽ�ｽ
+    void setColorWithParent(Color c){
+    	this.color =c;  
+    	if(this.parent!=null){
+    		this.parent.setColorWithParent(c);
+    	}
+    }    
+    
+    //#baba 2011/01/17�ｽ@�ｽe�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽﾜめてト�ｽs�ｽb�ｽN�ｽF�ｽ�ｽﾏゑｿｽ�ｽ�ｽ
+    void setTopicColorWithParent(Color c){
+    	this.addTopicColor(c);  
+    	if(this.parent!=null){
+    		this.parent.setTopicColorWithParent(c);
+    	}
+    }    
+    
+    
+    //#kozaki 2009/02/13�ｽ@�ｽm�ｽ[�ｽh�ｽﾌ状況に会ｿｽ�ｽ�ｽ�ｽﾄ会ｿｽ�ｽﾊノ�ｽ[�ｽh�ｽ�ｽOpen/Close�ｽ�ｽﾘゑｿｽﾖゑｿｽ�ｽ�ｽ
+    void changeOpenSub(){
+    	boolean b=true;
+    	if(getVisbleChildren().size()==this.children.size()){
+    		//this.setVisbleChildren(false);
+    		b=false;
+    	}
+    	else if(getVisbleChildren().size()>0){
+    		//this.setVisbleChildren(false);
+    		b=false;
+    	}
+//    	else{
+//    		this.setVisbleChildren(true);
+//    	}
+    	//this.setVisbleChildren(b);
+    	this.visible = true;
+    	this.open_sub=b;
+    	Enumeration en = this.children.elements();
+    	while(en.hasMoreElements()){
+    		ExbpNode n =(ExbpNode)en.nextElement();
+    		//if(!n.not_focus){
+    			n.visible=b;
+    		//}
+    	}    	
+    }
+    
+    //#kozaki 2008/10/06�ｽ@�ｽq�ｽm�ｽ[�ｽh�ｽﾌ表�ｽ�ｽ�ｽ�ｽﾏ更
+    void setVisbleChildren(boolean b){
+    	this.open_sub=b;
+    	setVisibleWithChildren(b);
+    	this.visible = true;//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽg�ｽﾍ擾ｿｽﾉ表�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+    }
+ 
+    void setNotFocusChildren(boolean b){
+    	this.not_focus=b;
+    	setNotFocusChildrenWithChildren(b);
+    	}
+    
+    void setNotFocusChildrenWithChildren(boolean b){
+    	this.not_focus = b;
+//    	if(!b){
+//    		this.setBounds(0,0,0,0);
+//    	}
+//    	
+    	Enumeration en = this.children.elements();
+	    	while(en.hasMoreElements()){
+	    		ExbpNode node = (ExbpNode)en.nextElement();
+	    		node.setNotFocusChildren(b);
+	    	}
+    }
+ 
+    Vector getVisbleChildren(){
+    	Vector<ExbpNode>  vec = new Vector<ExbpNode> ();
+    	Enumeration en = this.children.elements();
+    	while(en.hasMoreElements()){
+    		ExbpNode n =(ExbpNode)en.nextElement();
+    		if(n.visible){
+    			vec.addElement(n);
+    		}
+    	}    	
+    	return vec;
+    }
+    
+    Vector getInVisbleChildren(){
+    	Vector<ExbpNode>  vec = new Vector<ExbpNode> ();
+    	Enumeration en = this.children.elements();
+    	while(en.hasMoreElements()){
+    		ExbpNode n =(ExbpNode)en.nextElement();
+    		if(!n.visible){
+    			vec.addElement(n);
+    		}
+    	}    	
+    	return vec;
+    }
+    
+	//#kozaki 2008/02/09�ｽ@is-a�ｽﾌ�ｿｽ�ｽ[�ｽt�ｽﾅ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ驍ｽ�ｽﾟのダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽﾉ設定す�ｽ�ｽ
+    void setDummyNode(boolean b){
+    	this.isDummy = b;
+    }
+    
+//    void addChild(ExbpNode chi){
+//    	this.children.addElement(chi);
+//    	chi.parent=this;
+//    	if(!this.open_sub){
+//    		chi.visible=false;
+//    		chi.open_sub=false;
+//    	}
+//    }
+    
+    
+    boolean checkUpperPath(ExbpNode chi){
+    	ExbpNode par_node = this.getParent();
+		if(par_node==null){
+			return false;
+		}
+    	
+		Object org_node = par_node.getOrgNode();
+		if(org_node!=null){
+			if(org_node.equals(chi.getOrgNode())){
+				return true;
+			}		
+			else{
+				return par_node.checkUpperPath(chi);
+			}
+		}	
+		
+    	return false;
+    }
+    
+    // #hirota 2009/11/24 Any�ｽr�ｽ�ｽ�ｽp�ｽ�ｽ�ｽ�ｽ�ｽH�ｽH�ｽﾙ急�ｽp
+    void addChild(ExbpNode chi){
+    	/*
+    	Enumeration en = this.children.elements();
+    	while(en.hasMoreElements()){
+    		ExbpNode node = (ExbpNode) en.nextElement();
+    		if(node.getLabel().equals(chi.getLabel())){
+    			return;
+    		}
+    	}
+    	*/
+    	//#kozaki�ｽ@2009/11/30�ｽ@�ｽJ�ｽ�ｽﾔゑｿｽ�ｽﾌ会ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+    	if(this.checkUpperPath(chi)){
+    		return;
+    	}
+//		ExbpNode par_node2 = this.getParent();
+//		if(par_node2!=null){
+//			Object org_node = par_node2.getOrgNode();
+//			if(org_node!=null){
+//				if(org_node.equals(chi.getOrgNode())){
+//					return;
+//				}			
+//			}	
+//		}
+    	
+    	
+    	this.children.addElement(chi);
+    	chi.parent=this;
+    	if(!this.open_sub){
+    		chi.visible=false;
+    		chi.open_sub=false;
+    	}
+    	if(chi.getLabel().equals("Any")){
+    		chi.visible=false;
+    	}
+    }
+    
+    void removeChild(ExbpNode chi){
+    	this.children.remove(chi);
+    	chi.parent=null;
+    }
+    
+    //#hirota 09/11/19 ont�ｽ�ｽﾌ最擾ｿｽﾊノ�ｽ[�ｽh�ｽ�ｽﾔゑｿｽ
+//    Node getParentHozoNode(){}
+    
+    //#kozaki 2008/05/09�ｽ@�ｽe�ｽm�ｽ[�ｽh�ｽiDummy�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽj�ｽ�ｽﾔゑｿｽ
+    ExbpNode getParent(){
+    	if(this.parent==null){
+    		return null;
+    	}
+    	else if(!this.parent.isDummy){
+    		return this.parent;
+    	}
+    	else{
+    		return this.parent.getParent();
+    	}
+    }
+    
+    //#kozaki 2008/05/09�ｽ@�ｽe�ｽm�ｽ[�ｽh�ｽiDummy�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽj�ｽ�ｽﾔゑｿｽ
+    ExbpNode getParentNode(ExbpNode target){
+    	if(this.parent==null){
+    		return null;
+    	}
+    	else if(!this.parent.isDummy && this.parent.equals(target)){
+    		return this.parent;
+    	}
+    	else{
+    		return this.parent.getParent();
+    	}
+    }
+    
+    //#kozaki 2008/07/31�ｽ@�ｽ�ｽ�ｽi�ｽﾚのノ�ｽ[�ｽh�ｽﾅゑｿｽ�ｽ驍ｩ�ｽ�ｽﾔゑｿｽ
+    public int getLocatedLayer(){
+    	int i=0;
+    	for(ExbpNode node=this;node.parent!=null;node=node.parent){
+    		if(!(node.parent==null)){
+    			i++;	
+    		}
+//    		if(!node.getLabel().equals("ROOT")){
+//    			i++;
+//    		}
+    	}
+    	return i;
+    }
+    
+    //#kozaki 2008/05/09�ｽ@�ｽﾊ段�ｽ�ｽ�ｽﾌ子�ｽm�ｽ[�ｽh�ｽiDummy�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽj�ｽ�ｽﾔゑｿｽ
+    Vector<ExbpNode> getChildren(){
+    	Vector<ExbpNode> vec = new Vector<ExbpNode>();
+    	Iterator<ExbpNode> it =  this.children.iterator();
+        while (it.hasNext()) {
+        	ExbpNode childNode = it.next();
+        	if(childNode.isDummy){
+        		vec.addAll(childNode.getChildren());        		        		
+        	}
+        	else{
+        		vec.add(childNode);
+        	}
+        }    	
+    	return vec;
+    }
+    
+    //#kozaki 2008/05/09�ｽ@�ｽﾊ段�ｽ�ｽ�ｽﾌ子�ｽm�ｽ[�ｽh�ｽiDummy�ｽ�ｽ�ｽﾜむ）�ｽ�ｽﾔゑｿｽ 
+    //#kozaki2009/01/22�ｽ@�ｽs�ｽﾂ趣ｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾇ会ｿｽ
+    Vector<ExbpNode> getChildrenWithISADummy(boolean skipUnVisvle){
+    	Vector<ExbpNode> vec = new Vector<ExbpNode>();
+//    	if(skipUnVisvle && !this.open_sub){
+//    		return vec;
+//    	}
+    	
+    	Iterator<ExbpNode> it =  this.children.iterator();
+        while (it.hasNext()) {
+        	ExbpNode childNode = it.next();
+        	if(childNode.isDummy){
+        		//vec.addAll(childNode.getChildren());
+        		if(childNode.key.equals(ExbpNode.IS_A)||childNode.key.equals(ExbpNode.IS_A_L)){
+        			//if(!skipUnVisvle || childNode.visible){
+        				vec.add(childNode);
+        			//}
+        		}        		
+        	}
+        	else{
+        		//if(!skipUnVisvle || childNode.visible){
+        			vec.add(childNode);
+        		//}
+        	}
+        }    	
+    	return vec;
+    }
+
+    
+
+    //#kozaki 2009/01/04�ｽ@Key�ｽ�ｽ�ｽw�ｽ閧ｵ�ｽﾄ子�ｽm�ｽ[�ｽh�ｽ�ｽﾔゑｿｽ
+    ExbpNode findChildNodeByKey(String key){
+    	Vector<ExbpNode> chi_nodes = this.getChildExbpNodes();
+    	Enumeration<ExbpNode> en = chi_nodes.elements();
+    	String[] keys;
+    	while(en.hasMoreElements()){
+    		ExbpNode node = (ExbpNode)en.nextElement();
+    		if(node.key.equals(key)){
+				return node;
+			}
+    	//�ｽ�ｽ�ｽ{�ｽ�ｽ�ｽﾍ，�ｽu,�ｽ�ｽﾘゑｿｽv�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽK�ｽv
+//    		keys = node.key.split(",");
+//    		for(int i=0;i<keys.length;i++){
+//    			if(keys[i].equals(key)){
+//    				return node;
+//    			}
+//    		}
+    	}
+    	
+    	return null;
+    }
+    
+	ExbpNode(int x, int y, int w, int h){
+		super(x,y,w,h);
+	}
+
+	ExbpNode(String lbl, int x, int y, int w, int h){
+		super(x,y,w,h);
+		this.setLabel(lbl);
+	}
+	
+	ExbpNode(String lbl){
+		super(0,0,0,0);
+		this.setLabel(lbl);
+	}
+	
+	ExbpNode copy(){
+		ExbpNode copy = new ExbpNode(this.getLabel());
+		copy.setOrgNode(this.getOrgNode());
+		copy.key=this.key;
+		copy.opt=this.opt;
+		return copy;
+	}
+	
+	//�ｽ�ｽ�ｽﾊ概�ｽO�ｽﾌ含めゑｿｽExbpNode�ｽ�ｽ�ｽ�ｬ
+/*	ExbpNode(Node node){
+		this(node.getLabel(),0,0,0,0);
+//		#kozaki 2008/03/29�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ
+		if(mapfactory.isSubLung){
+			this.setLabel(node.getSubLabel());
+			System.out.println("�ｽT�ｽu�ｽ�ｽ�ｽ�ｽ:"+node.getLabel()+"-->"+node.getSubLabel());
+		}
+		this.setHozoNode(node);
+        this.key = IS_A;
+        
+		Enumeration chi_en = node.childs.elements();
+		while(chi_en.hasMoreElements()){
+			Node chi_node = (Node)chi_en.nextElement();
+			ExbpNode chi = new ExbpNode(chi_node);
+			this.addChild(chi);		
+		}		
+	}*/
+	
+
+	
+	//�ｽ�ｽ�ｽﾊ概�ｽO�ｽﾌ含めゑｿｽExbpNode�ｽ�ｽ�ｽ�ｬ�ｽi�ｽF�ｽw�ｽ閧�ｽ�ｽj isa�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽﾌみ擾ｿｽ�ｽ�ｽ
+/*	ExbpNode(Node node,Color clr){
+		this(node.getLabel(),0,0,0,0);
+//		#kozaki 2008/08/12
+		if(clr==null){
+			this.color=this.CENTER_COLOR;
+		}else{
+			this.color=clr;
+		}
+		//#kozaki 2008/03/22�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ
+		if(mapfactory.isSubLung){
+			this.setLabel(node.getSubLabel());
+			System.out.println("�ｽT�ｽu�ｽ�ｽ�ｽ�ｽ:"+node.getLabel()+"-->"+node.getSubLabel());
+		}
+		
+		this.setHozoNode(node);
+				
+		this.key = IS_A;
+		
+		//this.color=clr;
+		Enumeration<Node> chi_en = node.childs.elements();
+		int color_i=0;
+		Color chi_clr = clr;
+		while(chi_en.hasMoreElements()){
+				if(clr==null){
+					chi_clr=ExbpNode.node_color[color_i];
+					color_i++;
+					if(color_i>9){
+						color_i=0;
+					}
+				}
+			Node chi_node = chi_en.nextElement();
+			//#kozaki 2008/08/13�ｽ@RH�ｽﾍ会ｿｽ�ｽﾊ概�ｽO�ｽﾆゑｿｽ�ｽﾄ趣ｿｽ�ｽo�ｽ�ｽ�ｽﾈゑｿｽ
+//			if(chi_node instanceof NodeRH){
+//				continue;
+//			}
+			ExbpNode chi = new ExbpNode(chi_node,chi_clr);
+			this.addChild(chi);			
+		}
+		
+//		#kozaki�ｽ@2008/08/09�ｽ@IS-A�ｽﾌ擾ｿｽ�ｽ�ｽ(is-a�ｽﾆ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽe�ｽﾍ，�ｽﾙぼ難ｿｽ�ｽ�ｽ)
+		chi_en = node.extendedChilds.elements();
+		while(chi_en.hasMoreElements()){
+			Node chi_node = chi_en.nextElement();
+			if(clr==null){
+				chi_clr=ExbpNode.node_color[color_i];
+				color_i++;
+				if(color_i>9){
+					color_i=0;
+				}
+			}
+			ExbpNode chi = new ExbpNode(chi_node,chi_clr);
+			this.addChild(chi);			
+		}
+	}
+*/
+	//#kozaki 07/08/30
+	//�ｽ�ｽ�ｽﾊ概�ｽO�ｽ�ｽ�ｽﾜめゑｿｽExbpNode�ｽ�ｽ�ｽ�ｬ�ｽi�ｽF�ｽw�ｽ閧�ｽ�ｽj�ｽ@Leaf�ｽﾌ擾ｿｽ�ｽ�ｽ
+/*	ExbpNode(Node node,Color clr,String key){
+		this(node.getLabel(),0,0,0,0);
+//		#kozaki 2008/08/12
+		if(clr==null){
+			this.color=this.CENTER_COLOR;
+		}else{
+			this.color=clr;
+		}
+		
+//		#kozaki 2008/03/29�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ
+		if(mapfactory.isSubLung){
+			this.setLabel(node.getSubLabel());
+			System.out.println("�ｽT�ｽu�ｽ�ｽ�ｽ�ｽ:"+node.getLabel()+"-->"+node.getSubLabel());
+		}
+
+//		#kozaki 2008/08/13
+		if(node instanceof NodeRH){
+			//this.setHozoNode(((NodeRH)node).getCCNode());
+			this.setLabel(this.getLabel()+"[RH]");
+			this.setHozoNode(node);//#kozaki 2008/08/13
+//			Node cc_node = ((NodeRH)node).getCCNode();
+//			if(cc_node!=null){
+//				node =cc_node;
+//				}
+		}
+		else{
+			this.setHozoNode(node);
+		}
+
+		this.key = key;		
+		//this.color=clr;		
+	}
+*/
+	
+	//#kozaki 07/08/22 
+	//�ｽ@slot_role�ｽﾅ指�ｽ閧ｵ�ｽ�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽﾌク�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽ�ｽ
+/*	//�ｽ@�ｽ�ｽ�ｽﾊの概�ｽOExbpNode�ｽ�ｽ�ｽ�ｬ�ｽ�ｽ�ｽ�ｽi�ｽF�ｽw�ｽ閧�ｽ�ｽj
+	ExbpNode(Node node,Color clr,BrowsingPanel bp,String[] slot_role, String link_key){
+		this(node.getLabel(),0,0,0,0);
+		//#kozaki 2008/03/22�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ
+		if(mapfactory.isSubLung){
+			this.setLabel(node.getSubLabel());
+		}
+		
+		if(node instanceof NodeRH){
+			//System.out.println("this is NodeRH :" + this.getLabel());
+			//this.setHozoNode(((NodeRH)node).getCCNode());
+			this.setLabel(this.getLabel()+"[RH]");
+			this.setHozoNode(node);//#kozaki 2008/08/13
+//			Node cc_node = ((NodeRH)node).getCCNode();
+//			if(cc_node!=null){
+//				node =cc_node;
+//				}
+		}
+		else{
+			this.setHozoNode(node);
+		}
+		
+		//#kozaki 2008/08/12
+		if(clr==null){
+			this.color=this.CENTER_COLOR;
+		}else{
+			this.color=clr;
+		}
+		
+		//#kozaki�ｽ@2008/03/29�ｽ@�ｽo�ｽO�ｽ�ｽ�ｽ
+		if(this.getHozoNode()==null){
+			return;
+		}
+		
+		//slot_role�ｽﾅの選�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+		String key_role = slot_role[0];
+		System.out.println("KEY="+key_role);
+        //this.key = key_role;
+		//this.key = link_key;�ｽ@//#kozaki 2007/09/07
+		
+		
+		
+		
+		//
+		// �ｽ@�ｽ�ｽ�ｽﾊ概�ｽO�ｽﾌ抵ｿｽ�ｽo
+		// is-a
+		
+		if(key_role.equals(IS_A)){
+			//#kozaki 2008/02/09�ｽ@�ｽ�ｽ�ｽﾌ段�ｽﾌコ�ｽ}�ｽ�ｽ�ｽh�ｽｶ撰ｿｽ
+			String[] slot_role2 = slot_role;
+			if(slot_role.length>1){
+				slot_role2 = new String[slot_role.length-1];
+				for(int i=0;i<slot_role2.length;i++){
+					slot_role2[i] = slot_role[i+1];
+				}
+			}
+			
+			Enumeration<Node> chi_en = node.childs.elements();
+			while(chi_en.hasMoreElements()){
+				Node chi_node = chi_en.nextElement();
+//				#kozaki 2008/08/13�ｽ@RH�ｽﾍ会ｿｽ�ｽﾊ概�ｽO�ｽﾆゑｿｽ�ｽﾄ趣ｿｽ�ｽo�ｽ�ｽ�ｽﾈゑｿｽ
+//				if(chi_node instanceof NodeRH){
+//					continue;
+//				}
+				ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,"ISA");
+				chi.key="is-a";
+				this.addChild(chi);	
+			}
+			//#kozaki 2008/02/09�ｽ@Isa�ｽﾌ�ｿｽ�ｽ[�ｽt�ｽﾅ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+			//#kozaki 2008/08/12�ｽ@Isa�ｽﾌ�ｿｽ�ｽ[�ｽt�ｽ�ｽ�ｽ�ｽ�ｽﾍ兄�ｽ墲ｪ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾉ鯉ｿｽ�ｽ�ｽ
+			if(node.parent!=null){//#kozaki 2008/08/13�ｽ@�ｽo�ｽO�ｽ�ｽ�ｽ
+					if(node.childs.size()==0 && node.parent.childs.size()>1){
+						ExbpNode chi = new ExbpNode(node,clr,bp,slot_role2,"ISA");
+						chi.setDummyNode(true);
+						this.addChild(chi);	
+					}
+			}
+			
+			//#kozaki�ｽ@2008/08/09�ｽ@IS-A�ｽﾌ擾ｿｽ�ｽ�ｽ(is-a�ｽﾆ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽe�ｽﾍ，�ｽﾙぼ難ｿｽ�ｽ�ｽ)
+			chi_en = node.extendedChilds.elements();
+			while(chi_en.hasMoreElements()){
+				Node chi_node = chi_en.nextElement();
+				ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,"IS-A");
+				chi.key="IS-A";
+				this.addChild(chi);	
+			}			
+		}
+		
+		//
+		// ?�ｽ�ｽﾊ概�ｽO�ｽﾌ抵ｿｽ�ｽo
+		// #hirota 08/08/18 
+		else if(key_role.equals("super")){
+			
+			System.out.println(" - super :");
+			
+//			#kozaki 2008/02/09�ｽ@�ｽ�ｽ�ｽﾌ段�ｽﾌコ�ｽ}�ｽ�ｽ�ｽh�ｽｶ撰ｿｽ
+			String[] slot_role2 = slot_role;
+			if(slot_role.length>1){
+				slot_role2 = new String[slot_role.length-1];
+				for(int i=0;i<slot_role2.length;i++){
+					slot_role2[i] = slot_role[i+1];
+				}
+			}
+						
+			// node�ｽ�ｽNode�ｽﾌとゑｿｽ
+			if( !(node instanceof NodeRH)){ //#kozaki 2007/12/29�ｽ@RH�ｽﾌ費ｿｽ�ｽ�ｽ�ｽ�ｽC�ｽ�ｽ
+
+				//System.out.println("	This is Node"  );
+				if( node.parent != null){
+					ExbpNode chi = new ExbpNode(node.parent,clr,bp,slot_role2,"super");
+					chi.key="super";
+					this.addChild(chi);	
+				}
+		
+			}
+			// node�ｽ�ｽRH�ｽﾌとゑｿｽ�ｽARH�ｽ�ｽ�ｽ�ｽ�ｽo�ｽ�ｽ
+			else{
+				
+				//  System.out.println("	This is RH");
+				//	System.out.println(" 		parent:: "  + ((Slot)node).getWholeNodeRoot().parent.getLabel() );
+				if( ((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent != null){
+					if( ((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName() ) != null){
+						//System.out.println(" 		OK " + ((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName() ).getRHname() );
+						
+						
+							((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName() 
+									).setLabel(((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName() ).getRHname());
+							ExbpNode chi = new ExbpNode(((NodeRH)node).getRoleSlot().getWholeNodeRoot().parent.findSlotByRole( ((NodeRH)node).getRoleSlot().getRoleName() ).getNodeRH() ,clr,bp,slot_role2,"super");
+							chi.key="super";
+							this.addChild(chi);	
+						
+					}
+				}
+				
+			}
+		}
+		
+		else if(key_role.startsWith(":")){ //#kozaki 07/08/30 key_role�ｽﾅ指�ｽ閧ｵ�ｽ�ｽ�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾂ概�ｽO�ｽ�ｽ�ｽ�ｽ�ｽﾊに追会ｿｽ
+			//Vector nodes = bp.findReferringNodes(this.getLabel());
+			//#kozaki 2008/03/22�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ
+			Vector nodes = bp.findReferringNodes(this.getHozoNode().getLabel());
+
+			//#kozaki 2008/08/17�ｽ@�ｽX�ｽ�ｽ�ｽb�ｽg�ｽﾅ関連�ｽ�ｽ�ｽ�ｽ�ｽT�ｽO�ｽ�ｽH�ｽ髀茨ｿｽ�ｽ�ｽﾖの包ｿｽ�ｽ�ｽ
+			if(key_role.indexOf("!")>0){
+				makeSlotRelatedExbpNode(this,node,clr,bp,slot_role);
+				key_role=key_role.replaceFirst("!", "");
+				slot_role[0]=slot_role[0].replaceFirst("!", "");
+			}
+			//#kozaki 2008/08/09�ｽ@�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽg�ｽ�ｽ�ｽQ�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽX�ｽL�ｽb�ｽv�ｽ�ｽ�ｽ髀茨ｿｽ�ｽ
+			while(nodes.contains(node)){
+				nodes.removeElement(node);
+			}
+			
+			String[] super_node = key_role.split(":");
+			ExbpNode[] parent_node = new ExbpNode[super_node.length];
+			parent_node[0]=this;
+			
+			
+			//�ｽﾖ連�ｽT�ｽO�ｽﾌ階�ｽw�ｽ�ｬ�ｽ�ｽ�ｽ�ｽ
+			for(int i=1; i<super_node.length;i++){
+				if(super_node[i].indexOf("=")>0){//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌ階�ｽw�ｽ�ｽ�ｽQ�ｽi�ｽﾉ包ｿｽ�ｽ�ｽ�ｽ髀茨ｿｽ�ｽ�ｽi�ｽR�ｽi�ｽﾚ行�ｽﾍ，�ｽ�ｽ�ｽ�ｽﾌ課托ｿｽﾉ…�ｽj
+					System.out.println("super_node[i]==>"+super_node[i]);
+					String str[] = super_node[i].split("=");
+					if(str.length!=2){
+						System.out.println("ERROR�ｽF=�ｽﾌ使�ｽp�ｽ@�ｽ�ｽ�ｽﾔ茨ｿｽ�ｽ�ｽﾄゑｿｽ�ｽﾜゑｿｽ�ｽD�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽu�ｽT�ｽO�ｽ�ｽ=n�ｽi�ｽK�ｽw�ｽ�ｽ�ｽj�ｽv�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ");
+						return;
+					}
+					String super_name=str[0];
+					int layer_num = Integer.parseInt(str[1]);
+					
+					//parent_node[i-1].key=super_name;
+					
+					
+					int max=1;
+					Node par_node;// = bp.editorPanel.findNode(super_name);
+					//#kozaki 2008/05/08�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ�ｽﾌ修�ｽ�ｽ
+					if(mapfactory.isSubLung){
+						par_node = bp.editorPanel.findNodeWithSubLang(super_name);
+					}			
+					else{
+						par_node = bp.editorPanel.findNode(super_name);
+					}
+					int min= par_node.getParents().size();
+					
+					
+					//�ｽﾇ会ｿｽ�ｽ�ｽ�ｽ骭ｳ�ｽ�ｽNode�ｽﾌ�ｿｽ�ｽX�ｽg�ｽ�ｽ�ｽ謫ｾ
+					Vector<Node> addlists = new Vector<Node>();
+					Enumeration chi_en = nodes.elements();
+					while(chi_en.hasMoreElements()){
+						Node chi_node = (Node)chi_en.nextElement();
+						//#kozaki 2008/08/10�ｽ@�ｽ�ｽ�ｽ闖茨ｿｽ�ｽ�ｽ�ｽchi_node.equals(par_node)�ｽ�ｽ�ｽﾇ会ｿｽ
+						if(chi_node.isSubclassOf(par_node)||chi_node.equals(par_node)){
+							//parent_node[i-1].children.addElement(new ExbpNode(chi_node,clr,""));
+                            addlists.add(chi_node);
+							int m = chi_node.getParents().size();
+							if(m>max){
+								max = m;
+							}
+						}
+					}
+					
+					//�ｽﾇ会ｿｽ�ｽ�ｽ�ｽ驛奇ｿｽX�ｽg�ｽ�ｽ�ｽ�ｽﾊゑｿｽ�ｽ迴�ｿｽﾉ包ｿｽ�ｽﾗ替ゑｿｽ
+					Vector<Node> add_nodes = new Vector<Node>();
+					for(int k=min; k<=max; k++){
+						Enumeration<Node> add_en = addlists.elements();
+						while(add_en.hasMoreElements()){
+							Node add_node = add_en.nextElement();
+							if(add_node.getParents().size()==k){
+								add_nodes.add(add_node);
+							}
+						}
+					}
+					
+					//parent_node[i-1].key=super_node[i];
+					int n=1;
+					int org_c=add_nodes.size()/layer_num;
+					int c=org_c;
+					System.out.println("c="+c);
+					
+					Enumeration<Node> chi_en2 = add_nodes.elements();
+					while(chi_en2.hasMoreElements()){
+						Node chi_node = chi_en2.nextElement();
+						System.out.println("n="+n);
+						ExbpNode chi = null;
+						Vector slots = chi_node.findSlotsByClassConst(this.getHozoNode().getLabel());
+						
+						
+						if(n>org_c*(layer_num-1)){ //�ｽﾅ終�ｽi�ｽﾌ擾ｿｽ�ｽ�ｽ
+							System.out.println("�ｽﾅ終�ｽi�ｽﾌ擾ｿｽ�ｽ�ｽ");
+							if(i==super_node.length-1){//":"�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ鯉ｿｽﾌ趣ｿｽ�ｽﾍ，�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾉ移ゑｿｽ
+								System.out.println(":�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ鯉ｿｽﾌ趣ｿｽ�ｽﾍ，�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾉ移ゑｿｽ");
+								//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽslot_role�ｽﾌ配�ｽ�ｽ�ｽ�ｽ�ｽﾂゑｿｽ�ｽ轤ｷ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+								if(slot_role.length>1){
+									String[] slot_role2 = new String[slot_role.length-1];
+									for(int l=0;l<slot_role2.length;l++){
+										slot_role2[l] = slot_role[l+1];
+									}
+									chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_name);
+									parent_node[i-1].addChild(chi);	
+									//#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+//									Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+//									if(slot!=null){
+//										chi.key=slot.getRoleName();
+//										chi.opt=key_role; //#kozaki 2007/10/28
+//									}
+								}
+								else{
+									//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+                                    chi = new ExbpNode(chi_node,clr,super_name);
+                                    parent_node[i-1].addChild(chi);
+//                                  #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+//									Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+//									if(slot!=null){
+//										chi.key=slot.getRoleName();
+//										chi.opt=key_role; //#kozaki 2007/10/28
+//									}
+								}
+							}
+							else{
+								//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+                                chi = new ExbpNode(chi_node,clr,super_name);
+                                parent_node[i-1].addChild(chi);
+								addlists.add(chi_node);
+//								#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+//								Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+//								if(slot!=null){
+//									chi.key=slot.getRoleName();
+//									chi.opt=key_role; //#kozaki 2007/10/28
+//								}
+							}
+						} 
+						else if(n!=c){
+							//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+                            chi = new ExbpNode(chi_node,clr,super_name);
+                            parent_node[i-1].addChild(chi);
+//                          #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+//							Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+//							if(slot!=null){
+//								chi.key=slot.getRoleName();
+//								chi.opt=key_role; //#kozaki 2007/10/28
+//							}
+						}
+						else if(n==c){
+							//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+                            chi = new ExbpNode(chi_node,clr,super_name);
+                            parent_node[i-1].addChild(chi);
+//                          #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+//							Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+//							if(slot!=null){
+//								chi.key=slot.getRoleName();
+//								chi.opt=key_role; //#kozaki 2007/10/28
+//							}
+							parent_node[i-1] = parent_node[i-1].children.firstElement();
+							c=c+c;
+						}
+						n++;
+						
+						if(slots.size()>0 && chi!=null ){
+	                        Slot slot = (Slot)slots.firstElement();
+								if(slot!=null){
+									chi.key=slot.getRoleName();
+									if(mapfactry.isSubLung){
+										chi.key=slot.getSubRole();
+									}
+								}
+							}
+						if(chi!=null){
+							chi.opt=key_role;
+						}
+					}
+					
+					nodes.removeAll(addlists);
+				
+				}
+				else{//�ｽi�ｽ�ｽ1�ｽi�ｽﾌ場合�ｽﾌ関連�ｽT�ｽO�ｽ�ｽ�ｽ�ｽ	
+					parent_node[i-1].key=super_node[i];
+					parent_node[i-1].opt=key_role; //#kozaki 2007/10/28
+					Enumeration chi_en = nodes.elements();
+					Vector<Node> addlists = new Vector<Node>();
+					 //#kozaki 2008/03/29�ｽ@�ｽo�ｽO�ｽ�ｽ�ｽ�ｽﾌゑｿｽ�ｽ�ｽwhile�ｽ�ｽ�ｽ�ｽ�ｽC�ｽ�ｽ
+					while(chi_en.hasMoreElements()){
+						Node chi_node = (Node)chi_en.nextElement();
+						ExbpNode chi = null;
+						Vector slots = chi_node.findSlotsByClassConst(this.getHozoNode().getLabel());
+						
+						//#kozaki 2008/05/08�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ
+						Node par_node;
+						if(mapfactory.isSubLung){
+							par_node=bp.editorPanel.findNodeWithSubLang(super_node[i]);	
+						}
+						else{
+							par_node=bp.editorPanel.findNode(super_node[i]);
+						}
+						
+						//#kozaki 2008/08/10�ｽ@�ｽ�ｽ�ｽ闖茨ｿｽ�ｽ�ｽ�ｽchi_node.equals(par_node)�ｽ�ｽ�ｽﾇ会ｿｽ
+						if(chi_node.isSubclassOf(par_node)||chi_node.equals(par_node)){
+							if(i==super_node.length-1){//":"�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ鯉ｿｽﾌ趣ｿｽ�ｽﾍ，�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾉ移ゑｿｽ
+								//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽslot_role�ｽﾌ配�ｽ�ｽ�ｽ�ｽ�ｽﾂゑｿｽ�ｽ轤ｷ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+								if(slot_role.length>1){
+									String[] slot_role2 = new String[slot_role.length-1];
+									for(int l=0;l<slot_role2.length;l++){
+										slot_role2[l] = slot_role[l+1];
+									}
+									chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
+									parent_node[i-1].addChild(chi);
+								}
+								else{
+									chi = new ExbpNode(chi_node,clr,super_node[i]);
+                                    parent_node[i-1].addChild(chi);
+								}
+							}
+							else{
+								chi = new ExbpNode(chi_node,clr,super_node[i]);
+								parent_node[i-1].addChild(chi);
+								addlists.add(chi_node);
+							}
+						}
+						
+						if(slots.size()>0 && chi!=null ){
+                            Slot slot = (Slot)slots.firstElement();
+								if(slot!=null){
+									chi.key=slot.getRoleName();
+									if(mapfactory.isSubLung){
+										chi.key=slot.getSubRole();
+									}
+								}
+							}
+						if(chi!=null){
+							chi.opt=key_role;
+						}
+					}
+	
+					nodes.removeAll(addlists);
+				}
+				
+				if(i<super_node.length-1){
+					if(parent_node[i-1].children.size()>0){
+						parent_node[i]=parent_node[i-1].children.firstElement();
+					}
+					else{ 
+						parent_node[i]=new ExbpNode("---",0,0,0,0);
+						parent_node[i-1].addChild(parent_node[i]);
+					}
+				}
+			}
+		
+		}
+		
+//		 #hirota 08/08/19 �ｽR�ｽ}�ｽ�ｽ�ｽh�ｽ�ｽ�ｽ�ｽ
+		
+		//
+		// :
+		// (old)�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽw�ｽ閧�ｽ�ｽ@�ｽ{�ｽ@�ｽ�ｽ�ｽﾊ概�ｽO�ｽw�ｽ閧�ｽ�ｽ
+		//
+		
+		//	#kozaki, hirota 
+		else if(key_role.startsWith(";")){ 
+			
+			//Vector nodes// = bp.findReferringNodes(this.getHozoNode().getLabel());
+			
+			Vector nodes;
+//			#kozaki 2008/08/11�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ�ｽﾌ趣ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌ�ｿｽ�ｽx�ｽ�ｽ�ｽﾅ鯉ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾎよい
+//			if(mapfactory.isSubLung){
+//				nodes = bp.findReferringNodesWithSub(this.getHozoNode().getSubLabel() );
+//			}
+//			else{
+				nodes = bp.findReferringNodes(this.getHozoNode().getLabel());
+				//nodes = bp.findReferringNodesNonrec(this.getHozoNode().getLabel());
+//			}
+			
+//			#kozaki 2008/08/09�ｽ@�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽg�ｽ�ｽ�ｽQ�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽX�ｽL�ｽb�ｽv�ｽ�ｽ�ｽ髀茨ｿｽ�ｽ
+			while(nodes.contains(node)){
+				nodes.removeElement(node);
+			}
+			
+			String[] super_node = key_role.split(";"); 
+			ExbpNode[] parent_node = new ExbpNode[super_node.length];
+			parent_node[0]=this;
+			
+			// #hirota 11/29
+			// node�ｽ�ｽCC�ｽﾉなゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽS�ｽﾌ概�ｽO�ｽ�ｽ�ｽw�ｽ�ｽﾈゑｿｽ�ｽﾅ全�ｽﾄ趣ｿｽ�ｽo�ｽ�ｽ
+			if( super_node[1].equals("any")){
+			                             
+				
+				
+				// test print
+				Enumeration nodes_en = nodes.elements();
+				while( nodes_en.hasMoreElements()){
+					
+					
+					Node node_temp = (Node)nodes_en.nextElement();
+										
+						
+					//Node�ｽo�ｽ^�ｽ�ｽ�ｽ�ｽ
+					if(slot_role.length>1){
+						String[] slot_role2 = new String[slot_role.length-1];
+						for(int i=0;i<slot_role2.length;i++){
+							slot_role2[i] = slot_role[i+1];
+						}
+						
+						if(mapfactory.isSubLung){
+							ExbpNode chi = new ExbpNode(node_temp,clr,bp,slot_role2, ((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName() );
+							this.addChild(chi);	
+							chi.key=((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getSubRole();
+							chi.opt=key_role;
+							
+						}else{
+							ExbpNode chi = new ExbpNode(node_temp,clr,bp,slot_role2, ((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName() );
+							this.addChild(chi);	
+							chi.key=((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName();
+							chi.opt=key_role;
+						}
+									
+						
+
+					}
+					else{
+						
+						if(mapfactory.isSubLung){
+							ExbpNode chi = new ExbpNode(node_temp,clr, ((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName());
+							this.addChild(chi);	
+							chi.key=((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getSubRole();
+							chi.opt=key_role;
+						}
+						else{
+							ExbpNode chi = new ExbpNode(node_temp,clr, ((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName());
+							this.addChild(chi);	
+							chi.key=((Slot)node_temp.findSlotsByClassConst(node.getLabel()).firstElement()).getRoleName();
+							chi.opt=key_role;
+						}
+						
+						
+
+					}
+					
+					
+					
+				}
+					
+				
+			}
+			// role�ｽ�ｽ�ｽ�ｽ�ｽw�ｽ�ｽ
+			else{
+				
+				System.out.println(" 	any check role :: " + super_node[1]);
+				
+				
+//				�ｽﾖ連�ｽT�ｽO�ｽﾌ階�ｽw�ｽ�ｬ�ｽ�ｽ�ｽ�ｽ 
+				for(int i=1; i<super_node.length;i++){
+					if(super_node[i].indexOf("=")>0){//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌ階�ｽw�ｽ�ｽ�ｽQ�ｽi�ｽﾉ包ｿｽ�ｽ�ｽ�ｽ髀茨ｿｽ�ｽ�ｽi�ｽR�ｽi�ｽﾚ行�ｽﾍ，�ｽ�ｽ�ｽ�ｽﾌ課托ｿｽﾉ…�ｽj
+						System.out.println("super_node[i]==>"+super_node[i]);
+						String str[] = super_node[i].split("=");
+						if(str.length!=2){
+							System.out.println("ERROR�ｽF=�ｽﾌ使�ｽp�ｽ@�ｽ�ｽ�ｽﾔ茨ｿｽ�ｽ�ｽﾄゑｿｽ�ｽﾜゑｿｽ�ｽD�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽu�ｽT�ｽO�ｽ�ｽ=n�ｽi�ｽK�ｽw�ｽ�ｽ�ｽj�ｽv�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ");
+							return;
+						}
+						String super_name=str[0];
+						int layer_num = Integer.parseInt(str[1]);
+						
+						//parent_node[i-1].key=super_name;
+						
+						// #hirota �ｽ�ｽ�ｽ�ｽT�ｽO�ｽﾌ会ｿｽ�ｽﾊ概�ｽO�ｽw�ｽ�ｽﾌとゑｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+						Node par_node;
+						String str2[] = super_name.split(";");
+						boolean sub; //�ｽ�ｽ�ｽﾊ概�ｽO�ｽw�ｽ閧�ｽ�ｽ/�ｽﾈゑｿｽ
+						
+						if(str2.length!=2){
+							System.out.println("�ｽ�ｽ�ｽﾊ概�ｽO�ｽw�ｽ�ｽ@�ｽﾈゑｿｽ");
+							par_node = null;
+							sub=false;
+							
+						}else{
+							System.out.println("�ｽ�ｽ�ｽﾊ概�ｽO�ｽw�ｽ�ｽ@�ｽ�ｽ�ｽ�ｽ");
+							String par_node_name=str2[1];
+							
+							if(mapfactory.isSubLung){
+								par_node = bp.editorPanel.findNodeWithSubLang(super_name);
+							}			
+							else{
+								par_node = bp.editorPanel.findNode(super_name);
+							}
+							sub=true;
+							
+						}
+						super_name=str2[0];
+						int max=1;
+
+												
+						//test
+						if( par_node != null ){
+							System.out.println(" par_node : " + par_node.getLabel() );
+						}
+						
+						int min= 0;
+						
+						
+						//�ｽﾇ会ｿｽ�ｽ�ｽ�ｽ骭ｳ�ｽ�ｽNode�ｽﾌ�ｿｽ�ｽX�ｽg�ｽ�ｽ�ｽ謫ｾ
+						Vector addlists = new Vector();
+						Enumeration chi_en = nodes.elements();
+						while(chi_en.hasMoreElements()){
+							
+							Node chi_node = (Node)chi_en.nextElement();
+							
+//							if( chi_node instanceof Node){
+//								System.out.println("node : "  );
+//							}else if( chi_node instanceof Slot ){
+//								System.out.println("slot : " ) ;
+//							}
+							
+							
+							System.out.println(" chi_node : " + chi_node.getLabel() );
+							
+							//if(chi_node.isSubclassOf(par_node)){
+							if(mapfactory.isSubLung){
+								if(chi_node.findSlotByRoleWithSubLang(super_name) != null){
+									
+									// #hirota �ｽ�ｽ�ｽﾊ概�ｽO�ｽ�ｽ�ｽ�ｽadd
+									if(sub){
+										if(chi_node.isSubclassOf(par_node)){
+										    addlists.add(chi_node);
+											int m = chi_node.getParents().size();
+											if(m>max){
+												max = m;
+											}
+										}
+									}
+									else{
+										addlists.add(chi_node);
+										int m = chi_node.getParents().size();
+										if(m>max){
+											max = m;
+										}
+									}
+		
+								}
+							}
+							else{
+								if(chi_node.findSlotByRole(super_name) != null){
+									
+									// #hirota �ｽ�ｽ�ｽﾊ概�ｽO�ｽ�ｽ�ｽ�ｽadd
+									if(sub){
+										if(chi_node.isSubclassOf(par_node)){
+										    addlists.add(chi_node);
+											int m = chi_node.getParents().size();
+											if(m>max){
+												max = m;
+											}
+										}
+									}
+									else{
+										addlists.add(chi_node);
+										int m = chi_node.getParents().size();
+										if(m>max){
+											max = m;
+										}
+									}
+		
+								}
+							}
+							
+						}
+						
+						//�ｽﾇ会ｿｽ�ｽ�ｽ�ｽ驛奇ｿｽX�ｽg�ｽ�ｽ�ｽ�ｽﾊゑｿｽ�ｽ迴�ｿｽﾉ包ｿｽ�ｽﾗ替ゑｿｽ
+						Vector add_nodes = new Vector();
+						for(int k=min; k<=max; k++){
+							Enumeration add_en = addlists.elements();
+							while(add_en.hasMoreElements()){
+								Node add_node = (Node)add_en.nextElement();
+								if(add_node.getParents().size()==k){
+									add_nodes.add(add_node);
+								}
+							}
+						}
+						
+						//parent_node[i-1].key=super_node[i];
+						int n=1;
+						int org_c=add_nodes.size()/layer_num;
+						int c=org_c;
+						System.out.println("c="+c);
+						
+						Enumeration chi_en2 = add_nodes.elements();
+						while(chi_en2.hasMoreElements()){
+							Node chi_node = (Node)chi_en2.nextElement();
+							System.out.println("n="+n);
+							
+							if(n>org_c*(layer_num-1)){ //�ｽﾅ終�ｽi�ｽﾌ擾ｿｽ�ｽ�ｽ
+								System.out.println("�ｽﾅ終�ｽi�ｽﾌ擾ｿｽ�ｽ�ｽ");
+								if(i==super_node.length-1){//":"�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ鯉ｿｽﾌ趣ｿｽ�ｽﾍ，�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾉ移ゑｿｽ
+									System.out.println(":�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ鯉ｿｽﾌ趣ｿｽ�ｽﾍ，�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾉ移ゑｿｽ");
+									//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽslot_role�ｽﾌ配�ｽ�ｽ�ｽ�ｽ�ｽﾂゑｿｽ�ｽ轤ｷ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+									if(slot_role.length>1){
+										String[] slot_role2 = new String[slot_role.length-1];
+										for(int l=0;l<slot_role2.length;l++){
+											slot_role2[l] = slot_role[l+1];
+										}
+										ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_name);
+										parent_node[i-1].addChild(chi);	
+										
+										//#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+										if(mapfactory.isSubLung){
+											Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
+											if(slot!=null){
+												chi.key=slot.getRoleName();
+												if(mapfactory.isSubLung){
+													chi.key=slot.getSubRole();
+												}
+												chi.opt=key_role; //#kozaki 2007/10/28
+											}
+										}
+										else{
+											Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+											if(slot!=null){
+												chi.key=slot.getRoleName();
+												if(mapfactory.isSubLung){
+													chi.key=slot.getSubRole();
+												}
+												chi.opt=key_role; //#kozaki 2007/10/28
+											}
+										}
+										
+									}
+									else{
+										//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+	                                    ExbpNode chi = new ExbpNode(chi_node,clr,super_name);
+	                                    parent_node[i-1].addChild(chi);
+	                                    // #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+	                                    if(mapfactory.isSubLung){
+	                                    	Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
+											if(slot!=null){
+												chi.key=slot.getRoleName();
+												if(mapfactory.isSubLung){
+													chi.key=slot.getSubRole();
+												}
+												chi.opt=key_role; //#kozaki 2007/10/28
+											}
+	                                    }
+	                                    else{
+	                                    	Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+											if(slot!=null){
+												chi.key=slot.getRoleName();
+												if(mapfactory.isSubLung){
+													chi.key=slot.getSubRole();
+												}
+												chi.opt=key_role; //#kozaki 2007/10/28
+											}
+	                                    }
+										
+									}
+								}
+								else{
+									//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+	                                ExbpNode chi = new ExbpNode(chi_node,clr,super_name);
+	                                parent_node[i-1].addChild(chi);
+									addlists.add(chi_node);
+//									#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+									if(mapfactory.isSubLung){
+										Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
+										if(slot!=null){
+											chi.key=slot.getRoleName();
+											if(mapfactory.isSubLung){
+												chi.key=slot.getSubRole();
+											}
+											chi.opt=key_role; //#kozaki 2007/10/28
+										}
+									}
+									else{
+										Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+										if(slot!=null){
+											chi.key=slot.getRoleName();
+											if(mapfactory.isSubLung){
+												chi.key=slot.getSubRole();
+											}
+											chi.opt=key_role; //#kozaki 2007/10/28
+										}
+									}
+									
+								}
+							} 
+							else if(n!=c){
+								//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+	                            ExbpNode chi = new ExbpNode(chi_node,clr,super_name);
+	                            parent_node[i-1].addChild(chi);
+//	                          #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+	                            if(mapfactory.isSubLung){
+	                            	
+	                            	Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
+									if(slot!=null){
+										chi.key=slot.getRoleName();
+										if(mapfactory.isSubLung){
+											chi.key=slot.getSubRole();
+										}
+										chi.opt=key_role; //#kozaki 2007/10/28
+									}
+	                            }
+	                            else{
+	                            	Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+									if(slot!=null){
+										chi.key=slot.getRoleName();
+										if(mapfactory.isSubLung){
+											chi.key=slot.getSubRole();
+										}
+										chi.opt=key_role; //#kozaki 2007/10/28
+									}
+	                            }
+								
+							}
+							else if(n==c){
+								//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+	                            ExbpNode chi = new ExbpNode(chi_node,clr,super_name);
+	                            parent_node[i-1].addChild(chi);
+//	                          #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+	                            
+	                            if(mapfactory.isSubLung){
+	                            	Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
+									if(slot!=null){
+										chi.key=slot.getRoleName();
+										if(mapfactory.isSubLung){
+											chi.key=slot.getSubRole();
+										}
+										chi.opt=key_role; //#kozaki 2007/10/28
+									}
+	                            }
+	                            else{
+	                            	Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+									if(slot!=null){
+										chi.key=slot.getRoleName();
+										if(mapfactory.isSubLung){
+											chi.key=slot.getSubRole();
+										}
+										chi.opt=key_role; //#kozaki 2007/10/28
+									}
+	                            }
+								
+								parent_node[i-1] = parent_node[i-1].children.firstElement();
+								c=c+c;
+							}
+							n++;
+						}
+						
+						nodes.removeAll(addlists);
+					
+					}
+					
+					//	�ｽi�ｽ�ｽ1�ｽi�ｽﾌ場合�ｽﾌ関連�ｽT�ｽO�ｽ�ｽ�ｽ�ｽ	
+					else{
+						
+						System.out.println(" 		�ｽi�ｽ�ｽ1�ｽi�ｽﾌ場合�ｽﾌ関連�ｽT�ｽO : "+ super_node[1]);
+						
+						// #hirota �ｽ�ｽ�ｽ�ｽT�ｽO�ｽﾌ会ｿｽ�ｽﾊ概�ｽO�ｽw�ｽ�ｽﾌとゑｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+						Node par_node;
+						String str2[] = super_node[1].split(";");
+						boolean sub; //�ｽ�ｽ�ｽﾊ概�ｽO�ｽw�ｽ閧�ｽ�ｽ/�ｽﾈゑｿｽ
+						
+						if(str2.length!=2){
+							System.out.println("		�ｽP�ｽi�ｽ@�ｽ�ｽ�ｽﾊ概�ｽO�ｽw�ｽ�ｽ@�ｽﾈゑｿｽ");
+							
+							par_node = null;
+							sub=false;
+							
+						}else{
+							System.out.println("		�ｽP�ｽi�ｽ@�ｽ�ｽ�ｽﾊ概�ｽO�ｽw�ｽ�ｽ@�ｽ�ｽ�ｽ�ｽ");
+							String par_node_name=str2[1];
+							
+							if(mapfactory.isSubLung){
+								par_node = bp.editorPanel.findNodeWithSubLang(par_node_name);
+							}			
+							else{
+								par_node = bp.editorPanel.findNode(par_node_name);
+							}
+							sub=true;
+							
+						}
+						
+						parent_node[i-1].key=str2[0];
+						parent_node[i-1].opt=key_role; //#kozaki 2007/10/28
+						Enumeration chi_en = nodes.elements();
+						Vector addlists = new Vector();
+						
+						while(chi_en.hasMoreElements()){
+							
+							Node chi_node = (Node)chi_en.nextElement();
+							
+//							if( chi_node instanceof Node){
+//								System.out.println("node : "  );
+//							}else if( chi_node instanceof Slot ){
+//								System.out.println("slot : " ) ;
+//								
+//							}
+							
+							
+							
+							// �ｽ�ｽ�ｽﾊ概�ｽO�ｽ�ｽ�ｽ�ｽ@�ｽﾌとゑｿｽ
+							if(sub){
+								
+								if(mapfactory.isSubLung){
+									
+									if(chi_node.findSlotByRoleWithSubLang( str2[0]) != null && (chi_node.isSubclassOf(par_node))){
+										 
+										 System.out.println("�ｽ�ｽ�ｽﾊ概�ｽO�ｽ�ｽ�ｽ�ｽ@�ｽ�ｽi�ｽ@chi_node : " + chi_node.getLabel() );
+										 
+										if(i==super_node.length-1){//":"�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ鯉ｿｽﾌ趣ｿｽ�ｽﾍ，�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾉ移ゑｿｽ
+											//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽslot_role�ｽﾌ配�ｽ�ｽ�ｽ�ｽ�ｽﾂゑｿｽ�ｽ轤ｷ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+											if(slot_role.length>1){
+												String[] slot_role2 = new String[slot_role.length-1];
+												for(int l=0;l<slot_role2.length;l++){
+													slot_role2[l] = slot_role[l+1];
+												}
+												
+												//ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
+												ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2, super_node[i]);
+												parent_node[i-1].addChild(chi);
+//												
+												
+												//#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+												Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+												if(slot!=null){
+													chi.key=slot.getRoleName();
+													if(mapfactory.isSubLung){
+														chi.key=slot.getSubRole();
+													}
+													chi.opt=key_role; //#kozaki 2007/10/28
+												}
+											}
+											else{
+												//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+			                                    ExbpNode chi = new ExbpNode(chi_node,clr, super_node[i]);
+			                                    parent_node[i-1].addChild(chi);
+			                                    
+			                                    
+//			                                  #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+												Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+												if(slot!=null){
+													chi.key=slot.getRoleName();
+													if(mapfactory.isSubLung){
+														chi.key=slot.getSubRole();
+													}
+													chi.opt=key_role; //#kozaki 2007/10/28
+												}
+												
+											}
+										}
+										else{
+											ExbpNode chi = new ExbpNode(chi_node,clr,super_node[i] );
+											parent_node[i-1].addChild(chi);
+											
+//											#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+											Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+											if(slot!=null){
+												chi.key=slot.getRoleName();
+												if(mapfactory.isSubLung){
+													chi.key=slot.getSubRole();
+												}
+												chi.opt=key_role; //#kozaki 2007/10/28
+											}
+											addlists.add(chi_node);
+											
+										}
+									
+									}
+								// Sub�ｽ�ｽ�ｽ�ｽﾈゑｿｽ	
+								}else{
+									
+									if(chi_node.findSlotByRole( str2[0]) != null && (chi_node.isSubclassOf(par_node))){
+										 
+										 System.out.println("�ｽ�ｽ�ｽﾊ概�ｽO�ｽ�ｽ�ｽ�ｽ@�ｽ�ｽi�ｽ@chi_node : " + chi_node.getLabel() );
+										 
+										if(i==super_node.length-1){//":"�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ鯉ｿｽﾌ趣ｿｽ�ｽﾍ，�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾉ移ゑｿｽ
+											//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽslot_role�ｽﾌ配�ｽ�ｽ�ｽ�ｽ�ｽﾂゑｿｽ�ｽ轤ｷ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+											if(slot_role.length>1){
+												String[] slot_role2 = new String[slot_role.length-1];
+												for(int l=0;l<slot_role2.length;l++){
+													slot_role2[l] = slot_role[l+1];
+												}
+												
+												//ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
+												ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2, super_node[i]);
+												parent_node[i-1].addChild(chi);
+//												
+												
+												//#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+												Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+												if(slot!=null){
+													chi.key=slot.getRoleName();
+													if(mapfactory.isSubLung){
+														chi.key=slot.getSubRole();
+													}
+													chi.opt=key_role; //#kozaki 2007/10/28
+												}
+											}
+											else{
+												//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+			                                    ExbpNode chi = new ExbpNode(chi_node,clr, super_node[i]);
+			                                    parent_node[i-1].addChild(chi);
+			                                    
+			                                    
+//			                                  #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+												Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+												if(slot!=null){
+													chi.key=slot.getRoleName();
+													if(mapfactory.isSubLung){
+														chi.key=slot.getSubRole();
+													}
+													chi.opt=key_role; //#kozaki 2007/10/28
+												}
+												
+											}
+										}
+										else{
+											ExbpNode chi = new ExbpNode(chi_node,clr,super_node[i] );
+											parent_node[i-1].addChild(chi);
+											
+//											#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+											Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+											if(slot!=null){
+												chi.key=slot.getRoleName();
+												if(mapfactory.isSubLung){
+													chi.key=slot.getSubRole();
+												}
+												chi.opt=key_role; //#kozaki 2007/10/28
+											}
+											addlists.add(chi_node);
+											
+										}
+									
+									}
+									
+								}
+								
+								
+							}
+							
+							
+							// �ｽ�ｽ�ｽﾊ概�ｽO�ｽﾈゑｿｽ�ｽ@�ｽﾌとゑｿｽ
+							else{
+										
+								// sub
+								if(mapfactory.isSubLung){
+									 if(chi_node.findSlotByRoleWithSubLang( super_node[i]) != null){
+										 
+										 System.out.println(" chi_node : " + chi_node.getLabel() );
+										 
+										if(i==super_node.length-1){//":"�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ鯉ｿｽﾌ趣ｿｽ�ｽﾍ，�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾉ移ゑｿｽ
+											//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽslot_role�ｽﾌ配�ｽ�ｽ�ｽ�ｽ�ｽﾂゑｿｽ�ｽ轤ｷ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+											if(slot_role.length>1){
+												String[] slot_role2 = new String[slot_role.length-1];
+												for(int l=0;l<slot_role2.length;l++){
+													slot_role2[l] = slot_role[l+1];
+												}
+												
+												//ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
+												ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2, super_node[i]);
+												parent_node[i-1].addChild(chi);
+//												
+												
+												//#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+												Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
+												if(slot!=null){
+													chi.key=slot.getRoleName();
+													if(mapfactory.isSubLung){
+														chi.key=slot.getSubRole();
+													}
+													chi.opt=key_role; //#kozaki 2007/10/28
+												}
+											}
+											else{
+												//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+			                                    ExbpNode chi = new ExbpNode(chi_node,clr, super_node[i]);
+			                                    parent_node[i-1].addChild(chi);
+			                                    
+			                                    
+//			                                  #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+												Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel() ).firstElement();
+												if(slot!=null){
+													chi.key=slot.getRoleName();
+													if(mapfactory.isSubLung){
+														chi.key=slot.getSubRole();
+													}
+													chi.opt=key_role; //#kozaki 2007/10/28
+												}
+												
+											}
+										}
+										else{
+											ExbpNode chi = new ExbpNode(chi_node,clr,super_node[i] );
+											parent_node[i-1].addChild(chi);
+											
+//											#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+											Slot slot = (Slot)chi_node.findSlotsByClassConstWithSub(this.getLabel()).firstElement();
+											if(slot!=null){
+												chi.key=slot.getRoleName();
+												if(mapfactory.isSubLung){
+													chi.key=slot.getSubRole();
+												}
+												chi.opt=key_role; //#kozaki 2007/10/28
+											}
+											addlists.add(chi_node);
+											
+										}
+									
+									 }
+									
+								}
+								// �ｽm�ｽ[�ｽ}�ｽ�ｽ
+								else{
+									 if(chi_node.findSlotByRole( super_node[i]) != null){
+										 
+										 System.out.println(" chi_node : " + chi_node.getLabel() );
+										 
+										if(i==super_node.length-1){//":"�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ鯉ｿｽﾌ趣ｿｽ�ｽﾍ，�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽﾉ移ゑｿｽ
+											//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽslot_role�ｽﾌ配�ｽ�ｽ�ｽ�ｽ�ｽﾂゑｿｽ�ｽ轤ｷ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+											if(slot_role.length>1){
+												String[] slot_role2 = new String[slot_role.length-1];
+												for(int l=0;l<slot_role2.length;l++){
+													slot_role2[l] = slot_role[l+1];
+												}
+												
+												//ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_node[i]);
+												ExbpNode chi = new ExbpNode(chi_node,clr,bp,slot_role2, super_node[i]);
+												parent_node[i-1].addChild(chi);
+//												
+												
+												//#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+												if( !(chi_node.findSlotsByClassConst(this.getLabel())).isEmpty()){
+													Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+													if(slot!=null){
+														chi.key=slot.getRoleName();
+														if(mapfactory.isSubLung){
+															chi.key=slot.getSubRole();
+														}
+														chi.opt=key_role; //#kozaki 2007/10/28
+													}
+												}else{
+													System.out.println(" 		:"+this.getLabel());
+												}
+											}
+											else{
+												//ExbpNode chi = new ExbpNode(chi_node,clr,"");
+			                                    ExbpNode chi = new ExbpNode(chi_node,clr, super_node[i]);
+			                                    parent_node[i-1].addChild(chi);
+			                                    
+			                                    
+//			                                  #kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+			                                    if( !(chi_node.findSlotsByClassConst(this.getLabel())).isEmpty()){
+													Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+													if(slot!=null){
+														chi.key=slot.getRoleName();
+														if(mapfactory.isSubLung){
+															chi.key=slot.getSubRole();
+														}
+														chi.opt=key_role; //#kozaki 2007/10/28
+													}
+			                                    }
+											}
+										}
+										else{
+											ExbpNode chi = new ExbpNode(chi_node,clr,super_node[i] );
+											parent_node[i-1].addChild(chi);
+											
+//											#kozaki 2007/09/07�ｽ@�ｽF�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾅ配�ｽu�ｽ�ｽ�ｽ�ｽ�ｽﾛゑｿｽKEY�ｽ�ｽSlot�ｽﾌ�ｿｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽ�ｽ
+											Slot slot = (Slot)chi_node.findSlotsByClassConst(this.getLabel()).firstElement();
+											if(slot!=null){
+												chi.key=slot.getRoleName();
+												if(mapfactory.isSubLung){
+													chi.key=slot.getSubRole();
+												}
+												chi.opt=key_role; //#kozaki 2007/10/28
+											}
+											addlists.add(chi_node);
+											
+										}
+									
+									 }
+								}
+								
+							
+							}
+						}
+		
+						nodes.removeAll(addlists);
+					}
+					
+					if(i<super_node.length-1){
+						if(parent_node[i-1].children.size()>0){
+							parent_node[i]=parent_node[i-1].children.firstElement();
+						}
+						else{ 
+							parent_node[i]=new ExbpNode("---",0,0,0,0);
+							parent_node[i-1].addChild(parent_node[i]);
+						}
+					}
+				}
+			}
+		}
+			
+		//
+		// ? depend-on 
+		//
+		
+		// �ｽ@�ｽ�ｽ
+		//	 #hirota 11/26  �ｽ�ｽ�ｽﾝの趣ｿｽ�ｽ_�ｽ�ｽNode�ｽﾌとゑｿｽ�ｽANode�ｽﾌス�ｽ�ｽ�ｽb�ｽg�ｽ�ｽRH�ｽ�ｽ\�ｽ�ｽ
+		else if(key_role.equals("any-h")){
+			
+			System.out.println(" * any-RH :: " );
+			
+			// #hirota new
+			//
+//			//�ｽp�ｽ�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽﾎ象にゑｿｽ�ｽ�ｽ
+//			if(inh){
+//				
+//				System.out.println("							: inheri yes");
+//				
+//				// �ｽ�ｽ�ｽﾌ概�ｽO�ｽﾅ抵ｿｽ`�ｽ�ｽ�ｽ黷ｽ�ｽA�ｽ�ｽ�ｽ皷ｻ�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽﾈゑｿｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽ`�ｽF�ｽb�ｽN
+//				Enumeration test = node.getAllSlots().elements();
+//				while(test.hasMoreElements()){
+//					
+//					Slot slot = (Slot)test.nextElement();
+//					
+//					
+//					// �ｽﾇ会ｿｽ
+//					// 11/26 RH�ｽ窒ﾌ趣ｿｽ�ｽA�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽg�ｽ�ｽ
+//					String rh_label ="";
+//					if( slot.getRHname().equals("") ){
+//						rh_label= ((Slot)slot).getRoleName();
+//					}
+//					else{
+//						rh_label= ((Slot)slot).getRHname() ;
+//					}
+//					
+//						
+//					// Node�ｽ@�ｽo�ｽ^�ｽ�ｽ�ｽ�ｽ
+//					if(slot_role.length>1){
+//						String[] slot_role2 = new String[slot_role.length-1];
+//						for(int i=0;i<slot_role2.length;i++){
+//							slot_role2[i] = slot_role[i+1];
+//						}
+//						ExbpNode chi = new ExbpNode( slot.getNodeRH(),clr,bp,slot_role2,"ISA");
+//						//chi.setLabel(rh_label);
+//						this.addChild(chi);	
+//						chi.key=rh_label;
+//						chi.opt=key_role; //#kozaki 2007/10/28
+//
+//					}
+//					else{
+//						ExbpNode chi = new ExbpNode( slot.getNodeRH(),clr,"IS_A");
+//						//chi.setLabel(rh_label);
+//						this.addChild(chi);	
+//						chi.key=rh_label;
+//						chi.opt=key_role; //#kozaki 2007/10/28
+//
+//					}
+//			
+//					
+//					/*�ｽ@#kozaki�ｽ@2007/12/29�ｽ@�ｽG�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽo�ｽ驍ｩ�ｽ�ｽR�ｽ�ｽ�ｽ�ｽ�ｽg�ｽA�ｽE�ｽg
+//					//  #hirota 12/28 -inh�ｽ�ｽ�ｽ�ｽﾌとゑｿｽ�ｽA�ｽq�ｽg�ｽﾌク�ｽ�ｽ�ｽX�ｽ�ｽ�ｽｪゑｿｽ�ｽﾂス�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽ\�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+//					
+//					Enumeration RH_CC_Slot = slot.getCCNode().getSlots().elements();
+//					while( RH_CC_Slot.hasMoreElements()){
+//						
+//						Slot temp = (Slot)RH_CC_Slot.nextElement();
+//						
+//						System.out.println(" 	Node : " + temp.getClassConst() + " :" + temp.getRoleName() );
+//						
+//						// Node�ｽ@�ｽo�ｽ^�ｽ�ｽ�ｽ�ｽ
+//						if(slot_role.length>1){
+//							String[] slot_role2 = new String[slot_role.length-1];
+//							for(int i=0;i<slot_role2.length;i++){
+//								slot_role2[i] = slot_role[i+1];
+//							}
+//							ExbpNode chi = new ExbpNode( temp.getCCNode() ,clr,bp,slot_role2,slot.getRoleName());
+//							this.addChild(chi);	
+//						}
+//						else{
+//							ExbpNode chi = new ExbpNode( temp.getCCNode() ,clr,slot.getRoleName());
+//							this.addChild(chi);	
+//						}
+//						
+//					}
+//		             
+//					
+//				}
+//
+//			}
+//			
+//			//
+//			// �ｽp�ｽ�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽﾎ象にゑｿｽ�ｽﾈゑｿｽ
+//			else{
+				
+				Enumeration slot_en = node.slots.elements();						
+				
+				while( slot_en.hasMoreElements() ){
+					Slot slot = (Slot)slot_en.nextElement();
+					
+					
+					// �ｽﾇ会ｿｽ
+					// 11/26 RH�ｽ窒ﾌ趣ｿｽ�ｽA�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽg�ｽ�ｽ
+					String rh_label ="";
+					if( slot.getRHname().equals("") ){
+						rh_label= ((Slot)slot).getRoleName();
+						
+					}
+					else{
+						rh_label= ((Slot)slot).getRHname() ;
+					}
+					//System.out.println( rh_label);
+		
+					// Node�ｽ@�ｽo�ｽ^�ｽ�ｽ�ｽ�ｽ
+					if(slot_role.length>1){
+						String[] slot_role2 = new String[slot_role.length-1];
+						for(int i=0;i<slot_role2.length;i++){
+							slot_role2[i] = slot_role[i+1];
+						}
+						ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
+						//chi.setLabel(rh_label+"[RH]");
+						this.addChild(chi);	
+						chi.key=rh_label;
+						chi.opt=key_role; //#kozaki 2007/10/28
+
+					}
+					else{
+						ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr, rh_label+"[RH]");
+						//chi.setLabel(rh_label+"[RH]");
+						this.addChild(chi);	
+						chi.key=rh_label;
+						chi.opt=key_role; //#kozaki 2007/10/28
+
+					}
+
+					
+				}
+			
+			
+		}
+		
+		//
+		// ?�ｽ@depend on �ｽ@�ｽ�ｽ
+		// # hirota �ｽR�ｽ�ｽ�ｽe�ｽL�ｽX�ｽg�ｽ�ｽ�ｽ�ｽ�ｽo�ｽ�ｽ
+		else if(key_role.equals("++s")){
+			
+			System.out.println("	++s ::");
+			
+			if( node instanceof NodeRH){
+				//node = ((NodeRH)node).getRoleSlot();
+			
+				if(slot_role.length>1){
+					String[] slot_role2 = new String[slot_role.length-1];
+					for(int i=0;i<slot_role2.length;i++){
+						slot_role2[i] = slot_role[i+1];
+					}
+					ExbpNode chi = new ExbpNode(((NodeRH)node).getRoleSlot().getWholeNodeRoot(),clr,bp,slot_role2,"---");
+					this.addChild(chi);	
+					chi.key="Context";
+					chi.opt=key_role; //#kozaki 2007/10/28
+	
+				}
+				else{
+					ExbpNode chi = new ExbpNode(((NodeRH)node).getRoleSlot().getWholeNodeRoot(),clr,"---");
+					this.addChild(chi);	
+					chi.key="Context";
+					chi.opt=key_role; //#kozaki 2007/10/28
+	
+				}
+			}
+			
+			
+		}
+		
+		
+		//
+		//  playable �ｽﾖ係
+		//
+		
+		//
+		// ?�ｽ@�ｽ�ｽ
+		//
+		
+		//  #hirota 08/6/24
+		// all
+		else if(key_role.equals("++P")){
+			
+			if( ! (node instanceof NodeRH)){
+				
+				System.out.println(" ++P(" + node.getLabel() + ")" + " ::  ");
+				
+				Vector nodes;
+//				#kozaki 2008/08/11�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ�ｽﾌ趣ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌ�ｿｽ�ｽx�ｽ�ｽ�ｽﾅ鯉ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾎよい
+//				if(mapfactory.isSubLung){
+//					nodes = bp.findReferringNodesWithSub(this.getHozoNode().getSubLabel() );
+//				}
+//				else{
+					nodes = bp.findReferringNodes(this.getHozoNode().getLabel());
+//				}
+				
+				Enumeration nodes_en = nodes.elements();
+				while(nodes_en.hasMoreElements()){
+					
+					Node temp = (Node)nodes_en.nextElement();
+					//System.out.println("	test ::  " + temp.getLabel());
+					Vector List = temp.findSlotsByClassConst(node.getLabel());
+					Enumeration List_en = List.elements();
+					while(List_en.hasMoreElements()){
+						
+						Slot slot = (Slot)List_en.nextElement();
+						//System.out.println("	test_slot ::  " + slot.getRoleName());
+						
+						
+						
+						//	Node�ｽo�ｽ^�ｽ�ｽ�ｽ�ｽ
+						if(slot_role.length>1){
+							String[] slot_role2 = new String[slot_role.length-1];
+							for(int i=0;i<slot_role2.length;i++){
+								slot_role2[i] = slot_role[i+1];
+							}
+							
+							if(mapfactory.isSubLung){
+								ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, ((Slot)slot).getRoleName());
+								this.addChild(chi);	
+								//chi.setLabel(rh_label);
+								chi.key="[playable]"+((Slot)slot).getRoleName(); 
+								chi.opt=key_role;
+								
+							}else{
+								ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, ((Slot)slot).getRoleName());
+								this.addChild(chi);	
+								//chi.setLabel(rh_label);
+								chi.key="[playable]"+((Slot)slot).getRoleName(); 
+								chi.opt=key_role;
+							}
+										
+							
+	
+						}
+						else{
+							
+							if(mapfactory.isSubLung){
+								ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,((Slot)slot).getRoleName());
+								this.addChild(chi);	
+								//chi.setLabel(rh_label);
+								chi.key="[playable]"+((Slot)slot).getRoleName(); 
+								chi.opt=key_role;  
+							}
+							else{
+								ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr, ((Slot)slot).getRoleName());
+								//chi.setLabel(rh_label);
+								this.addChild(chi);	
+								chi.key="[playable]"+((Slot)slot).getRoleName();
+								chi.opt=key_role; 
+							}
+							
+							
+						
+						}
+					}
+				}
+			}
+		}
+		// label �ｽw�ｽ�ｽ
+		else if(key_role.startsWith("++p")){
+			
+			String str[] = key_role.split(":");
+			String Label = str[1];
+			System.out.println(" ++p:Label  ::  " + Label);
+			
+			if( ! (node instanceof NodeRH)){
+				
+				System.out.println(" ++P(" + node.getLabel() + ")" + " ::  ");
+				
+				Vector nodes;
+//				
+//				if(mapfactory.isSubLung){
+//					nodes = bp.findReferringNodesWithSub(this.getHozoNode().getSubLabel() );
+//				}
+//				else{
+					nodes = bp.findReferringNodes(this.getHozoNode().getLabel());
+//				}
+				
+				Enumeration nodes_en = nodes.elements();
+				while(nodes_en.hasMoreElements()){
+					
+					Node temp = (Node)nodes_en.nextElement();
+					//System.out.println("	test ::  " + temp.getLabel());
+					Vector List = temp.findSlotsByClassConst(node.getLabel());
+					Enumeration List_en = List.elements();
+					while(List_en.hasMoreElements()){
+						
+						Slot slot = (Slot)List_en.nextElement();
+						//System.out.println("	test_slot ::  " + slot.getRoleName());
+						
+						if(slot.getRoleName().equals(Label)){
+							
+							
+							//	Node�ｽo�ｽ^�ｽ�ｽ�ｽ�ｽ
+							if(slot_role.length>1){
+								String[] slot_role2 = new String[slot_role.length-1];
+								for(int i=0;i<slot_role2.length;i++){
+									slot_role2[i] = slot_role[i+1];
+								}
+								
+								if(mapfactory.isSubLung){
+									ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, "---");
+									this.addChild(chi);	
+									//chi.setLabel(rh_label);
+									chi.key="[playable]"+slot.getRoleName(); 
+									chi.opt=key_role;
+									
+								}else{
+									ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,bp,slot_role2, "---");
+									this.addChild(chi);	
+									//chi.setLabel(rh_label);
+									chi.key="[playable]"+slot.getRoleName(); 
+									chi.opt=key_role;
+								}
+											
+								
+		
+							}
+							else{
+								
+								if(mapfactory.isSubLung){
+									ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr,"---");
+									this.addChild(chi);	
+									//chi.setLabel(rh_label);
+									chi.key="[playable]"+slot.getRoleName(); 
+									chi.opt=key_role;  
+								}
+								else{
+									ExbpNode chi = new ExbpNode( slot.getNodeRH() ,clr, "---");
+									//chi.setLabel(rh_label);
+									this.addChild(chi);	
+									chi.key="[playable]"+slot.getRoleName();
+									chi.opt=key_role; 
+								}
+								
+								
+							
+							}
+						}
+					}
+				}
+			}
+			
+			
+		}
+		
+		
+		// ?�ｽ@playable �ｽ�ｽ
+		// �ｽv�ｽ�ｽ�ｽC�ｽ�ｽ�ｽ[�ｽﾌ趣ｿｽ�ｽo�ｽ�ｽ
+		else if(key_role.equals("++c")){
+
+			System.out.println(" ++c(player) ::  ");
+			
+			if( node instanceof NodeRH){
+								
+				// Node�ｽ@�ｽo�ｽ^�ｽ�ｽ�ｽ�ｽ
+
+				if(slot_role.length>1){
+					String[] slot_role2 = new String[slot_role.length-1];
+					for(int i=0;i<slot_role2.length;i++){
+						slot_role2[i] = slot_role[i+1];
+					}
+					ExbpNode chi = new ExbpNode( ((NodeRH)node).getCCNode() ,clr,bp,slot_role2,"---");
+					this.addChild(chi);	
+					chi.key="player";
+					chi.opt=key_role; //#kozaki 2007/10/28
+				}
+				else{
+					ExbpNode chi = new ExbpNode(((NodeRH)node).getCCNode() ,clr,"---");
+					this.addChild(chi);
+					chi.key="player";
+					chi.opt=key_role; //#kozaki 2007/10/28
+				}
+	
+			}
+			else if( node instanceof Node){
+				System.out.println(" Node instance");	
+			}
+			
+		
+			
+		}
+		
+		//
+		// ?�ｽﾖ係�ｽT�ｽO�ｽﾌ趣ｿｽ�ｽo�ｽ�ｽ
+		//
+		
+		// ++r:Lable 
+		else if(key_role.startsWith("++r:")){
+			
+			String str[] = key_role.split(":");
+			String Label = str[1];
+			System.out.println(" ++r:Label  ::  " + Label);
+			
+			if( node instanceof NodeRH){
+								
+				if( ((NodeRH)node).getRoleSlot().getLinkConst( ((NodeRH)node).getRoleSlot()) != null){
+					
+					Vector rel = ((NodeRH)node).getRoleSlot().getLinkConst( ((NodeRH)node).getRoleSlot());
+					
+					Enumeration rel_en = rel.elements();
+					while(rel_en.hasMoreElements()){
+						
+						Link link = (Link)rel_en.nextElement();
+						System.out.println(" Link :: " + link.getLabel() );
+													
+						Enumeration en = link.Arcs.elements();
+						while(en.hasMoreElements()){
+							
+							Arc temp = (Arc)en.nextElement();
+							System.out.println(" 	Link_print :: " + temp.getLabel() + " node ::" + ((Slot)temp.getNode()).getRoleName()  );
+							
+							if(temp.getLabel().equals(Label) && !node.equals(temp.getNode())){
+								Node node_temp = (Node)temp.getNode();
+								//System.out.println(" 			Link_OK :: " + ((Slot)node_temp).getRoleName() );
+								key = "[ "+ link.getLabel()+ " ]" + " �ｽ�ｽ "+temp.getLabel();
+								
+	//								 �ｽﾇ会ｿｽ
+								// 11/26 RH�ｽ窒ﾌ趣ｿｽ�ｽA�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽg�ｽ�ｽ
+								String rh_label ="";
+								if( ((Slot)node_temp).getRHname().equals("") ){
+									rh_label= ((Slot)node_temp).getRoleName();
+								}
+								else{
+									rh_label= ((Slot)node_temp).getRHname();
+								}
+								
+	//								Node�ｽo�ｽ^�ｽ�ｽ�ｽ�ｽ
+								if(slot_role.length>1){
+									String[] slot_role2 = new String[slot_role.length-1];
+									for(int i=0;i<slot_role2.length;i++){
+										slot_role2[i] = slot_role[i+1];
+									}
+									
+									if(mapfactory.isSubLung){
+										ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
+										//chi.setLabel(rh_label);
+										this.addChild(chi);	
+										chi.key=key;
+										chi.opt=link.getLabel(); 
+										
+									}else{
+										ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
+										//chi.setLabel(rh_label);
+										this.addChild(chi);	
+										chi.key=key;
+										chi.opt=link.getLabel(); 
+									}
+												
+									
+	
+								}
+								else{
+									
+									if(mapfactory.isSubLung){
+										ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr, rh_label+"[RH]");
+										//chi.setLabel(rh_label);
+										this.addChild(chi);	
+										chi.key=key;
+										chi.opt=link.getLabel(); 
+									}
+									else{
+										ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr, rh_label+"[RH]");
+										//chi.setLabel(rh_label);
+										this.addChild(chi);	
+										chi.key=key;
+										chi.opt=link.getLabel(); 
+									}
+									
+									
+								
+								}
+							}
+						
+						}
+						
+						
+						
+					}
+					
+				
+				}
+				
+				
+				
+			}
+
+		}
+		
+		// ++R  �ｽS�ｽ�ｽ�ｽ�ｽ�ｽo�ｽ�ｽ
+		else if(key_role.equals("++R")){
+			
+			System.out.println(" ++R  ::  " );
+			
+			if( node instanceof NodeRH){
+				
+				if( ((NodeRH)node).getRoleSlot().getLinkConst( ((NodeRH)node).getRoleSlot()) != null){
+					
+					Vector rel = ((NodeRH)node).getRoleSlot().getLinkConst( ((NodeRH)node).getRoleSlot());
+					
+					Enumeration rel_en = rel.elements();
+					while(rel_en.hasMoreElements()){
+						
+						Link link = (Link)rel_en.nextElement();
+						System.out.println(" Link_OK :: " + link.getLabel() );
+						
+						Enumeration en = link.Arcs.elements();
+						while(en.hasMoreElements()){
+							
+							Arc temp = (Arc)en.nextElement();
+							System.out.println(" 	Link_print :: " + temp.getLabel() + " node ::" + ((Slot)temp.getNode()).getRoleName()  );
+							
+							Node node_temp = (Node)temp.getNode();
+							//System.out.println(" 			Link_OK :: " + ((Slot)node_temp).getRoleName() );
+							key = "[ "+ link.getLabel()+ " ]" + " �ｽ�ｽ "+temp.getLabel();
+							
+//							 �ｽﾇ会ｿｽ
+							// 11/26 RH�ｽ窒ﾌ趣ｿｽ�ｽA�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽg�ｽ�ｽ
+							String rh_label ="";
+							if( ((Slot)node_temp).getRHname().equals("") ){
+								rh_label= ((Slot)node_temp).getRoleName();
+							}
+							else{
+								rh_label= ((Slot)node_temp).getRHname();
+							}
+							
+//							Node�ｽo�ｽ^�ｽ�ｽ�ｽ�ｽ
+							if(slot_role.length>1){
+								String[] slot_role2 = new String[slot_role.length-1];
+								for(int i=0;i<slot_role2.length;i++){
+									slot_role2[i] = slot_role[i+1];
+								}
+								
+								if(mapfactory.isSubLung){
+									ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
+									//chi.setLabel(rh_label);
+									this.addChild(chi);	
+									chi.key=key;
+									chi.opt=link.getLabel(); 
+									
+								}else{
+									ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr,bp,slot_role2, rh_label+"[RH]");
+									//chi.setLabel(rh_label);
+									this.addChild(chi);	
+									chi.key=key;
+									chi.opt=link.getLabel(); 
+								}
+											
+								
+
+							}
+							else{
+								
+								if(mapfactory.isSubLung){
+									ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr, rh_label+"[RH]");
+									//chi.setLabel(rh_label);
+									this.addChild(chi);	
+									chi.key=key;
+									chi.opt=link.getLabel(); 
+								}
+								else{
+									ExbpNode chi = new ExbpNode( ((Slot)node_temp).getNodeRH() ,clr, rh_label+"[RH]");
+									//chi.setLabel(rh_label);
+									this.addChild(chi);	
+									chi.key=key;
+									chi.opt=link.getLabel(); 
+								}
+								
+								
+							
+							}
+						
+						}
+												
+					}
+					
+				
+				}
+				
+				
+				
+			}
+			
+		}
+		
+		// #hirota 08/09/03 �ｽZ�ｽ�ｽT�ｽO�ｽﾌ趣ｿｽ�ｽo�ｽ�ｽ(super+isa)
+		else if(key_role.startsWith("super_isa")){
+			
+			
+			
+		}
+		
+		//		�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽ�ｽH�ｽ髀茨ｿｽ�ｽ�ｽ@#kozaki�ｽ@2008/08/12�ｽX�ｽV
+		// #hirota 08/08/019 only RH add
+		else if(key_role.startsWith("_")){
+			
+			key_role = key_role.substring(1);
+			
+			
+//			�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽ�ｽH�ｽ髀茨ｿｽ�ｽ�ｽ@#kozaki�ｽ@2008/08/12�ｽX�ｽV
+			Vector match_data = new Vector();
+			Vector match_slots = new Vector();
+			Vector match_cc_nodes = new Vector();
+			Vector match_keys = new Vector();
+			
+			Enumeration slot_en;
+			
+			if(key_role.startsWith("*") ){
+				//#kozaki 2008/08/17�ｽ@�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽ�ｽany�ｽ{�ｽﾎ象ゑｿｽRH�ｽﾌ趣ｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+				if(key_role.equals("*any") && node instanceof NodeRH){
+					NodeRH rh_node =(NodeRH)node;
+					Vector rh_slots;
+					rh_slots = rh_node.getAllSlotsWithSubSlots();
+					rh_slots.addAll(rh_node.getRoleSlot().whole_node.getAllSlotsWithSubSlots());
+					slot_en = rh_slots.elements();
+				}
+				else {
+					slot_en = node.getAllSlotsWithSubSlots().elements();
+				}
+				key_role=key_role.substring(1);
+				
+//				System.out.println("*�ｽﾌ擾ｿｽ�ｽ�ｽ"+this.getLabel());
+//				//#kozaki 2008/08/16�ｽ@IS-A�ｽﾅ会ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾍ，�ｽ�ｽﾊのノ�ｽ[�ｽh�ｽ�ｽ�ｽ辜奇ｿｽ�ｽ�ｽN�ｽ�ｽ�ｽo�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾇ会ｿｽ
+//				//if(this.key.equals(ExbpNode.IS_A)){
+//				if(this.parent!=null){
+//					System.out.println("IS-A�ｽﾅ会ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾍ，�ｽ�ｽﾊのノ�ｽ[�ｽh�ｽ�ｽ�ｽ辜奇ｿｽ�ｽ�ｽN�ｽ�ｽ�ｽo�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ:"+this.getLabel());
+//					if(this.parent!=null){
+//						ExbpNode dummy = new ExbpNode(0,0,0,0);
+//						dummy.setDummyNode(true);
+//						this.parent.addChild(dummy);
+//						
+//						ExbpNode chi = new ExbpNode(node.parent,clr,bp,slot_role,"-");
+//						chi.key=key_role.substring(1);
+//						dummy.addChild(chi);	
+//					}
+//					slot_en = node.slots.elements();
+//					slot_en = node.getSlotsAll().elements();
+//				}
+//				else{				
+//					slot_en = node.getAllSlotsWithSubSlots().elements();
+//					key_role=key_role.substring(1);
+//				}
+			}else{
+				//#kozaki 2008/08/17�ｽ@�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽ�ｽany�ｽ{�ｽﾎ象ゑｿｽRH�ｽﾌ趣ｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+				if(key_role.equals("any") && node instanceof NodeRH){
+					NodeRH rh_node =(NodeRH)node;
+					Vector rh_slots;
+					rh_slots = rh_node.getSlotsAll();
+					rh_slots.addAll(rh_node.getRoleSlot().whole_node.getSlotsAll());	
+					slot_en = rh_slots.elements();
+				}
+				else{
+					//slot_en = node.slots.elements();
+					slot_en = node.getSlotsAll().elements();
+				}
+			}			
+			
+			while(slot_en.hasMoreElements()){
+				Slot slot = (Slot)slot_en.nextElement();
+				//#kozaki�ｽ@2008/02/14�ｽ@�ｽ�ｽﾊス�ｽ�ｽ�ｽb�ｽg�ｽ�ｽH�ｽ�ｽ�ｽﾄ擾ｿｽ�ｽ�ｽ�ｽ�ｽr�ｽ�ｽ�ｽ髀茨ｿｽ�ｽ�ｽ�ｽﾇ会ｿｽ
+				Enumeration par_slots = slot.getParents().elements();
+				boolean isMatch = false;
+				String match_key =key_role;
+				while(par_slots.hasMoreElements()){
+					Slot par_slot = (Slot)par_slots.nextElement();
+					//#kozaki 2008/03/22�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ
+					String role_name = par_slot.getRoleName();
+					if(mapfactory.isSubLung){
+						role_name = par_slot.getSubRole();
+					}
+					//if(key_role.indexOf(role_name)>-1){
+					if(key_role.indexOf(role_name)>-1 || key_role.equals("any")){
+						isMatch = true;
+						if(par_slot.equals(slot)){
+							match_key = role_name;
+						}
+						else{
+							match_key = role_name+"("+slot.getRoleName()+")";
+							if(mapfactory.isSubLung){
+								match_key = role_name+"("+slot.getSubRole()+")";
+							}
+						}
+						break;
+						}
+//					if(key_role.indexOf(par_slot.getRoleName())>-1){
+//						isMatch = true;
+//						if(par_slot.equals(slot)){
+//							match_key = par_slot.getRoleName();
+//						}
+//						else{
+//							match_key = par_slot.getRoleName()+"("+
+//							            slot.getRoleName()+")";
+//						}
+//						break;
+//						}
+					}
+				
+				//#kozaki�ｽ@2008/08/12�ｽ@�ｽ�ｽ�ｽﾌ段�ｽ�ｽExbpNode�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾏ更
+				
+				if(isMatch || key_role.equals("any")){
+					
+					if(slot.isOrClassConst()){
+						List orClassConstList = slot.getClassConstNodeList();
+						for (int i = 0; i < orClassConstList.size(); i++) {
+							Node slot_node = (Node) orClassConstList.get(i);
+							if(slot!=null && slot_node!=null){
+								//#kozaki 2008/08/16�ｽ@CC�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ�ｽX�ｽﾌ趣ｿｽ�ｽﾍ表�ｽ�ｽ�ｽ�ｽ�ｽﾈゑｿｽ
+								//if(!match_cc_nodes.contains(slot_node)){
+								//if(!match_data.contains(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key)){
+								if(!match_data.contains(slot_node.getLabel())){
+									match_data.add(slot_node.getLabel());
+									//match_data.add(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key);
+									match_slots.add(slot);
+									match_cc_nodes.add(slot_node);
+						            match_keys.add(match_key);
+						        }
+								else{//�ｽﾊゑｿｽKey�ｽﾅマ�ｽb�ｽ`�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾉは，match_key�ｽ�ｽ�ｽX�ｽV
+									int index = match_data.indexOf(slot_node.getLabel());
+									//int index = match_cc_nodes.indexOf(slot_node);
+						        	String key = (String)match_keys.elementAt(index);
+						        	if(key.indexOf(match_key)<0){
+						        		key += ","+match_key;
+						        		match_keys.remove(index);
+						        		match_keys.add(index, key);
+						        	}
+						        }		
+							}	              
+			            }
+					}else{
+						Node slot_node = (Node)bp.editorPanel.hzeditor.findClassConstNode(slot.getClassConst());
+						//#kozaki�ｽ@2008/08/12�ｽ@�ｽ�ｽ�ｽT�ｽO�ｽﾎ会ｿｽ
+						if(slot_node==null){
+							if(slot.getClassConst().startsWith("#")){
+								slot_node = (Node)bp.editorPanel.hzeditor.findClassConstNode(slot.getClassConst().substring(1));
+							}
+						}
+						if(slot!=null && slot_node!=null){
+//							#kozaki 2008/08/16�ｽ@CC�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ�ｽX�ｽﾌ趣ｿｽ�ｽﾍ表�ｽ�ｽ�ｽ�ｽ�ｽﾈゑｿｽ
+							//if(!match_cc_nodes.contains(slot_node)){
+							//if(!match_data.contains(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key)){
+							if(!match_data.contains(slot_node.getLabel())){
+								match_data.add(slot_node.getLabel());
+								//match_data.add(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key);
+								match_slots.add(slot);
+								match_cc_nodes.add(slot_node);
+					            match_keys.add(match_key);
+					        }
+							else{//�ｽﾊゑｿｽKey�ｽﾅマ�ｽb�ｽ`�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾉは，match_key�ｽ�ｽ�ｽX�ｽV
+								int index = match_data.indexOf(slot_node.getLabel());
+								//int index = match_cc_nodes.indexOf(slot_node);
+					        	String key = (String)match_keys.elementAt(index);
+					        	if(key.indexOf(match_key)<0){
+					        		key += ","+match_key;
+					        		match_keys.remove(index);
+					        		match_keys.add(index, key);
+					        	}
+					        }		
+						}
+					}
+				}
+			}
+			
+
+			Vector<String> rh_nodes = new Vector<String>();
+			for(int i=0;i<match_slots.size();i++){
+				Slot slot = (Slot)match_slots.elementAt(i);
+            
+	            Node rh_node = null;
+	            // RH�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽCCC�ｽﾂゑｿｽ�ｽ�ｽﾈゑｿｽ
+				if(!slot.getRHname().equals("")){						
+					
+					rh_node = bp.editorPanel.hzeditor.findRH(slot.getRHname());
+					if(rh_node!=null){
+						if(!rh_nodes.contains(slot.getRHname())
+								&& !match_data.contains(slot.getRHname()) ){
+							makeExbpNodeCC(this,	//�ｽe�ｽﾆなゑｿｽExbpNode
+									slot,			//�ｽH�ｽ�ｽﾎ象となゑｿｽX�ｽ�ｽ�ｽb�ｽg
+									rh_node,		//�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾄ参�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽm�ｽ[�ｽh
+									node,			//�ｽH�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽ�ｽ�ｽﾂノ�ｽ[�ｽh
+									key_role,		//�ｽH�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh
+									(String)match_keys.elementAt(i),//�ｽ�ｽv�ｽ�ｽ�ｽ�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽi�ｽ�ｽﾊス�ｽ�ｽ�ｽb�ｽg�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽp�ｽj
+									slot_role,		//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌコ�ｽ}�ｽ�ｽ�ｽh
+									clr,			//�ｽm�ｽ[�ｽh�ｽﾌ色
+									bp	);
+							}
+							rh_nodes.addElement(slot.getRHname());
+						}
+				}
+				// RH�ｽ�ｽﾌとゑｿｽ�ｽCCCnode�ｽ�ｬ
+				else{
+					
+					makeExbpNodeCC(this,	//�ｽe�ｽﾆなゑｿｽExbpNode
+						slot,				//�ｽH�ｽ�ｽﾎ象となゑｿｽX�ｽ�ｽ�ｽb�ｽg
+	            		(Node)match_cc_nodes.elementAt(i),			//�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾄ参�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽm�ｽ[�ｽh
+						node,				//�ｽH�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽ�ｽ�ｽﾂノ�ｽ[�ｽh
+						key_role,		//�ｽH�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh
+						(String)match_keys.elementAt(i),		//�ｽ�ｽv�ｽ�ｽ�ｽ�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽi�ｽ�ｽﾊス�ｽ�ｽ�ｽb�ｽg�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽp�ｽj
+						slot_role,		//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌコ�ｽ}�ｽ�ｽ�ｽh
+						clr,				//�ｽm�ｽ[�ｽh�ｽﾌ色
+						bp	);
+					
+				}
+			}
+			
+		
+			
+		}
+		//		�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽ�ｽH�ｽ髀茨ｿｽ�ｽ�ｽ@#kozaki�ｽ@2008/08/12�ｽX�ｽV
+		//	 #hirota 08/08/19 �ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽﾌみ表�ｽ�ｽ
+		else{
+			
+			Vector match_data = new Vector();
+			Vector match_slots = new Vector();
+			Vector match_cc_nodes = new Vector();
+			Vector match_keys = new Vector();
+			
+			Enumeration slot_en;
+			
+			if(key_role.startsWith("*") ){
+				//#kozaki 2008/08/17�ｽ@�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽ�ｽany�ｽ{�ｽﾎ象ゑｿｽRH�ｽﾌ趣ｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+				if(key_role.equals("*any") && node instanceof NodeRH){
+					NodeRH rh_node =(NodeRH)node;
+					Vector rh_slots;
+					rh_slots = rh_node.getAllSlotsWithSubSlots();
+					rh_slots.addAll(rh_node.getRoleSlot().whole_node.getAllSlotsWithSubSlots());
+					slot_en = rh_slots.elements();
+				}
+				else {
+					slot_en = node.getAllSlotsWithSubSlots().elements();
+				}
+				key_role=key_role.substring(1);
+				
+//				System.out.println("*�ｽﾌ擾ｿｽ�ｽ�ｽ"+this.getLabel());
+//				//#kozaki 2008/08/16�ｽ@IS-A�ｽﾅ会ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾍ，�ｽ�ｽﾊのノ�ｽ[�ｽh�ｽ�ｽ�ｽ辜奇ｿｽ�ｽ�ｽN�ｽ�ｽ�ｽo�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾇ会ｿｽ
+//				//if(this.key.equals(ExbpNode.IS_A)){
+//				if(this.parent!=null){
+//					System.out.println("IS-A�ｽﾅ会ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾍ，�ｽ�ｽﾊのノ�ｽ[�ｽh�ｽ�ｽ�ｽ辜奇ｿｽ�ｽ�ｽN�ｽ�ｽ�ｽo�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ:"+this.getLabel());
+//					if(this.parent!=null){
+//						ExbpNode dummy = new ExbpNode(0,0,0,0);
+//						dummy.setDummyNode(true);
+//						this.parent.addChild(dummy);
+//						
+//						ExbpNode chi = new ExbpNode(node.parent,clr,bp,slot_role,"-");
+//						chi.key=key_role.substring(1);
+//						dummy.addChild(chi);	
+//					}
+//					slot_en = node.slots.elements();
+//					slot_en = node.getSlotsAll().elements();
+//				}
+//				else{				
+//					slot_en = node.getAllSlotsWithSubSlots().elements();
+//					key_role=key_role.substring(1);
+//				}
+			}else{
+				//#kozaki 2008/08/17�ｽ@�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽ�ｽany�ｽ{�ｽﾎ象ゑｿｽRH�ｽﾌ趣ｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+				if(key_role.equals("any") && node instanceof NodeRH){
+					NodeRH rh_node =(NodeRH)node;
+					Vector rh_slots;
+					rh_slots = rh_node.getSlotsAll();
+					rh_slots.addAll(rh_node.getRoleSlot().whole_node.getSlotsAll());	
+					slot_en = rh_slots.elements();
+				}
+				else{
+					//slot_en = node.slots.elements();
+					slot_en = node.getSlotsAll().elements();
+				}
+			}			
+			
+			while(slot_en.hasMoreElements()){
+				Slot slot = (Slot)slot_en.nextElement();
+				//#kozaki�ｽ@2008/02/14�ｽ@�ｽ�ｽﾊス�ｽ�ｽ�ｽb�ｽg�ｽ�ｽH�ｽ�ｽ�ｽﾄ擾ｿｽ�ｽ�ｽ�ｽ�ｽr�ｽ�ｽ�ｽ髀茨ｿｽ�ｽ�ｽ�ｽﾇ会ｿｽ
+				Enumeration par_slots = slot.getParents().elements();
+				boolean isMatch = false;
+				String match_key =key_role;
+				while(par_slots.hasMoreElements()){
+					Slot par_slot = (Slot)par_slots.nextElement();
+					//#kozaki 2008/03/22�ｽ@�ｽT�ｽu�ｽ�ｽ�ｽ齒茨ｿｽ�ｽ
+					String role_name = par_slot.getRoleName();
+					if(mapfactory.isSubLung){
+						role_name = par_slot.getSubRole();
+					}
+					// #hirota 
+					//if(key_role.indexOf(role_name)>-1 ){
+					if(key_role.indexOf(role_name)>-1 || key_role.equals("any")){
+						isMatch = true;
+						if(par_slot.equals(slot)){
+							match_key = role_name;
+						}
+						else{
+							match_key = role_name+"("+slot.getRoleName()+")";
+							if(mapfactory.isSubLung){
+								match_key = role_name+"("+slot.getSubRole()+")";
+							}
+						}
+						break;
+					}
+//					if(key_role.indexOf(par_slot.getRoleName())>-1){
+//						isMatch = true;
+//						if(par_slot.equals(slot)){
+//							match_key = par_slot.getRoleName();
+//						}
+//						else{
+//							match_key = par_slot.getRoleName()+"("+
+//							            slot.getRoleName()+")";
+//						}
+//						break;
+//						}
+				}
+				
+				//#kozaki�ｽ@2008/08/12�ｽ@�ｽ�ｽ�ｽﾌ段�ｽ�ｽExbpNode�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾏ更
+				
+				if(isMatch || key_role.equals("any")){
+					
+					if(slot.isOrClassConst()){
+						List orClassConstList = slot.getClassConstNodeList();
+						for (int i = 0; i < orClassConstList.size(); i++) {
+							Node slot_node = (Node) orClassConstList.get(i);
+							if(slot!=null && slot_node!=null){
+								//#kozaki 2008/08/16�ｽ@CC�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ�ｽX�ｽﾌ趣ｿｽ�ｽﾍ表�ｽ�ｽ�ｽ�ｽ�ｽﾈゑｿｽ
+								//if(!match_cc_nodes.contains(slot_node)){
+								//if(!match_data.contains(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key)){
+								if(!match_data.contains(slot_node.getLabel())){
+									match_data.add(slot_node.getLabel());
+									//match_data.add(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key);
+									match_slots.add(slot);
+									match_cc_nodes.add(slot_node);
+						            match_keys.add(match_key);
+						        }
+								else{//�ｽﾊゑｿｽKey�ｽﾅマ�ｽb�ｽ`�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾉは，match_key�ｽ�ｽ�ｽX�ｽV
+									int index = match_data.indexOf(slot_node.getLabel());
+									//int index = match_cc_nodes.indexOf(slot_node);
+						        	String key = (String)match_keys.elementAt(index);
+						        	if(key.indexOf(match_key)<0){
+						        		key += ","+match_key;
+						        		match_keys.remove(index);
+						        		match_keys.add(index, key);
+						        	}
+						        }		
+							}	              
+			            }
+					}else{
+						Node slot_node = (Node)bp.editorPanel.hzeditor.findClassConstNode(slot.getClassConst());
+						//#kozaki�ｽ@2008/08/12�ｽ@�ｽ�ｽ�ｽT�ｽO�ｽﾎ会ｿｽ
+						if(slot_node==null){
+							if(slot.getClassConst().startsWith("#")){
+								slot_node = (Node)bp.editorPanel.hzeditor.findClassConstNode(slot.getClassConst().substring(1));
+							}
+						}
+						if(slot!=null && slot_node!=null){
+//							#kozaki 2008/08/16�ｽ@CC�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽN�ｽ�ｽ�ｽX�ｽﾌ趣ｿｽ�ｽﾍ表�ｽ�ｽ�ｽ�ｽ�ｽﾈゑｿｽ
+							//if(!match_cc_nodes.contains(slot_node)){
+							//if(!match_data.contains(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key)){
+							if(!match_data.contains(slot_node.getLabel())){
+								match_data.add(slot_node.getLabel());
+								//match_data.add(slot.getRoleName()+"<=>"+slot_node.getLabel()+"@"+match_key);
+								match_slots.add(slot);
+								match_cc_nodes.add(slot_node);
+					            match_keys.add(match_key);
+					        }
+							else{//�ｽﾊゑｿｽKey�ｽﾅマ�ｽb�ｽ`�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾉは，match_key�ｽ�ｽ�ｽX�ｽV
+								int index = match_data.indexOf(slot_node.getLabel());
+								//int index = match_cc_nodes.indexOf(slot_node);
+					        	String key = (String)match_keys.elementAt(index);
+					        	if(key.indexOf(match_key)<0){
+					        		key += ","+match_key;
+					        		match_keys.remove(index);
+					        		match_keys.add(index, key);
+					        	}
+					        }		
+						}
+					}
+				}
+			}
+			
+
+			Vector<String> rh_nodes = new Vector<String>();
+			for(int i=0;i<match_slots.size();i++){
+				Slot slot = (Slot)match_slots.elementAt(i);
+				
+				makeExbpNodeCC(this,	//�ｽe�ｽﾆなゑｿｽExbpNode
+					slot,				//�ｽH�ｽ�ｽﾎ象となゑｿｽX�ｽ�ｽ�ｽb�ｽg
+            		(Node)match_cc_nodes.elementAt(i),			//�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾄ参�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽm�ｽ[�ｽh
+					node,				//�ｽH�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽ�ｽ�ｽﾂノ�ｽ[�ｽh
+					key_role,		//�ｽH�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh
+					(String)match_keys.elementAt(i),		//�ｽ�ｽv�ｽ�ｽ�ｽ�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽi�ｽ�ｽﾊス�ｽ�ｽ�ｽb�ｽg�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽp�ｽj
+					slot_role,		//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌコ�ｽ}�ｽ�ｽ�ｽh
+					clr,				//�ｽm�ｽ[�ｽh�ｽﾌ色
+					bp	);
+            
+	            Node rh_node = null;
+	            
+// #hirota RH�ｽ�ｽ�ｽ�ｽ�ｽ@�ｽp�ｽX	            
+//				if(!slot.getRHname().equals("")){
+//					rh_node = bp.editorPanel.hzeditor.findRH(slot.getRHname());
+//					if(rh_node!=null){
+//						if(!rh_nodes.contains(slot.getRHname())
+//								&& !match_data.contains(slot.getRHname()) ){
+//							makeExbpNodeCC(this,	//�ｽe�ｽﾆなゑｿｽExbpNode
+//									slot,			//�ｽH�ｽ�ｽﾎ象となゑｿｽX�ｽ�ｽ�ｽb�ｽg
+//									rh_node,		//�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾄ参�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽm�ｽ[�ｽh
+//									node,			//�ｽH�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽ�ｽ�ｽﾂノ�ｽ[�ｽh
+//									key_role,		//�ｽH�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh
+//									(String)match_keys.elementAt(i),//�ｽ�ｽv�ｽ�ｽ�ｽ�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽi�ｽ�ｽﾊス�ｽ�ｽ�ｽb�ｽg�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽp�ｽj
+//									slot_role,		//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌコ�ｽ}�ｽ�ｽ�ｽh
+//									clr,			//�ｽm�ｽ[�ｽh�ｽﾌ色
+//									bp	);
+//							}
+//							rh_nodes.addElement(slot.getRHname());
+//						}
+//				}
+			}
+			
+		}
+		
+	}
+*/	
+/*	
+//	#kozaki 2008/08/17�ｽ@�ｽX�ｽ�ｽ�ｽb�ｽg�ｽﾅ関連�ｽ�ｽ�ｽ�ｽ�ｽT�ｽO�ｽ�ｽH�ｽ髀茨ｿｽ�ｽ�ｽﾖの包ｿｽ�ｽ�ｽ
+	private void makeSlotRelatedExbpNode(ExbpNode par_exbpnode, Node node,Color clr,BrowsingPanel bp,String[] slot_role){
+		//�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+		String super_name = slot_role[0].substring(2);
+		Node par_node;
+		if(mapfactory.isSubLung){
+			par_node = bp.editorPanel.findNodeWithSubLang(super_name);
+		}			
+		else{
+			par_node = bp.editorPanel.findNode(super_name);
+		}
+		
+		//�ｽ�ｽ�ｽﾌ段�ｽﾌゑｿｽ�ｽﾟのコ�ｽ}�ｽ�ｽ�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ轤ｷ
+		String[] slot_role2 = null; 
+		if(slot_role.length>1){
+			slot_role2 = new String[slot_role.length-1];
+			for(int l=0;l<slot_role2.length;l++){
+				slot_role2[l] = slot_role[l+1];
+			}
+		}
+		
+		//�ｽﾎ象となゑｿｽNode�ｽ�ｽ�ｽ�ｽ�ｽﾂ全�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽT�ｽO�ｽﾌ�ｿｽ�ｽX�ｽg�ｽ�ｽ�ｽ謫ｾ
+		Enumeration en = node.getSlotsAll().elements();
+		Vector<Node> cc_nodes = new Vector<Node>();
+		while(en.hasMoreElements()){
+			Slot slot =(Slot)en.nextElement();
+			if(slot.isOrClassConst()){
+				cc_nodes.addAll(slot.getClassConstNodeList());
+			}
+			else if(slot.getClassConstNode()!=null){
+				cc_nodes.add(slot.getClassConstNode());
+			}
+		}
+		
+		//�ｽﾖ連�ｽ�ｽ�ｽ�ｽNode�ｽﾌ取得
+		Enumeration en2 = cc_nodes.elements();
+		Vector<Node> related_nodes = new Vector<Node>();
+		Vector<String> added_nodes = new Vector<String>();
+		while(en2.hasMoreElements()){
+			Node cc_node = (Node)en2.nextElement();
+			if(cc_node.getLabel().equals("Any")){
+				continue;
+			}
+			related_nodes = bp.findReferringNodes(cc_node.getLabel());
+			
+			Enumeration chi_en = related_nodes.elements();
+			while(chi_en.hasMoreElements()){
+				Node chi_node = (Node)chi_en.nextElement();
+				if(chi_node.isSubclassOf(par_node)||chi_node.equals(par_node)){
+					if(!added_nodes.contains(chi_node.getLabel())){
+						added_nodes.add(chi_node.getLabel());
+						ExbpNode chi;
+						if(slot_role2!=null){
+							chi = new ExbpNode(chi_node,clr,bp,slot_role2,super_name);
+						}
+						else{
+							chi = new ExbpNode(chi_node,clr,super_name);
+						}
+						par_exbpnode.addChild(chi);
+						chi.key="<"+cc_node.getLabel()+">";
+						chi.opt="<"+super_name+">";
+					}
+				}
+			}
+		}
+	}
+	
+	
+	//#kozaki 2008/08/12�ｽ@�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽ�ｽH�ｽ髀茨ｿｽ�ｽ�ｽ�ｽﾆ暦ｿｽ
+	private void makeExbpNodeCC(ExbpNode par_exbpnode,	//�ｽe�ｽﾆなゑｿｽExbpNode
+								Slot slot,				//�ｽH�ｽ�ｽﾎ象となゑｿｽX�ｽ�ｽ�ｽb�ｽg
+								Node slot_node,			//�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾄ参�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽm�ｽ[�ｽh
+								Node node,				//�ｽH�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽ�ｽ�ｽﾂノ�ｽ[�ｽh
+								String key_role,		//�ｽH�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh
+								String match_key,		//�ｽ�ｽv�ｽ�ｽ�ｽ�ｽ�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽi�ｽ�ｽﾊス�ｽ�ｽ�ｽb�ｽg�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽp�ｽj
+								String[] slot_role,		//�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾌコ�ｽ}�ｽ�ｽ�ｽh
+								Color clr,				//�ｽm�ｽ[�ｽh�ｽﾌ色
+								BrowsingPanel bp
+								){
+		
+			//#kozaki 2008/02/09 Any�ｽ�ｽ�ｽN�ｽ�ｽ�ｽX�ｽ�ｽ�ｽ�ｽﾌ趣ｿｽ�ｽﾍス�ｽL�ｽb�ｽv�ｽ�ｽ�ｽ髀茨ｿｽ�ｽ
+			if(slot.getClassConst().startsWith("Any")){
+				slot_node = null;
+			}
+
+			//#kozaki 2008/08/09�ｽ@�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽg�ｽ�ｽ�ｽQ�ｽﾆゑｿｽ�ｽﾄゑｿｽ�ｽ�ｽX�ｽ�ｽ�ｽb�ｽg�ｽ�ｽ�ｽX�ｽL�ｽb�ｽv�ｽ�ｽ�ｽ髀茨ｿｽ�ｽ
+			if(slot_node==node){
+				slot_node = null;
+			}
+			
+			if(slot_node!=null){
+				//System.out.println("�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ[�ｽv::check"+slot_node.getLabel());
+				//slot_role�ｽﾌ配�ｽ�ｽ�ｽ�ｽ�ｽﾂゑｿｽ�ｽ轤ｷ�ｽ�ｽ�ｽ�ｽ
+				if(slot_role.length>1){
+					String[] slot_role2 = new String[slot_role.length-1];
+					for(int i=0;i<slot_role2.length;i++){
+						slot_role2[i] = slot_role[i+1];
+					}
+					
+					//�ｽﾜゑｿｽ�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+					//if(slot_node!=null){
+						ExbpNode chi = new ExbpNode(slot_node,clr,bp,slot_role2,slot.getRoleName());
+						par_exbpnode.addChild(chi);
+						 //match_key = slot.getRoleName();
+						if(mapfactory.isSubLung){
+							match_key = slot.getSubRole();
+						}
+						chi.key=match_key;
+						chi.opt=key_role; 
+					//}
+				}
+				else{
+					ExbpNode chi = new ExbpNode(slot_node,clr,slot.getRoleName());
+					par_exbpnode.addChild(chi);
+					 //match_key = slot.getRoleName();
+					if(mapfactory.isSubLung){
+						match_key = slot.getSubRole();
+					}
+					chi.key=match_key;
+					chi.opt=key_role; 
+				}
+			}	
+	}
+	
+*/
+
+	public void setOrgNode(Object n){
+		this.org_node = n;
+	}
+		
+	public Object getOrgNode(){
+//		if(this.org_node instanceof NodeRH){
+//			return (NodeRH)this.org_node;
+//		}
+//		if(this.org_node instanceof Node){
+//			return (Node)this.org_node;
+//		}
+		return this.org_node;
+	}
+		
+	// layer�ｽﾅ指�ｽ閧ｵ�ｽ�ｽ�ｽi�ｽ�ｽ�ｽﾜでの葉�ｽﾌ搾ｿｽ�ｽv�ｽ�ｽ�ｽ�ｽﾔゑｿｽ
+	int getLeafNum(int layer){
+		int leaf_num = 0;
+		Vector<ExbpNode> nodes = new Vector<ExbpNode>();
+		nodes.addElement(this);
+		for(int i=1;i<=layer;i++){
+			Enumeration<ExbpNode>  en = nodes.elements();
+			Vector<ExbpNode> nodes2 = new Vector<ExbpNode>();
+			while(en.hasMoreElements()){
+				ExbpNode node = en.nextElement();
+				//Leaf�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ逅費ｿｽ�ｽ�ｽP�ｽJ�ｽE�ｽ�ｽ�ｽg�ｽ�ｽ�ｽ�ｽ �ｽD�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾅ終�ｽw�ｽii==layer�ｽj�ｽﾈらす�ｽﾗてカ�ｽE�ｽ�ｽ�ｽg
+				if(node.getVisbleChildren().isEmpty() || i==layer){
+					leaf_num++;
+					//System.out.println("Leaf:::"+node.getLabel());
+				}
+				else{
+					nodes2.addAll(node.getVisbleChildren());
+				}
+			}
+			//�ｽ�ｽ�ｽﾌ段�ｽﾉ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽﾚ行�ｽ�ｽ�ｽ驍ｽ�ｽﾟデ�ｽ[�ｽ^�ｽ�ｽn�ｽ�ｽ
+			nodes = nodes2;
+		}
+		
+		return leaf_num;
+	}
+
+
+	
+	
+	
+/*	static void setColors(){
+		node_color[0]=Color.yellow;
+		node_color[1]=Color.orange;
+		node_color[2]=Color.magenta;
+		node_color[3]=Color.cyan;
+		node_color[4]=Color.blue;
+		node_color[5]=Color.green;
+		node_color[6]=Color.pink;
+		node_color[7]=Color.red;
+		//node_color[]=Color.darkGray;
+		node_color[8]=Color.lightGray;
+		node_color[9]=Color.gray;	
+	}*/
+		
+	void setColorFont(Color c,Font f){
+		color=c;
+		font=f;
+	}
+	
+	void setChildrenColor(Color c){
+		this.color=c;
+		Enumeration en = this.children.elements();
+		while(en.hasMoreElements()){
+			ExbpNode chi = (ExbpNode)en.nextElement();
+			chi.setChildrenColor(c);
+		}
+		
+	}
+	
+	void setChildrenVisible(boolean v){
+		Enumeration en = this.children.elements();
+		while(en.hasMoreElements()){
+			ExbpNode chi = (ExbpNode)en.nextElement();
+			chi.setVisbleChildren(v);
+		}
+		
+	}
+	
+	void setRestrictedViewByTopic(ExtendBP exbp){
+		this.setVisible(false);
+		for(int i=0;i<this.topicColorList.size();i++){
+			if(exbp.topicColorList.contains(topicColorList.get(i))){
+				this.setVisibleTrueWithParent();
+				break;
+			}
+		}
+		
+		Enumeration en = this.children.elements();
+		while(en.hasMoreElements()){
+			ExbpNode chi = (ExbpNode)en.nextElement();
+			chi.setRestrictedViewByTopic(exbp);
+		}
+		
+	}
+//	void setChildrenColor_sus(){
+//		this.color=c;
+//		Enumeration en = this.children.elements();
+//		while(en.hasMoreElements()){
+//			ExbpNode chi = (ExbpNode)en.nextElement();
+//			chi.setChildrenColor(c);
+//		}
+//		
+//	}
+    
+    // �ｽ`�ｽ�ｽF�ｽ�ｽ�ｽ謫ｾ�ｽ�ｽ�ｽ�ｽ
+    protected Color getColor() {
+        return color;
+    }
+   
+    //#kozaki 2008/10/05
+    String getColorString(){
+    	if(this.getColor().equals(Color.orange)){
+    		return "orange";
+    	}
+    	else if(this.getColor().equals(Color.cyan)){
+    		return "cyan";
+    	}
+    	else if(this.getColor().equals(Color.pink)){
+    		return "pink";
+    	}
+    	else if(this.getColor().equals(Color.yellow)){
+    		return "yellow";
+    	}
+    	else if(this.getColor().equals(Color.green)){
+    		return "green";
+    	}
+    	else if(this.getColor().equals(Color.magenta)){
+    		return "magenta";
+    	}
+    	else if(this.getColor().equals(Color.lightGray)){
+    		return "lightGray";
+    	}
+    	else if(this.getColor().equals(Color.red)){
+    		return "red";
+    	}
+    	else if(this.getColor().equals(Color.blue)){
+    		return "blue";
+    	}
+    	else if(this.getColor().equals(Color.gray)){
+    		return "gray";
+    	}
+    		
+    	return "orange";
+    }
+    
+    String getHighlitColorString(){
+    	if(this.highligjtColor==null){
+    		return "NULL";
+    	}
+    	if(this.highligjtColor.equals(Color.white)){
+    		return "NULL";
+    	}    	
+    	if(this.highligjtColor.equals(Color.orange)){
+    		return "orange";
+    	}
+    	else if(this.highligjtColor.equals(Color.cyan)){
+    		return "cyan";
+    	}
+    	else if(this.highligjtColor.equals(Color.pink)){
+    		return "pink";
+    	}
+    	else if(this.highligjtColor.equals(Color.yellow)){
+    		return "yellow";
+    	}
+    	else if(this.highligjtColor.equals(Color.green)){
+    		return "green";
+    	}
+    	else if(this.highligjtColor.equals(Color.magenta)){
+    		return "magenta";
+    	}
+    	else if(this.highligjtColor.equals(Color.lightGray)){
+    		return "lightGray";
+    	}
+    	else if(this.highligjtColor.equals(Color.red)){
+    		return "red";
+    	}
+    	else if(this.highligjtColor.equals(Color.blue)){
+    		return "blue";
+    	}
+    	else if(this.highligjtColor.equals(Color.gray)){
+    		return "gray";
+    	}
+    		
+    	return "NULL";
+    }
+    
+    
+    String getLinkHighlitColorString(){
+    	if(this.link_highligjtColor==null){
+    		return "NULL";
+    	}
+    	if(this.link_highligjtColor.equals(Color.white)){
+    		return "NULL";
+    	}    	
+    	if(this.link_highligjtColor.equals(Color.orange)){
+    		return "orange";
+    	}
+    	else if(this.link_highligjtColor.equals(Color.cyan)){
+    		return "cyan";
+    	}
+    	else if(this.link_highligjtColor.equals(Color.pink)){
+    		return "pink";
+    	}
+    	else if(this.link_highligjtColor.equals(Color.yellow)){
+    		return "yellow";
+    	}
+    	else if(this.link_highligjtColor.equals(Color.green)){
+    		return "green";
+    	}
+    	else if(this.link_highligjtColor.equals(Color.magenta)){
+    		return "magenta";
+    	}
+    	else if(this.link_highligjtColor.equals(Color.lightGray)){
+    		return "lightGray";
+    	}
+    	else if(this.link_highligjtColor.equals(Color.red)){
+    		return "red";
+    	}
+    	else if(this.link_highligjtColor.equals(Color.blue)){
+    		return "blue";
+    	}
+    	else if(this.link_highligjtColor.equals(Color.gray)){
+    		return "gray";
+    	}
+    		
+    	return "NULL";
+    }
+    
+  	
+//	void paint(Graphics g){
+//		Font font = new Font("Times", Font.PLAIN, 12);
+//		FontMetrics fm = g.getFontMetrics(font);
+//		setSize(
+//			new Dimension(fm.stringWidth(label) +5,	fm.getHeight() + 5));
+//		
+//		g.setColor(Color.yellow);
+//		g.fillRect(this.x, this.y,this.width,this.height);
+//		g.setColor(Color.black);
+//		g.drawRect(this.x, this.y,this.width,this.height);
+//		//g.drawString(label, this.x, this.y);
+//		g.setFont(font);
+//		g.drawString(
+//				label,
+//				x + 2,
+//				y +fm.getAscent()+2);
+//	}
+
+    void paint(Graphics g,ExtendBP exbp){
+    	//Graphics g =exbp.getGraphics();
+    	
+		//#kozaki 2008/02/09�ｽ@�ｽ�ｽ�ｽ[�ｽt�ｽ�ｽ�ｽ�ｽ�ｽp�ｽﾌダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽﾍ描�ｽ謔ｵ�ｽﾈゑｿｽ
+		if(this.isDummy)return;
+		
+			
+		//Font font = new Font("Times", Font.PLAIN, 12);
+		Graphics2D g2 = (Graphics2D)g;
+	    //Stroke defaultS = g2.getStroke();
+	    Paint defaultP = g2.getPaint();
+	    //BasicStroke wideS = new BasicStroke(3.0f);
+	    
+		FontMetrics fm = g.getFontMetrics(font);
+		setSize(new Dimension(fm.stringWidth(label) +5,	fm.getHeight() + 5));	
+		g2.setPaint(new GradientPaint(x+width/4, y+height/4, color,
+		            x+width*3/4, y+height*3/4,Color.white, false));
+		
+
+		ArrayList<Color> topic_colors = new ArrayList<Color>();
+		for(int i=0;i<this.topicColorList.size();i++){
+			if(exbp.topicColorList.contains(topicColorList.get(i))){
+				topic_colors.add(topicColorList.get(i));
+			}
+		}
+ 		
+		if (topic_colors.size() == 1) {
+			g2.setPaint(new GradientPaint(x+width/4, y+height/4, topic_colors.get(0),
+            x+width*3/4, y+height*3/4,Color.white, false));
+
+		}
+		else if (topic_colors.size() > 1) {
+		
+	//	System.out.println(highLightColorList.get(1));
+			float[] dist = new float[topic_colors.size()];
+			
+			//float[] dist ={0.0f,0.3f,0.6f,1.0f};
+			
+			//Color[] colors = {Color.RED, Color.WHITE, Color.BLUE, Color.GREEN};
+				for (int i = 0;i < topic_colors.size() ; i++) {
+		 				dist[i] = ((float)i )/ ((float)topic_colors.size()-1);		
+				};
+				
+				Color[] colors = (Color[])topic_colors.toArray(new Color[0]);
+				
+				
+			    LinearGradientPaint gradient = new LinearGradientPaint(
+			    		x+width/4, y+height/4, 
+			    		x+width*3/4, y+height*3/4,
+			        dist,
+			        colors,
+			        MultipleGradientPaint.CycleMethod.NO_CYCLE
+			    );
+			    
+			    g2.setPaint(gradient);
+		}
+		
+		if(MapFactory.isGrayView){
+			g2.setColor(Color.white);
+			g2.fillRect(this.x, this.y,this.width,this.height);
+		}
+		else{
+			g2.fillRect(this.x, this.y,this.width,this.height);
+		}
+		g2.setPaint(defaultP);
+		if(this.highlight==true){
+			//BasicStroke wideStroke = new BasicStroke(3.0f);
+			 float dash[] = {10.0f, 3.0f};
+			  BasicStroke wideStroke = new BasicStroke(3.0f, 
+			                                           BasicStroke.CAP_BUTT, 
+			                                           BasicStroke.JOIN_MITER, 
+			                                           10.0f, 
+			                                           dash, 
+			                                           0.0f);
+			g2.setStroke(wideStroke);
+			//g2.setColor(Color.red);
+			g2.setColor(this.highligjtColor);
+		}
+		else{
+			BasicStroke wideStroke = new BasicStroke(1.0f);
+			g2.setStroke(wideStroke);
+			g2.setColor(Color.black);
+		}
+		g2.drawRect(this.x, this.y,this.width,this.height);
+		
+		g2.setColor(Color.black);
+		g.setFont(font);
+		
+		//�ｽ]�ｽ�ｽ�ｽL�ｽ�ｽﾏみは，�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾔゑｿｽ�ｽ�ｽ�ｽ�ｽi�ｽb�ｽ闖茨ｿｽ�ｽ�ｽj
+		if(this.evaluation!=0){
+			g2.setColor(Color.red);
+		}
+		if(this.evaluation==-1){
+			g2.setColor(Color.orange);
+		}
+		
+		//#kozaki 2008/08/16
+		if(this.children.size()!=this.getVisbleChildren().size()){
+			g.drawString(
+					label+"  [+]",
+					x + 2,
+					y +fm.getAscent()+2);
+		}
+		else{
+			g.drawString(
+				label,
+				x + 2,
+				y +fm.getAscent()+2);
+		}
+	
+    }
+    
+	void paint2(Graphics g){
+		//#kozaki 2008/02/09�ｽ@�ｽ�ｽ�ｽ[�ｽt�ｽ�ｽ�ｽ�ｽ�ｽp�ｽﾌダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽﾍ描�ｽ謔ｵ�ｽﾈゑｿｽ
+		if(this.isDummy)return;
+		
+			
+		//Font font = new Font("Times", Font.PLAIN, 12);
+		Graphics2D g2 = (Graphics2D)g;
+	    //Stroke defaultS = g2.getStroke();
+	    Paint defaultP = g2.getPaint();
+	    //BasicStroke wideS = new BasicStroke(3.0f);
+	    
+		FontMetrics fm = g.getFontMetrics(font);
+		setSize(new Dimension(fm.stringWidth(label) +5,	fm.getHeight() + 5));	
+		g2.setPaint(new GradientPaint(x+width/4, y+height/4, color,
+		            x+width*3/4, y+height*3/4,Color.white, false));
+		
+ 		
+		if (this.topicColorList.size() == 1) {
+			g2.setPaint(new GradientPaint(x+width/4, y+height/4, topicColorList.get(0),
+            x+width*3/4, y+height*3/4,Color.white, false));
+
+		}
+		else if (this.topicColorList.size() > 1) {
+		
+	//	System.out.println(highLightColorList.get(1));
+			float[] dist = new float[topicColorList.size()];
+			
+			//float[] dist ={0.0f,0.3f,0.6f,1.0f};
+			
+			//Color[] colors = {Color.RED, Color.WHITE, Color.BLUE, Color.GREEN};
+				for (int i = 0;i < topicColorList.size() ; i++) {
+		 				dist[i] = ((float)i )/ ((float)topicColorList.size()-1);		
+				};
+				
+				Color[] colors = (Color[])topicColorList.toArray(new Color[0]);
+				
+				
+			    LinearGradientPaint gradient = new LinearGradientPaint(
+			    		x+width/4, y+height/4, 
+			    		x+width*3/4, y+height*3/4,
+			        dist,
+			        colors,
+			        MultipleGradientPaint.CycleMethod.NO_CYCLE
+			    );
+			    
+			    g2.setPaint(gradient);
+		}
+		
+		if(MapFactory.isGrayView){
+			g2.setColor(Color.white);
+			g2.fillRect(this.x, this.y,this.width,this.height);
+		}
+		else{
+			g2.fillRect(this.x, this.y,this.width,this.height);
+		}
+		g2.setPaint(defaultP);
+		if(this.highlight==true){
+			//BasicStroke wideStroke = new BasicStroke(3.0f);
+			 float dash[] = {10.0f, 3.0f};
+			  BasicStroke wideStroke = new BasicStroke(3.0f, 
+			                                           BasicStroke.CAP_BUTT, 
+			                                           BasicStroke.JOIN_MITER, 
+			                                           10.0f, 
+			                                           dash, 
+			                                           0.0f);
+			g2.setStroke(wideStroke);
+			//g2.setColor(Color.red);
+			g2.setColor(this.highligjtColor);
+		}
+		else{
+			BasicStroke wideStroke = new BasicStroke(1.0f);
+			g2.setStroke(wideStroke);
+			g2.setColor(Color.black);
+		}
+		g2.drawRect(this.x, this.y,this.width,this.height);
+		
+		g2.setColor(Color.black);
+		g.setFont(font);
+		
+		//�ｽ]�ｽ�ｽ�ｽL�ｽ�ｽﾏみは，�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾔゑｿｽ�ｽ�ｽ�ｽ�ｽi�ｽb�ｽ闖茨ｿｽ�ｽ�ｽj
+		if(this.evaluation!=0){
+			g2.setColor(Color.red);
+		}
+		if(this.evaluation==-1){
+			g2.setColor(Color.orange);
+		}
+		
+		//#kozaki 2008/08/16
+		if(this.children.size()!=this.getVisbleChildren().size()){
+			g.drawString(
+					label+"  [+]",
+					x + 2,
+					y +fm.getAscent()+2);
+		}
+		else{
+			g.drawString(
+				label,
+				x + 2,
+				y +fm.getAscent()+2);
+		}
+	}
+
+	//#kozaki 2008/02/10�ｽ@�ｽn�ｽC�ｽ�ｽ�ｽC�ｽg�ｽ\�ｽ�ｽ�ｽﾌ描�ｽ�ｽi�ｽm�ｽ[�ｽh�ｽp�ｽj
+	void paintHilighit(Graphics g, Color h_color){
+		if(this.isDummy)return;
+		
+		//Font font = new Font("Times", Font.PLAIN, 12);
+		Graphics2D g2 = (Graphics2D)g;
+	    //Stroke defaultS = g2.getStroke();
+	    Paint defaultP = g2.getPaint();
+	    //BasicStroke wideS = new BasicStroke(3.0f);
+	    
+		FontMetrics fm = g.getFontMetrics(font);
+		setSize(new Dimension(fm.stringWidth(label) +5,	fm.getHeight() + 5));	
+		g2.setPaint(new GradientPaint(x+width/4, y+height/4, color,
+		            x+width*3/4, y+height*3/4,Color.white, false));
+		
+		
+
+
+		
+		if(MapFactory.isGrayView){
+			g2.setColor(Color.white);
+			g2.fillRect(this.x, this.y,this.width,this.height);
+		}
+		else{
+			g2.fillRect(this.x, this.y,this.width,this.height);
+		}
+		g2.setPaint(defaultP);
+		g2.setColor(Color.black);
+		g.setFont(font);
+		
+		//�ｽ]�ｽ�ｽ�ｽL�ｽ�ｽﾏみは，�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾔゑｿｽ�ｽ�ｽ�ｽ�ｽi�ｽb�ｽ闖茨ｿｽ�ｽ�ｽj
+		if(this.evaluation!=0){
+			g2.setColor(Color.red);
+		}
+		if(this.evaluation==-1){
+			g2.setColor(Color.orange);
+		}
+		
+		g.drawString(
+				label,
+				x + 2,
+				y +fm.getAscent()+2);
+		
+		
+		BasicStroke wideStroke = new BasicStroke(3.0f);
+		g2.setStroke(wideStroke);
+		g2.setColor(h_color);
+		g2.drawRect(this.x, this.y,this.width,this.height);	
+		
+		if(this.highlight==true){
+			//BasicStroke wideStroke = new BasicStroke(3.0f);
+			 float dash[] = {10.0f, 3.0f};
+			   wideStroke = new BasicStroke(3.0f, 
+			                                           BasicStroke.CAP_BUTT, 
+			                                           BasicStroke.JOIN_MITER, 
+			                                           10.0f, 
+			                                           dash, 
+			                                           0.0f);
+			g2.setStroke(wideStroke);
+			//g2.setColor(Color.red);
+			g2.setColor(this.highligjtColor);
+		}
+		g2.drawRect(this.x, this.y,this.width,this.height);	
+		
+	}
+	
+	//#kozaki 2008/02/10�ｽ@�ｽn�ｽC�ｽ�ｽ�ｽC�ｽg�ｽ\�ｽ�ｽ�ｽﾌ描�ｽ�ｽi�ｽ�ｽ�ｽ�ｽ�ｽN�ｽp�ｽj
+	void paintHilighitLink(Graphics g, Color h_color){
+		if(this.parent==null){
+			return;
+		}
+		
+		//#kozaki 2008/05/09�ｽ@Dummy�ｽ�ｽ2�ｽi�ｽﾈ擾ｿｽﾌ趣ｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+		ExbpNode parentNode = this.getParent();
+//		ExbpNode parentNode = this.parent;
+//		if(parentNode.isDummy){
+//			parentNode=parentNode.parent;
+//			if(parentNode==null){
+//				return;
+//			}
+//		}
+
+		
+		int px = parentNode.x + parentNode.width / 2;
+        int py = parentNode.y + parentNode.height / 2;
+        int cx = this.x + this.width / 2;
+        int cy = this.y + this.height / 2;
+        
+        Graphics2D g2 = (Graphics2D)g;
+        BasicStroke wideStroke = new BasicStroke(3.0f);
+		g2.setStroke(wideStroke);
+		g2.setColor(h_color);
+		g2.drawLine(px, py, cx, cy);
+		
+		int sx = (px + cx) / 2;
+	    int sy = (py + cy) / 2;
+	    g.setFont(ExtendBP.fontLink);
+	        g.setColor(Color.red);
+	        g.drawString(this.key, sx+5, sy);
+	}
+	
+	void adjustLoc(Graphics g){
+		if(this.isDummy)return;
+		FontMetrics fm = g.getFontMetrics(font);
+		setSize(
+			new Dimension(fm.stringWidth(label) +5,	fm.getHeight() + 5));
+		
+		//this.setLocation(this.x-this.width/2, this.y-this.height/2);
+        int nx = this.x-this.width/2;
+        if (nx < 0) nx = 0;
+        this.setLocation(nx, this.y);
+	}
+	
+	/* #kozaki 2009/01/20�ｽ@paint2(Graphics g)�ｽﾖ茨ｿｽ{�ｽ�ｽ
+	void paint3(Graphics g){
+		//#kozaki 2008/02/09�ｽ@�ｽ�ｽ�ｽ[�ｽt�ｽ�ｽ�ｽ�ｽ�ｽp�ｽﾌダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽﾍ描�ｽ謔ｵ�ｽﾈゑｿｽ
+		if(this.isDummy)return;
+		
+		//Font font = new Font("Times", Font.PLAIN, 12);
+		Graphics2D g2 = (Graphics2D) g;
+	    //Stroke defaultS = g2.getStroke();
+	    Paint defaultP = g2.getPaint();
+	    //BasicStroke wideS = new BasicStroke(3.0f);
+	    
+		FontMetrics fm = g.getFontMetrics(font);
+		setSize(
+			new Dimension(fm.stringWidth(label) +5,	fm.getHeight() + 5));
+		
+		//this.setLocation(this.x-this.width/2, this.y-this.height/2);
+        int nx = this.x-this.width/2;
+        if (nx < 0) nx = 0;
+        this.setLocation(nx, this.y);
+        
+        //g.setColor(color);
+		//g.fillRect(this.x, this.y,this.width,this.height);
+		
+		g2.setPaint(new GradientPaint(x+width/4, y+height/4, color,
+		            x+width*3/4, y+height*3/4,Color.white, false));
+		g2.fillRect(this.x, this.y,this.width,this.height);
+		g2.setPaint(defaultP);
+		BasicStroke wideStroke = new BasicStroke(1.0f);
+		g2.setStroke(wideStroke);
+		g2.setColor(Color.black);
+		g2.drawRect(this.x, this.y,this.width,this.height);
+		
+		//g.setColor(Color.black);
+		//g.drawRect(this.x, this.y,this.width,this.height);
+
+		g.setFont(font);
+		g.drawString(
+				label,
+				x + 2,
+				y +fm.getAscent()+2);
+	}*/
+
+	 void setLabel(String str){
+		this.label=str;
+	}
+	
+    protected String getLabel(){
+		return this.label;
+	}
+    
+    // �ｽq�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽ謫ｾ�ｽ�ｽ�ｽﾜゑｿｽ
+    protected Vector<ExbpNode> getChildExbpNodes() {
+        return children;
+    }
+
+    //#koazaki 2008/08/11�ｽ@�ｽm�ｽ[�ｽh�ｽﾌ抵ｿｽ�ｽS�ｽ�ｽ�ｽW�ｽ�ｽﾔゑｿｽ
+    public Point getCenterPoint(){
+        int px = this.x + this.width / 2;
+        int py = this.y + this.height / 2;
+        return new Point(px,py);
+    }
+    
+//  #kozaki 2007/10/28�ｽ@�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽﾉゑｿｽ�ｽ�ｽ�ｽ�ｽp�ｽX�ｽ�ｽﾔゑｿｽ
+    public String getPath(){
+    	String path="["+this.getLabel()+"]";
+    	for(ExbpNode n = this ; n.parent!=null ; n=n.parent ) {
+    		path="["+n.parent.getLabel()+"]"+ "\n-"+ n.key +"->"+path;
+    	}
+    	
+    	return path;
+    }
+
+    //#kozaki�ｽ@2008/02/10�ｽ@�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽﾉ趣ｿｽ�ｽ�ｽp�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ
+    public void painthilightPath(Graphics g,Color h_color){
+    	if(this.parent==null){
+    		return;
+    	}
+    	this.paintHilighitLink(g, h_color);
+    	
+    	for(ExbpNode n = this.parent ; n.parent!=null ; n=n.parent ) {
+    		if(!n.isDummy){
+    			n.paintHilighitLink(g, h_color);
+    			n.paintHilighit(g, h_color);
+    		}
+    	}
+    }
+    
+    //#kozaki�ｽ@2008/02/10�ｽ@�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽﾉ趣ｿｽ�ｽ�ｽp�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ
+    public void paintInfluencePath(ExtendBP exbp,Graphics g,Color color){
+      	
+    	paintHilighit(g, color);  	
+    	
+//    	Vector childs = new Vector();
+//    	Iterator it =  this.children.iterator();
+//        while (it.hasNext()) {
+//        	ExbpNode childNode = (ExbpNode) it.next();
+//        	if(childNode.isDummy){
+//        		childs.addAll(childNode.children);
+//        	}
+//        	else{
+//        		childs.add(childNode);
+//        	}
+//        }
+    	
+    	//#kozaki 2008/05/09�ｽ@Dummy�ｽ�ｽ2�ｽi�ｽﾈ擾ｿｽﾌ趣ｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽC�ｽ�ｽ
+    	Vector<ExbpNode> childs = this.getChildren();
+    	Iterator<ExbpNode> it = childs.iterator();
+        
+        while (it.hasNext()) {
+            ExbpNode childNode = it.next();
+	            if(exbp.nodes.contains(childNode) && childNode.visible){
+	            	childNode.paintHilighitLink(g, color);
+	            	childNode.parent.paintHilighit(g, color);
+	                childNode.paintInfluencePath(exbp,g,color);
+	        	}
+            }
+    }
+
+    //#kozaki 2008/06/26�ｽ@�ｽ`�ｽ謦ｲ�ｽ�ｽ�ｽp�ｽﾌダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽZ�ｽb�ｽg�ｽ�ｽ�ｽ�ｽ
+    public void setDummyNodes(int num_of_layer){
+    	//�ｽq�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ鼾�ｿｽC�ｽK�ｽw�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ_�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽq�ｽﾉ托ｿｽ�ｽ�ｽ
+    	if(this.children.size()==0){
+    		ExbpNode parent=this;
+    		ExbpNode dummy;
+    		for(int i=0;i<num_of_layer;i++){
+    			dummy = new ExbpNode("dummy_for_layout",0,0,0,0);
+    			dummy.setDummyNode(true);
+    			parent.addChild(dummy);
+    			parent=dummy;
+    		}
+    	}
+    	else{
+    		Iterator<ExbpNode> it =  this.children.iterator();
+    		while (it.hasNext()) {
+    			ExbpNode childNode = it.next();
+    			childNode.setDummyNodes(num_of_layer-1);
+          	}
+    	}
+    	
+    }
+    
+    //#kozaki 2008/06/26�ｽ@�ｽ`�ｽ謦ｲ�ｽ�ｽ�ｽp�ｽﾌダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+    public void removeDummyNodes(){
+    	if(this.children.size()>0){
+    		Iterator<ExbpNode> it =  this.children.iterator();
+    		Vector<ExbpNode> remove_nodes= new Vector<ExbpNode>();
+    		while (it.hasNext()) {
+    			ExbpNode childNode = it.next();
+    			if(childNode.isDummy && childNode.getLabel().equals("dummy_for_layout")){
+    				remove_nodes.addElement(childNode);
+    			}
+    			else{
+    				childNode.removeDummyNodes();
+    			}    			
+          	}
+    		
+    		if(remove_nodes.size()>0){
+    			this.children.removeAll(remove_nodes);
+    		}
+    	}
+    	
+    }
+
+    //#kozaki 2008/06/26�ｽ@�ｽ�ｽ�ｽﾗてのダ�ｽ~�ｽ[�ｽm�ｽ[�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+    public void removeDummyNodesAll(){
+    	if(this.children.size()>0){
+    		Iterator<ExbpNode> it =  this.children.iterator();
+    		Vector<ExbpNode> remove_nodes= new Vector<ExbpNode>();
+    		while (it.hasNext()) {
+    			ExbpNode childNode = it.next();
+    			if(childNode.isDummy){
+    				remove_nodes.addElement(childNode);
+    			}
+    			else{
+    				childNode.removeDummyNodes();
+    			}    			
+          	}
+    		
+    		if(remove_nodes.size()>0){
+    			this.children.removeAll(remove_nodes);
+    		}
+    	}
+    	
+    }
+    
+    //#kozaki 2011/01/256�ｽ@�ｽs�ｽﾂ趣ｿｽ�ｽﾌノ�ｽ[�ｽh�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+    public void removeUnmatchNodes(){
+    	if(this.children.size()>0){
+    		for (int i=0;i<children.size();i++) {
+    			ExbpNode childNode = children.elementAt(i);
+    			//System.out.println("--->childNode:"+childNode.getLabel()+":Match="+childNode.match);
+  			  
+    			if(childNode.match){
+    				childNode.removeUnmatchNodes();
+    			}
+    			else{
+    				children.remove(i);
+    				i--;
+    				//System.out.println(">>>>>Removed");
+    			}    			
+          	}
+    		Iterator<ExbpNode> it3 = children.iterator();
+			while (it3.hasNext()) {
+    			ExbpNode chiNode = it3.next();
+  				//System.out.println("===chiNode:"+chiNode.getLabel()+":Match="+chiNode.match);
+			}
+    	}
+     }
+    
+    
+//    /**
+//     * 
+//     * �ｽ�ｽ�ｽC�ｽ�ｽ�ｽK�ｽw�ｽ�ｽ�ｽ�ｽ�ｽ謫ｾ�ｽ�ｽ�ｽ�ｽ
+//     * 
+//     * @return �ｽ�ｽ�ｽC�ｽ�ｽ�ｽK�ｽw�ｽ�ｽ�ｽ�ｽﾟゑｿｽ�ｽﾜゑｿｽ�ｽB
+//     */
+//    public int getLayer() {
+//        return _layer;
+//    }
+//
+//    /**
+//     * 
+//     * �ｽ�ｽ�ｽC�ｽ�ｽ�ｽK�ｽw�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽ
+//     * 
+//     * @param _layer �ｽ�ｽ�ｽC�ｽ�ｽ�ｽK�ｽw�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽB
+//     */
+//    public void setLayer(int layer) {
+//        this._layer = layer;
+//    }
+}
+
+//�ｽR�ｽ}�ｽ�ｽ�ｽhTree�ｽ�ｬ�ｽp�ｽﾌコ�ｽ}�ｽ�ｽ�ｽh�ｽﾇ暦ｿｽ�ｽpExbpNode
+class ExbpNodeTemp extends ExbpNode{
+	String command;
+	
+	ExbpNodeTemp(String lbl){
+		super(lbl);
+	}
+	
+	public ExbpNodeTemp(ExbpNode exbpnode, String cmd) {
+		this(exbpnode.getLabel());
+		this.command=cmd;
+		this.setOrgNode(exbpnode.getOrgNode());
+	}
+
+	Vector<ExbpNode> getCopyChildren(){
+		Vector<ExbpNode>  copy_children = new Vector<ExbpNode>();
+		Enumeration en = this.children.elements();
+		while(en.hasMoreElements()){
+			ExbpNode chi = (ExbpNode)en.nextElement();
+			//ExbpNode copy= new ExbpNode(chi.getLabel());
+			copy_children.add(chi.copy());
+		}
+		return copy_children;
+	}
+	
+	//#kozaki�ｽ@�ｽ墲ｴ�ｽﾆ茨ｿｽv�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾉゑｿｽ�ｽﾝ定し�ｽﾄゑｿｽ�ｽ�ｽ
+	public boolean equals(Object obj) {
+		if (!(obj instanceof ExbpNodeTemp)) {
+                return false;
+        }
+        
+        ExbpNodeTemp other = (ExbpNodeTemp)obj;
+        
+        //�ｽR�ｽ}�ｽ�ｽ�ｽh�ｽｳ趣ｿｽ�ｽ�ｽ�ｽﾄ費ｿｽr�ｽﾅゑｿｽ�ｽ�ｽ謔､�ｽﾈ隠�ｽ�ｽ�ｽI�ｽv�ｽV�ｽ�ｽ�ｽ�ｽ
+        if("*".equals(this.command)){
+        	return other.label == this.label &&
+            	   other.org_node == this.org_node;
+        }
+        
+        return other.label == this.label &&
+               other.org_node == this.org_node && 
+               other.command == this.command;
+}
+
+	
+}
+
+// BrowsingGP�ｽ�ｽ�ｽﾌマ�ｽE�ｽX�ｽ�ｽ�ｽX�ｽi�ｽ[�ｽﾌク�ｽ�ｽ�ｽX
+class ExbpMouseListener implements MouseListener, MouseMotionListener {
+
+	ExtendBP _exbp;
+	public final int WHEEL_SCROLL_RATE = 50;		// �ｽ}�ｽE�ｽX�ｽz�ｽC�ｽ[�ｽ�ｽ�ｽﾌス�ｽN�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽ�ｽ
+	public final int MOVE_RATE = 1;		// �ｽ}�ｽE�ｽX�ｽz�ｽC�ｽ[�ｽ�ｽ�ｽﾌス�ｽN�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽ�ｽ
+	private Point _tmpPoint = new Point();
+
+	private Toolkit _toolkit;
+	private Image _imageHandOpen = null;
+	private Image _imageHandClose = null;
+	private Image _imageDanger = null;
+	private static final int HAND_OPEN = 0;
+	private static final int HAND_CLOSE = 1;
+
+	private boolean isMouseDragged = false;	// �ｽ}�ｽE�ｽX�ｽ�ｽ�ｽh�ｽ�ｽ�ｽb�ｽN�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ
+	private boolean isMouseExited = false;	// �ｽ}�ｽE�ｽX�ｽ�ｽ�ｽO�ｽ�ｽﾄゑｿｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ
+	
+	ExbpNode exbpnode; //#kozaki�ｽ@2008/08/11�ｽ@�ｽI�ｽ�ﾌノ�ｽ[�ｽh
+	Point press_point;
+
+	
+	
+	// �ｽR�ｽ�ｽ�ｽX�ｽg�ｽ�ｽ�ｽN�ｽ^
+	protected ExbpMouseListener(ExtendBP bpgp) {
+		super();
+		_exbp = bpgp;
+		
+//		_toolkit = Toolkit.getDefaultToolkit();
+//		_imageHandOpen = _toolkit.getImage(this.getClass().getResource("handopen_ss.gif"));
+//		_imageHandClose = _toolkit.getImage(this.getClass().getResource("handclose_ss.gif"));
+//		_imageDanger = _toolkit.getImage(this.getClass().getResource("danger_s.gif"));
+	}
+
+	// �ｽ}�ｽE�ｽX�ｽ�ｽ�ｽh�ｽ�ｽ�ｽb�ｽN�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽ
+	private void setMouseDragged(boolean isDragged) {
+		isMouseDragged = isDragged;
+	}
+	// �ｽ}�ｽE�ｽX�ｽ�ｽ�ｽO�ｽ�ｽﾄゑｿｽ�ｽ驍ｩ�ｽﾇゑｿｽ�ｽ�ｽ�ｽ�ｽﾝ定す�ｽ�ｽ
+	private void setMouseExited(boolean isExited) {
+		isMouseExited = isExited;
+	}
+
+	// �ｽX�ｽe�ｽ[�ｽ^�ｽX�ｽo�ｽ[�ｽﾉ表�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+/*	private void dispPointStatus(Point pt) {
+		// �ｽX�ｽe�ｽ[�ｽ^�ｽX�ｽo�ｽ[�ｽﾉ表�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ
+		//_bpGraphicPanel.bp.editorPanel.hzeditor._hzMainFrame.setStatusBarPosition(_tmpPoint);
+		double dsize = (double) 100.0 / _bpGraphicPanel.bp.editorPanel.hzeditor.getViewSize();
+		int tx = (int) ((pt.getLocation().x + _bpGraphicPanel.bp.SCB_horz.getValue()) * dsize);
+		int ty = (int) ((pt.getLocation().y + _bpGraphicPanel.bp.SCB_vert.getValue()) * dsize);
+		//System.out.println(_bpGraphicPanel.bp.editorPanel.hzeditor.getViewSize() + " : " + dsize + " : (" + tx + ", " + ty + ") : (" +  pt.getLocation().x + ", " + pt.getLocation().y + ")");
+		_tmpPoint.setLocation(tx, ty);
+		_bpGraphicPanel.bp.editorPanel.hzeditor._hzMainFrame.setStatusBarPosition(_tmpPoint);
+	}*/
+
+	// �ｽ}�ｽE�ｽX�ｽ�ｽ�ｽh�ｽ�ｽ�ｽb�ｽO�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾌ擾ｿｽ�ｽ�ｽ
+	public void mouseDragged(MouseEvent e) {
+		
+		Point pp = e.getPoint();
+		if(exbpnode!=null && !exbpnode.equals(_exbp.exbp_node_center)){
+			exbpnode.x += pp.x - press_point.x ;
+			exbpnode.y += pp.y - press_point.y ;
+			press_point = pp;
+		}
+		else{
+			Point viewPoint = _exbp._extendFrame.jsp_exbp.getViewport().getViewPosition();
+			Point cntPoint = e.getPoint();
+			cntPoint.translate(-press_point.x, -press_point.y);
+			viewPoint.translate(-cntPoint.x, -cntPoint.y);
+			_exbp.scrollRectToVisible(new Rectangle(viewPoint, _exbp._extendFrame.jsp_exbp.getViewport().getSize()));
+		}
+		
+		
+		_exbp.repaint();
+		}
+
+	public void mouseMoved(MouseEvent e) {
+
+	}
+
+	public void mouseClicked(MouseEvent e) {
+//		Point pp = e.getPoint();
+//		 if((e.isMetaDown() || e.isControlDown())){
+//		      	System.out.println("_exbp._popupMenu.show(_exbp, pp.x, pp.y);");
+//		      	if(exbpnode!=null){
+//		      		_exbp._popupMenu.setPopupMenu(exbpnode);
+//		      	}
+//		      	_exbp._popupMenu.show(_exbp, pp.x, pp.y);
+//	      }
+	}
+	public void mouseClicked2(MouseEvent e) {
+		Point pp = e.getPoint();
+		ExbpNode old_pick = exbpnode;
+		ExbpNode new_pick = this._exbp.getPick(pp);
+		if(new_pick!=exbpnode){
+			_exbp.mapfactory.selectedClear();
+        }
+		
+		exbpnode = new_pick; 
+		if(new_pick!=null){
+		 System.out.println(
+					new_pick.getLabel()+":Match="+
+					new_pick.match)
+					;
+			
+		}
+				
+		if(exbpnode!=null){
+			Path path = (Path)exbpnode.getOrgNode();
+			int num = exbpnode.getLocatedLayer();
+			System.out.println("setSPARQL num==>"+num);
+			
+			try {
+				this._exbp.getMapFactory().spBuilder.setSPARQL(path,num);
+			} catch (Exception e1) {
+				// TODO Auto-generated catch block
+				e1.printStackTrace();
+			}
+			
+		}
+		//this._exbp.getPick(pp);
+		
+//		if(exbpnode!=null){
+//			if(exbpnode.evaluation!=0){
+//				System.out.println("�ｽ�ｽ�ｽ�ｽ�ｽ]�ｽ�ｽ�ｽ�ｽ"+exbpnode.evaluation);
+//				System.out.println("�ｽ墲ｩ�ｽ�ｽ竄ｷ�ｽ�ｽ�ｽ�ｽ"+exbpnode.evaluation_1);
+//				System.out.println("�ｽ�ｽ�ｽ�ｽ�ｽﾌ再鯉ｿｽ�ｽ�ｽ�ｽE�ｽﾃ難ｿｽ�ｽ�ｽ�ｽE�ｽK�ｽﾘ撰ｿｽ�ｽ�ｽ"+exbpnode.evaluation_2);
+//				System.out.println("�ｽ�ｽ�ｽﾕ撰ｿｽ�ｽE�ｽﾔ暦ｿｽ�ｽ�ｽ�ｽE�ｽ��ｿｽ�ｽ�ｽ�ｽ"+exbpnode.evaluation_3);
+//				System.out.println("�ｽ�ｽ�ｽz�ｽE�ｽ�ｽ�ｽ�ｽ�ｽx�ｽ�ｽ�ｽi�ｽh�ｽ�ｽ�ｽj�ｽ�ｽ"+exbpnode.evaluation_4);
+//				System.out.println("�ｽR�ｽ�ｽ�ｽ�ｽ�ｽg�ｽ�ｽ"+exbpnode.evaluation_comment);
+//			}
+//		}
+		
+		
+//		_exbp._popupMenu.setVisible(false);
+		
+		if(e.isShiftDown()){
+			if(exbpnode!=null){
+				//#kozaki�ｽ@2008/02/14�ｽ@�ｽQ�ｽﾂめ選�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽﾉ趣ｿｽ�ｽ�ｽp�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ\�ｽ�ｽ
+				this._exbp.paint2ndHighlit(exbpnode);
+				return;
+			}
+		}
+		else if(exbpnode!=null){
+			this._exbp.exbp_node_pick=exbpnode; //#kozaki 2008/02/14
+            // �ｽﾅ擾ｿｽﾊに趣ｿｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽ
+            this._exbp.reentryExbpNode(exbpnode);
+            // OE�ｽﾌ描�ｽ�ｽy�ｽC�ｽ�ｽ�ｽﾉ選�ｽ�ｽ�ｽ�ｽﾔに費ｿｽ�ｽf
+//            if(exbpnode.getHozoNode()!=null){
+//            	_exbp.mapfactory.selected(exbpnode);
+////            	if(this._exbp._hzeditor!=null){
+////            		this._exbp._hzeditor.WCEditor.browsingPanel.Jump(exbpnode.getHozoNode());
+////            	}
+//            }
+            
+            //
+            //          09/11/5 #hirota �ｽﾊウ�ｽC�ｽ�ｽ�ｽh�ｽE�ｽ\�ｽ�ｽ
+//            if(exbpnode.getOrgNode() instanceof Node){
+//            	_exbp.mapfactory.minibp.setNode((Node)exbpnode.getOrgNode());
+//            }else if(exbpnode.getOrgNode() instanceof NodeRH){
+//            	_exbp.mapfactory.minibp.setNode( ((NodeRH)exbpnode.getOrgNode()) );
+//            }        	
+          	// fin 
+				
+			
+            //#kozaki 2007/10/28�ｽ@�ｽI�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽm�ｽ[�ｽh�ｽﾉゑｿｽ�ｽ�ｽ�ｽ�ｽp�ｽX�ｽ�ｽ\�ｽ�ｽ
+            if(e.isControlDown()){
+            	JOptionPane.showMessageDialog(_exbp, exbpnode.getPath());
+            	
+            }
+            System.out.println(exbpnode.getPath());
+			//this._exbp.repaint();
+//			Graphics g = this._exbp.getGraphics();
+//			g.setColor(Color.red);
+//			g.drawRect(exbpnode.x-1, exbpnode.y-1, exbpnode.width+2, exbpnode.height+2);
+//			g.drawRect(exbpnode.x-2, exbpnode.y-2, exbpnode.width+4, exbpnode.height+4);
+//			g.drawRect(exbpnode.x, exbpnode.y, exbpnode.width, exbpnode.height);
+            // �ｽE�ｽN�ｽ�ｽ�ｽb�ｽN
+            if(e.isMetaDown() || e.isControlDown()){
+//                ExtendBPPopupMenu newPopupMenu = new ExtendBPPopupMenu(_exbp, exbpnode);
+//                newPopupMenu.setVisible(false);
+//                newPopupMenu.show(_exbp, pp.x, pp.y);
+            }
+            else if(exbpnode.equals(old_pick) && e.getClickCount()>1){//�ｽ_�ｽu�ｽ�ｽ�ｽN�ｽ�ｽ�ｽb�ｽN�ｽ�ｽ�ｽ�ｽ
+            	//System.out.println("Dobule Clike!! ::"+exbpnode.getLabel());
+            	/*if(exbpnode.equals(this._exbp.exbp_node_center)){
+            		//#kozaki �ｽo�ｽO�ｽ�ｽ�ｽﾅゑｿｽﾌでとりあ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽO�ｽ�ｽ�ｽ�ｽ�ｽy�ｽv�ｽ�ｽ�ｽ�ｽ�ｽz
+            	}
+            	else *///if(exbpnode.getChildren().size()==exbpnode.getVisbleChildren().size()){
+            	/*if(exbpnode.open_sub){
+            		exbpnode.setVisbleChildren(false);
+            		//System.out.println("exbpnode.setVisbleChildren(false)::"+exbpnode.getLabel());
+            		//System.out.println("--->Children Size = "+exbpnode.children.size());
+            		
+            	}else{
+            		exbpnode.setVisbleChildren(true);
+            		//System.out.println("exbpnode.setVisbleChildren(true)::"+exbpnode.getLabel());
+            		//System.out.println("--->Children Size = "+exbpnode.children.size());
+            	}*/
+            	//#kozaki 2009/02/13�ｽ@�ｽT�ｽu�ｽm�ｽ[�ｽh�ｽﾌ開�ｽﾂの�ｿｽ�ｽ\�ｽb�ｽh�ｽ�ｽﾏ更
+            	exbpnode.changeOpenSub();
+            	_exbp.repaint();
+            	this._exbp._extendFrame.RefreshExbp();
+            }
+		}else{
+			this._exbp.exbp_node_pick=null; //#kozaki 2008/02/14
+//			this._exbp.repaint();
+		}
+		
+
+		
+	
+		this._exbp.repaint();
+		
+		
+		boolean skip=false;
+		//#kozaki 2008/10/28�ｽ@�ｽN�ｽ�ｽ�ｽb�ｽN�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ_�ｽﾅコ�ｽ}�ｽ�ｽ�ｽhTree�ｽ�ｽ�ｽN�ｽ�ｽ�ｽA
+		//if(exbpnode!=null){
+			//_exbp.cmd_dialog.setCommandOptions(exbpnode);
+		//#kozaki 2009/01/08�ｽ@�ｽX�ｽ�ｽ�ｽb�ｽh�ｽ�ｽ�ｽ�ｽ�ｽﾉ変更 	�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾊゑｿｽﾔゑｿｽ�ｽﾆゑｿｽ�ｽﾉは擾ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽX�ｽL�ｽb�ｽv�ｽ�ｽ�ｽ�ｽ
+//		if(exbpnode==null){
+//			if(_exbp.cmd_dialog.thread_waitng){
+//				_exbp.cmd_dialog.selected_exbp=null;
+//			}else{
+//				_exbp.cmd_dialog.resetCommandOptions();
+//			}
+//		}
+//		else if(exbpnode.equals(_exbp.cmd_dialog.selected_exbp)){
+//			//return;			
+//		}
+//		else{
+//			if(_exbp.cmd_dialog.selected_exbp!=null){
+//				if(_exbp.cmd_dialog.all_node.isSelected() &&
+//						exbpnode.getLocatedLayer()==_exbp.cmd_dialog.selected_exbp.getLocatedLayer()){
+//					skip = true;		
+//				}
+//			}
+//			
+//			if(!skip){
+//				if(_exbp.cmd_dialog.thread_waitng){
+//					_exbp.cmd_dialog.setCommandOptionsForNext(exbpnode);
+//				}else{
+//					_exbp.cmd_dialog.setCommandOptionsAsThread(exbpnode);
+//				}
+//			}
+//		}
+		
+      // �ｽE�ｽN�ｽ�ｽ�ｽb�ｽN
+		if((e.isMetaDown() || e.isControlDown())){
+	      	//System.out.println("_exbp._popupMenu.show(_exbp, pp.x, pp.y);");
+//	      	if(exbpnode!=null){
+//	      		_exbp._popupMenu.setPopupMenu(exbpnode);
+//	      		_exbp._popupMenu.show(_exbp, pp.x, pp.y);
+//	      	}
+//	      	else{
+//	      		_exbp._popupMenu.show(_exbp, pp.x, pp.y);
+//	      	}
+	     }
+		
+	      
+		
+		
+		
+//		if(exbpnode==null || _exbp.cmd_dialog.selected_node_only.isSelected()){
+//			_exbp.cmd_dialog.setCommandOptions(exbpnode);
+//			}
+//		else if(exbpnode.equals(_exbp.cmd_dialog.selected_exbp)){
+//			return;			
+//		}
+//		else if(_exbp.cmd_dialog.selected_exbp==null){
+//			if(_exbp.cmd_dialog.thread_waitng){
+//				_exbp.cmd_dialog.setCommandOptionsForNext(exbpnode);
+//			}else{
+//				_exbp.cmd_dialog.setCommandOptionsAsThread(exbpnode);
+//			}
+//		}else if(exbpnode.getLocatedLayer()!=_exbp.cmd_dialog.selected_exbp.getLocatedLayer()){
+//			if(_exbp.cmd_dialog.thread_waitng){
+//				_exbp.cmd_dialog.setCommandOptionsForNext(exbpnode);
+//			}else{
+//				_exbp.cmd_dialog.setCommandOptionsAsThread(exbpnode);
+//			}
+//		}
+			
+			
+		//}
+		
+        
+		//this._exbp.repaint();�ｽ@#kozaki�ｽb�ｽ�ｽ
+	}
+	
+	public void mouseEntered(MouseEvent e) {
+	}
+	
+	public void mouseExited(MouseEvent e) {
+	}
+
+	// �ｽ}�ｽE�ｽX�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ黷ｽ�ｽﾆゑｿｽ�ｽﾌイ�ｽx�ｽ�ｽ�ｽg
+	public void mousePressed(MouseEvent e) {
+		press_point = e.getPoint();
+		mouseClicked2(e);
+	}
+
+	// �ｽ}�ｽE�ｽX�ｽ｣ゑｿｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾌア�ｽN�ｽV�ｽ�ｽ�ｽ�ｽ
+	public void mouseReleased(MouseEvent e) {
+		//System.out.println("mouseReleased ...");
+/*		if (exbpnode != null && !exbpnode.equals(_exbp.exbp_node_center)) {
+//			exbpnode.x = e.getX();
+//			exbpnode.y = e.getY();
+//            //pick.fixed = pickfixed;
+            exbpnode = null;
+        }
+        _exbp.repaint();
+        e.consume();*/
+	}
+
+	// �ｽ}�ｽE�ｽX�ｽ�ｽ�ｽz�ｽC�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾆゑｿｽ�ｽﾌア�ｽN�ｽV�ｽ�ｽ�ｽ�ｽ
+/*	public void mouseWheelMoved (MouseWheelEvent e) {
+		// System.out.println("MouseWheel Moved ...");
+		int amount = e.getWheelRotation();
+
+		try {
+			// Ctrl�ｽL�ｽ[�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾄゑｿｽ�ｽ�ｽﾎ、�ｽ�ｽ�ｽX�ｽN�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽi�ｽﾊ擾ｿｽA�ｽc�ｽX�ｽN�ｽ�ｽ�ｽ[�ｽ�ｽ�ｽj
+			if(e.isControlDown()) {
+				_bpGraphicPanel.bp.SCB_horz.setValue(
+					_bpGraphicPanel.bp.SCB_horz.getValue()
+					+ amount * WHEEL_SCROLL_RATE);
+			} else {
+				_bpGraphicPanel.bp.SCB_vert.setValue(
+					_bpGraphicPanel.bp.SCB_vert.getValue()
+					+ amount * WHEEL_SCROLL_RATE);
+			}
+		} catch (NullPointerException ne) {
+			// �ｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽﾈゑｿｽ
+		} finally {
+
+		}
+	}*/
+
+
+
+
+	public void mouseWheelMoved(MouseWheelEvent arg0) {
+		
+	}
+
+} // end BPMouseListener
+
+/*
+class RoleLists_old {
+	
+	Vector<String> roles = new Vector<String>();
+	
+	RoleLists(){
+	}
+	
+	Vector<String> getRoleLists(){
+		return roles;
+	}
+	
+	void addRole(String role){
+		if(roles.contains(role)){
+			return;
+		}
+		else{
+			roles.add(role);
+		}
+	}
+	
+	void clearRoles(){
+		roles.removeAllElements();
+	}
+}*/
+
+//#kozaki 2008/10/25�ｽ@�ｽq�ｽb�ｽg�ｽ�ｽ�ｽ�ｽRole�ｽ�ｽ�ｽi�ｽﾈど）�ｽﾆヒ�ｽb�ｽg�ｽ�ｽ�ｽ�ｽ�ｽﾜとめて管暦ｿｽ�ｽ�ｽ�ｽ�ｽ謔､�ｽﾉ拡�ｽ�ｽ
+class RoleLists {
+	
+	Vector<String> roles = new Vector<String>();
+	Vector<Integer> hit_num = new Vector<Integer>();
+	
+	RoleLists(){
+	}
+	
+	Vector<String> getRoleLists(){
+		return roles;
+	}
+
+	Vector<Integer> getHitNumLists(){
+		return hit_num;
+	}
+	
+
+	//#kozaki�ｽ@2009/01/22 �ｽﾇ会ｿｽ�ｽ�ｽ�ｽ�ｽ�ｽ�ｽTRUE�ｽ�ｽﾔゑｿｽ
+	boolean addRole(String role){
+		if(roles.contains(role)){
+			int index = roles.indexOf(role);
+			Integer num = hit_num.elementAt(index);
+			Integer new_num =new Integer((num.intValue())+1);
+			hit_num.set(index,new_num);
+			//hit_num.removeElement(num);
+			//System.out.println("addRole++:::"+role);
+			return false;
+		}
+		else{
+			roles.add(role);
+			hit_num.add(new Integer(1));
+			return true;
+		}
+	}
+	
+	void clearRoles(){
+		roles.removeAllElements();
+		hit_num.removeAllElements();
+	}
+}
+
+
+//class ChangeViewFrame extends JFrame {}
+
+// #hirota 09/5/14 �ｽﾇ会ｿｽ  #kozaki�ｽ@2009/05/26�ｽ@�ｽﾏ更
+//class ChangeViewFrameRole_at extends JFrame {}
+
+//#kozaki 2010/07/04
+//class ChangeViewFrameByTopic extends JFrame{}
+
+//#kozaki 2011/01/26
+//class ChangeViewFrameTopicColor extends JFrame{}
+
+
+
+//class ChangeViewFrameRole extends JFrame {}
+
+
+
+
+// #kozaki�ｽ@2009/05/27�ｽ@�ｽﾏ更
+//class MatrixViewFrame extends JFrame {}
+
+
+//#kozaki 2010/01/25
+//class ChangeViewFrameClass_at extends JFrame {}
+
+
+
