[vtkusers] vtkPanel custom InteractorStyle
Sebastien Jourdain
sebastien.jourdain at kitware.com
Thu Jun 21 13:25:08 EDT 2012
Yes if you can just rely on that. But the vtkPanel is not using any
interactor (I think). Only vtkCanvas does.
On Thu, Jun 21, 2012 at 1:06 PM, Jonathan Ruiz Peinado
<jonathan.ruiz3 at gmail.com> wrote:
> Thanks, so addObserver method is the best way to go then?
>
>
> 2012/6/21 Sebastien Jourdain <sebastien.jourdain at kitware.com>
>>
>> You can not override vtkObject in Java. That code need to be written in
>> C++.
>>
>>
>> On Thu, Jun 21, 2012 at 11:17 AM, Jonathan Ruiz Peinado
>> <jonathan.ruiz3 at gmail.com> wrote:
>> > Hi I'm trying to build my own interactor style class, as it's shown in
>> > the
>> > documentation seems an easy job but is not working for some reason this
>> > is
>> > part of the code:
>> >
>> >
>> > ----------------------------------------------------------------------------------------------------
>> > vtkInteractorStylePointer interactor = new vtkInteractorStylePointer();
>> >
>> > interactor.SetInteractor(vtkPanel.getRenderWindowInteractor());
>> > vtkPanel.setInteractorStyle(interactor);
>> >
>> > ----------------------------------------------------------------------------------------------------
>> >
>> > if I use one of the predefined styles vtkInteractorStyle* they work
>> > perfectly well , but when I try to use mine vtkInteractorStylePointer()
>> > doesn't work at all.
>> >
>> >
>> > vtkInteractorStylePointer should print out some text when left button is
>> > pressed, but it doesn't.
>> >
>> >
>> > ----------------------------------------------------------------------------------------------------
>> > public class vtkInteractorStylePointer extends vtk.vtkInteractorStyle{
>> >
>> > @Override
>> > public void OnLeftButtonDown() {
>> > System.out.println("xxx");
>> > super.OnLeftButtonDown();
>> >
>> > }
>> > @Override
>> > public void OnLeftButtonUp() {
>> > System.out.println("yyy");
>> > super.OnLeftButtonUp();
>> > }
>> >
>> > }
>> >
>> > ------------------------------------------------------------------------------------------------------
>> >
>> > do some body know what's going wrong ?
>> >
>> > Thanks for your time!
>> >
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the VTK FAQ at:
>> > http://www.vtk.org/Wiki/VTK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtkusers
>> >
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list