Class VisualizationPropertiesTransform

    • Field Detail

      • FP_COLOR_PICKER_NAME

        public static final java.lang.String FP_COLOR_PICKER_NAME
        Constant specifying the name of the formal parameter for defining the id of a system picker that contains the possible color options. Value is colorPickerName.
        See Also:
        Constant Field Values
    • Constructor Detail

      • VisualizationPropertiesTransform

        public VisualizationPropertiesTransform()
        Default no-argument constructor. Initializes formal parameters.
    • Method Detail

      • initializeTransform

        public void initializeTransform​(Transformable data)
        Description copied from class: AbstractAppTransform

        This method initialize the private and protected fields of the transform, such as width and height. It also invokes the initializeWebComponent, initializeImages and initializeCss methods.

        This method is automatically called from the transform method. Transforms which would like to invoke other methods in this instance directly (for example, to invoke some render methods), need first to call this method to guarantee that the Transform is ready to generate output.
        Specified by:
        initializeTransform in interface AppTransform
        Overrides:
        initializeTransform in class AbstractAppTransform
        Parameters:
        data - the bean to transform.
      • getWebTemplate

        protected WebTemplate getWebTemplate()
      • isOpen

        protected boolean isOpen()
        Description copied from class: AbstractAppTransform
        Defines whether this Transform is currently visible to the end user.
        Overrides:
        isOpen in class AbstractAppTransform
        Returns:
        true if the bean is visible
      • isDialog

        protected boolean isDialog()
        Description copied from class: AbstractAppTransform
        Defines whether this Transform should behave as a dialog (for example, a pop-up window).
        Overrides:
        isDialog in class AbstractAppTransform
        Returns:
        true if it's transforming a dialog
      • renderJavascript

        protected void renderJavascript​(MarkupOutput out)
        This method renders all javascript that will be necessary for the Transform to work correctly.
        Parameters:
        out - The MarkupOutput object to render the output to.
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Transform
        Returns a textual description of the transform.
        Specified by:
        getDescription in interface Transform
        Returns:
        The textual description of the transform.
      • renderCheckbox

        public void renderCheckbox​(MarkupOutput out,
                                   java.lang.String propName)
        Renders a checkbox.
        Assumes the true value is "1"
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
      • renderCheckbox

        public void renderCheckbox​(MarkupOutput out,
                                   java.lang.String propName,
                                   java.lang.String extraAttributes)
        Renders a checkbox.
        Assumes the true value is "1"
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A list with value/name pairs of extra attributes to add to the input. The format is "onclick^alert('a')|onchange^alert('b')"
      • renderCheckbox

        public void renderCheckbox​(MarkupOutput out,
                                   java.lang.String propName,
                                   HashList<java.lang.String,​java.lang.String> extraAttributes)
        Renders a checkbox.
        Assumes the true value is "1"
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
      • renderCheckbox

        public void renderCheckbox​(MarkupOutput out,
                                   java.lang.String propName,
                                   java.lang.String extraAttributes,
                                   java.lang.String defaultValue)
        Renders a checkbox.
        Assumes the true value is "1"
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A list with value/name pairs of extra attributes to add to the input. The format is "onclick^alert('a')|onchange^alert('b')"
        defaultValue - the default value for the textbox. Used if the property is not saved.
      • renderCheckbox

        public void renderCheckbox​(MarkupOutput out,
                                   java.lang.String propName,
                                   HashList<java.lang.String,​java.lang.String> extraAttributes,
                                   java.lang.String defaultValue)
        Renders a checkbox.
        Assumes the true value is "1"
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
        defaultValue - the default value for the textbox. Used if the property is not saved.
      • renderTextbox

        public void renderTextbox​(MarkupOutput out,
                                  java.lang.String propName)
        Renders a text input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
      • renderTextbox

        public void renderTextbox​(MarkupOutput out,
                                  java.lang.String propName,
                                  java.lang.String extraAttributes)
        Renders a text input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
      • renderTextbox

        public void renderTextbox​(MarkupOutput out,
                                  java.lang.String propName,
                                  HashList<java.lang.String,​java.lang.String> extraAttributes)
        Renders a text input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
      • renderTextbox

        public void renderTextbox​(MarkupOutput out,
                                  java.lang.String propName,
                                  java.lang.String extraAttributes,
                                  java.lang.String defaultValue)
        Renders a text input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A list with value/name pairs of extra attributes to add to the input. The format is "onclick^alert('a')|onchange^alert('b')"
        defaultValue - the default value for the textbox. Used if the property is not saved.
      • renderTextbox

        public void renderTextbox​(MarkupOutput out,
                                  java.lang.String propName,
                                  HashList<java.lang.String,​java.lang.String> extraAttributes,
                                  java.lang.String defaultValue)
        Renders a text input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
        defaultValue - the default value for the textbox. Used if the property is not saved.
      • renderTextarea

        public void renderTextarea​(MarkupOutput out,
                                   java.lang.String propName)
        Renders a textarea input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
      • renderTextarea

        public void renderTextarea​(MarkupOutput out,
                                   java.lang.String propName,
                                   java.lang.String extraAttributes)
        Renders a text input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
      • renderTextarea

        public void renderTextarea​(MarkupOutput out,
                                   java.lang.String propName,
                                   HashList<java.lang.String,​java.lang.String> extraAttributes)
        Renders a textarea input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
      • renderTextarea

        public void renderTextarea​(MarkupOutput out,
                                   java.lang.String propName,
                                   java.lang.String extraAttributes,
                                   java.lang.String defaultValue)
        Renders a textarea input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A list with value/name pairs of extra attributes to add to the input. The format is "onclick^alert('a')|onchange^alert('b')"
        defaultValue - the default value for the Textarea. Used if the property is not saved.
      • renderTextarea

        public void renderTextarea​(MarkupOutput out,
                                   java.lang.String propName,
                                   HashList<java.lang.String,​java.lang.String> extraAttributes,
                                   java.lang.String defaultValue)
        Renders a textarea input.
        Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
        defaultValue - the default value for the Textarea. Used if the property is not saved.
      • renderHiddenInput

        public void renderHiddenInput​(MarkupOutput out,
                                      java.lang.String propName)
        Renders a hidden input that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
      • renderHiddenInput

        public void renderHiddenInput​(MarkupOutput out,
                                      java.lang.String propName,
                                      java.lang.String extraAttributes)
        Renders a hidden input that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        extraAttributes - A list with value/name pairs of extra attributes to add to the input. The format is "onclick^alert('a')|onchange^alert('b')"
      • renderHiddenInput

        public void renderHiddenInput​(MarkupOutput out,
                                      java.lang.String propName,
                                      java.lang.String value,
                                      HashList<java.lang.String,​java.lang.String> extraAttributes)
        Renders a hidden input that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        value - the input's value
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
      • renderSelectBox

        public void renderSelectBox​(MarkupOutput out,
                                    java.lang.String propName,
                                    java.lang.String elems)
        Renders a select box that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A String that represents the values to render on the select box. The format is "0^Red|1^Blue|2^Yellow"
      • renderSelectBox

        public void renderSelectBox​(MarkupOutput out,
                                    java.lang.String propName,
                                    HashList<java.lang.String,​java.lang.String> elems)
        Renders a select box that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A HashList with value/name pairs that represents the values to render on the select box.
      • renderSelectBox

        public void renderSelectBox​(MarkupOutput out,
                                    java.lang.String propName,
                                    java.lang.String elems,
                                    java.lang.String extraAttributes)
        Renders a select box that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A String that represents the values to render on the select box. The format is "0^Red|1^Blue|2^Yellow"
        extraAttributes - A list with value/name pairs of extra attributes to add to the input. The format is "onclick^alert('a')|onchange^alert('b')"
      • renderSelectBox

        public void renderSelectBox​(MarkupOutput out,
                                    java.lang.String propName,
                                    HashList<java.lang.String,​java.lang.String> elems,
                                    HashList<java.lang.String,​java.lang.String> extraAttributes)
        Renders a select box that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A HashList with value/name pairs that represents the values to render on the select box.
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
      • renderSelectBox

        public void renderSelectBox​(MarkupOutput out,
                                    java.lang.String propName,
                                    java.lang.String elems,
                                    java.lang.String extraAttributes,
                                    java.lang.String defaultValue)
        Renders a select box that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A String that represents the values to render on the select box. The format is "0^Red|1^Blue|2^Yellow"
        extraAttributes - A list with value/name pairs of extra attributes to add to the input. The format is "onclick^alert('a')|onchange^alert('b')"
        defaultValue - the default value for the selectbox. Used if the property is not saved.
      • renderSelectBox

        public void renderSelectBox​(MarkupOutput out,
                                    java.lang.String propName,
                                    HashList<java.lang.String,​java.lang.String> elems,
                                    HashList<java.lang.String,​java.lang.String> extraAttributes,
                                    java.lang.String defaultValue)
        Renders a select box that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A HashList with value/name pairs that represents the values to render on the select box.
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
        defaultValue - the default value for the selectbox. Used if the property is not saved.
      • renderRadio

        public void renderRadio​(MarkupOutput out,
                                java.lang.String propName,
                                java.lang.String elems)
        Renders Radio buttons that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A String that represents the values to render as Radio buttons. The format is "0^Red|1^Blue|2^Yellow"
      • renderRadio

        public void renderRadio​(MarkupOutput out,
                                java.lang.String propName,
                                HashList<java.lang.String,​java.lang.String> elems)
        Renders Radio buttons that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A HashList with value/name pairs to display as Radio buttons
      • renderRadio

        public void renderRadio​(MarkupOutput out,
                                java.lang.String propName,
                                java.lang.String elems,
                                java.lang.String extraAttributes)
        Renders Radio buttons that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A String that represents the values to render as radio buttons. The format is "0^Red|1^Blue|2^Yellow"
        extraAttributes - A list with value/name pairs of extra attributes to add to the input. The format is "onclick^alert('a')|onchange^alert('b')"
      • renderRadio

        public void renderRadio​(MarkupOutput out,
                                java.lang.String propName,
                                HashList<java.lang.String,​java.lang.String> elems,
                                HashList<java.lang.String,​java.lang.String> extraAttributes)
        Renders Radio buttons that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A HashList with value/name pairs to display as the Radio buttons
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
      • renderRadio

        public void renderRadio​(MarkupOutput out,
                                java.lang.String propName,
                                java.lang.String elems,
                                java.lang.String extraAttributes,
                                java.lang.String defaultValue)
        Renders Radio buttons that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A String that represents the values to render as radio buttons. The format is "0^Red|1^Blue|2^Yellow"
        extraAttributes - A list with value/name pairs of extra attributes to add to the input. The format is "onclick^alert('a')|onchange^alert('b')"
        defaultValue - the default value for the radio button. Used if the property is not saved.
      • renderRadio

        public void renderRadio​(MarkupOutput out,
                                java.lang.String propName,
                                HashList<java.lang.String,​java.lang.String> elems,
                                HashList<java.lang.String,​java.lang.String> extraAttributes,
                                java.lang.String defaultValue)
        Renders Radio buttons that represents a property that is to be persisted in the Visualization properties Adds the attribute (visprop="1") that informs the visualization Properties editor to save this value
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        elems - A HashList with value/name pairs to display as the Radio buttons
        extraAttributes - A HashList with value/name pairs of extra attributes to add to the input.
        defaultValue - the default value for the radio button. Used if the property is not saved.
      • renderColorPicker

        public void renderColorPicker​(MarkupOutput out,
                                      java.lang.String propName)
        Renders a color picker
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
      • renderColorPicker

        public void renderColorPicker​(MarkupOutput out,
                                      java.lang.String propName,
                                      java.lang.String defaultValue)
        Renders a color picker
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
        defaultValue - the default value in case the property is not saved. (i.e. #FFFFFF)
      • renderTabs

        public void renderTabs​(MarkupOutput out,
                               java.lang.String tabNames)
        Renders a collection of tabs for the editor
        Parameters:
        out - The Markup output of this transform
        tabNames - a comma separated list of tabs to display
      • renderSecondaryDataProvidersSelectbox

        public void renderSecondaryDataProvidersSelectbox​(MarkupOutput out,
                                                          java.lang.String propName)
        Renders a select box with the list of templates on the document excluding the one that tghe visualization is applied to. The selected template key will be saved as a secondary data provider as well as a visualization property named "propName"
        Parameters:
        out - The Markup output of this transform
        propName - the name of the property to render and read the value from
      • setExtraAttributesOnInput

        protected void setExtraAttributesOnInput​(HashList<java.lang.String,​java.lang.String> extraAttributes,
                                                 Tag input)
      • getTemplateName

        protected java.lang.String getTemplateName​(RWGridGraphDef def)
      • getHashListFromString

        protected HashList<java.lang.String,​java.lang.String> getHashListFromString​(java.lang.String elems)
      • isDescriptor

        protected boolean isDescriptor​(java.lang.String value)
      • getColorPicker

        protected ShortcutList getColorPicker()
        Returns the color picker. If a non-null instance have been registered through the setColorPicker method, it will return that one, otherwise, it will search for a system picker with the name specified in FP_COLOR_PICKER_NAME.
        Returns:
        ShortcutList to use for the color-picker.
      • renderColorDropdown

        protected void renderColorDropdown​(MarkupOutput out,
                                           java.lang.String cmdId,
                                           java.lang.String cmdValue,
                                           ShortcutList picker)
        This method renders a single dropdown to be used with a color picker
        Parameters:
        out - MarkupOutput where the content should be generated
        cmdId - the dropdown's command id
        cmdValue - the dropdown's current command value.
        picker - the ShortcutList for the picker.
      • getVisPropValue

        protected java.lang.String getVisPropValue​(java.lang.String propName)
        Parameters:
        propName - The property name
        Returns:
        The value of a visualization Property
      • isRW

        public boolean isRW()