Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

add minimize button for a window?

Lam Le
1 decade ago Feb 22, 2010 4:07pm

Hi all,
I am concerning about adding new functions for a window. Is it possible to add new 'buttons' next to the close button for example minimize or maximize.. and give listeners for them?
Thanks.

Pizza Napoletana
1 decade ago May 02, 2010 4:07am
Joonas Lehtinen
1 decade ago May 02, 2010 4:40pm
Ilavarasu Pandian
1 decade ago May 04, 2010 6:57pm
Jouni Koivuviita
1 decade ago May 05, 2010 11:33am
Pizza Napoletana
1 decade ago May 05, 2010 8:38pm

Considering that a Window is a fundamental container, and not a peripheral widget, it will be better for Vaadin toolkit if there weren't too many flavors of Window implementations and variations. So I'd like to make a case for Vaadin to enhance the current implementation of Window to include a Maximize button (aka "+" button on a Mac window), and a Minimize button (aka "-" button on a Mac window), in addition to the existing Close(X) button on the window header.

The + button would maximize or bring back to regular size, within the application window.
The meaning of "-" button can be tricky because there is no standard tray of closed windows in Vaadin applications. So, when the "-" button is clicked, Vaadin can merely send an event for the application to deal with with and not do anything else. In fact, it can do the same for the "+" button and let the application deal with the event and resize the Window appropriately.

I guess you could extend this concept and allow the application to add as many header buttons as it needs, and deal with the actions when the user clicks on the buttons.

Would this be a feature that Vaadin dev group might agree with and take on for development? I run a little dev. group (very very new to Vaadin) that might be able to take the existing Vaadin Window code and modify it to include this feature, and contribute back to Vaadin. But, I am afraid that our lack of Vaadin background might cause us delivering code with beginner's mistakes.

But more importantly, do the Vaadin developer and user community even think this is a worthwhile enhancement? It seems very fundamental to me to have windows with the "x","+", and "-" buttons (& possibly custom buttons) on the window header, but I am curious to hear what others think.

Jouni Koivuviita
1 decade ago May 06, 2010 9:02am
Ilavarasu Pandian
1 decade ago May 06, 2010 5:32pm
Pizza Napoletana
1 decade ago May 07, 2010 6:45am
Jouni Koivuviita
1 decade ago May 07, 2010 8:00am
Phu Nguyen
1 decade ago Oct 19, 2010 9:05am
Jouni Koivuviita
1 decade ago Oct 19, 2010 9:23am
Phu Nguyen
1 decade ago Oct 19, 2010 12:11pm
Phu Nguyen
1 decade ago Oct 19, 2010 12:30pm
André Schild
1 decade ago Oct 19, 2010 12:34pm
Phu Nguyen
1 decade ago Oct 19, 2010 12:55pm
Jouni Koivuviita
1 decade ago Oct 19, 2010 3:07pm
rdonadoni s
1 decade ago Jun 25, 2011 5:17pm
Jouni Koivuviita
1 decade ago Aug 19, 2011 8:50am
ahmer naeem
9 years ago Apr 26, 2012 12:08pm
Tiago Jacobi
9 years ago Oct 17, 2012 1:44pm

Jouni Koivuviita: Finally, I was able to make a small add-on that does just this. See the new ToolbarWindow add-on in the Directory.

Hi Jouni.

I've tested the ToolbarWindow in Internet Explorer 9, but it doesn't work well.
I've attached the image "ToolbarWindow.png" with the problems.

One other question is.
Do you know if there is one simple way to add more buttons next to the close button, not necessarily the buttons minimize and maximize, I saw in your code the "top: -27px;", that look like a workaround, this is the only way to do this?

The Ticket #3400 (http://dev.vaadin.com/ticket/3400) has a deadline? I saw that the last change was 6 weeks ago and it was opened in 2009-09-25.

Thanks for all.

Robert Nowak
8 years ago Nov 08, 2013 1:39pm

Hi, 
Long time no update, is there a chance to make this Toolbar Vaadin 7+ compatible or to incorporate the code to allow window minimialisation in the newest version of Vaadin? We are really looking forward to have it in our app.
Regards,
Robert

Abhiram Giri
7 years ago Nov 26, 2014 11:47am
chahat bhatia
5 years ago Jan 04, 2017 9:19pm