3 * Copyright (c) 2006 The Regents of the University of California.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions, and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions, and the following
13 * disclaimer in the documentation and/or other materials provided
14 * with the distribution.
15 * 3. Redistributions must acknowledge that this software was
16 * originally developed by the UCSF Computer Graphics Laboratory
17 * under support by the NIH National Center for Research Resources,
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY
21 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 package ext.edu.ucsf.rbvi.strucviz2;
35 import java.util.List;
38 * This interface provides a common set of methods that are implemented by the
39 * ChimeraModel, ChimeraChain, and ChimeraResidue classes.
45 public interface ChimeraStructuralObject
49 * Return the Chimera selection specification for this object
51 * @return a String representing a Chimera atom-spec
53 public String toSpec();
56 * Return a String representation for this object
58 * @return a String representing the object name
60 public String toString();
63 * Return the userData for this object
65 * @return an Object representing the userData (usually TreePath)
67 public Object getUserData();
70 * Set the userData for this object
73 * the Object representing the userData (usually TreePath)
75 public void setUserData(Object userData);
78 * Return the ChimeraModel for this object
80 * @return the ChimeraModel this object is part of
82 public ChimeraModel getChimeraModel();
85 * Set the "selected" state of this object
88 * boolean value as to whether this object is selected
90 public void setSelected(boolean selected);
93 * Get the "selected" state of this object
95 * @return the selected state of this object
97 public boolean isSelected();
100 * Get the selected state of this object and its children.
102 * @return true if any child is selected.
104 public boolean hasSelectedChildren();
107 * Get the children of this object (if any)
109 * @return the children of the object
111 public List<ChimeraStructuralObject> getChildren();