How to use Web look and feel

Discuss here any questions about the WebLaF library.
Bugs can be posted directly to GitHub issues tracker.

How to use Web look and feel

Postby nagamanig » Fri Jan 29, 2016 4:37 pm

Hi,

We have a requirements to create a customized theme and would need help in understanding of how the weblaf works.

Thanks,
Nagamani
nagamanig
 
Posts: 5
Joined: Fri Jan 29, 2016 4:31 pm

Re: How to use Web look and feel

Postby mgarin » Fri Jan 29, 2016 8:00 pm

Good day, I will soon be releasing v1.29 update which will contain a lot of styling-related features including themes (skins) support. I will be adding guides on how it can be used into GitHub wiki here:
https://github.com/mgarin/weblaf/wiki

I have already added an introduction wiki article:
https://github.com/mgarin/weblaf/wiki#styling
You can start reading it to get a basic idea of how it will be working.

If you will have any specific questions about the styling system I will be glad to answer those :)

The best ways to contact me are:
1. Gitter (online chat, the fastest way): https://gitter.im/mgarin/weblaf
2. GitHub issue tracker (mostly for issues): https://github.com/mgarin/weblaf/issues
3. Email (takes time): mgarin@alee.com

This forum is also still in place, but I will be shutting it down in favor of more reliable services like GitHub and Gitter.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

How to set the text color when selected a tab in tabbed pane

Postby nagamanig » Wed Feb 03, 2016 4:03 pm

Hi,

Good Morning!!

Need your help in settings the font color when the tab is selected.

We have set tabbedPane.setFont(WebTabbedPaneStyle.tabbedPaneFont ); and defined the font in Style file.

However wanted to have a different font when a particular is selected. Please help.


Thanks,
Nagamani
nagamanig
 
Posts: 5
Joined: Fri Jan 29, 2016 4:31 pm

Re: How to use Web look and feel

Postby mgarin » Wed Feb 03, 2016 5:00 pm

Unfortunately this is not possible with common Swing JTabbedPane, but might be achievable with later enhancements to tabbed pane styling I will be adding in v1.3.0 update, but not right now.

It is possible with WebDocumentPane component (complex version of JTabbedPane provided by WebLaF) - you can provide different title foreground through DocumentData used as tabs data. You can find article explaining how to work with WebDocumentPane on wiki:
https://github.com/mgarin/weblaf/wiki/H ... cumentPane

Also a small side note - color has nothing to do with font, font only contains size and family. Color is always defined separately in components, usually as "foreground" option.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Tabbed pane

Postby nagamanig » Thu Feb 04, 2016 10:23 am

Hi Mgarin,

Thanks so much. We will evaluate the same. Also, wanted to check if we have some in styledatbbedpane to have spaces between the tabs. Refer to the attachment for reference.

Thanks,
Nagamani
Attachments
Tabs.png
Tabs.png (6.33 KiB) Viewed 4366 times
nagamanig
 
Posts: 5
Joined: Fri Jan 29, 2016 4:31 pm

Re: How to use Web look and feel

Postby mgarin » Thu Feb 04, 2016 12:13 pm

Not in the current version, no, but most probably will be available in v1.29 release. I am working on tabbed pane and a few other components right now - will see what I could do about it.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Re: How to use Web look and feel

Postby nagamanig » Thu Feb 04, 2016 3:52 pm

Hi,

Can we get an eta for the same. It will be helpful for us.

Thanks,
Nagamani
nagamanig
 
Posts: 5
Joined: Fri Jan 29, 2016 4:31 pm

Re: How to use Web look and feel

Postby mgarin » Fri Feb 05, 2016 5:34 am

I planned to release v1.29 a week ago, but I am still working on merging all the changes made over this year together. Hopefully this doesn't take too much longer, so it should be out soon.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Re: How to use Web look and feel

Postby mgarin » Fri Feb 05, 2016 5:36 am

You can track the progress on the branch on GitHub: https://github.com/mgarin/weblaf/tree/styling
Or track my comments on WebLaF Gitter for each push: https://gitter.im/mgarin/weblaf/
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Re: How to use Web look and feel

Postby nagamanig » Fri Feb 05, 2016 11:33 am

Hi,

Thanks a lot for quick help. Will monitor GIT for the updates. However, will need another help on List. Is there a possibility to get rounded corners for ListView. We would also want to apply padding and spacing. Can you please help.

Attached screenshot for reference.

Thanks,
Nagamani
Attachments
ListView.png
ListView.png (9.01 KiB) Viewed 4353 times
nagamanig
 
Posts: 5
Joined: Fri Jan 29, 2016 4:31 pm

Re: How to use Web look and feel

Postby mgarin » Fri Feb 05, 2016 6:12 pm

This will certainly be possible with the v1.29 final release.
You will need to create custom styling for your list, something like this:
Code: Select all
    <style type="list" id="test" padding="10">
        <component>
            <opaque>false</opaque>
        </component>
        <painter class="WebListPainter">
            <decorations>
                <decoration round="10">
                    <BasicShade type="inner" width="10" />
                    <ColorBackground color="white" />
                </decoration>
            </decorations>
        </painter>
    </style>

As you can see you can provide everything here: opacity, padding, the way decoration is painted. You will also be able to provide your custom list selection painter description here (which is controlled by separate painter) to replace the default list selection decoration.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg

Re: How to use Web look and feel

Postby mgarin » Fri Feb 05, 2016 6:13 pm

Though if you will need a scrollable list with this decoration - you will need to reskin scroll pane instead of list in a similar manner as it will be controlling the outer decoration. So all depends on the case.
User avatar
mgarin
Site Admin
 
Posts: 223
Joined: Mon Apr 16, 2012 1:01 pm
Location: Russia, Saint-Petersburg


Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron