// 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.conflabelapplet;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ItemEvent;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JScrollPane;
import medusa.MedusaSettings;
import medusa.applet.MedusaLite;

public final class ConfLabelApplet extends MedusaLite {
    
    
    
    public void initPanel(){
        System.out.println("Initializing panel");
        String settingsParam=getParameter("settings");
        
        MedusaSettings stringSettings = new MedusaSettings(settingsParam);
        
        String linkStart=getParameter("linkStart");
        String linkEnd=getParameter("linkEnd");
        System.out.println(linkStart);
        setPanel(new ConfLabelAppletPanel(stringSettings, this, linkStart, linkEnd));
        System.out.println(getPanel());
    }
    
    JCheckBox relax=new JCheckBox("Relax",true);
    JCheckBox names = new JCheckBox("Labels", true);
    JButton frButton = new JButton("Layout");
    JScrollPane jScrollPane;
    final Color christian=new Color(230,226,230);
    
    
    public void populateControlPanel(){
        
        controlPanel.setLayout(new FlowLayout());
        controlPanel.setBackground(christian);
        relax.setBackground(christian);
        
        names.setBackground(christian);
        frButton.setBackground(christian);
        controlPanel.add(relax); relax.addItemListener(this);
        
        //controlPanel.add(names); names.addItemListener(this);
        controlPanel.add(frButton); frButton.addActionListener(this);
    }
    
    public void actionPerformed(ActionEvent e) {
        Object es=e.getSource();
        if (es==frButton){
            //panel.startCool();
            relax.setSelected(false);
            panel.energy();
        }
        //if (es == imageButton){
        
    }
    
    public void itemStateChanged(ItemEvent e){
        Object src = e.getSource();
        if (src==relax){
            if (relax.isSelected()){
                panel.start();
                //panel.energy();
            } else
                panel.stop();
        }
        
    }
}
 

Ads help maintain this website.