Back to index

wims  3.65+svn20090927
Public Member Functions | Public Attributes | Static Public Attributes | Package Functions | Package Attributes | Static Package Attributes
WIMSchem.MainPanel Class Reference
Inheritance diagram for WIMSchem.MainPanel:
Inheritance graph
[legend]
Collaboration diagram for WIMSchem.MainPanel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Properties loadProperties (String lang)
String getToolTips (int p)
 MainPanel (String LoadFN, boolean StreamMode, boolean AppletMode, MainWindow FrameParent, String Language, Properties Translation, boolean[] Selected_Tools, boolean[] Selected_Menus, String[] My_Atoms, boolean ViewH, boolean ViewC)
JMenuBar MenuBarApplication ()
JMenuBar MenuBarApplet ()
 

Molecule MolData ()
void SetMolecule (Molecule Mol)
void AddMolecule (Molecule Mol)
void ScaleToFit ()
void actionPerformed (ActionEvent e)
void mouseClicked (MouseEvent e)
void mouseEntered (MouseEvent e)
void mouseExited (MouseEvent e)
void mousePressed (MouseEvent e)
void mouseReleased (MouseEvent e)
void keyPressed (KeyEvent e)
void keyReleased (KeyEvent e)
void keyTyped (KeyEvent e)
void TemplSelected (Molecule mol, int idx)
void MolSelected (EditorPane source, int idx, boolean dblclick)
void DirtyChanged (boolean isdirty)
void lostOwnership (Clipboard clipboard, Transferable contents)
void windowActivated (WindowEvent e)
void windowClosed (WindowEvent e)
void windowClosing (WindowEvent e)
void windowDeactivated (WindowEvent e)
void windowDeiconified (WindowEvent e)
void windowIconified (WindowEvent e)
void windowOpened (WindowEvent e)

Public Attributes

String LICENSE = "or see http://www.gnu.org for details."
String[] TOOL_TIPS
String[] IMAGE_TOOL
boolean[] selected_tools
boolean[] selected_menus = {true,true,true,true,true,true,true,true}
String[] my_atoms

Static Public Attributes

static String VERSION = "0.1"
static boolean viewH
static boolean viewC

Package Functions

JMenuItem MenuItem (String txt, int key)
JMenuItem MenuItem (String txt, int key, Icon icon)
JMenuItem MenuItem (String txt, int key, Icon icon, KeyStroke accel)
JRadioButtonMenuItem RadioMenuItem (String txt, int key, boolean sel, ButtonGroup bg)
void FileQuit ()
void FileNew ()
void FileNewWindow ()
void FileNewDataSheet ()
void FileOpen ()
void FileSave ()
void FileSaveAs ()
void FileExportNative2JavaScript ()
void FileExportMDLMol2JavaScript ()
void FileExportMDLMOL ()
void FileExportCMLXML ()
void SetFilename (String fn)
void SaveCurrent ()
void ReadStream ()
void WriteStream ()
void TestMol ()
void EditCut ()
void EditCopy ()
void EditPaste ()
void SelectElement (String El)
void TemplateTool ()
void TemplateSelect ()
void TemplateAddTo ()
void EditDialog ()
void HelpAbout ()

Package Attributes

MainWindow frameParent
ImageIcon mainIcon = null
ImageIcon mainLogo = null
AbstractButton[] toolButtons
ButtonGroup toolGroup
ImageIcon[] toolIcons
EditorPane editor
Templates templ
JCheckBoxMenuItem chkShowHydr
JCheckBoxMenuItem chkShowSter
boolean firstResize = true
String filename = null
String lastElement = null
String typedElement = ""
Molecule lastTemplate = null
int templateIdx = -1
boolean streamMode = false
boolean appletMode = false
String language = ""
Properties translation
boolean useLocalClipboard = false
String appletClipboard = ""

Static Package Attributes

static final int TOOL_CURSOR = 0
static final int TOOL_ROTATOR = 1
static final int TOOL_ERASOR = 2
static final int TOOL_DIALOG = 3
static final int TOOL_EDIT = 4
static final int TOOL_SETATOM = 5
static final int TOOL_SINGLE = 6
static final int TOOL_DOUBLE = 7
static final int TOOL_TRIPLE = 8
static final int TOOL_ZERO = 9
static final int TOOL_INCLINED = 10
static final int TOOL_DECLINED = 11
static final int TOOL_UNKNOWN = 12
static final int TOOL_CHARGE = 13
static final int TOOL_UNDO = 14
static final int TOOL_REDO = 15
static final int TOOL_TEMPLATE = 16
static final int TOOL_CUT = 17
static final int TOOL_COPY = 18
static final int TOOL_PASTE = 19
static final int TOOL_COUNT = 20

Detailed Description

Definition at line 32 of file MainPanel.java.


Constructor & Destructor Documentation

WIMSchem.MainPanel.MainPanel ( String  LoadFN,
boolean  StreamMode,
boolean  AppletMode,
MainWindow  FrameParent,
String  Language,
Properties  Translation,
boolean[]  Selected_Tools,
boolean[]  Selected_Menus,
String[]  My_Atoms,
boolean  ViewH,
boolean  ViewC 
) [inline]

Definition at line 148 of file MainPanel.java.

                                                                                                                                                                                                                                              {
       streamMode=StreamMode;
       appletMode=AppletMode;
       // jm.evers
       if(appletMode){
           viewH=ViewH;
           viewC=ViewC;
           selected_tools=Selected_Tools;
           selected_menus=Selected_Menus;
           my_atoms=My_Atoms;
           mainIcon=new ImageIcon(getClass().getResource("/images/wims_icon.gif"));
           mainLogo=new ImageIcon(getClass().getResource("/images/wims_logo.gif"));
           language=Language;
           translation=Translation;
           System.out.println("Hi, I\'m the applet version....language is :"+language);
       }
       else
       {// no language button yet...
           language="en";
           my_atoms=null;
           viewH=true;
           viewC=true;    
           mainIcon=new ImageIcon(getClass().getResource("/images/MainIcon.png"));
           mainLogo=new ImageIcon(getClass().getResource("/images/MainLogo.png"));
           translation=loadProperties("en");
           System.out.println("Hi, I\'m the standalone version....language is :"+language);
       }
       frameParent=FrameParent;
       useLocalClipboard=appletMode; 
       // applet mode always uses "local clipboard"; if the applet is signed, this will need to switch
       // to false if permission has been granted to use the system clipboard
       templ=new Templates(getClass());
       
       // toolbar
       TOOL_TIPS=new String[20];
       JToolBar tools=new JToolBar(JToolBar.VERTICAL);
       tools.setFloatable(!AppletMode);
       toolButtons=new AbstractButton[TOOL_COUNT];
       toolIcons=new ImageIcon[TOOL_COUNT];
       toolGroup=new ButtonGroup();

       // jm.evers
       for (int n=0;n<TOOL_COUNT;n++) 
       {
           toolIcons[n]=new ImageIcon(getClass().getResource("/images/"+IMAGE_TOOL[n]+".png"));
           if (selected_tools[n]) 
           {
              toolButtons[n]=new ToolButton(toolIcons[n]); 
              toolGroup.add(toolButtons[n]);
              tools.add(toolButtons[n]);
              toolButtons[n].addActionListener(this);
              toolButtons[n].setToolTipText(getToolTips(n));
           }
           /*else {toolButtons[n]=new JButton(toolIcons[n]);
           tools.add(toolButtons[n]);
           toolButtons[n].addActionListener(this);}*/
       }
       if(selected_tools[0]){toolGroup.setSelected(toolButtons[TOOL_CURSOR].getModel(),true);}
       if(selected_tools[5]){
           toolButtons[TOOL_SETATOM].addMouseListener(this);// tool 5
           toolButtons[TOOL_SETATOM].addKeyListener(this);
           SelectElement("C");
       }
       if(selected_tools[16]){toolButtons[TOOL_TEMPLATE].addMouseListener(this);}   

       // menu
       
       JMenuBar menubar=AppletMode ? MenuBarApplet() : MenuBarApplication();

       // molecule
       
       editor=new EditorPane();
       editor.SetMolSelectListener(this);
       JScrollPane scroll=new JScrollPane(editor);

       // overall layout

       if (!AppletMode)
       {
           setLayout(new BorderLayout());
           add(scroll,BorderLayout.CENTER);
           add(menubar,BorderLayout.NORTH);
           add(tools,BorderLayout.WEST);
       }
       else
       {
           // (!! add a little icon somewhere which does the About box...)

           JPanel p=new JPanel();
           p.setLayout(new BorderLayout());
           p.add(menubar,BorderLayout.NORTH);
           p.add(scroll,BorderLayout.CENTER);
           
           setLayout(new BorderLayout());
           add(tools,BorderLayout.WEST);
           add(p,BorderLayout.CENTER);
       }
       
       editor.grabFocus();
       
       editor.SetToolCursor();
       
       if (LoadFN!=null)
       {
           try
           {
              FileInputStream istr=new FileInputStream(LoadFN);
              Molecule frag=MoleculeStream.ReadUnknown(istr);
              editor.AddArbitraryFragment(frag);
              istr.close();
           }
           catch (IOException e) 
           {
              JOptionPane.showMessageDialog(null,e.toString(),"Open Failed",JOptionPane.ERROR_MESSAGE);
              return;
           }

           SetFilename(LoadFN);
           editor.NotifySaved();
       }
       if (streamMode) ReadStream();
       
       addKeyListener(this);
       editor.addKeyListener(this);
       if (frameParent!=null) frameParent.addWindowListener(this);
    }

Here is the call graph for this function:


Member Function Documentation

void WIMSchem.MainPanel.actionPerformed ( ActionEvent  e) [inline]

Definition at line 1021 of file MainPanel.java.

    {
       String cmd=e.getActionCommand();
       
       int setsel=-1;
       
       if (cmd.equals(translation.getProperty("Quit")) || cmd.equals(translation.getProperty("Save_and_Quit"))) FileQuit();
       else if (cmd.equals(translation.getProperty("New"))) FileNew();
       else if (cmd.equals(translation.getProperty("New_Window"))) FileNewWindow();
       else if (cmd.equals(translation.getProperty("New_DataSheet"))) FileNewDataSheet();
       else if (cmd.equals(translation.getProperty("Open"))) FileOpen();
       else if (cmd.equals(translation.getProperty("Save"))) FileSave();
       else if (cmd.equals(translation.getProperty("Save_As"))) FileSaveAs();
       else if (cmd.equals(translation.getProperty("as_MDL_MOL"))) FileExportMDLMOL();
       else if (cmd.equals(translation.getProperty("as_CML_XML"))) FileExportCMLXML();
       else if (cmd.equals("Native2Javascript (wims)")) FileExportNative2JavaScript();
       else if (cmd.equals("MDLMol2Javascript (wims)")) FileExportMDLMol2JavaScript();
       else if (cmd.equals(translation.getProperty("Cursor")) || e.getSource()==toolButtons[TOOL_CURSOR]) {editor.SetToolCursor(); setsel=TOOL_CURSOR;}
       else if (cmd.equals(translation.getProperty("Rotator")) || e.getSource()==toolButtons[TOOL_ROTATOR]) {editor.SetToolRotator(); setsel=TOOL_ROTATOR;}
       else if (cmd.equals(translation.getProperty("Erasor")) || e.getSource()==toolButtons[TOOL_ERASOR]) {editor.SetToolErasor(); setsel=TOOL_ERASOR;}
       else if (cmd.equals(translation.getProperty("Editttt")) || e.getSource()==toolButtons[TOOL_DIALOG]) EditDialog();
       else if (cmd.equals(translation.getProperty("Select_All"))) editor.SelectAll();
       else if (cmd.equals(translation.getProperty("Next_Atom"))) editor.CycleSelection(true,false);
       else if (cmd.equals(translation.getProperty("Previous_Atom"))) editor.CycleSelection(false,false);
       else if (cmd.equals(translation.getProperty("Next_Group"))) editor.CycleSelection(true,true);
       else if (cmd.equals(translation.getProperty("Previous_Group"))) editor.CycleSelection(false,true);
       else if (cmd.equals(translation.getProperty("Edit_Atom")) || e.getSource()==toolButtons[TOOL_EDIT]) {editor.SetToolAtom(null); setsel=TOOL_EDIT;}
       else if (cmd.equals(translation.getProperty("Set_Atom")) || e.getSource()==toolButtons[TOOL_SETATOM]) {editor.SetToolAtom(lastElement); setsel=TOOL_SETATOM;}
       else if (cmd.equals(translation.getProperty("Single_Bond")) || e.getSource()==toolButtons[TOOL_SINGLE]) {editor.SetToolBond(1); setsel=TOOL_SINGLE;}
       else if (cmd.equals(translation.getProperty("Double_Bond")) || e.getSource()==toolButtons[TOOL_DOUBLE]) {editor.SetToolBond(2); setsel=TOOL_DOUBLE;}
       else if (cmd.equals(translation.getProperty("Triple_Bond")) || e.getSource()==toolButtons[TOOL_TRIPLE]) {editor.SetToolBond(3); setsel=TOOL_TRIPLE;}
       else if (cmd.equals(translation.getProperty("Zero_Bond")) || e.getSource()==toolButtons[TOOL_ZERO]) {editor.SetToolBond(0); setsel=TOOL_ZERO;}
       else if (cmd.equals(translation.getProperty("Inclined_Bond")) || e.getSource()==toolButtons[TOOL_INCLINED]) {editor.SetToolBond(-1); setsel=TOOL_INCLINED;}
       else if (cmd.equals(translation.getProperty("Declined_Bond")) || e.getSource()==toolButtons[TOOL_DECLINED]) {editor.SetToolBond(-2); setsel=TOOL_DECLINED;}
       else if (cmd.equals(translation.getProperty("Unknown_Bond")) || e.getSource()==toolButtons[TOOL_UNKNOWN]) {editor.SetToolBond(-3); setsel=TOOL_UNKNOWN;}
       else if (cmd.equals(translation.getProperty("Charge")) || e.getSource()==toolButtons[TOOL_CHARGE]) {editor.SetToolCharge(1); setsel=TOOL_CHARGE;}
       else if (cmd.equals(translation.getProperty("Undo")) || e.getSource()==toolButtons[TOOL_UNDO]) editor.Undo();
       else if (cmd.equals(translation.getProperty("Redo")) || e.getSource()==toolButtons[TOOL_REDO]) editor.Redo();
       else if (cmd.equals(translation.getProperty("Cut"))) EditCut();
       else if (cmd.equals(translation.getProperty("Copy"))) EditCopy();
       else if (cmd.equals(translation.getProperty("Paste"))) EditPaste();
       else if (cmd.equals(translation.getProperty("Flip_Horizontal"))) editor.FlipSelectedAtoms(false);
       else if (cmd.equals(translation.getProperty("Flip_Vertical"))) editor.FlipSelectedAtoms(true);
       else if (cmd.equals(translation.getProperty("Rotate_P45"))) editor.RotateSelectedAtoms(45);
       else if (cmd.equals(translation.getProperty("Rotate_M45"))) editor.RotateSelectedAtoms(-45);
       else if (cmd.equals(translation.getProperty("Rotate_P90"))) editor.RotateSelectedAtoms(90);
       else if (cmd.equals(translation.getProperty("Rotate_M90"))) editor.RotateSelectedAtoms(-90);
       else if (cmd.equals(translation.getProperty("Add_Temporary_Template"))) TemplateAddTo();
       else if (cmd.equals(translation.getProperty("Normalise_Bond_Lengths"))) editor.NormaliseBondLengths();
       else if (cmd.equals(translation.getProperty("Template_Tool")) || e.getSource()==toolButtons[TOOL_TEMPLATE]) {TemplateTool(); setsel=TOOL_TEMPLATE;}
       else if (cmd.equals(translation.getProperty("Select_Template"))) {TemplateSelect(); setsel=TOOL_TEMPLATE;}
       else if (cmd.equals(translation.getProperty("Zoom_Full"))) editor.ZoomFull();
       else if (cmd.equals(translation.getProperty("Zoom_In"))) editor.ZoomIn(1.5);
       else if (cmd.equals(translation.getProperty("Zoom_Out"))) editor.ZoomOut(1.5);
       else if (cmd.equals(translation.getProperty("Show_Elements"))) editor.SetShowMode(DrawMolecule.SHOW_ELEMENTS);
       else if (cmd.equals(translation.getProperty("Show_All_Elements"))) editor.SetShowMode(DrawMolecule.SHOW_ALL_ELEMENTS);
       else if (cmd.equals(translation.getProperty("Show_Indices"))) editor.SetShowMode(DrawMolecule.SHOW_INDEXES);
       else if (cmd.equals(translation.getProperty("Show_Ring_ID"))) editor.SetShowMode(DrawMolecule.SHOW_RINGID);
       else if (cmd.equals(translation.getProperty("Show_CIP_Priority"))) editor.SetShowMode(DrawMolecule.SHOW_PRIORITY);
       else if (cmd.equals(translation.getProperty("Show_Mapping_Number"))) editor.SetShowMode(DrawMolecule.SHOW_MAPNUM);
       else if (cmd.equals(translation.getProperty("Show_Hydrogen"))) editor.SetShowHydrogens(chkShowHydr.isSelected());
       else if (cmd.equals(translation.getProperty("Set_Explicit")))  editor.HydrogenSetExplicit(true);
       else if (cmd.equals(translation.getProperty("Clear_Explicit"))) editor.HydrogenSetExplicit(false);
       else if (cmd.equals(translation.getProperty("Zero_Explicit"))) editor.HydrogenSetExplicit(false,0);
       else if (cmd.equals(translation.getProperty("Create_Actual"))) editor.HydrogenCreateActual();
       else if (cmd.equals(translation.getProperty("Delete_Actual"))) editor.HydrogenDeleteActual();
       else if (cmd.equals(translation.getProperty("Show_Stereolabels"))) editor.SetShowStereolabels(chkShowSter.isSelected());
       else if (cmd.equals(translation.getProperty("Invert_Stereochemistry"))) editor.SetStereo(Molecule.STEREO_UNKNOWN);
       else if (cmd.equals(translation.getProperty("Set_RZ"))) editor.SetStereo(Molecule.STEREO_POS);
       else if (cmd.equals(translation.getProperty("Set_SE"))) editor.SetStereo(Molecule.STEREO_NEG);
       else if (cmd.equals(translation.getProperty("Cycle_Wedges"))) editor.CycleChiralWedges();
       else if (cmd.equals(translation.getProperty("Remove_Wedges"))) editor.RemoveChiralWedges();
       else if (cmd.equals(translation.getProperty("About"))) HelpAbout();
       else if (cmd.length()<=2) {SelectElement(cmd); editor.SetToolAtom(lastElement);}
       if (setsel!=-1) toolGroup.setSelected(toolButtons[setsel].getModel(),true);
    } 
void WIMSchem.MainPanel.AddMolecule ( Molecule  Mol) [inline]

Definition at line 525 of file MainPanel.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.DirtyChanged ( boolean  isdirty) [inline]

Implements WIMSchem.MolSelectListener.

Definition at line 1206 of file MainPanel.java.

    {
       String str=frameParent==null ? "WIMSchem" : frameParent.getTitle();
       if (str.charAt(0)=='*') str=str.substring(1);
       if (isdirty) str="*"+str;
       if (frameParent!=null) frameParent.setTitle(str);
    }
void WIMSchem.MainPanel.EditCopy ( ) [inline, package]

Definition at line 886 of file MainPanel.java.

                   {
       Molecule frag=editor.SelectedSubgraph();
       try
       {
           StringWriter sw=new StringWriter();
           BufferedWriter bw=new BufferedWriter(sw);
           MoleculeStream.WriteMDLMOL(bw,frag);
           MoleculeStream.WriteNative(bw,frag);
           if (useLocalClipboard)
           {
              appletClipboard=sw.toString();
           }
           else
           {
              Clipboard clip=Toolkit.getDefaultToolkit().getSystemClipboard();
              clip.setContents(new StringSelection(sw.toString()),this);
           }
       }
       catch (IOException e) 
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Copy_Failed"),JOptionPane.ERROR_MESSAGE);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.EditCut ( ) [inline, package]

Definition at line 861 of file MainPanel.java.

                  {
       Molecule frag=editor.SelectedSubgraph();
       try
       {
           StringWriter sw=new StringWriter();
           BufferedWriter bw=new BufferedWriter(sw);
           MoleculeStream.WriteMDLMOL(bw,frag);
           MoleculeStream.WriteNative(bw,frag);
           if (useLocalClipboard)
           {
              appletClipboard=sw.toString();
           }
           else
           {
              Clipboard clip=Toolkit.getDefaultToolkit().getSystemClipboard();
              clip.setContents(new StringSelection(sw.toString()),this);
           }
           editor.DeleteSelected(); // (keep this within the exception trap)
       }
       catch (IOException e) 
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Cut_Failed"),JOptionPane.ERROR_MESSAGE);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.EditDialog ( ) [inline, package]

Definition at line 992 of file MainPanel.java.

                     {
       Molecule newMol=(new DialogEdit(frameParent,editor.MolData(),editor.SelectedIndices())).exec();
       if (newMol!=null) 
       {
           editor.CacheUndo();
           editor.Replace(newMol,false);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.EditPaste ( ) [inline, package]

Definition at line 910 of file MainPanel.java.

                    {
       try 
       {
           String cliptext=null;
           if (useLocalClipboard) cliptext=appletClipboard;
           else
           {
              Clipboard clip=Toolkit.getDefaultToolkit().getSystemClipboard();
              Transferable contents=clip.getContents(null);
              if (contents!=null && contents.isDataFlavorSupported(DataFlavor.stringFlavor))
              {
                  cliptext=(String)contents.getTransferData(DataFlavor.stringFlavor);
              }
           }
           
           if (cliptext!=null)
           {
              Molecule frag=MoleculeStream.ReadUnknown(new BufferedReader(new StringReader(cliptext)));
              if (frag!=null) editor.AddArbitraryFragment(frag);
           }
       }
       catch (UnsupportedFlavorException e) 
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Clipboard_Read_Failed"),JOptionPane.ERROR_MESSAGE);
       }
       catch (IOException e) 
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Paste_Failed"),JOptionPane.ERROR_MESSAGE);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.FileExportCMLXML ( ) [inline, package]

Definition at line 760 of file MainPanel.java.

                           {
       JFileChooser chooser=new JFileChooser(System.getenv().get("PWD"));
       chooser.setDragEnabled(false);
       chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
       chooser.setFileFilter(new FileExtFilter(translation.getProperty("XML_Files"),".xml"));
       chooser.setAccessory(new FileMolPreview(chooser));
       if (chooser.showSaveDialog(frameParent)!=JFileChooser.APPROVE_OPTION) return;

       String fn=chooser.getSelectedFile().getPath();
       if (chooser.getSelectedFile().getName().indexOf('.')<0) fn=fn+".xml";

       File newf=new File(fn);
       if (newf.exists())
       {
           String opt[]={translation.getProperty("Yes"),translation.getProperty("No")};
           if (JOptionPane.showOptionDialog(null,translation.getProperty("Overwrite_existing_file")+" ["+newf.getName()+"]?",translation.getProperty("Export_CML_XML"),
                  JOptionPane.YES_NO_OPTION,JOptionPane.YES_NO_OPTION,null,opt,opt[0])!=JOptionPane.YES_OPTION) return;
       }      

       try
       {
           FileOutputStream ostr=new FileOutputStream(fn);
           MoleculeStream.WriteCMLXML(ostr,editor.MolData());
           ostr.close();
       }
       catch (IOException e)
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Export_Failed"),JOptionPane.ERROR_MESSAGE);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.FileExportMDLMOL ( ) [inline, package]

Definition at line 729 of file MainPanel.java.

                           {
       JFileChooser chooser=new JFileChooser(System.getenv().get("PWD"));
       chooser.setDragEnabled(false);
       chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
       chooser.setFileFilter(new FileExtFilter(translation.getProperty("MDL_MOL_Files"),".mol"));
       chooser.setAccessory(new FileMolPreview(chooser));
       if (chooser.showSaveDialog(frameParent)!=JFileChooser.APPROVE_OPTION) return;

       String fn=chooser.getSelectedFile().getPath();
       if (chooser.getSelectedFile().getName().indexOf('.')<0) fn=fn+".mol";

       File newf=new File(fn);
       if (newf.exists())
       {
           String opt[]={translation.getProperty("Yes"),translation.getProperty("No")};
           if (JOptionPane.showOptionDialog(null,translation.getProperty("Overwrite_existing_file")+" ["+newf.getName()+"]?",translation.getProperty("Export_MDL_MOL"),
                  JOptionPane.YES_NO_OPTION,JOptionPane.YES_NO_OPTION,null,opt,opt[0])!=JOptionPane.YES_OPTION) return;
       }      

       try
       {
           FileOutputStream ostr=new FileOutputStream(fn);
           MoleculeStream.WriteMDLMOL(ostr,editor.MolData());
           ostr.close();
       }
       catch (IOException e)
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Export_Failed"),JOptionPane.ERROR_MESSAGE);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 698 of file MainPanel.java.

                                      {
       // jm.evers :test with export to more convinient wims usage...? make a MDLMol Javascript string
       JFileChooser chooser=new JFileChooser(System.getenv().get("PWD"));
       chooser.setDragEnabled(false);
       chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
       if (chooser.showSaveDialog(frameParent)!=JFileChooser.APPROVE_OPTION) return;

       String fn=chooser.getSelectedFile().getPath();

       File newf=new File(fn);
       if (newf.exists())
       {
           String opt[]={translation.getProperty("Yes"),translation.getProperty("No")};
           if (JOptionPane.showOptionDialog(null,translation.getProperty("Overwrite_existing_file")+" ["+newf.getName()+"]?",translation.getProperty("Export_MDL_MOL"),
                  JOptionPane.YES_NO_OPTION,JOptionPane.YES_NO_OPTION,null,opt,opt[0])!=JOptionPane.YES_OPTION) return;
       }      

       try
       {
           FileOutputStream ostr=new FileOutputStream(fn);
           MoleculeStream.WriteMDLMol2JavaScript(ostr,editor.MolData());
           ostr.close();
       }
       catch (IOException e)
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Export_Failed"),JOptionPane.ERROR_MESSAGE);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 669 of file MainPanel.java.

                                      {
       // jm.evers :test with export to more convinient wims usage...? make a Native Javascript string
       JFileChooser chooser=new JFileChooser(System.getenv().get("PWD"));
       chooser.setDragEnabled(false);
       chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
       if (chooser.showSaveDialog(frameParent)!=JFileChooser.APPROVE_OPTION) return;

       String fn=chooser.getSelectedFile().getPath();

       File newf=new File(fn);
       if (newf.exists())
       {
           String opt[]={translation.getProperty("Yes"),translation.getProperty("No")};
           if (JOptionPane.showOptionDialog(null,translation.getProperty("Overwrite_existing_file")+" ["+newf.getName()+"]?",translation.getProperty("Export_MDL_MOL"),
                  JOptionPane.YES_NO_OPTION,JOptionPane.YES_NO_OPTION,null,opt,opt[0])!=JOptionPane.YES_OPTION) return;
       }      

       try
       {
           FileOutputStream ostr=new FileOutputStream(fn);
           MoleculeStream.WriteNative2JavaScript(ostr,editor.MolData());
           ostr.close();
       }
       catch (IOException e)
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Export_Failed"),JOptionPane.ERROR_MESSAGE);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.FileNew ( ) [inline, package]

Definition at line 572 of file MainPanel.java.

    {
       if (editor.MolData().NumAtoms()>0)
       {
           String opt[]={translation.getProperty("Yes"),translation.getProperty("No")};
           if (JOptionPane.showOptionDialog(null,translation.getProperty("Clear_current_structure_and_start_anew"),translation.getProperty("New"),
                  JOptionPane.YES_NO_OPTION,JOptionPane.YES_NO_OPTION,null,opt,opt[0])!=JOptionPane.YES_OPTION) return;
       }
       editor.Clear();
       filename=null;
       if (frameParent!=null) frameParent.setTitle("WIMSchem");
       editor.NotifySaved();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.FileNewDataSheet ( ) [inline, package]

Definition at line 590 of file MainPanel.java.

    {
       DataWindow dw=new DataWindow(null);
       dw.setVisible(true);
    }

Here is the caller graph for this function:

void WIMSchem.MainPanel.FileNewWindow ( ) [inline, package]

Definition at line 585 of file MainPanel.java.

    {
       MainWindow mw=new MainWindow(null,false,translation);
       mw.setVisible(true);
    }

Here is the caller graph for this function:

void WIMSchem.MainPanel.FileOpen ( ) [inline, package]

Definition at line 595 of file MainPanel.java.

    {
       JFileChooser chooser=new JFileChooser(System.getenv().get("PWD"));
       chooser.setDragEnabled(false);
       chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
       chooser.setFileFilter(new FileExtFilter(translation.getProperty("Molecular_Structures"),".el;.mol;.sdf;*.xml"));
       chooser.setAccessory(new FileMolPreview(chooser));
       if (chooser.showOpenDialog(frameParent)!=JFileChooser.APPROVE_OPTION) return;
       
       boolean fresh=editor.IsEmpty();
       String newfn=chooser.getSelectedFile().getPath();
       boolean anything=editor.MolData().NumAtoms()>0;
       try
       {
           FileInputStream istr=new FileInputStream(newfn);
           if (!DataWindow.ALLOW && MoleculeStream.ExamineIsDatabase(istr)) 
           {  // !! this section is to be deprecated when DataSheet is fully functional
              istr.close();
              CatalogWindow cw=new CatalogWindow(newfn);
              cw.setVisible(true);
           }
           else if (DataSheetStream.ExamineIsXMLDS(istr) || DataSheetStream.ExamineIsMDLSDF(istr))
           {
              istr.close();
              DataWindow dw=new DataWindow(newfn);
              dw.setVisible(true);
           }
           else
           {
              Molecule frag=MoleculeStream.ReadUnknown(istr);
              editor.AddArbitraryFragment(frag);
              istr.close();
              if (fresh) SetFilename(newfn);
              if (!anything) editor.NotifySaved();
           }
       }
       catch (IOException e) 
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Open_Failed"),JOptionPane.ERROR_MESSAGE);
           //e.printStackTrace();
           return;
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.FileQuit ( ) [inline, package]

Definition at line 552 of file MainPanel.java.

    {
       if (!streamMode)
       {
           if (editor.IsDirty())
           {
              String opt[]={"Yes","No"};
              if (JOptionPane.showOptionDialog(null,translation.getProperty("Current_structure_has_been_modified"),translation.getProperty("Quit"),
                     JOptionPane.YES_NO_OPTION,JOptionPane.YES_NO_OPTION,null,opt,opt[0])!=JOptionPane.YES_OPTION) return;
           }
       }
       else
       {
           WriteStream();
       }

       if (frameParent!=null) frameParent.dispose(); 

       return;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.FileSave ( ) [inline, package]

Definition at line 639 of file MainPanel.java.

    {
       if (filename==null) {FileSaveAs(); return;}
       SaveCurrent();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.FileSaveAs ( ) [inline, package]

Definition at line 645 of file MainPanel.java.

    {
       JFileChooser chooser=new JFileChooser(System.getenv().get("PWD"));
       chooser.setDragEnabled(false);
       chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
       chooser.setFileFilter(new FileExtFilter(translation.getProperty("WIMSchem_Files"),".el"));
       chooser.setAccessory(new FileMolPreview(chooser));
       if (chooser.showSaveDialog(frameParent)!=JFileChooser.APPROVE_OPTION) return;
    
       String fn=chooser.getSelectedFile().getPath();
       if (chooser.getSelectedFile().getName().indexOf('.')<0) fn=fn+".el";
    
       File newf=new File(fn);
       if (newf.exists())
       {
           String opt[]={translation.getProperty("Yes"),translation.getProperty("No")};
           if (JOptionPane.showOptionDialog(null,translation.getProperty("Overwrite_existing_file")+" ["+newf.getName()+"]?",translation.getProperty("Save_As"),
                  JOptionPane.YES_NO_OPTION,JOptionPane.YES_NO_OPTION,null,opt,opt[0])!=JOptionPane.YES_OPTION) return;
       }      
    
       SetFilename(fn);
       SaveCurrent();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

String WIMSchem.MainPanel.getToolTips ( int  p) [inline]

Definition at line 104 of file MainPanel.java.

                                       {
       if(p>TOOL_COUNT){return "error";}
       TOOL_TIPS[0]=translation.getProperty("CURSOR_TIP");
       TOOL_TIPS[1]=translation.getProperty("ROTATOR_TIP");
       TOOL_TIPS[2]=translation.getProperty("ERASOR_TIP");
       TOOL_TIPS[3]=translation.getProperty("EDIT_DIALOG_TIP");
       TOOL_TIPS[4]=translation.getProperty("EDIT_ELEMENT_TIP");
       TOOL_TIPS[5]=translation.getProperty("PLACE_ELEMENT_TIP");
       TOOL_TIPS[6]=translation.getProperty("SINGLE_BOND_TIP");
       TOOL_TIPS[7]=translation.getProperty("DOUBLE_BOND_TIP");
       TOOL_TIPS[8]=translation.getProperty("TRIPLE_BOND_TIP");
       TOOL_TIPS[9]=translation.getProperty("ZERO_BOND_TIP");
       TOOL_TIPS[10]=translation.getProperty("INCLINED_BOND_TIP");
       TOOL_TIPS[11]=translation.getProperty("DECLINE_BOND_TIP");
       TOOL_TIPS[12]=translation.getProperty("SQUIGGLY_BOND_TIP");
       TOOL_TIPS[13]=translation.getProperty("CHARGE_TIP");
       TOOL_TIPS[14]=translation.getProperty("UNDO_TIP");
       TOOL_TIPS[15]=translation.getProperty("REDO_TIP");
       TOOL_TIPS[16]=translation.getProperty("TEMPLATE_TIP");
       TOOL_TIPS[17]=translation.getProperty("CUT_TIP");
       TOOL_TIPS[18]=translation.getProperty("COPY_TIP");
       TOOL_TIPS[19]=translation.getProperty("PASTE");
       return TOOL_TIPS[p];
    }

Here is the caller graph for this function:

void WIMSchem.MainPanel.HelpAbout ( ) [inline, package]

Definition at line 1001 of file MainPanel.java.

    {
       String msg="        WIMSchem v"+VERSION+"           \n"+
                 "                                        \n"+
                 "   Molecule drawing tool for WIMS       \n"+
                 "   [ the Interactive Education Server ] \n"+
                 "   http://wims.unice.fr/wims/wims.cgi?  \n"+
                 "   A slightly modified version of:      \n"+
                 "                                        \n"+
                 "      SketchEl  version1.19             \n"+
                 "    2005-2008 Dr. Alex M. Clark        \n"+
                 "   Released under the Gnu Public        \n"+
                 "   License (GPL), see www.gnu.org       \n"+
                 "   Home page and documentation:         \n"+
                 "   http://sketchel.sf.net               \n";
       JOptionPane.showMessageDialog(null,msg,translation.getProperty("About_WIMSchem"),JOptionPane.INFORMATION_MESSAGE,mainLogo);
    }

Here is the caller graph for this function:

void WIMSchem.MainPanel.keyPressed ( KeyEvent  e) [inline]

Definition at line 1151 of file MainPanel.java.

    {
       // keyboard arrow-nudges
       if (!e.isAltDown() && !e.isShiftDown() && !e.isControlDown() && !e.isMetaDown())
       {
           if (e.getKeyCode()==KeyEvent.VK_UP) {editor.NudgeSelectedAtoms(0,0.05); return;}
           if (e.getKeyCode()==KeyEvent.VK_DOWN) {editor.NudgeSelectedAtoms(0,-0.05); return;}
           if (e.getKeyCode()==KeyEvent.VK_LEFT) {editor.NudgeSelectedAtoms(-0.05,0); return;}
           if (e.getKeyCode()==KeyEvent.VK_RIGHT) {editor.NudgeSelectedAtoms(0.05,0); return;}
       }
    }

Here is the call graph for this function:

void WIMSchem.MainPanel.keyReleased ( KeyEvent  e) [inline]

Definition at line 1162 of file MainPanel.java.

{}
void WIMSchem.MainPanel.keyTyped ( KeyEvent  e) [inline]

Definition at line 1163 of file MainPanel.java.

    {    
       // user typing in an element...
       char ch=e.getKeyChar();
       if (ch>='A' && ch<='Z') typedElement=""+ch;
       else if (typedElement.length()==1 && ch>='a' && ch<='z') typedElement=typedElement+ch;
       else if (typedElement.compareTo("R")==0 && ch>='0' && ch<='9') typedElement=typedElement+ch;
       else {typedElement=""; return;}

       String elset=null;
       if (typedElement.length()>=2 && typedElement.charAt(0)=='R' && typedElement.charAt(1)>='0' && typedElement.charAt(1)<='9') 
       {
           elset=typedElement;
       }
       else
       {
           for (int n=1;n<Molecule.ELEMENTS.length;n++) if (typedElement.compareTo(Molecule.ELEMENTS[n])==0) {elset=typedElement;}
       }
       if (elset!=null)
       {
           SelectElement(elset); 
           toolGroup.setSelected(toolButtons[TOOL_SETATOM].getModel(),true);
           editor.SetToolAtom(elset);
       }
    }

Here is the call graph for this function:

Properties WIMSchem.MainPanel.loadProperties ( String  lang) [inline]

Definition at line 51 of file MainPanel.java.

                                                 {//jm.evers                                                                               
        Properties P=new Properties();                                                                                                     
        try{                                                                                                                               
            InputStream in = getClass().getResourceAsStream("/lang/WIMSchemProperties_"+lang+".properties");                               
            P.load(in);in.close();                                                                                                         
            return P;                                                                                                                      
    }                                                                                                                                      
        catch (Exception e){ System.out.println("error reading /lang/WIMSchemProperties_"+lang+".properties\n"+e);}                        
        return null;                                                                                                                       
    } 

Here is the caller graph for this function:

void WIMSchem.MainPanel.lostOwnership ( Clipboard  clipboard,
Transferable  contents 
) [inline]

Definition at line 1214 of file MainPanel.java.

{} // don't care
JMenuBar WIMSchem.MainPanel.MenuBarApplet ( ) [inline]


Definition at line 402 of file MainPanel.java.

                                   {
       JMenuBar menubar=new JMenuBar();
       if(selected_menus[0]){
           AppletMenu menublock=new AppletMenu(translation.getProperty("Block"));
           menublock.setMnemonic(KeyEvent.VK_B);
           menublock.add(MenuItem(translation.getProperty("New"),KeyEvent.VK_N,null,KeyStroke.getKeyStroke('N',InputEvent.CTRL_MASK)));
           menublock.add(MenuItem(translation.getProperty("Editttt"),KeyEvent.VK_E,null,KeyStroke.getKeyStroke(' ',InputEvent.CTRL_MASK)));
           menublock.add(MenuItem(translation.getProperty("Undo"),KeyEvent.VK_U,null,KeyStroke.getKeyStroke('Z',InputEvent.CTRL_MASK)));
           menublock.add(MenuItem(translation.getProperty("Redo"),KeyEvent.VK_R,null,KeyStroke.getKeyStroke('Z',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
           menublock.add(MenuItem(translation.getProperty("Cut"),KeyEvent.VK_X,null,KeyStroke.getKeyStroke('X',InputEvent.CTRL_MASK)));
           menublock.add(MenuItem(translation.getProperty("Copy"),KeyEvent.VK_C,null,KeyStroke.getKeyStroke('C',InputEvent.CTRL_MASK)));
           menublock.add(MenuItem(translation.getProperty("Paste"),KeyEvent.VK_V,null,KeyStroke.getKeyStroke('V',InputEvent.CTRL_MASK)));
           
           menubar.add(menublock);
       }
       if(selected_menus[1]){
           AppletMenu menuselect=new AppletMenu(translation.getProperty("Select"));
           menuselect.setMnemonic(KeyEvent.VK_S);
           menuselect.add(MenuItem(translation.getProperty("Select_All"),KeyEvent.VK_S,null,KeyStroke.getKeyStroke('A',InputEvent.CTRL_MASK)));
           menuselect.add(MenuItem(translation.getProperty("Next_Atom"),KeyEvent.VK_N,null,KeyStroke.getKeyStroke('E',InputEvent.CTRL_MASK)));
           menuselect.add(MenuItem(translation.getProperty("Previous_Atom"),KeyEvent.VK_P,null,KeyStroke.getKeyStroke('E',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
           menuselect.add(MenuItem(translation.getProperty("Next_Group"),KeyEvent.VK_G,null,KeyStroke.getKeyStroke('G',InputEvent.CTRL_MASK)));
           menuselect.add(MenuItem(translation.getProperty("Previous_Group"),KeyEvent.VK_R,null,KeyStroke.getKeyStroke('G',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
    
           menubar.add(menuselect);
       }
       
       
       if(selected_menus[2]){
           AppletMenu menutransform=new AppletMenu(translation.getProperty("Transform"));
           menutransform.setMnemonic(KeyEvent.VK_T);
           menutransform.add(MenuItem(translation.getProperty("Flip_Horizontal"),KeyEvent.VK_H,null,null));
           menutransform.add(MenuItem(translation.getProperty("Flip_Vertical"),KeyEvent.VK_V,null,null));
           menutransform.add(MenuItem(translation.getProperty("Rotate_P45"),KeyEvent.VK_4,null,null));
           menutransform.add(MenuItem(translation.getProperty("Rotate_M45"),KeyEvent.VK_5,null,null));
           menutransform.add(MenuItem(translation.getProperty("Rotate_P90"),KeyEvent.VK_9,null,null));
           menutransform.add(MenuItem(translation.getProperty("Rotate_M90"),KeyEvent.VK_0,null,null));
           menutransform.addSeparator();
           menutransform.add(MenuItem(translation.getProperty("Add_Temporary_Template"),KeyEvent.VK_T,null,null));
           menutransform.add(MenuItem(translation.getProperty("Normalise_Bond_Lengths"),KeyEvent.VK_N,null,null));
       menubar.add(menutransform);
       }

       if(selected_menus[3]){
           AppletMenu menuzoom=new AppletMenu(translation.getProperty("Zoom"));
           menuzoom.setMnemonic(KeyEvent.VK_Z);
           menuzoom.add(MenuItem(translation.getProperty("Zoom_Full"),KeyEvent.VK_F,null,KeyStroke.getKeyStroke('0',InputEvent.CTRL_MASK)));
           menuzoom.add(MenuItem(translation.getProperty("Zoom_In"),KeyEvent.VK_I,null,KeyStroke.getKeyStroke('=',InputEvent.CTRL_MASK)));
           menuzoom.add(MenuItem(translation.getProperty("Zoom_Out"),KeyEvent.VK_O,null,KeyStroke.getKeyStroke('-',InputEvent.CTRL_MASK)));
           menubar.add(menuzoom);
       }

       if(selected_menus[4]){      
           AppletMenu menushow=new AppletMenu(translation.getProperty("Show"));
           menushow.setMnemonic(KeyEvent.VK_O);
           ButtonGroup showBG=new ButtonGroup();
//         if(viewC){
              menushow.add(RadioMenuItem(translation.getProperty("Show_Elements"),KeyEvent.VK_E,true,showBG));
              menushow.add(RadioMenuItem(translation.getProperty("Show_All_Elements"),KeyEvent.VK_A,false,showBG));
//         }
           menushow.add(RadioMenuItem(translation.getProperty("Show_Indices"),KeyEvent.VK_I,false,showBG));
           menushow.add(RadioMenuItem(translation.getProperty("Show_Ring_ID"),KeyEvent.VK_R,false,showBG));
           menushow.add(RadioMenuItem(translation.getProperty("Show_CIP_Priority"),KeyEvent.VK_C,false,showBG));
           menushow.add(RadioMenuItem(translation.getProperty("Show_Mapping_Number"),KeyEvent.VK_M,false,showBG));
           menubar.add(menushow);
       }

       if(selected_menus[5]){      
           AppletMenu menuhydrogen=new AppletMenu(translation.getProperty("Hydrogen"));
           menuhydrogen.setMnemonic(KeyEvent.VK_H);
           // jm.evers : do not show checkbox in appletparam "viewH" is "no
           if(viewH){
              chkShowHydr=new JCheckBoxMenuItem(translation.getProperty("Show_Hydrogen"));
               chkShowHydr.setMnemonic(KeyEvent.VK_Y);
              chkShowHydr.setSelected(true);
               chkShowHydr.addActionListener(this);
              menuhydrogen.add(chkShowHydr);
           }
           menuhydrogen.add(MenuItem(translation.getProperty("Set_Explicit"),KeyEvent.VK_E));
           menuhydrogen.add(MenuItem(translation.getProperty("Clear_Explicit"),KeyEvent.VK_X));
           menuhydrogen.add(MenuItem(translation.getProperty("Zero_Explicit"),KeyEvent.VK_Z));
           menuhydrogen.add(MenuItem(translation.getProperty("Create_Actual"),KeyEvent.VK_C));
           menuhydrogen.add(MenuItem(translation.getProperty("Delete_Actual"),KeyEvent.VK_D));
       
           menubar.add(menuhydrogen);
       }
       
       if(selected_menus[6]){
           AppletMenu menustereo=new AppletMenu(translation.getProperty("Stereo"));
           menustereo.setMnemonic(KeyEvent.VK_E);
           chkShowSter=new JCheckBoxMenuItem(translation.getProperty("Show_Stereolabels"));
           chkShowSter.setMnemonic(KeyEvent.VK_L);
           chkShowSter.setSelected(false);
           chkShowSter.addActionListener(this);
           menustereo.add(chkShowSter);
           menustereo.add(MenuItem(translation.getProperty("Invert_Stereochemistry"),KeyEvent.VK_I));
           menustereo.add(MenuItem(translation.getProperty("Set_RZ"),KeyEvent.VK_R));
           menustereo.add(MenuItem(translation.getProperty("Set_SE"),KeyEvent.VK_S));
           menustereo.add(MenuItem(translation.getProperty("Cycle_Wedges"),KeyEvent.VK_C));
           menustereo.add(MenuItem(translation.getProperty("Remove_Wedges"),KeyEvent.VK_W));
       
           menubar.add(menustereo);
       }

       if(selected_menus[7]){
           AppletMenu menuhelp=new AppletMenu(translation.getProperty("Help"));
           menuhelp.setMnemonic(KeyEvent.VK_P);
           menuhelp.add(MenuItem(translation.getProperty("About"),KeyEvent.VK_A));
       
           menubar.add(menuhelp);
       }
       
       return menubar;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 276 of file MainPanel.java.

    {
       JMenuBar menubar=new JMenuBar();
       JMenu menufile=new JMenu(translation.getProperty("File"));
       menufile.setMnemonic(KeyEvent.VK_F);
       menufile.add(MenuItem(translation.getProperty("New"),KeyEvent.VK_N,null,KeyStroke.getKeyStroke('N',InputEvent.CTRL_MASK)));
       menufile.add(MenuItem(translation.getProperty("New_Window"),KeyEvent.VK_W,null,KeyStroke.getKeyStroke('N',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
       if (DataWindow.ALLOW) // (temporary)
           menufile.add(MenuItem(translation.getProperty("New_DataSheet"),KeyEvent.VK_D,null));
       menufile.add(MenuItem(translation.getProperty("Open"),KeyEvent.VK_O,null,KeyStroke.getKeyStroke('O',InputEvent.CTRL_MASK)));
       if (!streamMode) menufile.add(MenuItem(translation.getProperty("Save"),KeyEvent.VK_S,null,KeyStroke.getKeyStroke('S',InputEvent.CTRL_MASK)));
       menufile.add(MenuItem(translation.getProperty("Save_As"),KeyEvent.VK_A));
       JMenu menuexport=new JMenu(translation.getProperty("Export"));
       menuexport.setMnemonic(KeyEvent.VK_X);
       menuexport.add(MenuItem("Native2Javascript (wims)",KeyEvent.VK_M,null,KeyStroke.getKeyStroke('W',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
       menuexport.add(MenuItem("MDLMol2Javascript (wims)",KeyEvent.VK_M,null,KeyStroke.getKeyStroke('V',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
       menuexport.add(MenuItem(translation.getProperty("as_MDL_MOL"),KeyEvent.VK_M,null,KeyStroke.getKeyStroke('M',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
       menuexport.add(MenuItem(translation.getProperty("as_CML_XML"),KeyEvent.VK_X,null,KeyStroke.getKeyStroke('X',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
       menufile.add(menuexport);

       menufile.addSeparator();
       if (!streamMode) menufile.add(MenuItem(translation.getProperty("Quit"),KeyEvent.VK_Q,null,KeyStroke.getKeyStroke('Q',InputEvent.CTRL_MASK)));
       else menufile.add(MenuItem(translation.getProperty("Save_and_Quit"),KeyEvent.VK_Q,null,KeyStroke.getKeyStroke('Q',InputEvent.CTRL_MASK)));
       
       JMenu menuedit=new JMenu(translation.getProperty("Edit"));
       menuedit.setMnemonic(KeyEvent.VK_E);
       menuedit.add(MenuItem(translation.getProperty("Editttt"),KeyEvent.VK_E,toolIcons[TOOL_DIALOG],KeyStroke.getKeyStroke(' ',InputEvent.CTRL_MASK)));
       menuedit.add(MenuItem(translation.getProperty("Undo"),KeyEvent.VK_U,toolIcons[TOOL_UNDO],KeyStroke.getKeyStroke('Z',InputEvent.CTRL_MASK)));
       menuedit.add(MenuItem(translation.getProperty("Redo"),KeyEvent.VK_R,toolIcons[TOOL_REDO],KeyStroke.getKeyStroke('Z',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
       menuedit.add(MenuItem(translation.getProperty("Cut"),KeyEvent.VK_X,toolIcons[TOOL_CUT],KeyStroke.getKeyStroke('X',InputEvent.CTRL_MASK)));
       menuedit.add(MenuItem(translation.getProperty("Copy"),KeyEvent.VK_C,toolIcons[TOOL_COPY],KeyStroke.getKeyStroke('C',InputEvent.CTRL_MASK)));
       menuedit.add(MenuItem(translation.getProperty("Paste"),KeyEvent.VK_V,toolIcons[TOOL_PASTE],KeyStroke.getKeyStroke('V',InputEvent.CTRL_MASK)));
       menuedit.addSeparator();
       menuedit.add(MenuItem(translation.getProperty("Select_All"),KeyEvent.VK_S,null,KeyStroke.getKeyStroke('A',InputEvent.CTRL_MASK)));
       menuedit.add(MenuItem(translation.getProperty("Next_Atom"),KeyEvent.VK_N,null,KeyStroke.getKeyStroke('E',InputEvent.CTRL_MASK)));
       menuedit.add(MenuItem(translation.getProperty("Previous_Atom"),KeyEvent.VK_P,null,KeyStroke.getKeyStroke('E',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
       menuedit.add(MenuItem(translation.getProperty("Next_Group"),KeyEvent.VK_G,null,KeyStroke.getKeyStroke('G',InputEvent.CTRL_MASK)));
       menuedit.add(MenuItem(translation.getProperty("Previous_Group"),KeyEvent.VK_R,null,KeyStroke.getKeyStroke('G',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
       menuedit.addSeparator();
       menuedit.add(MenuItem(translation.getProperty("Flip_Horizontal"),KeyEvent.VK_H,null,null));
       menuedit.add(MenuItem(translation.getProperty("Flip_Vertical"),KeyEvent.VK_V,null,null));
       menuedit.add(MenuItem(translation.getProperty("Rotate_P45"),KeyEvent.VK_4,null,null));
       menuedit.add(MenuItem(translation.getProperty("Rotate_M45"),KeyEvent.VK_5,null,null));
       menuedit.add(MenuItem(translation.getProperty("Rotate_P90"),KeyEvent.VK_9,null,null));
       menuedit.add(MenuItem(translation.getProperty("Rotate_M90"),KeyEvent.VK_0,null,null));
       menuedit.addSeparator();
       menuedit.add(MenuItem(translation.getProperty("Add_Temporary_Template"),KeyEvent.VK_T,null,null));
       menuedit.add(MenuItem(translation.getProperty("Normalise_Bond_Lengths"),KeyEvent.VK_N,null,null));
       
       JMenu menuview=new JMenu(translation.getProperty("View"));
       menuview.setMnemonic(KeyEvent.VK_V);
       menuview.add(MenuItem(translation.getProperty("Zoom_Full"),KeyEvent.VK_F,null,KeyStroke.getKeyStroke('0',InputEvent.CTRL_MASK)));
       menuview.add(MenuItem(translation.getProperty("Zoom_In"),KeyEvent.VK_I,null,KeyStroke.getKeyStroke('=',InputEvent.CTRL_MASK)));
       menuview.add(MenuItem(translation.getProperty("Zoom_Out"),KeyEvent.VK_O,null,KeyStroke.getKeyStroke('-',InputEvent.CTRL_MASK)));
       menuview.addSeparator();
       ButtonGroup showBG=new ButtonGroup();
       menuview.add(RadioMenuItem(translation.getProperty("Show_Elements"),KeyEvent.VK_E,true,showBG));
       menuview.add(RadioMenuItem(translation.getProperty("Show_All_Elements"),KeyEvent.VK_A,false,showBG));
       menuview.add(RadioMenuItem(translation.getProperty("Show_Indices"),KeyEvent.VK_I,false,showBG));
       menuview.add(RadioMenuItem(translation.getProperty("Show_Ring_ID"),KeyEvent.VK_R,false,showBG));
       menuview.add(RadioMenuItem(translation.getProperty("Show_CIP_Priority"),KeyEvent.VK_C,false,showBG));
       menuview.add(RadioMenuItem(translation.getProperty("Show_Mapping_Number"),KeyEvent.VK_M,false,showBG));
       
       JMenu menutool=new JMenu(translation.getProperty("Tool"));
       menutool.setMnemonic(KeyEvent.VK_T);
       menutool.add(MenuItem(translation.getProperty("Cursor"),KeyEvent.VK_C,toolIcons[TOOL_CURSOR],KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,0)));
       menutool.add(MenuItem(translation.getProperty("Rotator"),KeyEvent.VK_R,toolIcons[TOOL_ROTATOR],KeyStroke.getKeyStroke('R',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Erasor"),KeyEvent.VK_E,toolIcons[TOOL_ERASOR],KeyStroke.getKeyStroke('D',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Edit_Atom"),KeyEvent.VK_A,toolIcons[TOOL_EDIT],KeyStroke.getKeyStroke(',',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Set_Atom"),KeyEvent.VK_S,new ImageIcon(getClass().getResource("/images/ASelMenu.png")),KeyStroke.getKeyStroke('.',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Single_Bond"),KeyEvent.VK_1,toolIcons[TOOL_SINGLE],KeyStroke.getKeyStroke('1',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Double_Bond"),KeyEvent.VK_2,toolIcons[TOOL_DOUBLE],KeyStroke.getKeyStroke('2',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Triple_Bond"),KeyEvent.VK_3,toolIcons[TOOL_TRIPLE],KeyStroke.getKeyStroke('3',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Zero_Bond"),KeyEvent.VK_0,toolIcons[TOOL_ZERO],KeyStroke.getKeyStroke('0',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Inclined_Bond"),KeyEvent.VK_I,toolIcons[TOOL_INCLINED]));
       menutool.add(MenuItem(translation.getProperty("Declined_Bond"),KeyEvent.VK_D,toolIcons[TOOL_DECLINED]));
       menutool.add(MenuItem(translation.getProperty("Unknown_Bond"),KeyEvent.VK_U,toolIcons[TOOL_UNKNOWN]));
       menutool.add(MenuItem(translation.getProperty("Charge"),KeyEvent.VK_H,toolIcons[TOOL_CHARGE],KeyStroke.getKeyStroke('H',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Template_Tool"),KeyEvent.VK_T,toolIcons[TOOL_TEMPLATE],KeyStroke.getKeyStroke('T',InputEvent.CTRL_MASK)));
       menutool.add(MenuItem(translation.getProperty("Select_Template"),KeyEvent.VK_T,toolIcons[TOOL_TEMPLATE],KeyStroke.getKeyStroke('T',InputEvent.CTRL_MASK+InputEvent.SHIFT_MASK)));
       JMenu menuhydr=new JMenu(translation.getProperty("Hydrogen"));
       menuhydr.setMnemonic(KeyEvent.VK_Y);
       chkShowHydr=new JCheckBoxMenuItem(translation.getProperty("Show_Hydrogen"));
       chkShowHydr.setMnemonic(KeyEvent.VK_Y);
       chkShowHydr.setSelected(true);
       chkShowHydr.addActionListener(this);
       menuhydr.add(chkShowHydr);
       menuhydr.add(MenuItem(translation.getProperty("Set_Explicit"),KeyEvent.VK_E));
       menuhydr.add(MenuItem(translation.getProperty("Clear_Explicit"),KeyEvent.VK_X));
       menuhydr.add(MenuItem(translation.getProperty("Zero_Explicit"),KeyEvent.VK_Z));
       menuhydr.add(MenuItem(translation.getProperty("Create_Actual"),KeyEvent.VK_C));
       menuhydr.add(MenuItem(translation.getProperty("Delete_Actual"),KeyEvent.VK_D));

       JMenu menuster=new JMenu(translation.getProperty("Stereochemistry"));
       menuster.setMnemonic(KeyEvent.VK_S);
       chkShowSter=new JCheckBoxMenuItem(translation.getProperty("Show_Stereolabels"));
       chkShowSter.setMnemonic(KeyEvent.VK_L);
       chkShowSter.setSelected(false);
       chkShowSter.addActionListener(this);
       menuster.add(chkShowSter);
       menuster.add(MenuItem(translation.getProperty("Invert_Stereochemistry"),KeyEvent.VK_I));
       menuster.add(MenuItem(translation.getProperty("Set_RZ"),KeyEvent.VK_R));
       menuster.add(MenuItem(translation.getProperty("Set_SE"),KeyEvent.VK_S));
       menuster.add(MenuItem(translation.getProperty("Cycle_Wedges"),KeyEvent.VK_C));
       menuster.add(MenuItem(translation.getProperty("Remove_Wedges"),KeyEvent.VK_W));

       JMenu menuhelp=new JMenu(translation.getProperty("Help"));
       menuhelp.setMnemonic(KeyEvent.VK_H);
       menuhelp.add(MenuItem(translation.getProperty("About"),KeyEvent.VK_A));

       menubar.add(menufile);
       menubar.add(menuedit);
       menubar.add(menuview);
       menubar.add(menutool);
       menubar.add(menuhydr);
       menubar.add(menuster);
       menubar.add(Box.createHorizontalGlue());
       menubar.add(menuhelp);
       
       return menubar;
    }    

Here is the call graph for this function:

Here is the caller graph for this function:

JMenuItem WIMSchem.MainPanel.MenuItem ( String  txt,
int  key 
) [inline, package]

Definition at line 533 of file MainPanel.java.

{return MenuItem(txt,key,null,null);}

Here is the call graph for this function:

Here is the caller graph for this function:

JMenuItem WIMSchem.MainPanel.MenuItem ( String  txt,
int  key,
Icon  icon 
) [inline, package]

Definition at line 534 of file MainPanel.java.

{return MenuItem(txt,key,icon,null);}

Here is the call graph for this function:

Here is the caller graph for this function:

JMenuItem WIMSchem.MainPanel.MenuItem ( String  txt,
int  key,
Icon  icon,
KeyStroke  accel 
) [inline, package]

Definition at line 535 of file MainPanel.java.

    {
       JMenuItem mi=new JMenuItem(txt,key);
       mi.addActionListener(this);
       if (icon!=null) mi.setIcon(icon);
       if (accel!=null) mi.setAccelerator(accel);
       return mi;
    }

Definition at line 518 of file MainPanel.java.

{return editor.MolData();} // shallow copy, use with care

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.MolSelected ( EditorPane  source,
int  idx,
boolean  dblclick 
) [inline]

Implements WIMSchem.MolSelectListener.

Definition at line 1195 of file MainPanel.java.

    {
       if (dblclick && idx!=0)
       {
           ArrayList<Integer> selidx=new ArrayList<Integer>();
           if (idx>0) selidx.add(idx);
           else {selidx.add(editor.MolData().BondFrom(-idx)); selidx.add(editor.MolData().BondTo(-idx));}
           Molecule newMol=(new DialogEdit(frameParent,editor.MolData(),selidx)).exec();
           if (newMol!=null) editor.Replace(newMol);
       }
    }

Here is the call graph for this function:

void WIMSchem.MainPanel.mouseClicked ( MouseEvent  e) [inline]

Definition at line 1098 of file MainPanel.java.

{}
void WIMSchem.MainPanel.mouseEntered ( MouseEvent  e) [inline]

Definition at line 1099 of file MainPanel.java.

{}
void WIMSchem.MainPanel.mouseExited ( MouseEvent  e) [inline]

Definition at line 1100 of file MainPanel.java.

{}
void WIMSchem.MainPanel.mousePressed ( MouseEvent  e) [inline]

Definition at line 1101 of file MainPanel.java.

                                          {
       // jm.evers : setting atoms menulist according applet-params...or not
       if (e.getSource()==toolButtons[TOOL_SETATOM] && e.getButton()==MouseEvent.BUTTON3)
       {
           toolButtons[TOOL_SETATOM].setSelected(true);
           JPopupMenu popup=new JPopupMenu();
           if(my_atoms==null){
              popup.add(MenuItem("C",0));
               popup.add(MenuItem("H",0));
              popup.add(MenuItem("O",0));
               popup.add(MenuItem("N",0));
               popup.add(MenuItem("S",0));
               popup.add(MenuItem("P",0));
               popup.add(MenuItem("Li",0));
               popup.add(MenuItem("Na",0));
               popup.add(MenuItem("K",0));
               popup.add(MenuItem("Mg",0));
               popup.add(MenuItem("Ca",0));
              popup.add(MenuItem("Ti",0));
               popup.add(MenuItem("Zr",0));
               popup.add(MenuItem("Cr",0));
               popup.add(MenuItem("Mo",0));
               popup.add(MenuItem("Mn",0));
               popup.add(MenuItem("Fe",0));
               popup.add(MenuItem("Cu",0));
               popup.add(MenuItem("Zn",0));
               popup.add(MenuItem("Ag",0));
               popup.add(MenuItem("Hg",0));
               popup.add(MenuItem("Al",0));
               popup.add(MenuItem("Si",0));
               popup.add(MenuItem("F",0));
               popup.add(MenuItem("Cl",0));
               popup.add(MenuItem("Br",0));
               popup.add(MenuItem("I",0));
           }
           else
           {
              for(int p=0; p<my_atoms.length;p++){
                  popup.add(MenuItem(my_atoms[p],0));
              }
           }
           popup.show(toolButtons[TOOL_SETATOM],0,0);
       }
       if (e.getSource()==toolButtons[TOOL_TEMPLATE] && e.getButton()==MouseEvent.BUTTON3) 
       {
           toolGroup.setSelected(toolButtons[TOOL_TEMPLATE].getModel(),true);
           TemplateSelect();
       }
    }

Here is the call graph for this function:

void WIMSchem.MainPanel.mouseReleased ( MouseEvent  e) [inline]

Definition at line 1150 of file MainPanel.java.

{}   
JRadioButtonMenuItem WIMSchem.MainPanel.RadioMenuItem ( String  txt,
int  key,
boolean  sel,
ButtonGroup  bg 
) [inline, package]

Definition at line 543 of file MainPanel.java.

    {
       JRadioButtonMenuItem mi=new JRadioButtonMenuItem(txt,sel);
       mi.addActionListener(this);
       mi.setMnemonic(key);
       bg.add(mi);
       return mi;
    }

Here is the caller graph for this function:

void WIMSchem.MainPanel.ReadStream ( ) [inline, package]

Definition at line 820 of file MainPanel.java.

                     {
       try
       {
           Molecule frag=MoleculeStream.ReadUnknown(System.in);
           editor.AddArbitraryFragment(frag);
       }
       catch (IOException e) 
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("stdin_Read_Failed"),JOptionPane.ERROR_MESSAGE);
           return;
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.SaveCurrent ( ) [inline, package]

Definition at line 806 of file MainPanel.java.

                      {
       try
       {
           FileOutputStream ostr=new FileOutputStream(filename);
           MoleculeStream.WriteNative(ostr,editor.MolData());
           ostr.close();
           editor.NotifySaved();
       }
       catch (IOException e)
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("Save_Failed"),JOptionPane.ERROR_MESSAGE);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.ScaleToFit ( ) [inline]

Definition at line 531 of file MainPanel.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.SelectElement ( String  El) [inline, package]

Definition at line 941 of file MainPanel.java.

                                 {
       if (lastElement!=null) 
       {
           if (lastElement.compareTo(El)==0) return;
           toolIcons[TOOL_SETATOM]=new ImageIcon(getClass().getResource("/images/"+IMAGE_TOOL[TOOL_SETATOM]+".png"));
       }

       int w=toolIcons[TOOL_SETATOM].getImage().getWidth(null),h=toolIcons[TOOL_SETATOM].getImage().getHeight(null);
       BufferedImage img=new BufferedImage(w,h,BufferedImage.TYPE_INT_ARGB);
       Graphics2D g=(Graphics2D)img.getGraphics();
       g.setColor(new Color(0x00000000,true));
       g.fillRect(0,0,w,h);
       g.drawImage(toolIcons[TOOL_SETATOM].getImage(),0,0,null);
       
       Font font=new Font("SansSerif",Font.PLAIN,El.length()==1 ? 20 : 14);
       g.setFont(font);
       g.setColor(new Color(0,192,0));
       FontMetrics metrics=g.getFontMetrics();
       g.drawString(El,(w-metrics.stringWidth(El))/2-3,(h+metrics.getAscent())/2-2);
       
       toolButtons[TOOL_SETATOM].setIcon(new ImageIcon(img));
       
       lastElement=El;
    }

Here is the caller graph for this function:

void WIMSchem.MainPanel.SetFilename ( String  fn) [inline, package]

Definition at line 792 of file MainPanel.java.

                               {
       if (fn.length()==0) {filename=null; return;}
       filename=fn;
       
       if (!streamMode)
       {
          String chopfn=fn;
          int i=chopfn.lastIndexOf("/");
          if (i>=0) chopfn=chopfn.substring(i+1);
           if (frameParent!=null) frameParent.setTitle(chopfn+" - WIMSchem");
       } 
       else {if (frameParent!=null) frameParent.setTitle("WIMSchem");}
    }

Here is the caller graph for this function:

void WIMSchem.MainPanel.SetMolecule ( Molecule  Mol) [inline]

Definition at line 519 of file MainPanel.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.TemplateAddTo ( ) [inline, package]

Definition at line 988 of file MainPanel.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.TemplateSelect ( ) [inline, package]

Definition at line 971 of file MainPanel.java.

                         {
       int heightFudge=appletMode ? 30 : 0; // !! unpleasant hack which stands in for being a non-signed applet; correct at some point
       TemplateSelector sel=new TemplateSelector(templ,this,heightFudge);
       Point pos=toolButtons[TOOL_TEMPLATE].getLocationOnScreen();

       Dimension ssz=Toolkit.getDefaultToolkit().getScreenSize();
       GraphicsEnvironment ge=GraphicsEnvironment.getLocalGraphicsEnvironment();
       GraphicsConfiguration gc=ge.getScreenDevices()[0].getConfigurations()[0];
       ssz.width-=Toolkit.getDefaultToolkit().getScreenInsets(gc).right;
       ssz.height-=Toolkit.getDefaultToolkit().getScreenInsets(gc).bottom;
              
       if (pos.x+sel.getWidth()>ssz.width) pos.x=ssz.width-sel.getWidth();
       if (pos.y+sel.getHeight()>ssz.height) pos.y=ssz.height-sel.getHeight();
       sel.setLocation(pos);
       sel.setVisible(true);
    }

Here is the caller graph for this function:

void WIMSchem.MainPanel.TemplateTool ( ) [inline, package]

Definition at line 966 of file MainPanel.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void WIMSchem.MainPanel.TemplSelected ( Molecule  mol,
int  idx 
) [inline]

Implements WIMSchem.TemplSelectListener.

Definition at line 1189 of file MainPanel.java.

Here is the call graph for this function:

void WIMSchem.MainPanel.TestMol ( ) [inline, package]

Definition at line 845 of file MainPanel.java.

                  {
       Molecule mol=new Molecule();
       
       mol.AddAtom("N",0,0);
       mol.AddAtom("C",1.2,0);
       mol.AddAtom("O",2,0.8);
       mol.AddAtom("H",3,-0.8);
       mol.AddAtom("H",4,0);
       mol.AddBond(1,2,1);
       mol.AddBond(2,3,2);
       mol.AddBond(3,4,1);
       mol.AddBond(4,5,0);
       
       editor.Replace(mol);
    } 

Here is the call graph for this function:

void WIMSchem.MainPanel.windowActivated ( WindowEvent  e) [inline]

Definition at line 1216 of file MainPanel.java.

{}
void WIMSchem.MainPanel.windowClosed ( WindowEvent  e) [inline]

Definition at line 1217 of file MainPanel.java.

{}
void WIMSchem.MainPanel.windowClosing ( WindowEvent  e) [inline]

Definition at line 1218 of file MainPanel.java.

    {
       FileQuit();
    }

Here is the call graph for this function:

void WIMSchem.MainPanel.windowDeactivated ( WindowEvent  e) [inline]

Definition at line 1222 of file MainPanel.java.

{}
void WIMSchem.MainPanel.windowDeiconified ( WindowEvent  e) [inline]

Definition at line 1223 of file MainPanel.java.

{}
void WIMSchem.MainPanel.windowIconified ( WindowEvent  e) [inline]

Definition at line 1224 of file MainPanel.java.

{}
void WIMSchem.MainPanel.windowOpened ( WindowEvent  e) [inline]

Definition at line 1225 of file MainPanel.java.

    {
       if (firstResize)
       {
           editor.ScaleToFit();
           editor.repaint();
           firstResize=false;
       }
       editor.requestFocusInWindow();
    }

Here is the call graph for this function:

void WIMSchem.MainPanel.WriteStream ( ) [inline, package]

Definition at line 832 of file MainPanel.java.

                      {
       Molecule mol=editor.MolData();
       try
       {
           MoleculeStream.WriteMDLMOL(System.out,mol);
           MoleculeStream.WriteNative(System.out,mol);
       }
       catch (IOException e) 
       {
           JOptionPane.showMessageDialog(null,e.toString(),translation.getProperty("stdout_Write_Failed"),JOptionPane.ERROR_MESSAGE);
       }
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

String WIMSchem.MainPanel.appletClipboard = "" [package]

Definition at line 145 of file MainPanel.java.

Definition at line 141 of file MainPanel.java.

JCheckBoxMenuItem WIMSchem.MainPanel.chkShowHydr [package]

Definition at line 134 of file MainPanel.java.

JCheckBoxMenuItem WIMSchem.MainPanel.chkShowSter [package]

Definition at line 134 of file MainPanel.java.

Definition at line 132 of file MainPanel.java.

String WIMSchem.MainPanel.filename = null [package]

Definition at line 137 of file MainPanel.java.

Definition at line 136 of file MainPanel.java.

Definition at line 63 of file MainPanel.java.

Initial value:
{
       "Cursor","Rotator","Erasor","EDialog","AEdit","ASelect","BSingle","BDouble","BTriple","BZero","BInclined","BDeclined","BUnknown",
       "ACharge","Undo","Redo","Template","ECut","ECopy","EPaste"
    }

Definition at line 90 of file MainPanel.java.

String WIMSchem.MainPanel.language = "" [package]

Definition at line 142 of file MainPanel.java.

String WIMSchem.MainPanel.lastElement = null [package]

Definition at line 138 of file MainPanel.java.

Definition at line 139 of file MainPanel.java.

String WIMSchem.MainPanel.LICENSE = "or see http://www.gnu.org for details."

Definition at line 35 of file MainPanel.java.

ImageIcon WIMSchem.MainPanel.mainIcon = null [package]

Definition at line 65 of file MainPanel.java.

ImageIcon WIMSchem.MainPanel.mainLogo = null [package]

Definition at line 65 of file MainPanel.java.

Definition at line 101 of file MainPanel.java.

Definition at line 99 of file MainPanel.java.

Initial value:
{true,true,true,true,true,true,true,true,true,true,
                                   true,true,true,true,true,true,true,true,true,true}

Definition at line 96 of file MainPanel.java.

Definition at line 141 of file MainPanel.java.

Definition at line 133 of file MainPanel.java.

int WIMSchem.MainPanel.templateIdx = -1 [package]

Definition at line 140 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_CHARGE = 13 [static, package]

Definition at line 81 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_COPY = 18 [static, package]

Definition at line 86 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_COUNT = 20 [static, package]

Definition at line 88 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_CURSOR = 0 [static, package]

Definition at line 68 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_CUT = 17 [static, package]

Definition at line 85 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_DECLINED = 11 [static, package]

Definition at line 79 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_DIALOG = 3 [static, package]

Definition at line 71 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_DOUBLE = 7 [static, package]

Definition at line 75 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_EDIT = 4 [static, package]

Definition at line 72 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_ERASOR = 2 [static, package]

Definition at line 70 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_INCLINED = 10 [static, package]

Definition at line 78 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_PASTE = 19 [static, package]

Definition at line 87 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_REDO = 15 [static, package]

Definition at line 83 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_ROTATOR = 1 [static, package]

Definition at line 69 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_SETATOM = 5 [static, package]

Definition at line 73 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_SINGLE = 6 [static, package]

Definition at line 74 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_TEMPLATE = 16 [static, package]

Definition at line 84 of file MainPanel.java.

Definition at line 89 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_TRIPLE = 8 [static, package]

Definition at line 76 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_UNDO = 14 [static, package]

Definition at line 82 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_UNKNOWN = 12 [static, package]

Definition at line 80 of file MainPanel.java.

final int WIMSchem.MainPanel.TOOL_ZERO = 9 [static, package]

Definition at line 77 of file MainPanel.java.

AbstractButton [] WIMSchem.MainPanel.toolButtons [package]

Definition at line 129 of file MainPanel.java.

ButtonGroup WIMSchem.MainPanel.toolGroup [package]

Definition at line 130 of file MainPanel.java.

ImageIcon [] WIMSchem.MainPanel.toolIcons [package]

Definition at line 131 of file MainPanel.java.

Properties WIMSchem.MainPanel.translation [package]

Definition at line 143 of file MainPanel.java.

String WIMSchem.MainPanel.typedElement = "" [package]

Definition at line 138 of file MainPanel.java.

Definition at line 144 of file MainPanel.java.

String WIMSchem.MainPanel.VERSION = "0.1" [static]

Definition at line 49 of file MainPanel.java.

Definition at line 67 of file MainPanel.java.

Definition at line 66 of file MainPanel.java.


The documentation for this class was generated from the following file: