org.openbp.common.generic.description
Class DisplayObjectImpl

java.lang.Object
  extended by org.openbp.common.generic.description.DescriptionObjectImpl
      extended by org.openbp.common.generic.description.DisplayObjectImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, Copyable, DescriptionObject, Displayable, DisplayObject, Validatable
Direct Known Subclasses:
DisplayTreeObjectImpl, ObjectDescriptor, PropertyDescriptor

public class DisplayObjectImpl
extends DescriptionObjectImpl
implements DisplayObject

An object that has a name, a display name and a description. \bNote that this object does not support localization currently!\b
\bThe 'locale' parameter of all methods is ignored.\b

Author:
Heiko Erhardt
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.openbp.common.generic.Copyable
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW
 
Constructor Summary
DisplayObjectImpl()
          Default constructor.
DisplayObjectImpl(java.lang.String name)
          Value constructor.
DisplayObjectImpl(java.lang.String name, java.lang.String displayName, java.lang.String description)
          Value constructor.
 
Method Summary
 void copyFrom(java.lang.Object source, int copyMode)
          Copies the values of the source object to this object.
 java.lang.String getDisplayName()
          Gets the default display name of this object.
 java.lang.String getDisplayText()
          Gets text that can be used to display this object.
 void setDisplayName(java.lang.String displayName)
          Sets the default display name of this object.
 
Methods inherited from class org.openbp.common.generic.description.DescriptionObjectImpl
clone, compareTo, getDescription, getDescriptionEscape, getDescriptionText, getName, setDescription, setDescriptionEscape, setName, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openbp.common.generic.description.DescriptionObject
clone, getDescription, getDescriptionText, getName, setDescription, setName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

DisplayObjectImpl

public DisplayObjectImpl()
Default constructor.


DisplayObjectImpl

public DisplayObjectImpl(java.lang.String name)
Value constructor.

Parameters:
name - The internal name of the object

DisplayObjectImpl

public DisplayObjectImpl(java.lang.String name,
                         java.lang.String displayName,
                         java.lang.String description)
Value constructor.

Parameters:
name - The internal name of the object
displayName - Display name of this object
description - Description of this object
Method Detail

copyFrom

public void copyFrom(java.lang.Object source,
                     int copyMode)
              throws java.lang.CloneNotSupportedException
Copies the values of the source object to this object.

Specified by:
copyFrom in interface Copyable
Overrides:
copyFrom in class DescriptionObjectImpl
Parameters:
source - The source object. Must be of the same type as this object.
copyMode - Determines if a deep copy, a first level copy or a shallow copy is to be performed. See the constants of the org.openbp.common.generic.description.Copyable class.
Throws:
java.lang.CloneNotSupportedException - If the cloning of one of the contained objects failed

getDisplayName

public java.lang.String getDisplayName()
Gets the default display name of this object. The display name is the human-readable name of the object (i. e. a name that is displayed in the user interface).

Specified by:
getDisplayName in interface DisplayObject

setDisplayName

public void setDisplayName(java.lang.String displayName)
Sets the default display name of this object. The display name is the human-readable name of the object (i. e. a name that is displayed in the user interface).

Specified by:
setDisplayName in interface DisplayObject

getDisplayText

public java.lang.String getDisplayText()
Gets text that can be used to display this object. This is either the display name (setDisplayName(java.lang.String)) or the regular name (DescriptionObject.setName(String)) of the object itself.

Specified by:
getDisplayText in interface DescriptionObject
Specified by:
getDisplayText in interface Displayable
Overrides:
getDisplayText in class DescriptionObjectImpl
Returns:
The display text (should usually not be null)


Copyright © 2011. All Rights Reserved.