Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
New Contributor
Posts: 4
Registered: ‎12-15-2011
My Device: 9700
My Carrier: Viettel
Accepted Solution

Problem with class extend from Field

[ Edited ]

Hello everyone!

Now, I have a problem with class extend from Field:

public class ContentItem extends Field

{

//have a bitmap and text

}
public abstract class ContentField extend from Field

{

protected abstract void paint(Graphics graphics);

protected abstract void drawFocus(Graphics graphics);

}

public class ContentA extends ContentField

{

//have many ContentItem field

//and paint ContentItem field in paint and drawFocus function

}

I'm having a problem when i want to focus to ContentItem. How to focus to ContentItem in ContentA class. Please help me.

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Problem with class extend from Field

welcome to the support forums.

you have to implement the abstract methods. drawFocus handles how the focus is drawn while paint draws the whole field.

maybe it would be easier to start with a labelfield and a bitmapfield in a manager instead of a custom field?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 4
Registered: ‎12-15-2011
My Device: 9700
My Carrier: Viettel

Re: Problem with class extend from Field

Thanks, It was solved. I just override navigationMovement method and process it at the child field

Developer
Posts: 285
Registered: ‎08-26-2011
My Device: 9900
My Carrier: Not Specified

Re: Problem with class extend from Field

Select the "Accept as solution " if your problem is solved;
=================================================================================
Feel free to click LIKE button if the solution helps you;
--
Regards,

ALI SHAIK.