Interface PluginContent<T extends PluginDataStructure>


public interface PluginContent<T extends PluginDataStructure>
Registered implementations will be used to help present plugin data for a specific MTDataProvider. In this context, "present" means "show to end user".
Author:
Per-Erik
  • Method Details

    • getDataProviderUUID

      String getDataProviderUUID()
      Returns the uuid of the MTDataProvider that this MTPluginContent can handle.
      Returns:
      the uuid of the MTDataProvider that this MTPluginContent can handle.
    • getDataKey

      String getDataKey()
      Returns the data key that this MTPluginContent can handle.
      Returns:
      the data key that this MTPluginContent can handle.
    • getStructureType

      Class<T> getStructureType()
    • createPluginStructure

      T createPluginStructure(MTPluginData data)
    • getContentIconStream

      InputStream getContentIconStream(int w, int h, boolean inverted)
      Returns an input stream for a jpg or png file representing this data content. The implementation may disregard the dimension parameters but should return an InputStream with valid image data. This means that the dimension parameters are a request, not a demand. The client may need to rescale the image data.
      Parameters:
      w - The requested width of the image.
      h - The requested height of the image.
      inverted - When using the new metro style icons a value of true indicates that the icon should be inverted (e.g. when a list row or table cell is selected). For ordinary types of icons this parameter may be ignored.
      Returns:
      An input stream with jpg or png data, never null.
    • getDataIconStream

      InputStream getDataIconStream(MTPluginData data, int w, int h, boolean inverted)
      Returns an input stream for a jpg or png file representing the given plugin data. The implementation may disregard the dimension parameters but should return an InputStream with valid image data. This means that the dimension parameters are a request, not a demand. The client may need to rescale the image data.
      Parameters:
      w - The requested width of the image.
      h - The requested height of the image.
      inverted - When using the new metro style icons a value of true indicates that the icon should be inverted (e.g. when a list row or table cell is selected). For ordinary types of icons this parameter may be ignored.
      Returns:
      An input stream with jpg or png data, this may also be null. As opposed to getContentIconStream, this method may return null.
    • getContentDisplayName

      String getContentDisplayName()
      Returns the display name of this content.
      Returns:
      the display name of this content.
    • getDataDisplayName

      String getDataDisplayName(MTPluginData data)
      Returns the display name of the given data.
      Parameters:
      data - the data to give the display name for.
      Returns:
      the display name of the given data.
    • isWorkspaceData

      default boolean isWorkspaceData()