Class ResourcePropertyEditorComponent

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, org.pentaho.reporting.libraries.designtime.swing.propertyeditors.ValidatingPropertyEditorComponent

    public class ResourcePropertyEditorComponent
    extends JComponent
    implements org.pentaho.reporting.libraries.designtime.swing.propertyeditors.ValidatingPropertyEditorComponent
    A UI component which will capture a resource name / location and if that resource should be linked externally or embedded in the report.
    Author:
    Thomas Morgner, David Kincade, Ezequiel Cuellar
    See Also:
    Serialized Form
    • Constructor Detail

      • ResourcePropertyEditorComponent

        public ResourcePropertyEditorComponent​(ReportDocumentContext reportRenderContext)
        Constructor which sets up the location of all the elements on this component
        Parameters:
        reportRenderContext - the report render context for the current report
    • Method Detail

      • getValue

        public Object getValue()
        Returns the current value of the property as a ResourceKey.
        If the key is embedded, additional information will be stored in the Factory Parameters in the following way:
        keyvalue original_valueThe string version of the key that was original entered embeddedIndicates if the resource should be / is embedded in the document bundle
        Returns:
        the ResourceKey being created in this
      • setValue

        public void setValue​(String value)
        Sets the value of the source field
        Parameters:
        value - the current string value
      • setValue

        public void setValue​(Object object)
        Sets the value of the source field
        Parameters:
        object - the current value
      • isValidEditorValue

        public boolean isValidEditorValue()
        Indicates if the current value is a valid value. The current value is valid if the document location is LINK, or the current value is a ResourceKey and the document location is embed.
        Specified by:
        isValidEditorValue in interface org.pentaho.reporting.libraries.designtime.swing.propertyeditors.ValidatingPropertyEditorComponent