root/BH13SPARQLBuilder/src/hozo/maptool/ExtendFrame.java @ 31

リビジョン 7, 59.7 KB (コミッタ: kozaki, 11 年 前)

GUI部分です.

  • 属性 svn:mime-type の設定値 text/plain
行番号 
1package hozo.maptool;
2
3import java.awt.BorderLayout;
4import java.awt.Checkbox;
5import java.awt.Color;
6import java.awt.Dimension;
7import java.awt.Font;
8import java.awt.GridLayout;
9import java.awt.Image;
10import java.awt.Point;
11import java.awt.Toolkit;
12import java.awt.event.*;
13import java.io.BufferedReader;
14import java.io.BufferedWriter;
15import java.io.File;
16import java.io.FileInputStream;
17import java.io.FileReader;
18import java.io.FileWriter;
19import java.io.IOException;
20import java.io.InputStream;
21import java.io.InputStreamReader;
22import java.io.PrintWriter;
23import java.util.*;
24import java.io.*;
25
26import javax.swing.JButton;
27import javax.swing.JCheckBox;
28import javax.swing.JCheckBoxMenuItem;
29import javax.swing.JComboBox;
30import javax.swing.JFileChooser;
31import javax.swing.JFrame;
32import javax.swing.JLabel;
33import javax.swing.JMenu;
34import javax.swing.JMenuBar;
35import javax.swing.JMenuItem;
36import javax.swing.JOptionPane;
37import javax.swing.JPanel;
38import javax.swing.JScrollPane;
39import javax.swing.JTextArea;
40import javax.swing.JTextField;
41import javax.swing.JList;
42import javax.swing.event.ChangeEvent;
43import javax.swing.event.ChangeListener;
44
45import java.beans.*;
46
47public class ExtendFrame extends JFrame {
48
49        private static final long serialVersionUID = 1L;
50
51        //#kozaki 2008/10/05�ス@GUI�スフア�スN�スZ�スX�ス�スprivate�ス�ス�ス�スマ更
52        private ExtendBP _exbp = null;
53        JScrollPane jsp_exbp;
54        JTextField jtf_nodesize = new JTextField("12",5);
55        JTextField jtf_layer = new JTextField("4",5);
56        JTextField jtf_width = new JTextField("100",5);
57    JTextField jtf_scale = new JTextField("10",5);
58    JTextField jtf_rotation = new JTextField("0",5);
59    JCheckBox jCB_VisibleCenter;
60    JCheckBox jCB_VisibleInflu;
61    JCheckBox jCB_VisibleLink;
62    JCheckBox jCB_VisibleLayer;
63    JCheckBox jCB_VisibleBorder;
64    JTextField jTF_Option;
65
66    private JComboBox jCB_LayoputOption;
67
68    private JComboBox jCB_LocalPath;
69    private String _localProjectRootPath;
70    private List _localPathList;
71    private static final int MAX_HISTORY_SIZE = 10;
72    private static String HISTORY_PATH = "temp";
73    private static String LOCAL_HISTORY_FILE_NAME = "map.his";
74       
75    private static final String DEFAULT_TITLE = "Hozo2Map";
76   
77    private static final String SERVICE_URL_FILE = "extools.ini";
78    protected static final String DEFAULT_SERVICE_URL = "http://localhost:8080";
79
80        protected static String SERVICE_URL = DEFAULT_SERVICE_URL;
81   
82    private JButton select_option = new JButton("...");
83//    EtendBPSelectDialog select_dialog;
84   
85    JCheckBox jCB_stop;
86    JCheckBox jCB_PlaceOnLayer;
87    JCheckBox jCB_showEdges;
88   
89    public int rotation = 0;
90    Double arc = 1.0;
91
92    JCheckBox jCB_stoplist;
93    String[] stoplist_string={
94                "process","object","quantity","flow","agent","value",
95                "attribute","natural construction","substance","Artificial object",
96                "action","activity","situation","substrate","Big","Speed","direction of change",
97                "�スv�ス�ス�スZ�スX","�ス�ス","�スl�スH�ス�ス","�ス�ス�ス�ス","�ス�ス�ス�ス","�ス�ス","�ス�ス�ス�ス","�スG�ス[�スW�スF�ス�ス�スg","�スl"};
98    JMenuItem JMI_stoplist = new JMenuItem("Edit Stop List");
99   
100    JMenuBar menubar = new JMenuBar();
101    JMenu filemenu = new JMenu("File");
102    JMenu viewmenu = new JMenu("View");         //#ohta 2008/11/18 View�ス�ス�スj�ス�ス�ス[�スフ追会ソス
103    JMenuItem JMI_OpenMap = new JMenuItem("OpenMap");
104    JMenuItem JMI_SaveMap = new JMenuItem("SaveMap");
105    JMenuItem JMI_MergeMap = new JMenuItem("MergeMap");
106    JMenuItem JMI_CompareMap = new JMenuItem("Compare Maps");
107    JMenuItem JMI_ShowAspects = new JMenuItem("show Aspect Dialog");
108    JMenuItem JMI_ChangeView = new JMenuItem("Change View");
109    JMenuItem JMI_SerachPath = new JMenuItem("Search Path");
110    JMenuItem JMI_SerachPathEasy = new JMenuItem("<html><font color=red><b>Search Path (Easy)");
111    JMenuItem JMI_ChangeViewRole = new JMenuItem("Change View(by Role)");
112    JCheckBoxMenuItem JCMI_isSublang = new JCheckBoxMenuItem("Sub Langage");
113   
114    // #hirota 09/5/14
115    JMenuItem JMI_ChangeViewRole_at = new JMenuItem("Change View(by Role_attribute)");
116   
117    //  #kozaki�ス@2010/01/25�ス@�ス\�ス�ス�ス�ス�ス�スMAP�ス�ス�ス�スI�ス�ス�ス�ス�ス�ス�スX�ス�ス�スb�スg�スl�スi�ス�ス�ス�ス�スj�ス�ス�ス�ス�スツノ�ス[�スh�ス�ス�スn�スC�ス�ス�スC�スg
118    JMenuItem JMI_ChangeViewClass_at = new JMenuItem("Change View(by Class_attribute)");
119   
120    // #kozaki�ス@2009/05/27
121    JMenuItem JMI_MatrixView = new JMenuItem("Matrix View");
122         
123    public ExtendFrame compare_map; //#kozaki 2008/08/18
124   
125    //#hirota mappath�ス�スr�スp
126    int max_node_tensuu=0,max_link_tensuu=0;
127    public Vector path_list = new Vector(); // �ス�ス�スマ撰ソス
128    public Vector subpath_list = new Vector(); //
129   
130       
131        /**
132         * This is the default constructor
133         */
134        public ExtendFrame(MapFactory fac) {
135                super();
136                _exbp = new ExtendBP(fac);
137                _exbp._extendFrame=this;
138                _exbp.setPreferredSize(new Dimension(2000,2000));
139               
140                // #hirota 09/4/27 add
141//              _exbp._extendFrame.setLocation(_exbp.cmd_dialog.getWidth(), 0);
142                 //new DockingListener(_exbp._extendFrame, _exbp.cmd_dialog);
143                 
144                initialize();
145       
146        this._localPathList = new ArrayList();
147       
148        this.setLocalPathHistory();     // �スq�スX�スg�ス�ス�ス[�スフ読搾ソス
149        this.updateDisplay();    // �ス�スハゑソス�スX�スV�ス�ス�ス�ス
150        this.getServiceURL();    // URL�スフ趣ソス闕橸ソス�ス
151       
152       
153    }
154
155       
156        public static void main (String[] args) {
157                ExtendFrame exfm = new ExtendFrame(null);
158        //exfm.setHZEditor(_hzEditor);
159                exfm._exbp.exbp_node_center=new ExbpNode(0,0,0,0);
160        exfm.setVisible(true);
161        //exfm.RefreshExbp();   
162       
163               
164               
165        }
166       
167       
168       
169        //#kozaki 2008/08/18
170        //#hirota 08/20
171        void setCompare(){
172                //System.out.println("setCompare:::");
173                if(this._exbp.mapfactory.getMapVec().size() == 1){
174                        System.out.println("not Compare!!!");
175                        return;
176                }
177               
178                // Map_vec dialog �ス\�ス�ス
179                Vector tmp = new Vector();// select_name�スヌ暦ソス
180                Vector Exf = new Vector();
181                Enumeration e = this._exbp.mapfactory.getMapVec().elements();
182                while(e.hasMoreElements()){
183                        ExtendFrame f = (ExtendFrame)e.nextElement();
184                        if(!this.equals(f)) {
185                                tmp.add(f._exbp.exbp_node_center.getLabel() + ":" + f.getOption());
186                                Exf.add(f);
187                        }
188                }
189                JList jlist = new JList(tmp);
190               
191                JScrollPane jsc = new JScrollPane(jlist);
192                int ans = JOptionPane.showConfirmDialog(this,jsc,"Compare ",JOptionPane.YES_NO_CANCEL_OPTION );
193               
194                this._exbp.topicColorList.add(Color.red);
195                this._exbp.topicColorList.add(Color.blue);
196               
197                ExtendFrame comp=null;
198                if(ans==JOptionPane.YES_OPTION ){
199
200
201                        comp = (ExtendFrame)Exf.elementAt(jlist.getSelectedIndex());
202
203                        comp._exbp.topicColorList.add(Color.red);
204                        comp._exbp.topicColorList.add(Color.blue);
205
206                        System.out.println("select ::"+ comp._exbp.exbp_node_center.getLabel() + ":" + comp.getOption());               
207               
208               
209                        // check
210                        Enumeration en = this.getExtendBP().nodes.elements();
211                        while(en.hasMoreElements()){
212                                ExbpNode node = (ExbpNode)en.nextElement();
213                                                               
214                                // ROOT�スヘ擾ソス�スO
215                                if(node.getOrgNode() != null/* && !(node.getHozoNode() instanceof NodeRH)*/){
216                                        Object hozonode = node.getOrgNode();
217                                        //System.out.println("Check:::"+hozonode.getLabel());
218                                       
219                                        Enumeration en_comp = comp._exbp.nodes.elements();
220                                        while(en_comp.hasMoreElements()){
221                                                ExbpNode node_comp = (ExbpNode)en_comp.nextElement();
222                                                               
223                                                //ROOT�スヘ擾ソス�スO
224                                                if( node_comp.getOrgNode() != null/* && !(node_comp.getOrgNode() instanceof NodeRH)*/){
225                                                       
226                                                        if(node_comp.getOrgNode().equals(hozonode)){
227                                                                //node.highlight=true;
228                                                                //node_comp.highlight=true;
229                                                                node.setHighLight(true, Color.darkGray);
230                                                                /*node.color=Color.white;
231                                                                node_comp.setHighLight(true, Color.darkGray);
232                                                                node_comp.color=Color.white;*/
233                                                                node.addTopicColor(Color.red);
234                                                                node.addTopicColor(Color.blue);
235                                                                node_comp.addTopicColor(Color.red);
236                                                                node_comp.addTopicColor(Color.blue);
237                                                               
238                                                               
239                                                                System.out.println("March:::"+node.getLabel());
240                                                                //break;
241                                                        }
242                                                }
243                                        }                                                       
244                                       
245                                }else{
246                                        // ozonode = null;
247                                }
248                        }
249                       
250                        this.getExtendBP().repaint();           
251                }
252        }
253       
254        int addTopicColorToALLNode(Color clr){
255                int count=0;
256                Enumeration en = this.getExtendBP().nodes.elements();
257                while(en.hasMoreElements()){
258                        ExbpNode node = (ExbpNode)en.nextElement();
259                        if(node.open_sub=false){
260                                node.setChildrenVisible(false);
261                        }
262                }
263               
264                en = this.getExtendBP().nodes.elements();
265                while(en.hasMoreElements()){
266                        ExbpNode node = (ExbpNode)en.nextElement();
267                        if(node.visible){
268                                node.addTopicColor(clr);
269                                count++;
270                        }
271                        else{
272                                node.color=Color.white;
273                        }
274                }                                       
275                return count;
276        }
277       
278        int compareMaps(ExtendFrame exf1, Color clr1,
279                                        ExtendFrame exf2, Color clr2){
280                //System.out.println("setCompare:::");
281                int count=0;
282//              this._exbp.topicColorList.add(Color.red);
283//              this._exbp.topicColorList.add(Color.blue);
284//             
285//              comp = (ExtendFrame)Exf.elementAt(jlist.getSelectedIndex());
286//
287//                      comp._exbp.topicColorList.add(Color.red);
288//                      comp._exbp.topicColorList.add(Color.blue);
289//
290//                      System.out.println("select ::"+ comp._exbp.exbp_node_center.getLabel() + ":" + comp.getOption());               
291               
292               
293                        // check
294                        Enumeration en = exf1.getExtendBP().nodes.elements();
295                        while(en.hasMoreElements()){
296                                ExbpNode node = (ExbpNode)en.nextElement();
297                                                               
298                                // ROOT�スヘ擾ソス�スO
299                                if(node.visible && node.getOrgNode() != null/* && !(node.getHozoNode() instanceof NodeRH)*/){
300                                        Object hozonode = node.getOrgNode();
301                                        //System.out.println("Check:::"+hozonode.getLabel());
302                                       
303                                        Enumeration en_comp = exf2._exbp.nodes.elements();
304                                        while(en_comp.hasMoreElements()){
305                                                ExbpNode node_comp = (ExbpNode)en_comp.nextElement();
306                                                               
307                                                //ROOT�スヘ擾ソス�スO
308                                                if(node_comp.visible && node_comp.getOrgNode() != null/* && !(node_comp.getOrgNode() instanceof NodeRH)*/){
309                                                       
310                                                        if(node_comp.getOrgNode().equals(hozonode)){
311                                                                count++;
312                                                                //node.highlight=true;
313                                                                //node_comp.highlight=true;
314                                                                node.setHighLight(true, Color.darkGray);
315                                                                /*node.color=Color.white;
316                                                                node_comp.setHighLight(true, Color.darkGray);
317                                                                node_comp.color=Color.white;*/
318                                                                node.addTopicColor(clr2);
319                                                                //node.addTopicColor(Color.blue);
320                                                                node_comp.addTopicColor(clr1);
321                                                                //node_comp.addTopicColor(Color.blue);
322                                                               
323                                                               
324                                                                //System.out.println("March:::"+node.getLabel());
325                                                                //break;
326                                                        }
327                                                }else{
328                                                        //System.out.println("exf2:HOZO-NODE=NULL");
329                                                }
330                                        }                                                       
331                                       
332                                }else{
333                                        //System.out.println("exf1:HOZO-NODE=NULL");
334                                        // ozonode = null;
335                                }
336                       
337                       
338                }
339        return count;
340        }
341       
342       
343        // #hirota 09/12/17
344        void ComparePath(ExbpNode _exbpNode){
345                //System.out.println("setCompare:::");
346                if(this._exbp.mapfactory.getMapVec().size() == 1){
347                        System.out.println("not Compare!!!");
348                        return;
349                }
350               
351                // Map_vec dialog �ス\�ス�ス
352                Vector tmp = new Vector();// select_name�スヌ暦ソス
353                Vector Exf = new Vector();
354                Enumeration e = this._exbp.mapfactory.getMapVec().elements();
355                while(e.hasMoreElements()){
356                        ExtendFrame f = (ExtendFrame)e.nextElement();
357                        if(!this.equals(f)) {
358                                tmp.add(f._exbp.exbp_node_center.getLabel() + ":" + f.getOption());
359                                Exf.add(f);
360                        }
361                }
362                JList jlist = new JList(tmp);
363               
364                JScrollPane jsc = new JScrollPane(jlist);
365                int ans = JOptionPane.showConfirmDialog(this,jsc,"Compare ",JOptionPane.YES_NO_CANCEL_OPTION );
366               
367                ExtendFrame comp=null;
368                if(ans==JOptionPane.YES_OPTION ){
369                       
370                        comp = (ExtendFrame)Exf.elementAt(jlist.getSelectedIndex());
371
372                        System.out.println("select ::"+ comp._exbp.exbp_node_center.getLabel() + ":" + comp.getOption());               
373               
374               
375                        // check
376                        Enumeration en = this.getExtendBP().nodes.elements();
377                        while(en.hasMoreElements()){
378                                ExbpNode node = (ExbpNode)en.nextElement();
379                                                               
380                                // ROOT�スヘ擾ソス�スO
381                                if(node.getOrgNode() != null/* && !(node.getHozoNode() instanceof NodeRH)*/){
382                                        Object hozonode = node.getOrgNode();
383                                        //System.out.println("Check:::"+hozonode.getLabel());
384                                       
385                                        Enumeration en_comp = comp._exbp.nodes.elements();
386                                        while(en_comp.hasMoreElements()){
387                                                ExbpNode node_comp = (ExbpNode)en_comp.nextElement();
388                                                               
389                                                //ROOT�スヘ擾ソス�スO
390                                                if( node_comp.getOrgNode() != null/* && !(node_comp.getOrgNode() instanceof NodeRH)*/){
391                                                       
392                                                        if(node_comp.getOrgNode().equals(hozonode)){
393                                                                //node.highlight=true;
394                                                                //node_comp.highlight=true;
395                                                                //System.out.println("March:::"+node.getLabel());
396                                                                //break;
397                                                        }
398                                                }
399                                        }                                                       
400                                       
401                                }else{
402                                        // ozonode = null;
403                                }
404                        }
405                       
406                        this.getExtendBP().repaint();   
407                       
408                        // #hirota 09/12/17 path�ス�スr�ス�ス�ス�ス
409                        //
410                       
411                             
412                             
413                      // �ス�ス�スロの擾ソス�ス�ス
414                      // _exbpNode:�ス�ス�スニ選�ス�ス�スp�スX�スC_exbp:�ス�ス�ス�ス�ス}�スb�スv
415                      ExbpNode _exbpNode_moto = _exbpNode;
416                      Enumeration nodes_en =comp._exbp.nodes.elements();
417                                while(nodes_en.hasMoreElements()){
418                                        ExbpNode exnode = (ExbpNode)nodes_en.nextElement();
419                                        int tensuu=0;
420                                        if(exnode.visible == true){
421                                               
422                                                //
423                                                // �ス�ス�スニ選�ス�ス�スp�スX�ス@�ス�スi�ス�ス�スツゑソス�ス轤キ
424                                                while(_exbpNode != null ){
425                                                       
426                                                        // System.out.println("�ス�ス�ス�ス:"+  _exbpNode.label );
427                                                        //      �ス�ス�スx�ス�ス�ス�スv�ス�ス�ス�スニ,�ス�ス�スs�スC
428                                                        if(exnode.getLabel().equals(_exbpNode.getLabel())) {
429                                                               
430                                                                // �ス�ス�ス�ス�スN�ス�スv�ス�ス�ス�ス�ス+1�ス_
431                                                                if( exnode.key.equals(_exbpNode.key)){
432                                                                        //tensuu++;
433                                                                }
434                                                                //System.out.println("�ス�ス selected_path :"+ "("+ _exbpNode.label + ")" + exnode.getPath());
435                                                                //String str = "�ス�ス selected_path :"+ "("+ _exbpNode.label + ")" + exnode.getPath();
436                                                                String str = "�ス�ス selected_path :";
437                                                                System.out.println(str);
438                                                               
439                                                                // old
440                                                                //exnode.tracepath(_exbpNode, tensuu, str);             
441                                                               
442//                                                              // new �ス�ス�ス�ス�ス�ス�ス�ス�ス�ス�ス�ス�スI�スI
443//                                                              str = tracepath(_exbpNode,_exbpNode, tensuu, str);     
444//                                                              System.out.println(str);
445                                                               
446                                                        }else{
447                                                               
448                                                        }
449                                                       
450                                                        _exbpNode = _exbpNode.parent;                                                           
451                                                }
452                                                _exbpNode = _exbpNode_moto ;
453                                               
454                                        }                                       
455                                        else{
456                                               
457                                        }
458                                       
459                                }
460                                //
461                               
462                }
463        }
464
465        // #hirota 09/12/21 new
466        void CompareAllMAP_Path(ExbpNode _exbpNode){}
467       
468        void CompareAllMAP_Path_sub(ExbpNode _exbpNode){}
469       
470        public void tracepath(ExbpNode target_node, ExbpNode _exbpNode,int node_tensuu, int link_tensuu, String s){
471               
472                if(target_node.parent != null){
473                        if(_exbpNode != null ){
474                                if(target_node.visible == true){
475                                       
476                                        if(target_node.label.equals(_exbpNode.label)){
477                                               
478                                                node_tensuu++;
479                                                if(target_node.key.equals(_exbpNode.key) ){
480                                                        link_tensuu++;
481                                                }                               
482                                               
483                                               
484                                                //      System.out.println("*** :"+ this.label + ", �ス�ス " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
485                                                // max�ス�ス�スワゑソス�スX�スV�ス�ス�ス�ストゑソス�スネゑソス�ス鼾�ソスフ擾ソス�ス�ス cast�スG�ス�ス�ス[�ス�ス�スナるた�ス�ス
486                                                String str = null;
487                                                if(max_node_tensuu == 0 && max_link_tensuu == 0){
488                                                        str = " *"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
489                                                        + target_node.parent.label+ ","+node_tensuu+","+link_tensuu;
490                                                }else{
491                                                        String[] s_tmp = s.split(","); // s_tmp[0]:path
492                                                        str = s_tmp[0] + "\n  *"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
493                                                        + target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;                                           
494//                                                      str = " :"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
495//                                                      + target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;
496                                                }                                               
497                                                System.out.println(str);                                               
498                                               
499                                                //target_node.setColorFont(Color.red,font);
500                                                path_list.add(str);
501                                                subpath_list.add(target_node);
502                                                //path_list.add(s+"\n"+str);
503                                                //tracepath(target_node.parent,_exbpNode.parent,node_tensuu,link_tensuu,s+"\n"+str);                                   
504                                                tracepath(target_node.parent,_exbpNode.parent,node_tensuu,link_tensuu,str);
505                                       
506                                        }else{
507                                                // #hirota 09/12/24 �スm�ス[�スh�ス�スv�ス�ス�ストゑソス�スネゑソス�ストゑソス�スC�ス�ス�ス�ス�ス�ス�スツづゑソス�ス�ス@�ス�ス�スニ難ソス�ス�ス�ス@�ス�ス�ス_�スヘゑソス�スネゑソス
508                                                if(target_node.key.equals(_exbpNode.key) ){
509                                                        link_tensuu++;
510                                                }                               
511                                               
512                                               
513                                                // System.out.println("*** :"+ this.label + ", �ス�ス " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
514                                                // max�ス�ス�スワゑソス�スX�スV�ス�ス�ス�ストゑソス�スネゑソス�ス鼾�ソスフ擾ソス�ス�ス cast�スG�ス�ス�ス[�ス�ス�スナるた�ス�ス
515                                                String str = null;
516                                                if(max_node_tensuu == 0 && max_link_tensuu == 0){
517                                                        str = " **"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
518                                                        + target_node.parent.label+ ","+node_tensuu+","+link_tensuu;
519                                                }else{
520                                                        String[] s_tmp = s.split(","); // s_tmp[0]:path
521                                                        str = s_tmp[0] + "\n  **"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
522                                                        + target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;                                   
523
524                                                }                                               
525                                                System.out.println(str);                                       
526                                                path_list.add(str);     
527                                                subpath_list.add(target_node);
528                                                tracepath(target_node.parent,_exbpNode.parent,node_tensuu,link_tensuu,str);
529                                               
530                                                // System.out.println("*** error");
531                                                // return null;
532                                        }
533                                }
534                               
535                        }
536                       
537                }else{
538                 // OK                 
539                }               
540                //return null;         
541        }
542       
543        // 09/12/25 �ス�ス�ス
544        //       #hirota 09/12/17 �ス�ス�ス�ス�スフパ�スX�ス]�ス�ス�スp�ス�ス�ス�ス
545        public void tracepathToTarget(ExbpNode target_node, ExbpNode _exbpNode,int node_tensuu, int link_tensuu, String s){
546               
547                // �スI�ス�ス�ス�ス�ス黷ス�ス�ス�スヤ目的�スm�ス[�スh�スナはなゑソス�ス鼾�
548                if( ! _exbpNode.equals(target_node) ){
549                       
550                        if(_exbpNode != null ){
551                                if(target_node.visible == true){
552                                       
553                                        if(target_node.label.equals(_exbpNode.label)){
554                                               
555                                                node_tensuu++;
556                                                if(target_node.key.equals(_exbpNode.key) ){
557                                                        link_tensuu++;
558                                                }                               
559                                               
560                                               
561                                                //      System.out.println("*** :"+ this.label + ", �ス�ス " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
562                                                // max�ス�ス�スワゑソス�スX�スV�ス�ス�ス�ストゑソス�スネゑソス�ス鼾�ソスフ擾ソス�ス�ス cast�スG�ス�ス�ス[�ス�ス�スナるた�ス�ス
563                                                String str = null;
564                                                if(max_node_tensuu == 0 && max_link_tensuu == 0){
565                                                        str = " *"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
566                                                        + target_node.parent.label+ ","+node_tensuu+","+link_tensuu;
567                                                }else{
568                                                        String[] s_tmp = s.split(","); // s_tmp[0]:path
569                                                        str = s_tmp[0] + "\n  *"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
570                                                        + target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;                                           
571//                                                      str = " :"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
572//                                                      + target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;
573                                                }                                               
574                                                System.out.println(str);                                               
575                                               
576                                                //target_node.setColorFont(Color.red,font);
577                                                path_list.add(str);
578                                                subpath_list.add(target_node);
579                                                //path_list.add(s+"\n"+str);
580                                                //tracepath(target_node.parent,_exbpNode.parent,node_tensuu,link_tensuu,s+"\n"+str);                                   
581                                                tracepathToTarget(target_node,_exbpNode.parent,node_tensuu,link_tensuu,str);
582                                       
583                                        }else{
584                                                // #hirota 09/12/24 �スm�ス[�スh�ス�スv�ス�ス�ストゑソス�スネゑソス�ストゑソス�スC�ス�ス�ス�ス�ス�ス�スツづゑソス�ス�ス@�ス�ス�スニ難ソス�ス�ス�ス@�ス�ス�ス_�スヘゑソス�スネゑソス
585                                                if(target_node.key.equals(_exbpNode.key) ){
586                                                        link_tensuu++;
587                                                }                               
588                                               
589                                               
590                                                // System.out.println("*** :"+ this.label + ", �ス�ス " + "(" +this.key + ")" + this.parent.label + "tensuu:" + tensuu);
591                                                // max�ス�ス�スワゑソス�スX�スV�ス�ス�ス�ストゑソス�スネゑソス�ス鼾�ソスフ擾ソス�ス�ス cast�スG�ス�ス�ス[�ス�ス�スナるた�ス�ス
592                                                String str = null;
593                                                if(max_node_tensuu == 0 && max_link_tensuu == 0){
594                                                        str = " **"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
595                                                        + target_node.parent.label+ ","+node_tensuu+","+link_tensuu;
596                                                }else{
597                                                        String[] s_tmp = s.split(","); // s_tmp[0]:path
598                                                        str = s_tmp[0] + "\n  **"+ target_node.label + "�ス�ス "+ "(" +target_node.key + "):"
599                                                        + target_node.parent.label+ ","+node_tensuu+"/"+max_node_tensuu+","+link_tensuu+"/"+max_link_tensuu;                                   
600
601                                                }                                               
602                                                System.out.println(str);                                       
603                                                path_list.add(str);     
604                                                subpath_list.add(target_node);
605                                                tracepathToTarget(target_node,_exbpNode.parent,node_tensuu,link_tensuu,str);
606                                               
607                                                // System.out.println("*** error");
608                                                // return null;
609                                        }
610                                }
611                               
612                        }
613                       
614                }else{
615                 // OK                 
616                }               
617                //return null;         
618        }
619       
620        void saveMap(){
621                if(this._exbp.mapfactory.isSubLung){
622                        Object[] msg={"Do you save this MAP in Sub Language?",
623                                              "(*Warning* Some data may be lost!)"};
624                        int ans = JOptionPane.showConfirmDialog(this._exbp._extendFrame, msg,
625                                        "Save Map Data in Sub-Language",
626                                        JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
627                        if(ans!=JOptionPane.YES_OPTION){
628                                return;
629                        }
630                }
631               
632               
633                String OPEN_DIRECTORY = "./data3/mapdata/";
634                File dir = new File(OPEN_DIRECTORY);
635                if(!dir.exists()){
636                        File ont_file = this._exbp.mapfactory.getFile();
637                        if(ont_file!=null){
638                                OPEN_DIRECTORY= ont_file.getParentFile().getAbsolutePath();
639                        }
640                }
641                JFileChooser  fd = new JFileChooser(OPEN_DIRECTORY);
642                fd.showSaveDialog(this);
643                File file = fd.getSelectedFile();
644               
645                this.getExtendBP().saveMAPinXML(file);
646                return;
647        }
648       
649        void saveMap_old(){
650                               
651                // Map_vec dialog �ス\�ス�ス
652                Vector tmp = new Vector();// select_name�スヌ暦ソス
653                Vector Exf = new Vector();
654                String chi_str="";
655               
656                Enumeration e = this._exbp.mapfactory.getMapVec().elements();
657                while(e.hasMoreElements()){
658                        ExtendFrame f = (ExtendFrame)e.nextElement();
659                        //if(!this.equals(f)) {
660                       
661                        //ROOT�スフとゑソス�スC�スq�スm�ス[�スh�ス�ス�スt�ス@�スC�ス�ス�スノ保托ソス
662                        if(f._exbp.exbp_node_center.getLabel().equals("(ROOT)")){
663                               
664                               
665                                Enumeration node_en = f._exbp.exbp_node_center.children.elements();
666                    while(node_en.hasMoreElements()){
667                                        ExbpNode chi = (ExbpNode)node_en.nextElement();
668                                        chi_str = chi_str+chi.getLabel()+",";                                   
669                                }
670                    tmp.add("(ROOT)"+chi_str + ":" + f.getOption());
671                        }
672                        // center �ス�スツのとゑソス
673                        else{
674                                tmp.add(f._exbp.exbp_node_center.getLabel() + ":" + f.getOption());
675                        }
676                       
677                       
678                        Exf.add(f);
679                        //}
680                }
681                JList jlist = new JList(tmp);
682               
683                JScrollPane jsc = new JScrollPane(jlist);
684               
685                //#kozaki
686                JCheckBox saveAsAnother = new JCheckBox("Save as Another File");
687                Object[] msg = {jsc,saveAsAnother};
688               
689               
690               
691                int ans = JOptionPane.showConfirmDialog(this,msg,"SAVE MAP_file ",JOptionPane.YES_NO_CANCEL_OPTION );
692               
693                ExtendFrame comp=null;
694                if(ans==JOptionPane.YES_OPTION ){
695
696                        //2008/10/03�ス@#kozaki Save�ス�ス�ス�スMAP�ス�ス�スI�ス�ス�スナゑソス�ス驍ア�スニゑソスh�ス�ス
697                        if(jlist.getSelectedIndex()<0){
698                                comp=(ExtendFrame)Exf.elementAt(0);
699                        }
700                        else{
701                                comp = (ExtendFrame)Exf.elementAt(jlist.getSelectedIndex());
702                        }
703                       
704
705                        System.out.println("select ::"+ comp._exbp.exbp_node_center.getLabel() + ":" + comp.getOption());       
706                       
707                        //#kozaki 2008/10/03�ス@�スハのフ�ス@�スC�ス�ス�スニゑソス�スト保托ソス�ス�ス�ス�ス
708                        if(saveAsAnother.isSelected()){
709                                String OPEN_DIRECTORY = "./data3/mapdata/";
710                                JFileChooser  fd = new JFileChooser(OPEN_DIRECTORY);
711                                fd.showSaveDialog(this);
712                                File file = fd.getSelectedFile();
713                               
714                                this.getExtendBP().saveMAPinXML(file);
715                                return;
716                        }
717                       
718                        //
719                        //save �ス�ス�ス�ス
720                        String fileName = "";
721                String directoryName = "";
722
723                // �スt�ス@�スC�ス�ス�ス�ス�ス繽托ソス�ス�スロ托ソス�ス�ス�ス�ス
724                if(this._exbp.mapfactory != null) {
725                    //_hzEditor.getOEManager().saveData_XML(_hzEditor.getFile(), true);
726                    //Command cmd = new CommandSave(this._exbp._hzeditor);
727                    //cmd.execute();
728
729                    fileName = this._exbp.mapfactory.getFile().getName();
730                    directoryName =this._exbp.mapfactory.getFile().getAbsolutePath();
731                    //directoryName =hozo.oe.command.CommandExportText.OPEN_DIRECTORY;
732                   
733                }
734
735                try {
736
737                        String map_command ="";
738                        // center�スP�スツのとゑソス
739                        if(chi_str.equals("")){
740                                map_command =  fileName +"::"+ comp._exbp.exbp_node_center.getLabel() + "::" + comp.getOption();
741                        }
742                        //�ス@center�ス�ス�ス�ス�スフとゑソス
743                        else{
744                                map_command =  fileName +"::"+ "(ROOT)"+ chi_str + "::" + comp.getOption();
745                        }
746                        System.out.println("write::"+map_command);
747
748                   
749                    File map_file = new File(directoryName+fileName+".hozo_map");
750                    FileOutputStream os = null;
751                   
752                    //�ス@�スヌ会ソス�ス�ス�ス�ス
753                    if(map_file.exists()){      os = new FileOutputStream(map_file,true); }
754                   
755                    // �スO�スノ搾ソス�ス�ス�ス�ス�ス�スニゑソス�スネゑソス�ス�ス�ス�ス�スニゑソス�スC�スV�スK�ス�ャ
756                    else{   os = new FileOutputStream(map_file); }   
757                   
758                    OutputStreamWriter osw = new OutputStreamWriter(os , "MS932");
759                    BufferedWriter bw = new BufferedWriter(osw);
760                    bw.write(map_command);
761                    bw.newLine();
762                   
763                    bw.close();
764                    osw.close();
765                    os.close();
766                   
767                } catch (IOException ioe) {
768                    System.out.println(ioe.getStackTrace());
769                }
770               
771               
772               
773                }
774        }
775       
776        /**
777         * This method initializes this
778         *
779         * @return void
780         */
781        private void initialize() {
782                //this.setSize(650, 600); //#kozaki 2008/06/26
783                this.setSize(920, 800); //#hirota 2009/11/5
784                this.getContentPane().setLayout(new BorderLayout());
785                this.jsp_exbp = new JScrollPane(_exbp);
786                this.getContentPane().add(jsp_exbp,BorderLayout.CENTER );
787                //this.getContentPane().add(new JScrollPane(new JTextArea(100,100)),BorderLayout.CENTER );
788                //this.setContentPane(getJContentPane());
789                JPanel panel_buttons=new JPanel();
790                this.getContentPane().add(panel_buttons,BorderLayout.SOUTH);
791                JLabel j;
792                       
793               
794                // #hirota 08/08/20
795                this.addWindowListener(new WindowAdapter() {
796            public void windowClosing(WindowEvent e) {
797                System.out.println("fin_Map :: "+ _exbp.exbp_node_center.getLabel() + ":"+_exbp._extendFrame.getOption());
798                if(_exbp.mapfactory!=null){
799                        _exbp.mapfactory.getMapVec().removeElement(_exbp._extendFrame);
800                }
801//              if(_exbp._hzeditor!=null){
802//                      _exbp._hzeditor.Map_vec.removeElement(_exbp._extendFrame);
803//              }
804//              _exbp.cmd_dialog.dispose();
805                dispose();             
806            }
807        });
808                   
809       
810                //#kozaki 2008/10/04�ス@�ス�ス�スj�ス�ス�ス[�スo�ス[�スフ追会ソス
811                this.setJMenuBar(menubar);
812                menubar.add(filemenu);
813                filemenu.add(JMI_OpenMap);
814                JMI_OpenMap.addActionListener(new java.awt.event.ActionListener() {
815            public void actionPerformed (ActionEvent e) {
816                OpenMAPinXML(false);
817            }
818        });
819               
820                // #hirota 08/10/21
821                filemenu.add(JMI_SaveMap);
822                JMI_SaveMap.addActionListener(new java.awt.event.ActionListener() {
823            public void actionPerformed (ActionEvent e) {
824                saveMap();
825            }
826        });
827               
828                filemenu.addSeparator();
829                filemenu.add(JMI_MergeMap);
830                JMI_MergeMap.addActionListener(new java.awt.event.ActionListener() {
831            public void actionPerformed (ActionEvent e) {
832                OpenMAPinXML(true);
833            }
834        });
835                //JMI_CompareMap
836                filemenu.add(JMI_CompareMap);
837                JMI_CompareMap.addActionListener(new java.awt.event.ActionListener() {
838            public void actionPerformed (ActionEvent e) {
839                OpenMapsToCompare();
840            }
841        });
842               
843                //#ohta 2008/11/18 Aspect�ス_�スC�スA�ス�ス�スO�スフ表�ス�ス�ス�ス�スj�ス�ス�ス[�スフ追会ソス
844                menubar.add(viewmenu);
845                viewmenu.add(JMI_ShowAspects);
846                JMI_ShowAspects.addActionListener(new java.awt.event.ActionListener() {
847            public void actionPerformed (ActionEvent e) {
848//              _exbp.cmd_dialog.setVisible(true);
849            }
850        });
851               
852                //#kozaki�ス@2009/01/04�ス@�ス\�ス�ス�ス�ス�ス�スMAP�ス�ス�ス�スI�ス�ス�ス�ス�ス�ス�スN�ス�ス�スX�スフ会ソス�スハ概�スO�スフゑソス�スn�スC�ス�ス�スC�スg
853                viewmenu.add(JMI_ChangeView);
854                JMI_ChangeView.addActionListener(new java.awt.event.ActionListener() {
855            public void actionPerformed (ActionEvent e) {
856                //String[] cls_lists =  _exbp.mapfactory.getSelectedClass(new String[0]);
857//              Node[] cls_lists =  _exbp.mapfactory.getSelectedClassNodes(null);
858                //String opt = _exbp._extendFrame.select_dialog.commands[0].getSelectedClass();
859//              if(opt==null){
860//                                      opt="Any";
861//                              }
862//                      String[] cls_lists = opt.split(" "+"\\" + Slot.OR_DELIMITER+" ");
863                        //_exbp.setClassRestrictedView(cls_lists);
864//                      new ChangeViewFrame(_exbp,cls_lists);
865            }
866        });
867               
868                //#kozaki�ス@2009/01/21�ス@�ス\�ス�ス�ス�ス�ス�スMAP�ス�ス�ス�スI�ス�ス�ス�ス�ス�スRole�スフパ�スX�ス�ス�スn�スC�ス�ス�スC�スg
869                viewmenu.add(JMI_ChangeViewRole);
870                JMI_ChangeViewRole.addActionListener(new java.awt.event.ActionListener() {
871            public void actionPerformed (ActionEvent e) {
872//              ChangeViewFrameRole frame = new ChangeViewFrameRole(_exbp);
873               
874                //Vector roles =  _exbp.mapfactory.getRoleList();
875            /*  Vector roles =  _exbp.getLinkList();
876                String[] list = new String[roles.size()];
877                roles.copyInto(list);
878                JList jlist = new JList(list);
879                JScrollPane jsp = new JScrollPane(jlist);
880                //jlist.setPreferredSize(new Dimension(100,300));
881                JOptionPane.showMessageDialog(null,jsp);
882                //jsp.setPreferredSize(new Dimension(100,300));
883                int[] indexes =jlist.getSelectedIndices();
884                String[] values = new String[indexes.length];
885                for(int i=0;i<indexes.length;i++){
886                        values[i]=list[indexes[i]];
887                }
888                _exbp.setRoleRestrictedView(values);*/
889                }
890        });
891               
892                //      #hirota�ス@2009/05/14�ス@�ス\�ス�ス�ス�ス�ス�スMAP�ス�ス�ス�スI�ス�ス�ス�ス�ス�スRole_at�スフパ�スX�ス�ス�スn�スC�ス�ス�スC�スg
893                viewmenu.add(JMI_ChangeViewRole_at);
894                JMI_ChangeViewRole_at.addActionListener(new java.awt.event.ActionListener() {
895            public void actionPerformed (ActionEvent e) {
896//              ChangeViewFrameRole_at frame = new ChangeViewFrameRole_at(_exbp);
897                               
898            }
899        });
900               
901                //      #kozaki�ス@2010/01/25�ス@�ス\�ス�ス�ス�ス�ス�スMAP�ス�ス�ス�スI�ス�ス�ス�ス�ス�ス�スX�ス�ス�スb�スg�スl�スi�ス�ス�ス�ス�スj�ス�ス�ス�ス�スツノ�ス[�スh�ス�ス�スn�スC�ス�ス�スC�スg
902                viewmenu.add(JMI_ChangeViewClass_at);
903                JMI_ChangeViewClass_at.addActionListener(new java.awt.event.ActionListener() {
904            public void actionPerformed (ActionEvent e) {
905//              ChangeViewFrameClass_at frame = new ChangeViewFrameClass_at(_exbp);
906                               
907            }
908        });
909               
910                //#kozaki 2009/05/27
911                viewmenu.add(JMI_MatrixView);
912                JMI_MatrixView.addActionListener(new java.awt.event.ActionListener() {
913            public void actionPerformed (ActionEvent e) {
914//              MatrixViewFrame frame = new MatrixViewFrame(_exbp);                             
915            }
916        });
917               
918                JMenuItem JMI_ChangeViewTopic = new JMenuItem("Change View By Topic");
919                viewmenu.add(JMI_ChangeViewTopic);
920                JMI_ChangeViewTopic.addActionListener(new java.awt.event.ActionListener() {
921            public void actionPerformed (ActionEvent e) {
922//              ChangeViewFrameByTopic frame = new ChangeViewFrameByTopic(_exbp);
923                               
924            }
925        });
926                viewmenu.addSeparator();
927               
928               
929                //#kozaki 2009/01/04�ス@�スI�ス�ス�ス�ス�ス�ス�スN�ス�ス�スX�スノ趣ソス�ス�スp�スX�ス�ス�ス�ス�ス�ス�ス�ス�ス�スMAP�ス�ス\�ス�ス
930                viewmenu.add(JMI_SerachPath);
931                JMI_SerachPath.addActionListener(new java.awt.event.ActionListener() {
932            public void actionPerformed (ActionEvent e) {
933               
934            }
935        });
936               
937                /*
938                viewmenu.add(JMI_SerachPathEasy);
939                JMI_SerachPathEasy.addActionListener(new java.awt.event.ActionListener() {
940            public void actionPerformed (ActionEvent e) {
941                        //String[] cls_lists =  _exbp.mapfactory.getSelectedClass(new String[0]);               
942                        Node[] cls_lists =  null;//_exbp.mapfactory.getSelectedClassNodes(null);
943                        ExbpNode[] target_nodes;
944                        if(_exbp.exbp_node_pick==null){
945                                if("ROOT".equals(_exbp.exbp_node_center.getLabel())){
946                                        target_nodes = new ExbpNode[_exbp.exbp_node_center.children.size()];
947                                        _exbp.exbp_node_center.children.copyInto(target_nodes);                                         
948                                }
949                                else{
950                                        target_nodes = new ExbpNode[1];
951                                        target_nodes[0]=_exbp.exbp_node_center;                         
952                                }               
953                        }
954                        else if(_exbp.cmd_dialog.all_node.isSelected()){
955                                int layer = _exbp.exbp_node_pick.getLocatedLayer();
956                                target_nodes = _exbp.getExbpNodesAtLear(layer,true);
957                }
958                else{
959                                target_nodes = new ExbpNode[1];
960                                target_nodes[0]=_exbp.exbp_node_pick;
961                        }
962                        new ChangeViewFrame(_exbp, target_nodes, cls_lists);
963            }
964        });*/
965               
966                //       #hirota 2009/7/31 �スX�スg�スb�スv�ス�ス�スX�スg�スフ表�ス�ス�スE�スメ集
967                viewmenu.add(JMI_stoplist);
968                JMI_stoplist.addActionListener(new java.awt.event.ActionListener() {
969            public void actionPerformed (ActionEvent e) {
970                JTextArea at = new JTextArea();
971                //JOptionPane.showInputDialog(this,at);
972                JOptionPane.showConfirmDialog(null, at, "Stop LIST", JOptionPane.INFORMATION_MESSAGE);
973                //Editstoplist list = new Editstoplist(_exbp);
974            }
975        });
976               
977                //#kozaki�ス@2009/02/15
978                viewmenu.addSeparator();
979                JCMI_isSublang.setSelected(this._exbp.mapfactory.isSubLung);
980                viewmenu.add(JCMI_isSublang);
981                JCMI_isSublang.addActionListener(new java.awt.event.ActionListener() {
982            public void actionPerformed (ActionEvent e) {
983//              _exbp.mapfactory.setSubLang(JCMI_isSublang.isSelected());
984                RefreshExbp();
985                }
986        });
987               
988                // #hirota a08/08/20
989                jtf_nodesize = new JTextField("12",3);
990                jtf_nodesize.addActionListener(new java.awt.event.ActionListener() {
991            public void actionPerformed (ActionEvent e) {
992                RefreshExbp();
993            }
994        });
995       
996                jtf_layer = new JTextField("6",3);
997        jtf_layer.addActionListener(new java.awt.event.ActionListener() {
998            public void actionPerformed (ActionEvent e) {
999                RefreshExbp();
1000            }
1001        });
1002                jtf_width = new JTextField("80",3);
1003        jtf_width.addActionListener(new java.awt.event.ActionListener() {
1004            public void actionPerformed (ActionEvent e) {
1005                RefreshExbp();
1006            }
1007        });
1008        jtf_rotation = new JTextField("0",3);
1009        jtf_rotation.addActionListener(new java.awt.event.ActionListener() {
1010            public void actionPerformed (ActionEvent e) {
1011                RefreshExbp();
1012            }
1013        });
1014//        jtf_scale = new JTextField("100",3);
1015//        jtf_scale.addActionListener(new java.awt.event.ActionListener() {
1016//            public void actionPerformed (ActionEvent e) {
1017//                RefreshExbp();
1018//            }
1019//        });
1020                JButton jb_refresh = new JButton("Refresh");
1021                jb_refresh.addActionListener(new java.awt.event.ActionListener() {
1022                        public void actionPerformed (ActionEvent e) {
1023                                RefreshExbp();
1024                        }
1025                });
1026               
1027                // #hirota 08/08/20
1028                JButton jb_compare = new JButton("Compare");
1029                jb_compare.addActionListener(new java.awt.event.ActionListener() {
1030                        public void actionPerformed (ActionEvent e) {
1031                                setCompare();
1032                        }
1033                });
1034               
1035        jCB_VisibleCenter = new JCheckBox("Root");
1036        jCB_VisibleCenter.setSelected(true);
1037        jCB_VisibleCenter.addChangeListener(new ChangeListener() {
1038            public void stateChanged(ChangeEvent e) {
1039                _exbp.setVisibleCenter(jCB_VisibleCenter.isSelected());
1040                getExtendBP().repaint();
1041            }
1042        });
1043        //#kozak 2008/02/10i
1044        jCB_VisibleInflu = new JCheckBox("Influ.");
1045        jCB_VisibleInflu.setSelected(true);
1046        jCB_VisibleInflu.addChangeListener(new ChangeListener() {
1047            public void stateChanged(ChangeEvent e) {
1048                _exbp.setVisibleInflu(jCB_VisibleInflu.isSelected());
1049                getExtendBP().repaint();
1050            }
1051        });
1052        jCB_VisibleLink = new JCheckBox("Link");
1053        jCB_VisibleLink.setSelected(true);//#kozaki�ス@2008/06/26�ス@Link�ス\�ス�ス�スヘデ�スt�スH�ス�ス�スgON�スノ変更
1054        jCB_VisibleLink.addChangeListener(new ChangeListener() {
1055            public void stateChanged(ChangeEvent e) {
1056                _exbp.setVisibleLink(jCB_VisibleLink.isSelected());
1057                getExtendBP().repaint();
1058            }
1059        });
1060        jCB_VisibleLayer = new JCheckBox("Layer");
1061        jCB_VisibleLayer.setSelected(true);
1062        jCB_VisibleLayer.addChangeListener(new ChangeListener() {
1063            public void stateChanged(ChangeEvent e) {
1064                _exbp.setVisibleLevel(jCB_VisibleLayer.isSelected());
1065                getExtendBP().repaint();
1066            }
1067        });
1068        jCB_VisibleBorder = new JCheckBox("Border");
1069        jCB_VisibleBorder.setSelected(true);
1070        jCB_VisibleBorder.addChangeListener(new ChangeListener() {
1071            public void stateChanged(ChangeEvent e) {
1072                _exbp.setVisibleBorder(jCB_VisibleBorder.isSelected());
1073                getExtendBP().repaint();
1074            }
1075        });
1076        jTF_Option = new JTextField("",30);
1077        jTF_Option.setPreferredSize(new Dimension(200, jTF_Option.getPreferredSize().height));
1078        jTF_Option.addActionListener(new java.awt.event.ActionListener() {
1079            public void actionPerformed (ActionEvent e) {
1080                String opt = jTF_Option.getText();
1081                System.out.println("action:"+opt);
1082                _exbp.setNodes(opt);
1083                RefreshExbp();
1084            }
1085        });
1086       
1087        //#kozaki�ス@2008/06/26�ス@�ス�ス�スC�スA�スE�スg�ス�ス@�スリゑソスヨゑソス
1088        jCB_LayoputOption = new JComboBox();
1089        jCB_LayoputOption.addItem("Link Centric Layout");
1090        jCB_LayoputOption.addItem("Node Centric Layout");
1091        jCB_LayoputOption.addItem("Link Centric Layout2");
1092        jCB_LayoputOption.setEditable(true);
1093        jCB_LayoputOption.addActionListener(new ActionListener() {
1094            public void actionPerformed(ActionEvent e) {
1095                String text = (String) jCB_LayoputOption.getSelectedItem();
1096                if (text != null) {
1097                    if(text.equals("Link Centric Layout")){
1098                        _exbp.setLayoutOption(_exbp.LinkCentricLayout);
1099                    }
1100                    else if(text.equals("Node Centric Layout")){
1101                        _exbp.setLayoutOption(_exbp.NodeCentricLayout);
1102                    }
1103                    else if(text.equals("Link Centric Layout2")){
1104                        _exbp.setLayoutOption(_exbp.LinkCentricLayout2);
1105                    }                             
1106                    RefreshExbp();
1107                    updateHsitoryPath();    // �ス�ス�ス�ス�ス�ス�スX�スV�ス�ス�ス�ス
1108                    updateDisplay();    // �ス�スハゑソス�スX�スV�ス�ス�ス�ス
1109                }
1110               
1111            }
1112        });
1113       
1114        jCB_LocalPath = new JComboBox();
1115        jCB_LocalPath.setEditable(true);
1116        jCB_LocalPath.setMinimumSize(new Dimension(100, 12));
1117        jCB_LocalPath.setMaximumSize(new Dimension(250, 12));//#kozaki2008/06/26
1118        jCB_LocalPath.addActionListener(new ActionListener() {
1119            public void actionPerformed(ActionEvent e) {
1120                String text = (String) jCB_LocalPath.getSelectedItem();
1121                if (text != null) {
1122                    _localProjectRootPath = text;
1123                } else {
1124                    _localProjectRootPath
1125                            = jCB_LocalPath.getEditor().getItem().toString();
1126                }
1127                               
1128                if(_localProjectRootPath.length() > 0
1129                        && getExtendBP() != null
1130                        && getExtendBP().exbp_node_center != null) {
1131                    _exbp.setNodes(_localProjectRootPath);
1132                    RefreshExbp();
1133                   
1134                    updateHsitoryPath();    // �ス�ス�ス�ス�ス�ス�スX�スV�ス�ス�ス�ス
1135                    updateDisplay();    // �ス�スハゑソス�スX�スV�ス�ス�ス�ス
1136                }
1137               
1138            }
1139        });
1140       
1141                // #hirota 08/08/25
1142                JButton jb_save = new JButton("SAVE");
1143                jb_save.addActionListener(new java.awt.event.ActionListener() {
1144                        public void actionPerformed (ActionEvent e) {
1145                               
1146                                saveMap();
1147                                //System.out.println("save_Map :: "+ _exbp.exbp_node_center.getLabel() + ":"+_exbp._extendFrame.getOption());
1148                               
1149                        }
1150                });
1151               
1152        //#kozaki 2008/08/12�ス@�スo�スl�ス�ス�スf�ス�ス�スp�ス�ス�ス�ス
1153        jCB_stop = new JCheckBox("Stop");
1154        jCB_stop.setSelected(_exbp.stop);
1155        jCB_PlaceOnLayer = new JCheckBox("Place on Layers");
1156        jCB_PlaceOnLayer.setSelected(_exbp.stopOnLayer);
1157        jCB_showEdges = new JCheckBox("Show Edges");
1158        jCB_showEdges.setSelected(_exbp.showEdges);
1159        jCB_stop.addItemListener(new ItemListener(){
1160                public void itemStateChanged(ItemEvent e) {
1161                        _exbp.stop=jCB_stop.isSelected();
1162            }
1163        });
1164        jCB_PlaceOnLayer.addItemListener(new ItemListener(){
1165                public void itemStateChanged(ItemEvent e) {
1166                        _exbp.stopOnLayer=jCB_PlaceOnLayer.isSelected();
1167            }
1168        });
1169        jCB_showEdges.addItemListener(new ItemListener(){
1170                public void itemStateChanged(ItemEvent e) {
1171                        _exbp.showEdges=jCB_showEdges.isSelected();
1172            }
1173        });
1174       
1175//      #hirota 2009/07/31 stopList�ス�ス�ス�ス
1176        jCB_stoplist = new JCheckBox("Stop_List");
1177        jCB_stoplist.setSelected(true);
1178        jCB_stoplist.addItemListener(new ItemListener(){
1179                public void itemStateChanged(ItemEvent e) {
1180                       
1181                        Enumeration nodes_en = _exbp.nodes.elements();
1182                        while(nodes_en.hasMoreElements()){
1183                                ExbpNode node = (ExbpNode)nodes_en.nextElement();
1184                                                               
1185                                for(int i=0;i<stoplist_string.length;i++){
1186                                        if(stoplist_string[i].equals(node.getLabel())){
1187                                                node.setVisibleWithChildren(!jCB_stoplist.isSelected()); // �スm�ス[�スh�ス�ス�ス�ス
1188                                                //node.setVisbleChildren(!jCB_stoplist.isSelected());// �スm�ス[�スh�スc�ス�ス
1189                                        }                                       
1190                                }                               
1191                        }
1192                        //RefreshExbp();
1193                        getExtendBP().repaint();
1194            }
1195        });
1196        JButton jb_zoomINfont = new JButton("+");
1197        jb_zoomINfont.addActionListener(new ActionListener() {
1198            public void actionPerformed(ActionEvent e) {
1199                int width = Integer.parseInt(jtf_nodesize.getText());
1200                jtf_nodesize.setText(Integer.toString(width+1));
1201                RefreshExbp();
1202            }
1203        });
1204        JButton jb_zoomOUTfont = new JButton("-");
1205        jb_zoomOUTfont.addActionListener(new ActionListener() {
1206            public void actionPerformed(ActionEvent e) {
1207                int width = Integer.parseInt(jtf_nodesize.getText());
1208                jtf_nodesize.setText(Integer.toString(width-1));
1209                RefreshExbp();
1210            }
1211        });
1212       
1213        panel_buttons.setLayout(new GridLayout(2,1));//#kozaki 2008/08/12
1214        JPanel panel1 = new JPanel();
1215        JPanel panel2 = new JPanel();
1216        //JPanel panel3 = new JPanel();//#kozaki 2008/08/12
1217        panel_buttons.add(panel1);
1218        panel_buttons.add(panel2);
1219        //panel_buttons.add(panel3);//#kozaki 2008/08/12
1220        panel1.add(jb_zoomINfont);
1221        panel1.add(jb_zoomOUTfont);
1222        panel1.add(new JLabel("node_size"));
1223        panel1.add(jtf_nodesize);       
1224        panel1.add(new JLabel("Number of Layer"));
1225        panel1.add(jtf_layer);         
1226        panel1.add(new JLabel("Width"));
1227        panel1.add(jtf_width);
1228//        panel_buttons.add(new JLabel("Scale"));
1229//        panel_buttons.add(jtf_scale);
1230        panel1.add(jCB_VisibleCenter);
1231        panel1.add(jCB_VisibleInflu);
1232        panel1.add(jCB_VisibleLink);
1233        panel1.add(jCB_VisibleLayer);
1234        panel1.add(jCB_VisibleBorder);
1235        panel1.add(jCB_LayoputOption); //#kozaki 2008/06/26
1236        //panel_buttons.add(jTF_Option);
1237       
1238       
1239       
1240        JButton jb_zoomIN = new JButton("+");
1241        jb_zoomIN.addActionListener(new ActionListener() {
1242            public void actionPerformed(ActionEvent e) {
1243                int width = Integer.parseInt(jtf_width.getText());
1244                jtf_width.setText(Integer.toString(width+10));
1245                RefreshExbp();
1246            }
1247        });
1248        JButton jb_zoomOUT = new JButton("-");
1249        jb_zoomOUT.addActionListener(new ActionListener() {
1250            public void actionPerformed(ActionEvent e) {
1251                int width = Integer.parseInt(jtf_width.getText());
1252                jtf_width.setText(Integer.toString(width-10));
1253                RefreshExbp();
1254            }
1255        });
1256        JButton jb_rotation1 = new JButton("�ス�ス");
1257        jb_rotation1.addActionListener(new ActionListener() {
1258            public void actionPerformed(ActionEvent e) {
1259                //_exbp.rotation=_exbp.rotation+1;
1260                arc += 1.0;
1261                RefreshExbp();
1262            }
1263        });
1264       
1265        JButton jb_rotation2 = new JButton("�ス�ス");
1266        jb_rotation1.addActionListener(new ActionListener() {
1267            public void actionPerformed(ActionEvent e) {
1268                //_exbp.rotation=_exbp.rotation-1;
1269                arc -= 1.0;
1270                RefreshExbp();
1271            }
1272        });
1273       
1274       
1275        panel2.add(jb_zoomIN);
1276        panel2.add(jb_zoomOUT);
1277        panel2.add(new JLabel("Rotation"));
1278        panel2.add(this.jtf_rotation);
1279       
1280      /*  panel2.add(jCB_LocalPath);
1281        panel2.add(select_option);
1282        select_option.addActionListener(new ActionListener() {
1283            public void actionPerformed(ActionEvent e) {
1284                               
1285                // #hirota 08/10/21 update
1286                //select_dialog.setcenter(_exbp.mapfactory.hzEditor.findNode(_exbp.exbp_node_center.getLabel()));
1287               
1288                //String opt = _exbp._extendFrame.getOption();
1289                String opt = jTF_Option.getText();
1290                System.out.println("rebutton_opt::"+opt);
1291                select_dialog.setCommandtoCommandPanel(opt);
1292                select_dialog.setVisible(true);
1293               
1294            }
1295        });*/
1296       
1297        panel2.add(jb_refresh);
1298        panel2.add(jb_compare); // #hirota 08/08/20
1299        panel2.add(jCB_stop);//#kozaki 2008/08/12
1300        panel2.add(jCB_PlaceOnLayer);//#kozaki 2008/08/12
1301        panel2.add(jCB_showEdges);//#kozaki 2008/08/12
1302        // panel2.add(jb_save); // #hirota 08/10/21
1303        panel2.add(jCB_stoplist); // #hirota 09/2009/07/31
1304       
1305                this.setTitle(DEFAULT_TITLE);
1306        }
1307
1308        public boolean checkStopList(ExbpNode node){
1309                for(int i=0;i<stoplist_string.length;i++){
1310                        if(stoplist_string[i].equals(node.getLabel())){
1311                                return true;
1312                                }                                       
1313                }       
1314               
1315                return false;
1316        }
1317       
1318        //#kozaki 2008/10/04�ス@XML�ス`�ス�ス�スナ保托ソス�ス�ス�ス�スMAP�ス�スOPEN
1319        // #hirota protected �ス�ス�ス@public �ス�ス
1320        public void OpenMAPinXML(boolean merge) {
1321                String OPEN_DIRECTORY = "./data3/mapdata/";
1322                File dir = new File(OPEN_DIRECTORY);
1323                if(!dir.exists()){
1324                        File ont_file = this._exbp.mapfactory.getFile();
1325                        if(ont_file!=null){
1326                                OPEN_DIRECTORY= ont_file.getParentFile().getAbsolutePath();
1327                        }
1328                }
1329               
1330                JFileChooser  fd = new JFileChooser(OPEN_DIRECTORY);
1331
1332                if(merge){
1333                        fd.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
1334                }
1335                fd.showOpenDialog(this);
1336                File file = fd.getSelectedFile();
1337//              ExtendBPManager exbpmanager = new ExtendBPManager(this._exbp);
1338                //exbpmanager.openMAPinXML(file);
1339//              if(merge){
1340//                      exbpmanager.mergeMAP(file);
1341//                      _exbp.exbp_node_center.removeUnmatchNodes();
1342//                      _exbp.exbp_node_center.setVisibleWithChildren(true);
1343//                     
1344//              }
1345//              else{
1346//                      exbpmanager.openMAPinXML(file);
1347//              }
1348//             
1349//             
1350//              // #hirota 08/10/23
1351//              exbpmanager.exbp.mapfactory.exbpframe.RefreshExbp();
1352        }
1353       
1354       
1355        // #kozaki 2013/07/23�ス@�ス�ス�ス�ス�ス}�スb�スv�ス�ス�スr�スp�スノ開�ス�ス
1356        public void OpenMapsToCompare() {}
1357
1358        //#kozaki 2008/07/31
1359        int getLayerNum(){
1360                int layer;
1361                String layer_str = jtf_layer.getText();
1362                if(layer_str.indexOf(",")>0){
1363                        String[] str = layer_str.split(",");
1364                        layer = Integer.parseInt(str[1]);
1365                }else{
1366                        layer = Integer.parseInt(jtf_layer.getText());
1367                }
1368                return layer;
1369        }
1370
1371        //#kozaki 2008/07/31
1372        void setLayerNum(int i){
1373                jtf_layer.setText(Integer.toString(i));
1374        }
1375       
1376    // �ス`�ス�ス�ス�ス�ス�スt�ス�ス�スb�スV�ス�ス�ス�ス�ス�ス
1377        public void RefreshExbp(){
1378                int layer;
1379                Double arc = 1.0; //#kozaki 2008/03/25�ス@�ス�ス`�スフ角�スx�スン抵ソス
1380                String layer_str = jtf_layer.getText();
1381                if(layer_str.indexOf(",")>0){
1382                        String[] str = layer_str.split(",");
1383                        arc = Double.parseDouble(str[0]);
1384                        layer = Integer.parseInt(str[1]);
1385                }else{
1386                        layer = Integer.parseInt(jtf_layer.getText());
1387                }
1388               
1389                System.out.println("center::"+ getExtendBP().exbp_node_center.getLabel());
1390               
1391                // #hirota 08/08/19 node_size�スマ更
1392                int node_size = Integer.parseInt(jtf_nodesize.getText());
1393                ExtendBP.fontLink = new Font("Times", Font.PLAIN, node_size); //#kozaki 2008/08/19
1394                //exbp_node_center.color = ExbpNode.CENTER_COLOR;
1395                getExtendBP().exbp_node_center.font = new Font("Times", Font.BOLD,
1396                                (int)(node_size*(ExbpNode.Font_node_center)));
1397
1398                               
1399                int width = Integer.parseInt(jtf_width.getText());
1400        int scale = Integer.parseInt(jtf_scale.getText());
1401               
1402               
1403                getExtendBP().setNodesLoc(layer, width,arc, node_size);//#kozaki 2008/03/25�ス@�ス�ス`�スフ角�スx�スン抵ソス
1404        //getExtendBP().setCanvasScale(scale);
1405        getExtendBP().setNodesLoc();   // �スハ置�ス�ス�ス�ス�ス�ス�ス
1406        getExtendBP().setEdgesForSpringModel();//#kozaki�ス@2008/08/13�ス@
1407//              getExtendBP().repaint();
1408       
1409        // �ス^�スC�スg�ス�ス�ス�スマ更
1410        String subTitle = getExtendBP().exbp_node_center.getLabel();
1411        if (subTitle == ExtendBP.DEFAULT_NAME) {
1412            subTitle = getExtendBP().mapfactory.getFile().getName();
1413        }
1414       
1415        //#kozaki�ス@2008/08/18
1416        if(compare_map==null){
1417                this.setTitle(DEFAULT_TITLE, subTitle);
1418                }
1419        else{
1420                this.setTitle(DEFAULT_TITLE, subTitle+"<Compare>");
1421                        //#kozaki 2008/08/18�ス@�ス}�スb�スv�スフ費ソスr�ス�ス�ス�ス
1422            this.setCompare();
1423        }
1424       
1425        getExtendBP().repaint();
1426        }
1427       
1428    // �ス^�スC�スg�ス�ス�ス�スン定す�ス�ス
1429    private void setTitle(String mainTitle, String subTitle) {
1430        if (subTitle == null) {
1431            subTitle = "";
1432        }
1433        super.setTitle(mainTitle + " - [" + subTitle + "]");
1434    }
1435   
1436        /**
1437         * This method initializes jContentPane
1438         *
1439         * @return javax.swing.JPanel
1440         */
1441/*      private ExtendBP getJContentPane() {
1442                if (_exbp == null) {
1443                        //_exbp = new ExtendBP();
1444                        _exbp = new ExtendBP(this);
1445                        _exbp.setLayout(new BorderLayout());
1446                }
1447                return _exbp;
1448        }*/
1449       
1450        public ExtendBP getExtendBP(){
1451                return _exbp;
1452        }
1453
1454//    public void setHZEditor(HZEditor hze){
1455//      this._exbp.setHZEditor(hze);
1456//      select_dialog = new EtendBPSelectDialog(this._exbp,this);
1457//      hze.Map_vec.add(this);
1458//    }
1459 
1460    //#enegate# 08/07/07 �スI�ス�ス�ス_�スC�スA�ス�ス�スO�ス�スOK�ス{�ス^�ス�ス�ス�ス�ス�ス�ス�ス�ス黷ス�ス�ス�スヌゑソス�ス�ス�スH
1461//    public boolean isOK() {
1462//      return this.select_dialog.isOK();
1463//    }
1464   
1465//    public HZEditor getHZEditor() {
1466//        if (this._exbp == null) {
1467//            return null;
1468//        }
1469//        return this._exbp.getHZEditor();
1470//    }
1471   
1472    //#kozaki 2008/01/04
1473    void setOption(String opt){
1474        this.jTF_Option.setText(opt);
1475        this.jCB_LocalPath.getEditor().setItem(opt);
1476    }
1477   
1478    //#kozaki 2008/07/31
1479    String getOption(){
1480        return this.jTF_Option.getText();
1481    }
1482   
1483   
1484   
1485    /**
1486     *
1487     * �スp�スX�ス�ス�スX�スg�ス謫セ
1488     *
1489     * @param logPath   �ス�ス�スO�スp�スX
1490     * @return
1491     */
1492    private List loadPathList(String path) {
1493        ArrayList rtnList = new ArrayList();
1494       
1495        //�スp�スX�スt�ス@�スC�ス�ス
1496        File pathFile = new File(path);
1497       
1498        //�スt�ス@�スC�ス�ス�ス�ス�ス�ス�スンゑソス�スネゑソス�ス鼾�ソスヘ擾ソス�ス�ス�スネゑソス
1499        if (!pathFile.exists()) {
1500            return rtnList;
1501        }
1502
1503        //�スp�スX�ス�ス�スe�ス�スヌみ趣ソス�ス
1504        try {
1505            BufferedReader bReader = new BufferedReader(
1506                    new InputStreamReader(
1507                            new FileInputStream(pathFile.getAbsolutePath()),
1508                            "SJIS"));   
1509            try {
1510                String line;
1511                while((line = bReader.readLine()) != null){
1512                    rtnList.add(line);
1513                }
1514            } finally {
1515                bReader.close();
1516            }
1517        } catch(Exception e) {
1518            e.printStackTrace();
1519        }
1520       
1521        //return (String[]) rtnList.toArray(new String[rtnList.size()]);
1522        return rtnList;
1523    }
1524   
1525    /**
1526     *
1527     * �スp�スX�ス�ス�スX�スg�スロ托ソス
1528     *
1529     * @return
1530     */
1531    private void savePathList(String path, String name, List pathList) {
1532        //�スp�スX�スt�ス@�スC�ス�ス
1533        File pathFile = new File(path);
1534        //�スt�スH�ス�ス�ス_�ス�ス�ス�ス�スンゑソス�スネゑソス�ス鼾�ソスヘフ�スH�ス�ス�ス_�ス�ャ
1535        if (!pathFile.exists()) {
1536            pathFile.mkdir();
1537        }
1538        String filePath = path + "/" + name;
1539        File filePathFile = new File(filePath);
1540        //�スt�スH�ス�ス�ス_�ス�ス�ス�ス�スンゑソス�スネゑソス�ス鼾�ソスヘフ�スH�ス�ス�ス_�ス�ャ
1541        if (!filePathFile.exists()) {
1542            try {
1543                filePathFile.createNewFile();
1544            } catch(Exception e) {
1545                e.printStackTrace();
1546            }
1547        }
1548       
1549        try {
1550            FileWriter out = new FileWriter(filePathFile);
1551            Iterator it = pathList.iterator();
1552            while(it.hasNext()) {
1553                out.write(it.next().toString());
1554                out.write("\n");
1555            }
1556            out.close();
1557        } catch(Exception e) {
1558            e.printStackTrace();
1559        } finally {
1560       
1561        }
1562    }
1563   
1564    /**
1565     *
1566     * �ス�ス�ス[�スJ�ス�ス�スフパ�スX�ス�ス�ス�ス�ス�スン定し�スワゑソス�スB
1567     *
1568     */
1569    private void setLocalPathHistory() {
1570        this._localPathList.clear();
1571        String path = HISTORY_PATH + "/" + LOCAL_HISTORY_FILE_NAME;
1572        this._localPathList.addAll(this.loadPathList(path));
1573    }
1574   
1575    /**
1576     *
1577     * �ス�ス�ス[�スJ�ス�ス�スフパ�スX�ス�ス�ス�ス�ス�ス�ス謫セ�ス�ス�スワゑソス�スB
1578     *
1579     */
1580    public List getLocalPathHistory() {
1581        return this._localPathList;
1582    }
1583   
1584    /**
1585     *
1586     * �ス�ス�ス[�スJ�ス�ス�スフパ�スX�ス�ス�ス�ス�ス�スヌ会ソス�ス�ス�スワゑソス�スB
1587     *
1588     */
1589    public void appendLocalPathHistory(String path) {
1590        if(_localPathList != null && path != null
1591                && _localPathList.contains(path)) {
1592            _localPathList.remove(path);
1593        }
1594        _localPathList.add(0, path);    // �ス謫ェ�スノ追会ソス
1595       
1596        // �スナ托ソスl�スエゑソス�ス�スホ厄ソス�ス[�スワで擾ソス�ス�ス
1597        while (_localPathList.size() > MAX_HISTORY_SIZE) {
1598            int lastIndex = _localPathList.size() - 1;
1599            _localPathList.remove(lastIndex);
1600        }
1601    }
1602   
1603    /**
1604     *
1605     * �ス�ス�ス[�スJ�ス�ス�スフパ�スX�ス�ス�ス�ス�ス�スロ托ソス�ス�ス�スワゑソス�スB
1606     *
1607     */
1608    public void saveLocalPathHistory() {
1609        this.savePathList(HISTORY_PATH, LOCAL_HISTORY_FILE_NAME, this._localPathList);
1610    }
1611   
1612    /**
1613     *
1614     * �スp�スX�ス�ス�スX�スV�ス�ス�スワゑソス�スB
1615     *
1616     */
1617    public boolean updateHsitoryPath() {
1618        try {
1619            // �スp�スX�ス�ス�ス�ス�ス�スヌ会ソス
1620            this.appendLocalPathHistory(this._localProjectRootPath);
1621           
1622            // �スp�スX�ス�スロ托ソス�ス�ス�ス�ス
1623            this.saveLocalPathHistory();
1624             
1625            return true;
1626           
1627        } catch (Exception e) {
1628            e.printStackTrace();
1629           
1630            return false;
1631        }
1632    }
1633   
1634    /**
1635     *
1636     * �ス�スハ更�スV�ス�ス�スワゑソス�スB
1637     *
1638     */
1639    protected void updateDisplay() {
1640        if (_localProjectRootPath == null) _localProjectRootPath = "";
1641         // �ス�ス�ス�ス�スワゑソス
1642        jCB_LocalPath.removeAllItems();
1643        // �スp�スX�スフ表�ス�ス�ス�ス�スX�スV�ス�ス�ス�ス
1644        jCB_LocalPath.addItem(_localProjectRootPath);
1645         // �スq�スX�スg�ス�ス�ス[�ス謫セ
1646        List localPathList = this.getLocalPathHistory();
1647        Iterator it = localPathList.iterator();
1648        while (it.hasNext()) {
1649            String tmpLocalURL = (String) it.next();
1650            if (!tmpLocalURL.equals(_localProjectRootPath)) {
1651                jCB_LocalPath.addItem(tmpLocalURL);
1652            }
1653        }
1654    }
1655   
1656    // �スT�ス[�スr�スXURL�スフ読み搾ソス�ス�ス
1657    private void getServiceURL() {
1658        try {
1659            BufferedReader br = new BufferedReader(new FileReader(SERVICE_URL_FILE));
1660            SERVICE_URL = br.readLine();
1661            br.close();
1662            String name = null;
1663        } catch(IOException f) {
1664            SERVICE_URL = DEFAULT_SERVICE_URL;
1665        }
1666    }
1667}
1668
1669// #hirota 09/4/27 �スE�スC�ス�ス�スh�スE�ス�ス�ス�ス
1670class DockingListener implements ComponentListener {
1671    private final JFrame frame1;
1672    private final JFrame frame2;
1673
1674    public DockingListener(JFrame f1, JFrame f2) {
1675        frame1 = f1;
1676        frame1.addComponentListener(this);
1677        frame2 = f2;
1678        frame2.addComponentListener(this);
1679    }
1680    public void componentResized(ComponentEvent e) {
1681        positionFrames(e);
1682    }
1683    public void componentMoved(ComponentEvent e) {
1684        positionFrames(e);
1685    }
1686    public void componentShown(ComponentEvent e) {
1687        positionFrames(e);
1688    }
1689    public void componentHidden(ComponentEvent e) {
1690        positionFrames(e);
1691    }
1692    private void positionFrames(ComponentEvent e) {
1693        if(e.getComponent().equals(frame1)) {
1694            int x = frame1.getBounds().x - frame2.getWidth(); // + frame1.getBounds().width;
1695            int y = frame1.getBounds().y ;//+ frame1.getBounds().height;
1696            frame2.removeComponentListener(this);
1697            frame2.setLocation(x, y);
1698            frame2.addComponentListener(this);
1699        }else{
1700            int x = frame2.getBounds().x +  frame2.getWidth(); // - frame1.getBounds().width;
1701            int y = frame2.getBounds().y; //- frame1.getBounds().height;
1702            frame1.removeComponentListener(this);
1703            frame1.setLocation(x, y);
1704            frame1.addComponentListener(this);
1705        }
1706    }
1707}
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。