-public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListener
-{
- 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.gui.SeqCanvas seqcanvas;
- public Sequence sequence;
- final StringBuffer mappingDetails = new StringBuffer();
- PDBChain mainchain;
- Vector highlightRes;
- boolean pdbAction = false;
- boolean seqColoursReady = false;
- jalview.gui.FeatureRenderer fr;
- Color backgroundColour = Color.black;
-
- public PDBCanvas(jalview.gui.SeqCanvas seqcanvas, Sequence seq)
- {
- this.seqcanvas = seqcanvas;
- this.sequence = seq;
- seqcanvas.setPDBCanvas(this);
- }
-
- public void setPDBFile(PDBfile pdb)
- {
- int max = -10;
- int maxchain = -1;
- int pdbstart = 0;
- int pdbend = 0;
- int seqstart = 0;
- int seqend = 0;
- AlignSeq maxAlignseq = null;
-
- for (int i = 0; i < pdb.chains.size(); i++)
- {