File: LiveJGraphInternalFrame.java

package info (click to toggle)
libjgraph-java 5.12.2.1.dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,788 kB
  • ctags: 7,274
  • sloc: java: 20,300; xml: 124; makefile: 37
file content (41 lines) | stat: -rw-r--r-- 962 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package org.jgraph.example;

import javax.swing.JTable;
import javax.swing.JScrollPane;
import org.jgraph.graph.DefaultGraphCell;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JInternalFrame;

public class LiveJGraphInternalFrame extends JInternalFrame {
	private DefaultGraphCell _graphCell = null;

	public LiveJGraphInternalFrame() {
		setResizable(true);
		setFrameIcon(null);
		setClosable(true);
		setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
	}

	public void create() {
		JPanel mainPanel = new JPanel(new BorderLayout());
		JScrollPane sp = new JScrollPane(new JTable(2, 3));
		mainPanel.add(sp, BorderLayout.CENTER);
		getContentPane().add(mainPanel);
		pack();
		setSize(320, 320);
		setVisible(true);
	}

	public String toString() {
		return ("");
	}

	public void setGraphCell(DefaultGraphCell graphCell) {
		_graphCell = graphCell;
	}

	public DefaultGraphCell getGraphCell() {
		return (_graphCell);
	}
}