[8189] | 1 | package vishnu.testvis.dendro;
|
---|
| 2 |
|
---|
| 3 | import javax.swing.*;
|
---|
| 4 | import java.awt.*;
|
---|
| 5 | import java.awt.event.*;
|
---|
| 6 | import vishnu.testvis.visual.*;
|
---|
| 7 | import vishnu.testvis.object.*;
|
---|
| 8 | import vishnu.testvis.sammon.*;
|
---|
| 9 | import java.util.*;
|
---|
| 10 |
|
---|
| 11 | /** Panel containing the dendro map interface */
|
---|
| 12 | public class DendroPanel extends JPanel
|
---|
| 13 | {
|
---|
| 14 |
|
---|
| 15 | public final static int LIST_ON_LEFT = 0;
|
---|
| 16 | public final static int LIST_ON_RIGHT = 1;
|
---|
| 17 |
|
---|
| 18 | public JPanel picturePanel;
|
---|
| 19 | public TreePanel treePanel;
|
---|
| 20 | public DendroKeywordPanel keywordPanel;
|
---|
| 21 | public HLinkPanel hLinkPanel;
|
---|
| 22 | public Stack dataStack;
|
---|
| 23 | public DataManager dataMan=null;
|
---|
| 24 | public Vishnu currentMain;
|
---|
| 25 | public JPanel topPanel = new JPanel();
|
---|
| 26 |
|
---|
| 27 | public DendroPanel(Vishnu parent)
|
---|
| 28 | {
|
---|
| 29 | currentMain = parent;
|
---|
| 30 | setUpGui();
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | public void setUpGui()
|
---|
| 34 | {
|
---|
| 35 | setLayout(new BorderLayout(10,10));
|
---|
| 36 | setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
|
---|
| 37 | treePanel = new TreePanel(this,currentMain);
|
---|
| 38 | keywordPanel = new DendroKeywordPanel(currentMain,this);
|
---|
| 39 | Dimension d = currentMain.getSize();
|
---|
| 40 | hLinkPanel = new HLinkPanel((int)(d.width)/4,d.height,currentMain);
|
---|
| 41 | picturePanel = new JPanel();
|
---|
| 42 | picturePanel.setLayout(new BorderLayout(0,3));
|
---|
| 43 |
|
---|
| 44 | picturePanel.add(treePanel,"Center");
|
---|
| 45 | add("East", hLinkPanel.linkPane);
|
---|
| 46 | add("Center", picturePanel);
|
---|
| 47 | add("West", keywordPanel);
|
---|
| 48 | setVisible(true);
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | public void update()
|
---|
| 52 | {
|
---|
| 53 | dataMan = currentMain.dataManager;
|
---|
| 54 | dataStack = new Stack();
|
---|
| 55 | treePanel.clear();
|
---|
| 56 | treePanel.update();
|
---|
| 57 | keywordPanel.clear();
|
---|
| 58 | hLinkPanel.clear();
|
---|
| 59 | }
|
---|
| 60 | }
|
---|
| 61 |
|
---|