\r
public class AppletPDBCanvas extends Panel implements MouseListener, MouseMotionListener\r
{\r
- MCMatrix idmat = new MCMatrix(3, 3);\r
+ public AppletPDBCanvas()\r
+ {\r
+ try\r
+ {\r
+ jbInit();\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ ex.printStackTrace();\r
+ }\r
+ }\r
+\r
+ MCMatrix idmat = new MCMatrix(3, 3);\r
MCMatrix objmat = new MCMatrix(3, 3);\r
boolean redrawneeded = true;\r
int omx = 0;\r
{\r
paint(g);\r
}\r
+\r
+ private void jbInit()\r
+ throws Exception\r
+ {\r
+ }\r
}\r
}\r
});\r
charge.setLabel("Charge & Cysteine");\r
- charge.addItemListener(new ItemListener()\r
+ charge.addActionListener(new ActionListener()\r
{\r
- public void itemStateChanged(ItemEvent e)\r
+ public void actionPerformed(ActionEvent e)\r
{\r
charge_actionPerformed();\r
}\r
});\r
hydro.setLabel("Hydrophobicity");\r
- hydro.addItemListener(new ItemListener()\r
+ hydro.addActionListener(new ActionListener()\r
{\r
- public void itemStateChanged(ItemEvent e)\r
+ public void actionPerformed(ActionEvent e)\r
{\r
hydro_actionPerformed();\r
}\r
});\r
chain.setLabel("By Chain");\r
- chain.addItemListener(new ItemListener()\r
+ chain.addActionListener(new ActionListener()\r
{\r
- public void itemStateChanged(ItemEvent e)\r
+ public void actionPerformed(ActionEvent e)\r
{\r
chain_actionPerformed();\r
}\r
});\r
- seqButton.setState(true);\r
seqButton.setLabel("By Sequence");\r
- seqButton.addItemListener(new ItemListener()\r
+ seqButton.addActionListener(new ActionListener()\r
{\r
- public void itemStateChanged(ItemEvent e)\r
- {\r
+ public void actionPerformed(ActionEvent e){\r
seqButton_actionPerformed();\r
}\r
});\r
CheckboxMenuItem wire = new CheckboxMenuItem();\r
CheckboxMenuItem depth = new CheckboxMenuItem();\r
CheckboxMenuItem zbuffer = new CheckboxMenuItem();\r
- CheckboxMenuItem charge = new CheckboxMenuItem();\r
\r
+ MenuItem charge = new MenuItem();\r
+ MenuItem hydro = new MenuItem();\r
+ MenuItem chain = new MenuItem();\r
+ MenuItem seqButton = new MenuItem();\r
\r
- CheckboxMenuItem hydro = new CheckboxMenuItem();\r
- CheckboxMenuItem chain = new CheckboxMenuItem();\r
- CheckboxMenuItem seqButton = new CheckboxMenuItem();\r
CheckboxMenuItem molecule = new CheckboxMenuItem();\r
\r
public void charge_actionPerformed()\r
public void seqButton_actionPerformed()\r
{\r
clearButtonGroup();\r
- pdbcanvas.bysequence = seqButton.getState();\r
+ pdbcanvas.bysequence = true;\r
pdbcanvas.updateSeqColours();\r
}\r
\r