Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 Multiple TouchListeners on one chart

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
YuaNWA Posted - 27 Jun 2014 : 22:52:03
I would like to be able to have multiple touchlisteners on a single chart. From your user manual, it says that it is advisable to only have one touch listener active at a time.

I have hence created a radio group to control the type of touch listener being active. Do you have any advice or can I be pointed to somewhere on how to activate and deactivate the touch listeners?

Also that due to the library being initially based on Java, chartzoom works by a single touch. This has carried over to the Android version as well. Is it possible for me to subclass chartzoom to handle pinch zooming as per most Android graphics?

Also a suggestion that builds on that would be to actually combine chartzoom and movecoordinates to actually work together.If it detects 2 fingers, then it does chartzoom, if there is only one finger, it moves the chart around.
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 29 Jun 2014 : 15:46:04
In the manual, the description for each TouchListener lists the method which can be used to enable/disable it: setDataToolTipEnable, setMoveObjEnable, setDataCursorEnable, setZoomEnable, setMoveCoordinatesEnable, etc..

Sorry, but it is unlikely you would be able to sub class the ChartZoom class to write your own which uses a pinch zoom. We experimented with it when we wrote the software, but that generation of Android touch screens produced too many invalid values on double touches and it could not be made to work with any accuracy or reliability. You would need the underlying source code of the QCChart2DAndroid library in order to figure out how to write your own.

There is no way to externally combine the ChartZoom and MoveCoordinates classes like you want. The only way would be to write a special TouchListener which combines the two in the QCChart2DAndroid library jar file. We could do that under contract if it is critical to your application.


Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07