ITT Rule IDL Version 7.0 User Manual Page 133

  • Download
  • Add to my manuals
  • Print
  • Page
    / 430
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 132
Chapter 6: Creating a Visualization 133
iTool Developer’s Guide Creating a New Visualization Type
object. We set the value of the ExampleProperty directly in the ExampleVis object’s
instance data.
Finally, we call the superclass’ SetProperty method, passing in all of the keywords
stored in the
_extra structure.
Creating an OnDataChangeUpdate Method
The visualization class OnDataChangeUpdate method takes care of updating the
visualization when one or more of the data parameters used to create the visualization
change their values. The tasks this method must perform are dependent on the type of
visualization involved and the data parameter that changes. The general idea is that
when the value of a data object changes, the OnDataChangeUpdate method for each
visualization that uses that data is called. The OnDataChangeUpdate method then
uses the GetData method to retrieve the changed data from the IDLitData object,
inspects the data and manipulates it as necessary, and uses the SetProperty method to
insert the new data values into the visualization object.
See “IDLitParameter::OnDataChangeUpdate” (IDL Reference Guide) and “Data
Update Mechanism” on page 65 for additional details.
Example OnDataChangeUpdate Method
The following example code shows a very simple OnDataChangeUpdate method for
the
ExampleVis visualization type:
PRO ExampleVis::OnDataChangeUpdate, oSubject, parmName
CASE STRUPCASE(parmName) OF
'<PARAMETER SET>': BEGIN
oParams = oSubject->Get(/ALL, COUNT = nParam, $
NAME = paramNames)
FOR i = 0, nParam-1 DO BEGIN
IF (paramNames[i] EQ '') THEN CONTINUE
oData = oSubject->GetByName(paramNames[i])
IF (OBJ_VALID(oData)) THEN $
self->OnDataChangeUpdate, oData, paramNames[i]
ENDFOR
END
'Y': BEGIN
success = oSubject->GetData(data)
nData = N_ELEMENTS(data)
IF (nData GT 0) THEN BEGIN
; Set the min/max values.
minn = MIN(data, MAX = maxx)
self._oPlot->SetProperty, DATAY = TEMPORARY(data), $
Page view 132
1 2 ... 128 129 130 131 132 133 134 135 136 137 138 ... 429 430

Comments to this Manuals

No comments