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
Contributor
pedalshoe
Posts: 19
Registered: ‎08-08-2009
My Device: Torch 9800 and PlayBook
My Carrier: at&t
Accepted Solution

BorderFactory.createBitmapBorder and XYEdges

Hi, I'm trying to understand how createBitmapBorder is treating the bitmap when you specify the edges.  It seems like the method is disecting the bitmap that is supplied.  I've also seen some examples (i.e. http://miamicoder.com/2010/using-backgrounds-and-borders-in-blackberry-super-apps/) online where they use a curved rectangle image and give edges as  new XYEdges(12,12,12,12).  It's not clear to me how  this is working.

Any information explaining how these edges parameters affect the bitmap is what i'm looking for.

 

Thank you

Christopher

Please use plain text.
Developer
welsenKiriono
Posts: 202
Registered: ‎04-19-2011
My Device: Blackberry Bold 9780
My Carrier: TAM

Re: BorderFactory.createBitmapBorder and XYEdges

This is just my opinion,

Every field can be set for the border...

Using function setBorder...

For the easy way, use BorderFactory for creating the border.... there's many ways, like solid border, rounded border, or using bitrmap for boder...

new XYZEdges is using for the size of elipsis for each point... the bigger the size, border became more rounded..

 

corrrect me if i'm wrong

Please use plain text.
Contributor
pedalshoe
Posts: 19
Registered: ‎08-08-2009
My Device: Torch 9800 and PlayBook
My Carrier: at&t

Re: BorderFactory.createBitmapBorder and XYEdges

Thanks, but just focusing on the createBitmapBorder method, how is it manipulating the supplied bitmap?  What is it really expecting.  The example at the url is using a rounded-border.png file which contains a rounded corner image.  How is createBitmapBorder using that image and are there any examples of the right way to use this method?

Interestingly.. if the field that is being "bordered" is log and wide.. the bitmap is being applied by repeating the image or stretching it..

 

 

Thank you

Please use plain text.
Contributor
pedalshoe
Posts: 19
Registered: ‎08-08-2009
My Device: Torch 9800 and PlayBook
My Carrier: at&t

Re: BorderFactory.createBitmapBorder and XYEdges

I figured it out.  This is what i discovered...  right in the javadocs for BorderFactory explains the parameters but is missing an image..  the path to the image is wrong in the javadoc for:

http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/decor/BorderFactory.html

 

There is a link to an image that explains alot.  the alt text is "Image explaining border and edges"

once you fix the link ../doc-files/bitmap_border.gif that image will appear in the javadoc.  This javadoc in general just needs a review, I saw some misspellings there too.

Please use plain text.
Developer
jromanoski
Posts: 90
Registered: ‎09-07-2010
My Device: Not Specified

Re: BorderFactory.createBitmapBorder and XYEdges

Sorry, do you have that image? I can't find it in the javadocs, and I also need to understand how is treating the method createBitmapBorder the Bitmap with the XYEdges. I would appreciate so much your help.

 

Manu thanks in advance. Regards.

Please use plain text.
Contributor
pedalshoe
Posts: 19
Registered: ‎08-08-2009
My Device: Torch 9800 and PlayBook
My Carrier: at&t

Re: BorderFactory.createBitmapBorder and XYEdges

The image is accessable by creating the url as in my last post. By replacing the javadoc file with the path to the image.
../doc-files/bitmap_border.gif
So the path the image is:
http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/decor/../doc-files/bitmap_b...

The full correct path is:
http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/doc-files/bitmap_border.gif
Please use plain text.