Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: joelib/gui/molviewer/java3d/util/CentralDisplayAdapter.java


1   ///////////////////////////////////////////////////////////////////////////////
2   //  Filename: $RCSfile: CentralDisplayAdapter.java,v $
3   //  Purpose:  Counts the number of descriptors and molecules in a molecule file.
4   //  Language: Java
5   //  Compiler: JDK 1.4
6   //  Authors:  Joerg K. Wegner
7   //  Version:  $Revision: 1.2 $
8   //            $Date: 2003/08/19 13:11:26 $
9   //            $Author: wegner $
10  //
11  //  Copyright (c) Dept. Computer Architecture, University of Tuebingen, Germany
12  //
13  //  This program is free software; you can redistribute it and/or modify
14  //  it under the terms of the GNU General Public License as published by
15  //  the Free Software Foundation version 2 of the License.
16  //
17  //  This program is distributed in the hope that it will be useful,
18  //  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  //  GNU General Public License for more details.
21  ///////////////////////////////////////////////////////////////////////////////
22  package joelib.gui.molviewer.java3d.util;
23  
24  
25  /*==========================================================================*
26   * IMPORTS
27   *========================================================================== */
28  import joelib.gui.molviewer.java3d.graphics3D.*;
29  import joelib.gui.molviewer.java3d.molecule.ViewerMolecule;
30  
31  import joelib.molecule.*;
32  
33  
34  /*==========================================================================*
35   * CLASS DECLARATION
36   *========================================================================== */
37  
38  /**
39   * Description of the Class
40   *
41   * @author     wegnerj
42   * @license    GPL
43   * @cvsversion    $Revision: 1.2 $, $Date: 2003/08/19 13:11:26 $
44   */
45  public class CentralDisplayAdapter extends MolViewerEventAdapter
46  {
47      //~ Instance fields ////////////////////////////////////////////////////////
48  
49      JPanel3D myPanel;
50  
51      //~ Constructors ///////////////////////////////////////////////////////////
52  
53      /*-------------------------------------------------------------------------*
54       * constructor
55       *------------------------------------------------------------------------- */
56  
57      /**
58       *Constructor for the CentralDisplayAdapter object
59       *
60       * @param panel  Description of the Parameter
61       */
62      public CentralDisplayAdapter(JPanel3D panel)
63      {
64          myPanel = panel;
65      }
66  
67      //~ Methods ////////////////////////////////////////////////////////////////
68  
69      /*-------------------------------------------------------------------------*
70       * public member variables
71       *------------------------------------------------------------------------- */
72  
73      /**
74       * Description of the Method
75       *
76       * @param event  Description of the Parameter
77       */
78      public void centralDisplayChange(MolViewerEvent event)
79      {
80          if (event.getType() == MolViewerEvent.REPLACE_MOLECULE)
81          {
82              myPanel.clear();
83              myPanel.addMolecule((JOEMol) event.getParam());
84          }
85      }
86  }
87  ///////////////////////////////////////////////////////////////////////////////
88  //  END OF FILE.
89  ///////////////////////////////////////////////////////////////////////////////