FreeHEP API
Version current

hep.graphics.heprep.ref
Class DefaultHepRepAttribute

java.lang.Object
  extended byhep.graphics.heprep.ref.DefaultHepRepAttribute
All Implemented Interfaces:
HepRepAttribute, HepRepConstants, Serializable
Direct Known Subclasses:
DefaultHepRepDefinition, DefaultHepRepInstance, DefaultHepRepPoint

public abstract class DefaultHepRepAttribute
extends Object
implements HepRepAttribute, Serializable

Version:
$Id: DefaultHepRepAttribute.java,v 1.26 2004/07/05 22:09:46 duns Exp $
Author:
M.Donszelmann
See Also:
Serialized Form
Source Code:
DefaultHepRepAttribute.java

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
protected DefaultHepRepAttribute()
           
 
Method Summary
 void addAttColor(String key, double r, double g, double b, double alpha, int showLabel)
           
 void addAttColor(String key, String colorName, int showLabel)
           
 void addAttValue(HepRepAttValue hepRepAttValue)
          Adds an attValue.
 void addAttValue(String key, boolean value)
          Adds an attValue.
 void addAttValue(String key, boolean value, int showLabel)
          Adds an attValue.
 void addAttValue(String key, Color value)
          Adds a Color attValue.
 void addAttValue(String key, Color value, int showLabel)
          Adds a Color attValue.
 void addAttValue(String key, double value)
          Adds an attValue.
 void addAttValue(String key, double value, int showLabel)
          Adds an attValue.
 void addAttValue(String key, int value)
          Adds an attValue.
 void addAttValue(String key, int value, int showLabel)
          Adds an attValue.
 void addAttValue(String key, String value)
          Adds an attValue.
 void addAttValue(String key, String value, int showLabel)
          Adds an attValue.
 void addAttValue(String name, String value, String type, int showLabel)
           
abstract  HepRepAttValue getAttValue(String name)
          Returns the attValue specified by name.
 HepRepAttValue getAttValueFromNode(String lowerCaseName)
          Returns a named attribute value from this node.
 Set getAttValuesFromNode()
          Returns a collection of all attribute values from this node.
 HepRepAttValue removeAttValue(String key)
          Remove the attvalue named by key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cvsId

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

DefaultHepRepAttribute

protected DefaultHepRepAttribute()
Method Detail

getAttValuesFromNode

public Set getAttValuesFromNode()
Description copied from interface: HepRepAttribute
Returns a collection of all attribute values from this node.

Specified by:
getAttValuesFromNode in interface HepRepAttribute
Returns:
collection of HepRepAttValues.

addAttValue

public void addAttValue(HepRepAttValue hepRepAttValue)
Description copied from interface: HepRepAttribute
Adds an attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
hepRepAttValue - to be added.

addAttValue

public void addAttValue(String key,
                        String value)
Description copied from interface: HepRepAttribute
Adds an attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue

addAttValue

public void addAttValue(String key,
                        int value)
Description copied from interface: HepRepAttribute
Adds an attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue

addAttValue

public void addAttValue(String key,
                        double value)
Description copied from interface: HepRepAttribute
Adds an attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue

addAttValue

public void addAttValue(String key,
                        boolean value)
Description copied from interface: HepRepAttribute
Adds an attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue

addAttValue

public void addAttValue(String key,
                        Color value)
Description copied from interface: HepRepAttribute
Adds a Color attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue

addAttValue

public void addAttValue(String key,
                        String value,
                        int showLabel)
Description copied from interface: HepRepAttribute
Adds an attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue
showLabel - show this as label

addAttValue

public void addAttValue(String key,
                        int value,
                        int showLabel)
Description copied from interface: HepRepAttribute
Adds an attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue
showLabel - show this as label

addAttValue

public void addAttValue(String key,
                        double value,
                        int showLabel)
Description copied from interface: HepRepAttribute
Adds an attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue
showLabel - show this as label

addAttValue

public void addAttValue(String key,
                        boolean value,
                        int showLabel)
Description copied from interface: HepRepAttribute
Adds an attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue
showLabel - show this as label

addAttValue

public void addAttValue(String key,
                        Color value,
                        int showLabel)
Description copied from interface: HepRepAttribute
Adds a Color attValue.

Specified by:
addAttValue in interface HepRepAttribute
Parameters:
key - name of attValue
value - value of attValue
showLabel - show this as label

addAttColor

public void addAttColor(String key,
                        String colorName,
                        int showLabel)

addAttColor

public void addAttColor(String key,
                        double r,
                        double g,
                        double b,
                        double alpha,
                        int showLabel)

addAttValue

public void addAttValue(String name,
                        String value,
                        String type,
                        int showLabel)

getAttValueFromNode

public HepRepAttValue getAttValueFromNode(String lowerCaseName)
Description copied from interface: HepRepAttribute
Returns a named attribute value from this node.

Specified by:
getAttValueFromNode in interface HepRepAttribute
Parameters:
lowerCaseName - name in all lowercase.
Returns:
corresponding HepRepAttValue.

removeAttValue

public HepRepAttValue removeAttValue(String key)
Description copied from interface: HepRepAttribute
Remove the attvalue named by key.

Specified by:
removeAttValue in interface HepRepAttribute
Parameters:
key - name of the attValue to be removed.
Returns:
removed HepRepAttValue, or null if not removed.

getAttValue

public abstract 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.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.