com.spss.psapi.extensions.ui.spi

Interface PropertyControl



  • public interface PropertyControl
    Defines the functionality associated with a custom property control on a PropertiesPanel. The implementing class must declare a no-argument constructor.
    Since:
    PSAPI 11.1
    Version:
    1.0
    Author:
    Julian Clinton
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void dataModelUpdated(DataModel dataModel)
      Called to notify the control that the data model seen by the control is updated.
      void disposeControl()
      Called to notify the control that the window which contains the control is being destroyed.
      java.lang.Object getControlValue()
      Returns the current value of the control.
      javax.swing.JComponent getUIComponent()
      Returns the UI object that will be used to display the property control component.
      void initControl(java.lang.String property, ExtensionObjectWindowHandle windowHandle, ManagedSession managedSession)
      This is the first method to be called on the control after the property control instance has been created.
      boolean isControlEnabled()
      Returns the enabled state of the control.
      void setControlEnabled(boolean value)
      Called to notify the control that the enabled state of the control should be changed.
      void setControlValue(java.lang.Object value)
      Sets the current value of the control.
    • Method Detail

      • initControl

        void initControl(java.lang.String property,
                       ExtensionObjectWindowHandle windowHandle,
                       ManagedSession managedSession)
        This is the first method to be called on the control after the property control instance has been created. This should be used to initialise the control UI component(s).
        Parameters:
        property - the property declared in the spec file that this control is associated with
        windowHandle - the handle of the window that will contain this control
        managedSession - the ManagedSession
      • getUIComponent

        javax.swing.JComponent getUIComponent()
        Returns the UI object that will be used to display the property control component. If a control contains multiple UI components, they must all be children of the returned UI object.
        Returns:
        the UI object
      • getControlValue

        java.lang.Object getControlValue()
        Returns the current value of the control. The value should be consistent with the property storage declaration:
        • if storage is "string", "encryptedString" or "fieldName", the value must be an instance of String
        • if storage is "integer", the value must be an instance of Integer
        • if storage is "double", the value must be an instance of Double
        • if storage is "boolean", the value must be an instance of Boolean
        • if storage is "date", the value must be an instance of Date
        If the property was declared as a list type then the value should be java.util.List containing values of the appropriate type. Custom controls for "enum" values are not currently supported.
        Returns:
        the current value of the control
      • setControlValue

        void setControlValue(java.lang.Object value)
        Sets the current value of the control. The supplied value will be consistent with the property storage declaration:
        • if storage is "string", "encryptedString" or "fieldName", the value will be an instance of String
        • if storage is "integer", the value will be an instance of Integer
        • if storage is "double", the value will be an instance of Double
        • if storage is "boolean", the value will be an instance of Boolean
        • if storage is "date", the value will be an instance of Date
        If the property was declared as a list type then the value will be java.util.List containing values of the appropriate type.

        Custom controls for "enum" values are not currently supported.

        Parameters:
        value - the value to be displayed in the control
      • setControlEnabled

        void setControlEnabled(boolean value)
        Called to notify the control that the enabled state of the control should be changed.
        Parameters:
        value - true if the control should be enabled, false if not
      • isControlEnabled

        boolean isControlEnabled()
        Returns the enabled state of the control.
        Returns:
        the enabled state of the control
      • dataModelUpdated

        void dataModelUpdated(DataModel dataModel)
        Called to notify the control that the data model seen by the control is updated. This will only be called for controls associated with node dialogs.
        Parameters:
        dataModel - the updated data model
      • disposeControl

        void disposeControl()
        Called to notify the control that the window which contains the control is being destroyed. This gives provides an opportunity to free any resources than need to be freed explicitly. This is the last method called on this object.

Copyright © 2014 Integral Solutions Ltd. All Rights Reserved.