Package cysbml.cyactions

Source Code of cysbml.cyactions.ChangeStateAction

package cysbml.cyactions;

import java.awt.event.ActionEvent;

import javax.swing.Action;
import javax.swing.ImageIcon;

import cysbml.CySBML;
import cysbml.gui.NavigationPanel;
import cytoscape.util.CytoscapeAction;

@SuppressWarnings("serial")
public class ChangeStateAction extends CytoscapeAction {
    public ChangeStateAction() {super(CySBML.NAME + " Hide/Show Panel");}
   
  public ChangeStateAction(ImageIcon icon, CySBML plugin) {
    super("", icon);
    this.putValue(Action.SHORT_DESCRIPTION, CySBML.NAME + " Hide/Show Panel");
  }
   
    public void actionPerformed(ActionEvent ae) {
      NavigationPanel navPanel = NavigationPanel.getInstance();
      if (navPanel.isActive()){
        navPanel.deactivate();
      }else{
        navPanel.activate();
      }
    }     
   
  public boolean isInToolBar() {
    return true;
  }
 
  public boolean isInMenuBar() {
    return false;
  }
}
TOP

Related Classes of cysbml.cyactions.ChangeStateAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.