Interface GraphicalComponent

All Superinterfaces:
GraphicalAttRepresentationHandler
All Known Implementing Classes:
AbstractGraphicalComponent, MultiStateIconComponent, PercentCompleteComponent, ProgressBarComponent, TrafficLightComponent

public interface GraphicalComponent extends GraphicalAttRepresentationHandler
This interface defines the requirements for all graphical components.

Customizer's should extend the AbstractGraphicalComponent class rather than implementing this interface directly.
Supported API: true

Extendable: false

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of the JavaScript function that can render the values returned by toJSON().
    newInstance(Object value, Map<String,Object> metaData)
    Constructs a new instance of the graphical component configured to render a graphical representation with the given data.
    org.json.JSONObject
    Returns the JSON object that will be passed to the client-side JavaScript renderer for this graphical representation.

    Methods inherited from interface com.ptc.core.lwc.common.graphicalatts.GraphicalAttRepresentationHandler

    isValidForDatatype
  • Method Details

    • newInstance

      GraphicalComponent newInstance(Object value, Map<String,Object> metaData) throws WTException
      Constructs a new instance of the graphical component configured to render a graphical representation with the given data.
      Supported API: true

      Parameters:
      value - the value of the attribute to render. value may be null.
      metaData - a map of the additional data (e.g. begin, end, color, ...) used to render the value metaData may be null.
      Returns:
      a new GraphicalComponent instance
      Throws:
      WTException
    • toJSON

      org.json.JSONObject toJSON() throws WTException
      Returns the JSON object that will be passed to the client-side JavaScript renderer for this graphical representation.
      Supported API: true

      Returns:
      the JSON object that will be passed to the client-side
      Throws:
      WTException
    • getJSRendererName

      String getJSRendererName()
      Returns the name of the JavaScript function that can render the values returned by toJSON().
      Supported API: true

      Returns:
      the name of the JavaScript function that can render the values returned by toJSON().