Download QCChart2D User Manual - Quinn

Transcript
Moving Objects and Data Points 313
[Visual Basic]
Overloads Public Sub New( _
ByVal component As ChartView, _
ByVal buttonmask As MouseButtons, _
ByVal object1filter As String _
)
Overloads Public Sub New( _
ByVal component As ChartView, _
ByVal buttonmask As MouseButtons _
)
[C#]
public MoveObj(
ChartView component,
MouseButtons buttonmask,
string object1filter
);
public MoveObj(
ChartView component,
MouseButtons buttonmask
);
component
A reference to the ChartView object that the chart is placed in.
buttonmask
Specifies the mouse button that is trapped to invoke a move.
objectfilter
The fully qualified class name of the base class that is used to filter
the desired class objects. The string "ChartText" causes the routine
to move only objects derived from the ChartText class. If you want
to move only specific objects of a given class, create a special
subclass of that class. Then create your moveable objects using that
subclass. Then specify your class name, i.e. MyTextClass, using
the string “MyTextClass”.
Create the MoveObj object and then install it using the
ChartView.SetCurrentMouseListener method. This adds the MoveObj object as a
MouseListener to the ChartView object. Enable/Disable the function using
MoveObj.SetEnable method. Call MoveObj.SetCurrentMouseListener(null) to
remove the object as a mouse listener for the chart view.
Not all GraphObj derived object are moveable. Call the GraphObj.GetMoveableType
method and check to see if it returns ChartObj.OBJECT_MOVEABLE. Alternatively,
you can call the MoveObj.IsMoveableObject method, passing in a reference to the
object.