Skip to main content

Style.setBgColor as a gradient fill?

4 replies [Last post]
asumma66061
Offline
Joined: 2007-04-12

The graphics support for gradients would be nice to have as a style, especially when you look at containers.

I mainly I started down the path of using a gradient fill as a background on a custom dialog...but that seems like I'm trying to mix two different worlds (I also want other components on the dialog).

Also curious why the Resource editor doesn't seem to support the ability to theme the tint color for forms.

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chen

Hi,
You can install painters on the style, create a painter that uses fill
gradients and install it to the Style.
http://lwuit.blogspot.com/2008/07/pimp-my-lwuit-part-1-gradient-galore.html
Regarding the Form tint color, usually this color will remain the same
across different themes therefore we added the ability to modify it
through the LookAndFeel rather then the Theme.

Regards,
Chen

lwuit-users@mobileandembedded.org wrote:
> The graphics support for gradients would be nice to have as a style, especially when you look at containers.
>
> I mainly I started down the path of using a gradient fill as a background on a custom dialog...but that seems like I'm trying to mix two different worlds (I also want other components on the dialog).
>
> Also curious why the Resource editor doesn't seem to support the ability to theme the tint color for forms.
>
> Thanks!
> [Message sent by forum member 'asumma66061' (asumma66061)]
>
> http://forums.java.net/jive/thread.jspa?messageID=286850
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

asumma66061
Offline
Joined: 2007-04-12

Thanks for the reminder on using painters Chen.

I am able to get this to work on my custom dialog IF I have a square corner dialog border. Setting a rounded corner dialog causes the painter to not be honored. paint(Graphics, Rectangle) is no longer called (as is mentioned in http://lwuit.blogspot.com/2008/07/define-that-boundary-borders.html)

So it is not possible to get a rounded corner dialog w/ gradient fill currently...any hopes for that changing?

Thanks again for the hard work and continued support!

Shai Almog

> So it is not possible to get a rounded corner dialog w/ gradient
> fill currently...any hopes for that changing?

Ahem:
http://lwuit.blogspot.com/2008/07/pimp-my-lwuit-part-ii-rounded-all-
over.html

Shai Almog
http://lwuit.blogspot.com/

[att1.html]

asumma66061
Offline
Joined: 2007-04-12

Never again shall I doubt LWUIT's ability ;-)

THANKS!