FreeHEP API
Version v1.2.2

hep.graphics.heprep.corba
Class HepRepInstanceAdapter

java.lang.Object
  |
  +--hep.graphics.heprep.corba.CORBAHepRepAttribute
        |
        +--hep.graphics.heprep.corba.HepRepInstanceAdapter
All Implemented Interfaces:
HepRepAttribute, HepRepConstants, HepRepInstance

public class HepRepInstanceAdapter
extends CORBAHepRepAttribute
implements HepRepInstance

Version:
$Id: HepRepInstanceAdapter.java,v 1.23 2003/12/10 00:01:40 duns Exp $
Author:
Mark Donszelmann

Field Summary
static String cvsId
           
 
Fields inherited from interface hep.graphics.heprep.HepRepConstants
SHOW_DESC, SHOW_EXTRA, SHOW_NAME, SHOW_NONE, SHOW_VALUE, TYPE_BOOLEAN, TYPE_COLOR, TYPE_DOUBLE, TYPE_INT, TYPE_LONG, TYPE_STRING, TYPE_UNKNOWN
 
Constructor Summary
HepRepInstanceAdapter(HepRepTypeTree typeTree, HepRepInstance hepRepInstance, HepRepInstance parent)
           
 
Method Summary
 void addInstance(HepRepInstance instance)
          Adds an sub-instance to this instance.
 void addPoint(HepRepPoint point)
          Adds a point to this instance.
 HepRepInstance copy(HepRepTypeTree typeTree, HepRepInstance parent)
          Returns a deep copy of this instance.
 HepRepInstance copy(HepRepTypeTree typeTree, HepRepInstance parent, HepRepSelectFilter filter)
          Returns a deep copy of this instance.
 HepRepInstance copy(HepRepTypeTree typeTree, HepRepInstanceTree parent)
          Returns a deep copy of this instance.
 HepRepInstance copy(HepRepTypeTree typeTree, HepRepInstanceTree parent, HepRepSelectFilter filter)
          Returns a deep copy of this instance.
 boolean equals(Object o)
           
 HepRepAttValue getAttValue(String name)
          Returns the attValue specified by name.
protected  HepRepAttValue[] getAttValues()
           
 List getInstances()
          Returns a collection of all sub-instances this instance keeps.
 List getPoints()
          Returns a collection of all points this instance keeps.
 HepRepInstance getSuperInstance()
          Returns the parent of this instance.
 HepRepType getType()
          Returns the associated type for this instance.
 Object getUserObject()
          Returns a user object previously set on this instance.
 int hashCode()
           
 void overlay(HepRepInstance instance)
          Overlays the instance on the current instance.
 void removeInstance(HepRepInstance instance)
          Removes a sub-instance from this instance.
 void setUserObject(Object object)
          Sets a User Object on this instance.
 
Methods inherited from class hep.graphics.heprep.corba.CORBAHepRepAttribute
addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, getAttValueFromNode, getAttValuesFromNode, removeAttValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.graphics.heprep.HepRepAttribute
addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, addAttValue, getAttValueFromNode, getAttValuesFromNode, removeAttValue
 

Field Detail

cvsId

public static final String cvsId
See Also:
Constant Field Values
Constructor Detail

HepRepInstanceAdapter

public HepRepInstanceAdapter(HepRepTypeTree typeTree,
                             HepRepInstance hepRepInstance,
                             HepRepInstance parent)
Method Detail

getSuperInstance

public HepRepInstance getSuperInstance()
Description copied from interface: HepRepInstance
Returns the parent of this instance.

Specified by:
getSuperInstance in interface HepRepInstance
Returns:
parent of instance, or null if top-level.

overlay

public void overlay(HepRepInstance instance)
Description copied from interface: HepRepInstance
Overlays the instance on the current instance. Attributes of the instance override or are added to the current instance. Sub-instances of the instance are added only if the current instance has no sub-instances. Points of the instance are added only if the current instance has no points.

Specified by:
overlay in interface HepRepInstance

copy

public HepRepInstance copy(HepRepTypeTree typeTree,
                           HepRepInstanceTree parent)
                    throws CloneNotSupportedException
Description copied from interface: HepRepInstance
Returns a deep copy of this instance.

Specified by:
copy in interface HepRepInstance
Parameters:
parent - to which the copy is added.
Returns:
copy of this instance.
Throws:
CloneNotSupportedException - if copying is not possible.

copy

public HepRepInstance copy(HepRepTypeTree typeTree,
                           HepRepInstance parent)
                    throws CloneNotSupportedException
Description copied from interface: HepRepInstance
Returns a deep copy of this instance.

Specified by:
copy in interface HepRepInstance
Parameters:
parent - to which the copy is added.
Returns:
copy of this instance.
Throws:
CloneNotSupportedException - if copying is not possible.

copy

public HepRepInstance copy(HepRepTypeTree typeTree,
                           HepRepInstance parent,
                           HepRepSelectFilter filter)
                    throws CloneNotSupportedException
Description copied from interface: HepRepInstance
Returns a deep copy of this instance.

Specified by:
copy in interface HepRepInstance
Parameters:
parent - to which the copy is added.
filter - run on all instances before copying.
Returns:
copy of this instance.
Throws:
CloneNotSupportedException - if copying is not possible.

copy

public HepRepInstance copy(HepRepTypeTree typeTree,
                           HepRepInstanceTree parent,
                           HepRepSelectFilter filter)
                    throws CloneNotSupportedException
Description copied from interface: HepRepInstance
Returns a deep copy of this instance.

Specified by:
copy in interface HepRepInstance
Parameters:
parent - to which the copy is added.
filter - run on all instances before copying.
Returns:
copy of this instance.
Throws:
CloneNotSupportedException - if copying is not possible.

setUserObject

public void setUserObject(Object object)
Description copied from interface: HepRepInstance
Sets a User Object on this instance.

Specified by:
setUserObject in interface HepRepInstance
Parameters:
object - User Object.

getUserObject

public Object getUserObject()
Description copied from interface: HepRepInstance
Returns a user object previously set on this instance.

Specified by:
getUserObject in interface HepRepInstance
Returns:
User Object.

getType

public HepRepType getType()
Description copied from interface: HepRepInstance
Returns the associated type for this instance.

Specified by:
getType in interface HepRepInstance
Returns:
associated HepRepType.

getInstances

public List getInstances()
Description copied from interface: HepRepInstance
Returns a collection of all sub-instances this instance keeps.

Specified by:
getInstances in interface HepRepInstance
Returns:
collection of HepRepInstances.

getPoints

public List getPoints()
Description copied from interface: HepRepInstance
Returns a collection of all points this instance keeps.

Specified by:
getPoints in interface HepRepInstance
Returns:
collection of HepRepPoints.

addPoint

public void addPoint(HepRepPoint point)
              throws UnsupportedOperationException
Description copied from interface: HepRepInstance
Adds a point to this instance.

Specified by:
addPoint in interface HepRepInstance
Parameters:
point - to be added.
UnsupportedOperationException

addInstance

public void addInstance(HepRepInstance instance)
                 throws UnsupportedOperationException
Description copied from interface: HepRepInstance
Adds an sub-instance to this instance.

Specified by:
addInstance in interface HepRepInstance
Parameters:
instance - sub-instance.
UnsupportedOperationException

removeInstance

public void removeInstance(HepRepInstance instance)
                    throws UnsupportedOperationException
Description copied from interface: HepRepInstance
Removes a sub-instance from this instance.

Specified by:
removeInstance in interface HepRepInstance
Parameters:
instance - sub-instance.
UnsupportedOperationException

getAttValue

public HepRepAttValue getAttValue(String name)
Description copied from interface: HepRepAttribute
Returns the attValue specified by name. This attValue is normally searched on the node itself and then on its type, moving up the typetree.

Specified by:
getAttValue in interface HepRepAttribute
Parameters:
name - of attribute value.
Returns:
attribute value.

getAttValues

protected HepRepAttValue[] getAttValues()
Specified by:
getAttValues in class CORBAHepRepAttribute

equals

public boolean equals(Object o)
Overrides:
equals in class CORBAHepRepAttribute

hashCode

public int hashCode()
Overrides:
hashCode in class CORBAHepRepAttribute

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.