1 | package vishnu.testvis.visual;
|
---|
2 | import vishnu.testvis.treemap.visual.TMNavigator;
|
---|
3 | import vishnu.testvis.sammon.*;
|
---|
4 | import vishnu.testvis.object.*;
|
---|
5 | import vishnu.testvis.evaluate.*;
|
---|
6 | import vishnu.testvis.dendro.*;
|
---|
7 | import java.awt.*;
|
---|
8 | import javax.swing.*;
|
---|
9 | import java.awt.event.*;
|
---|
10 | import java.beans.*;
|
---|
11 | import javax.swing.event.*;
|
---|
12 | import java.io.*;
|
---|
13 | import java.util.Vector;
|
---|
14 | import java.util.Properties;
|
---|
15 | import java.applet.*;
|
---|
16 | import java.net.*;
|
---|
17 | import vishnu.datablock.*;
|
---|
18 |
|
---|
19 | public class VishnuSingle extends Vishnu
|
---|
20 | {
|
---|
21 |
|
---|
22 | protected void initCollections() {
|
---|
23 | // put in a dummy Collection
|
---|
24 | Collection c = new Collection(coll, coll, coll, 0, coll, null);
|
---|
25 | dataManager.currentCollection = c;
|
---|
26 | }
|
---|
27 |
|
---|
28 | // overwrite this to remove the collection stuff - cos we are working within one collection only
|
---|
29 | protected void jbInit() throws Exception {
|
---|
30 | JPanel pane = new JPanel();
|
---|
31 | setContentPane(pane);
|
---|
32 | pane.setBorder(BorderFactory.createLineBorder(Color.black, 2));
|
---|
33 | pane.setLayout(new BorderLayout());
|
---|
34 |
|
---|
35 | JPanel searchPanel = new JPanel();
|
---|
36 | searchPanel.setLayout(new BorderLayout(5,5));
|
---|
37 | searchPanel.setBackground(SystemColor.control);
|
---|
38 | searchBox = new JTextField();
|
---|
39 | searchBox.setPreferredSize(new Dimension((int)(size.width/5), 26));
|
---|
40 | searchBox.setEditable(true);
|
---|
41 | searchBox.addKeyListener(new java.awt.event.KeyAdapter(){
|
---|
42 | public void keyPressed(KeyEvent e)
|
---|
43 | {
|
---|
44 | findButton_keyPressed(e);
|
---|
45 | }
|
---|
46 | });
|
---|
47 |
|
---|
48 | JLabel searchLabel = new JLabel();
|
---|
49 | searchLabel.setFont(new java.awt.Font("Monospaced", 0, largeFont));
|
---|
50 | searchLabel.setForeground(Color.black);
|
---|
51 | searchLabel.setText("Search:");
|
---|
52 |
|
---|
53 | searchPanel.add(searchLabel, BorderLayout.WEST);
|
---|
54 | searchPanel.add(searchBox, BorderLayout.CENTER);
|
---|
55 |
|
---|
56 |
|
---|
57 | JPanel topPanel = new JPanel();
|
---|
58 | topPanel.setLayout(new BorderLayout(10,10));
|
---|
59 | topPanel.setBackground(SystemColor.control);
|
---|
60 | topPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
|
---|
61 |
|
---|
62 | JPanel backPanel = new JPanel();
|
---|
63 | backPanel.setPreferredSize(new Dimension(size.width,size.height));
|
---|
64 | backPanel.setBackground(SystemColor.control);
|
---|
65 | backPanel.setLayout(new BorderLayout());
|
---|
66 |
|
---|
67 | theTabbedPane.setBackground(SystemColor.control);
|
---|
68 | theTabbedPane.setFont(new java.awt.Font("Monospaced", Font.BOLD, largeFont));
|
---|
69 | theTabbedPane.addChangeListener(new javax.swing.event.ChangeListener(){
|
---|
70 | public void stateChanged(ChangeEvent e)
|
---|
71 | {
|
---|
72 | theTabbedPane_stateChanged(e);
|
---|
73 | }
|
---|
74 | });
|
---|
75 |
|
---|
76 | findButton.setBackground(SystemColor.control);
|
---|
77 | findButton.setFont(new java.awt.Font("Monospaced", 0, largeFont));
|
---|
78 | findButton.setBorder(BorderFactory.createEtchedBorder());
|
---|
79 | findButton.setText("Find");
|
---|
80 | findButton.addKeyListener(new java.awt.event.KeyAdapter(){
|
---|
81 | public void keyPressed(KeyEvent e)
|
---|
82 | {
|
---|
83 | findButton_keyPressed(e);
|
---|
84 | }
|
---|
85 | });
|
---|
86 |
|
---|
87 | findButton.addMouseListener(new java.awt.event.MouseAdapter(){
|
---|
88 | public void mouseClicked(MouseEvent e)
|
---|
89 | {
|
---|
90 | findButton_mouseClicked(e);
|
---|
91 | }
|
---|
92 | });
|
---|
93 |
|
---|
94 | pane.add(backPanel, BorderLayout.CENTER);
|
---|
95 | backPanel.add(theTabbedPane, BorderLayout.CENTER);
|
---|
96 |
|
---|
97 | theTabbedPane.add(plainPanel, "PlainVis");
|
---|
98 | theTabbedPane.add(radVizPanel, "RadialVis");
|
---|
99 | theTabbedPane.add(sammonPanel,"SammonVis");
|
---|
100 | theTabbedPane.add(dendroPanel,"DendroVis");
|
---|
101 | theTabbedPane.setForegroundAt(0,Color.blue);
|
---|
102 |
|
---|
103 | pane.add(topPanel, BorderLayout.NORTH);
|
---|
104 |
|
---|
105 | topPanel.add(searchPanel, BorderLayout.CENTER);
|
---|
106 | topPanel.add(findButton, BorderLayout.EAST);
|
---|
107 |
|
---|
108 | theTabbedPane.setPreferredSize(size);
|
---|
109 |
|
---|
110 | }
|
---|
111 |
|
---|
112 |
|
---|
113 | }
|
---|
114 |
|
---|
115 |
|
---|
116 |
|
---|
117 |
|
---|
118 |
|
---|