Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Contributor
ashokjavasp
Posts: 21
Registered: 01-29-2010
My Carrier: NA

Handling multiple paints

Hi,

 

Following is my scenario.

 

I am using blackberry 8900 and  rendering a chart by the painting using a graphics class. And need to select the specific region of the chart say bar graph contains three bars. i want to select the first bar. Since 8900 is a non-touch device i am creating a custom cursor by repainting a bitmap of cursor image.  When i  call a screen i am getting only the bitmap not the graph.

 

How to handle this scenario. Any suggestion on this.

 

 

Thanks in Advance

 

 

Please use plain text.
Developer
Astarot82
Posts: 53
Registered: 10-29-2010

Re: Handling multiple paints

It seems like you are calling graphics.clear() just before you paint the cursor.

Please use plain text.
Contributor
ashokjavasp
Posts: 21
Registered: 01-29-2010
My Carrier: NA

Re: Handling multiple paints

I am not using graphics.clear() method but still i am facing the same issue

Please use plain text.
Developer
Astarot82
Posts: 53
Registered: 10-29-2010

Re: Handling multiple paints

Can  you show us your code for painting?

Please use plain text.
Developer
peter_strange
Posts: 14,614
Registered: 07-14-2008

Re: Handling multiple paints

[ Edited ]

I have had some success in drawing a cursor, by overriding the paint method for the Screen, calling super.paint and then painting my cursor.  this does however require that you know where you cursor is and invalidate the old are whenever you move it.  Not trivial.

 

I'm wondering whether for you a better option might be to indicate 'focus', so that the "current" chart changes in some way to indicate it is the currently selected one - perhaps the other ones are partially transparent (one trick I have used).  Then you have to know where focus is and act accordingly, but the same is true when you use a cursor.

 

Just a thought.

 

Edit - Similar Thread:

http://supportforums.blackberry.com/t5/Java-Development/making-bars-click-able-in-bar-diagrams/td-p/...

Please use plain text.