- MCMatrix idmat = new MCMatrix(3, 3);
- MCMatrix objmat = new MCMatrix(3, 3);
- boolean redrawneeded = true;
- int omx = 0;
- int mx = 0;
- int omy = 0;
- int my = 0;
- public PDBfile pdb;
- int bsize;
- Image img;
- Graphics ig;
- Dimension prefsize;
- float[] centre = new float[3];
- float[] width = new float[3];
- float maxwidth;
- float scale;
- String inStr;
- String inType;
- boolean bysequence = true;
- boolean depthcue = true;
- boolean wire = false;
- boolean bymolecule = false;
- boolean zbuffer = true;
- boolean dragging;
- int xstart;
- int xend;
- int ystart;
- int yend;
- int xmid;
- int ymid;
- Font font = new Font("Helvetica", Font.PLAIN, 10);
- jalview.appletgui.SeqCanvas seqcanvas;
- public Sequence sequence;
- final StringBuffer mappingDetails = new StringBuffer();
- String appletToolTip = null;
- int toolx, tooly;
- PDBChain mainchain;
- Vector highlightRes;
- boolean pdbAction = false;
- Bond highlightBond1, highlightBond2;
- boolean errorLoading = false;
- boolean seqColoursReady = false;
- jalview.appletgui.FeatureRenderer fr;
-
- public AppletPDBCanvas(jalview.appletgui.SeqCanvas seqcanvas, Sequence seq)
- {
- this.seqcanvas = seqcanvas;
- this.sequence = seq;
-
- seqcanvas.setPDBCanvas(this);
- addKeyListener(new KeyAdapter()
- {
-
- public void keyPressed(KeyEvent evt)
- {
- doKeyPressed(evt);
- }
- });
+ MCMatrix idmat = new MCMatrix(3, 3);
+ MCMatrix objmat = new MCMatrix(3, 3);
+ boolean redrawneeded = true;
+ int omx = 0;
+ int mx = 0;
+ int omy = 0;
+ int my = 0;
+ public PDBfile pdb;
+ PDBEntry pdbentry;
+ int bsize;
+ Image img;
+ Graphics ig;
+ Dimension prefsize;
+ float[] centre = new float[3];
+ float[] width = new float[3];
+ float maxwidth;
+ float scale;
+ String inStr;
+ String inType;
+ boolean bysequence = true;
+ boolean depthcue = true;
+ boolean wire = false;
+ boolean bymolecule = false;
+ boolean zbuffer = true;
+ boolean dragging;
+ int xstart;
+ int xend;
+ int ystart;
+ int yend;
+ int xmid;
+ int ymid;
+ Font font = new Font("Helvetica", Font.PLAIN, 10);
+ public SequenceI [] sequence;
+ final StringBuffer mappingDetails = new StringBuffer();
+ String appletToolTip = null;
+ int toolx, tooly;
+ PDBChain mainchain;
+ Vector highlightRes;
+ boolean pdbAction = false;
+ Bond highlightBond1, highlightBond2;
+ boolean errorLoading = false;
+ boolean seqColoursReady = false;
+ FeatureRenderer fr;
+ AlignmentPanel ap;
+ StructureSelectionManager ssm;
+
+ public AppletPDBCanvas(PDBEntry pdbentry,
+ SequenceI[] seq,
+ String [] chains,
+ AlignmentPanel ap,
+ String protocol)
+
+ {
+ this.ap = ap;
+ this.pdbentry = pdbentry;
+ this.sequence = seq;
+
+ ssm = StructureSelectionManager.getStructureSelectionManager();
+
+ try{
+ pdb = ssm.setMapping(seq, chains, pdbentry.getFile(), protocol);
+
+ if(protocol.equals(jalview.io.AppletFormatAdapter.PASTE))
+ pdbentry.setFile("INLINE"+pdb.id);
+
+ }catch(Exception ex)
+ {
+ ex.printStackTrace();
+ return;