com.ptc.wvs.common.ui
Class VisualizationHelper

java.lang.Object
  extended by com.ptc.wvs.common.ui.VisualizationHelper
All Implemented Interfaces:
wt.wvs.VisualizationHelperIfc

public class VisualizationHelper
extends Object
implements wt.wvs.VisualizationHelperIfc

The VisualizationHelper class provides abstract access to class methods in the com.ptc.wvs package from external packages such as wt and provides visualization helper methods.

Supported API: true


Field Summary
static String DEFAULT_THUMBNAILS_PROP_PAGE_PREF_VALUE
          Thumbnail preference default value to use in getIndexOfVisLink

Supported API: true
static String THUMBNAILS_PROP_PAGE_PREF_KEY
          Thumbnail preference key to use in getIndexOfVisLink

Supported API: true
 
Method Summary
 int clipboardLinkIndex()
          Returns the index of the Add to Clipboard link in the data array returned by getDefaultVisualizationData

Supported API: true
 String getCreateDialogWindow()
          Returns the JavaScript to create a Dialog Window.
 String[] getDefaultVisualizationData(String representableObjectReference, Boolean forListing, Locale locale)
          Returns a set of HTML fragments to display thumbnails and other visualization action links

Supported API: true
 int getIndexOfVisLink(String prefKey, String prefDefault)
          Returns the index in the data array returned by getDefaultVisualizationData of the HTML fragment to use for launching PV.
 int[] getThumbnailSize()
          Returns the thumbnail width and height

Supported API: true
 boolean isDisplayPartViewEnabled()
          Returns true if the WVS property partstructureview is true.
 boolean isVisualNavigationInstalled()
          Returns true if visual nagigation is installed

Supported API: true
 boolean isWVSEnabled()
          Returns true if visualization services are enabled

Supported API: true
 int printLinkIndex()
          Returns the index of the Print link in the data array returned by getDefaultVisualizationData

Supported API: true
 int productViewLinkIndex()
          Returns the index of the Launch ProductView link in the data array returned by getDefaultVisualizationData

Supported API: true
 int thumbnailLinkIndex()
          Returns the index of the thumbnail, Publish Me, or Launch ProductView link in the data array returned by getDefaultVisualizationData.
 int viewRepsLinkIndex()
          Returns the index of the view representations link in the data array returned by getDefaultVisualizationData

Supported API: true
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THUMBNAILS_PROP_PAGE_PREF_KEY

public static final String THUMBNAILS_PROP_PAGE_PREF_KEY
Thumbnail preference key to use in getIndexOfVisLink

Supported API: true

See Also:
Constant Field Values

DEFAULT_THUMBNAILS_PROP_PAGE_PREF_VALUE

public static final String DEFAULT_THUMBNAILS_PROP_PAGE_PREF_VALUE
Thumbnail preference default value to use in getIndexOfVisLink

Supported API: true

See Also:
Constant Field Values
Method Detail

isWVSEnabled

public boolean isWVSEnabled()
Returns true if visualization services are enabled

Supported API: true


isVisualNavigationInstalled

public boolean isVisualNavigationInstalled()
Returns true if visual nagigation is installed

Supported API: true


isDisplayPartViewEnabled

public boolean isDisplayPartViewEnabled()
Returns true if the WVS property partstructureview is true. NOTE: Also insures that visualization services and required software is installed and configured.

Supported API: true


getThumbnailSize

public int[] getThumbnailSize()
Returns the thumbnail width and height

Supported API: true


getCreateDialogWindow

public String getCreateDialogWindow()
Returns the JavaScript to create a Dialog Window. This should be called once per page, and included in the HEAD of the page

Supported API: true


getDefaultVisualizationData

public String[] getDefaultVisualizationData(String representableObjectReference,
                                            Boolean forListing,
                                            Locale locale)
Returns a set of HTML fragments to display thumbnails and other visualization action links

Supported API: true

Parameters:
representableObjectReference - The object reference of the representable
forListing - Specifies if the resulting HTML is to be used in a listing
locale - Specifies the locale to use for tooltip display
Returns:
String[] HTML fragments, which can be extracted using the "...Index" methods in this class

productViewLinkIndex

public int productViewLinkIndex()
Returns the index of the Launch ProductView link in the data array returned by getDefaultVisualizationData

Supported API: true


thumbnailLinkIndex

public int thumbnailLinkIndex()
Returns the index of the thumbnail, Publish Me, or Launch ProductView link in the data array returned by getDefaultVisualizationData. The graphic returned depends on the state of the Representable object.

Supported API: true


clipboardLinkIndex

public int clipboardLinkIndex()
Returns the index of the Add to Clipboard link in the data array returned by getDefaultVisualizationData

Supported API: true


printLinkIndex

public int printLinkIndex()
Returns the index of the Print link in the data array returned by getDefaultVisualizationData

Supported API: true


viewRepsLinkIndex

public int viewRepsLinkIndex()
Returns the index of the view representations link in the data array returned by getDefaultVisualizationData

Supported API: true


getIndexOfVisLink

public int getIndexOfVisLink(String prefKey,
                             String prefDefault)
Returns the index in the data array returned by getDefaultVisualizationData of the HTML fragment to use for launching PV. This depends on the thumbnail preference setting for the client. The index returned will be that of the element containing the Launch PV icon (productViewLinkIndex) or the element containing the thumbnail (thumbnailLinkIndex).

Parameters:
prefKey - The key for the user preference to display thumbnails use THUMBNAILS_PROP_PAGE_PREF_KEY for the property page preference key
prefDefault - The default value for the key, use DEFAULT_THUMBNAILS_PROP_PAGE_PREF_VALUE for the default property page value

Supported API: true