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

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: 16,985
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.