TPTP 4.5.0 Testing Tools Project
Internal API Specification

org.eclipse.hyades.test.ui.datapool.internal.util
Class StringValueClass

java.lang.Object
  extended by org.eclipse.hyades.test.ui.datapool.internal.util.StringValueClass
All Implemented Interfaces:
IDisplayValueClass
Direct Known Subclasses:
EncryptedStringValueClass

public class StringValueClass
extends java.lang.Object
implements IDisplayValueClass


Constructor Summary
StringValueClass()
           
 
Method Summary
 java.lang.String getPropertyDescription(java.lang.Object theObject)
          This method returns the description of the object used in the initial property display.
 java.lang.Object getPropertyDisplay(java.lang.Object theObject, org.eclipse.swt.widgets.Composite parent, boolean editable)
          This method returns the control that is placed in the property editor to allow access to data.
 java.lang.Object getUpdatedObject(java.lang.Object theObject, java.lang.Object display)
          This method takes the property, value or difference display and the asssociated object and returns an updated instance of the original object.
 java.lang.Object getValueDisplay(java.lang.Object theObject, org.eclipse.swt.widgets.Composite parent, boolean editable)
          This method returns an Object(widgets.Dialog or jface.Dialog) that is used to display a detailed view of the specified data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringValueClass

public StringValueClass()
Method Detail

getPropertyDescription

public java.lang.String getPropertyDescription(java.lang.Object theObject)
Description copied from interface: IDisplayValueClass
This method returns the description of the object used in the initial property display. When selected for editing this text will be replaced by the property display if it is not null.

Specified by:
getPropertyDescription in interface IDisplayValueClass
Parameters:
theObject - An instance of the class represented by the associated value class.
Returns:
A description of the supplied object.

getPropertyDisplay

public java.lang.Object getPropertyDisplay(java.lang.Object theObject,
                                           org.eclipse.swt.widgets.Composite parent,
                                           boolean editable)
Description copied from interface: IDisplayValueClass
This method returns the control that is placed in the property editor to allow access to data. This method may return a null value and a standard control will be used that displays the value display control. Either this method or getValueDisplay must return a non-null Control.

The types of Controls this method might return are ComboBox, CheckBox, Text or Dialog. The Control must be able to be cleanly resized to fit into a cell of a property style sheet type display.

Specified by:
getPropertyDisplay in interface IDisplayValueClass
Parameters:
theObject - An instance of the class represented by this value class.
Returns:
A Control that can be used in a property sheet style display.

getValueDisplay

public java.lang.Object getValueDisplay(java.lang.Object theObject,
                                        org.eclipse.swt.widgets.Composite parent,
                                        boolean editable)
Description copied from interface: IDisplayValueClass
This method returns an Object(widgets.Dialog or jface.Dialog) that is used to display a detailed view of the specified data. This method may return a null value, however either this method or getPropertyDisplay must return a non-null component. If the nature of this data is complex (such as a grid, tree or property set) then this method should be supported instead of the getPropertyDisplay counterpart.

This control will return dialog contains of classes such as tree, table, ColorDialog and the like. If a Window class object is returned it will be positioned and displayed directly. Otherwise an appropriate wrapper will be placed around the control.

Specified by:
getValueDisplay in interface IDisplayValueClass
Parameters:
theObject - An instance of the class represented by this value class.
editable - true if the display should allow modifications to the specified data.
Returns:
A component that can be used to display a detailed view of the specified data.

getUpdatedObject

public java.lang.Object getUpdatedObject(java.lang.Object theObject,
                                         java.lang.Object display)
Description copied from interface: IDisplayValueClass
This method takes the property, value or difference display and the asssociated object and returns an updated instance of the original object. If no changes were made to the original object then the orignal object should be returned unmodified. If a difference display is passed in then the instance will be for the left side of the comparison.

Specified by:
getUpdatedObject in interface IDisplayValueClass
Parameters:
theObject - The object the display represents.
display - A Control returned from getPropertyDisplay, getValueDisplay.
Returns:
An updated instance of theObject.

TPTP 4.5.0 Testing Tools Project
Internal API Specification