[vtkusers] vtkPanel custom InteractorStyle
Jonathan Ruiz Peinado
jonathan.ruiz3 at gmail.com
Thu Jun 21 13:06:06 EDT 2012
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
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120621/cb58f6fe/attachment.htm>
More information about the vtkusers
mailing list