DataView.GetAttachedObject

Prototypes

Object GetAttachedObject( String sName )

Return Value

The return value is a reference to the attached Java object. If there is no attachment with the specified name, the return value is null.

Parameters

String sName
The name of the attachment.

Remarks

This method returns the attachment with the specified name. The attachment must have been added using the method AddAttachedObject.

The DataView class enables you to add attachments to a DataView. This enables you to associate additional information about a DataView with the DataView itself. The DataView does not use your attachments.

Example
x = rannor( 1:1000 );
y = ranuni( 1:1000 );

declare ScatterPlot plot = ScatterPlot.Create( "Example", x, y );

declare Histogram hist = Histogram.Create( "Normal", x, false );
plot.AddAttachedObject( "X Histogram", hist );

declare Histogram xhist;
xhist = (Histogram)plot.GetAttachedObject( "X Histogram" );
xhist.SetWindowPosition( 50, 50, 50, 50 );
xhist.ShowWindow();
See Also

DataView.AddAttachedObject