mgarin / weblaf

WebLaF is a fully open-source Look & Feel and component library written in pure Java for cross-platform desktop Swing applications.
http://weblookandfeel.com
GNU General Public License v3.0
1.14k stars 235 forks source link

Empty combobox size issue #136

Closed parkjohnston closed 9 years ago

parkjohnston commented 10 years ago

I am working to load a combo box and the only value in it is blank. the combo box shows up in a very small line, is there a way to make it stay the normal size?!

screen shot 2014-06-11 at 4 27 49 pm

mgarin commented 10 years ago

That is obviously a bug, thanks for reporting :) I will fix it and include the fix into v1.28 update.

parkjohnston commented 10 years ago

Do you know when that will be coming out?

Also when the item is simply blank the area to select it is very small...suggestions?

On Wed, Jun 11, 2014 at 6:55 PM, Mikle notifications@github.com wrote:

That is obviously a bug, thanks for reporting :) I will fix it and include the fix into v1.28 update.

— Reply to this email directly or view it on GitHub https://github.com/mgarin/weblaf/issues/136#issuecomment-45810914.

mgarin commented 10 years ago

Not sure yet about the release date - probably the middle or the end of the next week. There is still a lot of issues I need to fix there.

About this bug - I will simply force the combobox to have a proper size even if there is no value or if it is empty - its just the same case actually.

parkjohnston commented 10 years ago

Great!

Thanks for being so responsive

On Jun 12, 2014, at 10:26 AM, Mikle notifications@github.com wrote:

Not sure yet about the release date - probably the middle or the end of the next week. There is still a lot of issues I need to fix there.

About this bug - I will simply force the combobox to have a proper size even if there is no value or if it is empty - its just the same case actually.

— Reply to this email directly or view it on GitHub.

mgarin commented 10 years ago

Sorry for the delay, I have committed the fix for this issue. v1.28 update will be available soon.

parkjohnston commented 10 years ago

No worries, you are great! I will let you know if i find anything else :)

On Jun 26, 2014, at 10:58 AM, Mikle notifications@github.com wrote:

Sorry for the delay, I have committed the fix for this issue. v1.28 update will be available soon.

— Reply to this email directly or view it on GitHub.

mgarin commented 10 years ago

You can now download the v1.28 update: https://github.com/mgarin/weblaf/releases/tag/v1.28

And thanks again for pointing out this issue! If you will find anything else - you know where to post about it :)

parkjohnston commented 10 years ago

having this error when trying to use a notification. It runs a few times than crashes

JRootPane for PopupLayer cannot be found

code is below:

    WebNotificationPopup notificationPopup = new WebNotificationPopup ();
    notificationPopup.setIcon ( NotificationIcon.mail );
    notificationPopup.setDisplayTime ( 500 );
    if(newMesages > 1)
    {
        notificationPopup.setContent(newMessages + " unread email messages");
    }
    else
    {
        notificationPopup.setContent(newMessages + " unread email message");
    }
    NotificationManager.showNotification ( notificationPopup );
mgarin commented 10 years ago

I'll investigate this issue, thanks for reporting.

parkjohnston commented 10 years ago

If you need more information please let me know. It could also be I'm not implementing it properly

On Jun 30, 2014, at 5:39 PM, Mikle notifications@github.com wrote:

I'll investigate this issue, thanks for reporting.

— Reply to this email directly or view it on GitHub.

mgarin commented 10 years ago

I'm not sure yet, will be checking it tomorrow from another notebook. Will say if something is wrong then. For now your code seems legit, I guess there might be some issue with timed notifications.

mgarin commented 10 years ago

I have tried a few cases with the notification code you have provided and didn't see any issues. Here is the one of examples I have tried:

public class NotificationTest
{
    public static void main ( final String[] args )
    {
        WebLookAndFeel.install ();
        TestFrame.show ( new WebButton ( "show", new ActionListener ()
        {
            @Override
            public void actionPerformed ( final ActionEvent e )
            {
                final WebNotificationPopup notificationPopup = new WebNotificationPopup ();
                notificationPopup.setIcon ( NotificationIcon.mail );
                notificationPopup.setDisplayTime ( 500 );
                notificationPopup.setContent ( 0 + " unread email messages" );
                NotificationManager.showNotification ( notificationPopup );
            }
        } ), 250 );
    }
}

It works as intended, no exceptions or any other problems.

So here are the things you might describe to help me find the issue if it exists:

And it would be really nice if you can provide a small code example that clearly represents this issue (you might find the source of this issue while trying to create such example).

parkjohnston commented 10 years ago

I have the WEBLAF installed and thought that was going to fix the issue, but it ran for several iterations and than failed again.

I am using java mail and can provide the entire class if you could provide a private contact information as their is sensitive information in the code.

On Jul 3, 2014, at 3:35 AM, Mikle notifications@github.com wrote:

I have tried a few cases with the notification code you have provided and didn't see any issues. Here is the one of examples I have tried:

public class NotificationTest { public static void main ( final String[] args ) { WebLookAndFeel.install (); TestFrame.show ( new WebButton ( "show", new ActionListener () { @Override public void actionPerformed ( final ActionEvent e ) { final WebNotificationPopup notificationPopup = new WebNotificationPopup (); notificationPopup.setIcon ( NotificationIcon.mail ); notificationPopup.setDisplayTime ( 500 ); notificationPopup.setContent ( 0 + " unread email messages" ); NotificationManager.showNotification ( notificationPopup ); } } ), 250 ); } } It works as intended, never seeing any exceptions or any other problems.

So here are the things you might describe to help me find the issue if it exists:

Did you install WebLaF or not? Or simply initialized managers? Or just used notifications? Do you have any 3rd-party libraries that might affect layered pane? (for example Jide) Do you have something special about the window you are displaying notifications on? What is your JDK type/architecture/version? And it would be really nice if you can provide a small code example that clearly represents this issue (you might find the source of this issue while trying to create such example).

— Reply to this email directly or view it on GitHub.

mgarin commented 10 years ago

Sure, you can send the code directly to my email address: mgarin@alee.com Failing code example will help a lot.

In any case - whether you install WebLaF or just initialize managers shouldn't matter, that affects only the UIs of Swing components - whether or not they are using Web-UI or not. The rest of WebLaF should function the same way as it does with install.

mgarin commented 10 years ago

Error happened due to Swing hidden Frame being used as notifications container. It is now fixed and will be available with v1.29 update.

parkjohnston commented 10 years ago

Is there a way to have the calendar start on saturday instead of monday?

mgarin commented 10 years ago

Use method webCalendar.setStartWeekFromSunday ( true );. It should help :)

parkjohnston commented 10 years ago

trying to run this from a web date field and can't seem to get it to work.

OpenDateTextBox.getCalendar().setStartWeekFromSunday(true); is not working

On Wed, Jul 16, 2014 at 4:48 AM, Mikle notifications@github.com wrote:

Use method webCalendar.setStartWeekFromSunday ( true );. It should help :)

— Reply to this email directly or view it on GitHub https://github.com/mgarin/weblaf/issues/136#issuecomment-49138296.

mgarin commented 10 years ago

Well, you were asking about calendar, not WebDateField. There is no convenient way to modify WebDateField's calendar so far.

I have added a small improvement which will be available starting from v1.29 - you will be able to set calendar customizer into WebDateField itself and configure the calendar there:

final WebDateField dateField = new WebDateField ();
dateField.setCalendarCustomizer ( new Customizer<WebCalendar> ()
{
    @Override
    public void customize ( final WebCalendar calendar )
    {
        calendar.setStartWeekFromSunday ( true );
    }
} );
parkjohnston commented 10 years ago

I have a version of 1.29 would it be in that or another build?

On Wed, Jul 16, 2014 at 11:29 AM, Mikle notifications@github.com wrote:

Well, you were asking about calendar, not WebDateField. There is no convenient way to modify WebDateField's calendar so far.

I have added a small improvement which will be available starting from v1.29 - you will be able to set calendar customizer into WebDateField itself and configure the calendar there:

final WebDateField dateField = new WebDateField ();dateField.setCalendarCustomizer ( new Customizer (){ @Override public void customize ( WebCalendar calendar ) { calendar.setStartWeekFromSunday ( true ); }} );

— Reply to this email directly or view it on GitHub https://github.com/mgarin/weblaf/issues/136#issuecomment-49182640.

mgarin commented 10 years ago

No, of course not in the one you have - I didn't even commit this change yet.

parkjohnston commented 10 years ago

Oh ok.

Will you please send this information over when build the information.

On Jul 16, 2014, at 11:33 AM, Mikle notifications@github.com wrote:

No, of course not in the one you have - I didn't even commit this change yet.

— Reply to this email directly or view it on GitHub.

mgarin commented 10 years ago

I will make a note in each issue fixed in or related to the release, including this one. So you will certainly receive a notification.