// Medusa is a graph viewer which allows interactive editing of networks
// (edges and nodes) and also connects to databases.
//
// Copyright (C) 2006 Sean Hooper
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or (at
// your option) any later version.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
// Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the
// Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330,
// Boston, MA 02111-1307 USA
package medusa.display;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import medusa.*;
import medusa.graph.Edge;
import medusa.graph.Node;
public class EdgeDialog extends JDialog implements ActionListener {
private static EdgeDialog edgeDialog;
private EdgeDialog(java.awt.Frame frame, java.awt.Component locationComp){
this(frame, locationComp, new MedusaSettings());
}
private EdgeDialog(java.awt.Frame frame,
java.awt.Component locationComp, MedusaSettings ss){
super(frame, "",true);
setDefaultLookAndFeelDecorated(true);
this.ss= ss;
//ss.report();
init();
setLocationRelativeTo(locationComp);
}
MedusaSettings ss;
final java.awt.Color stringColor = MedusaSimplerFrame.STRINGCOLOR;
final int preferredHeight=20;
final int preferredWidth=50;
final java.awt.Dimension textAreaSize
= new java.awt.Dimension(preferredWidth,preferredHeight);
private JButton submitButton = new JButton("Submit");
private JButton cancelButton = new JButton("Cancel");
private JLabel node1Label = new JLabel("Node 1");
private JTextArea node1Area = new JTextArea();
private JLabel node2Label = new JLabel("Node 2");
private JTextArea node2Area = new JTextArea();
private JPanel mainPanel = new JPanel();
private JLabel titleLabel = new JLabel();
private JLabel sideLabel = new JLabel();
private JPanel bottomPanel = new JPanel();
// interaction type
private JLabel interactionLabel = new JLabel("Type");
//private String[] numbers = {"1","2","3"};
private JComboBox interactionCB;
private JLabel confidenceLabel = new JLabel("Conf");
private JTextArea confidenceArea = new JTextArea("1.0");
private JLabel orientationLabel = new JLabel("Ori");
private JTextArea orientationArea = new JTextArea("0.0");
private String[] getInteractions(){
int i = ss.getSize();
//System.out.println(i);
String[] numbers = new String[i];
for (int j=0; j
Ads help maintain this website.