Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
BZ-1195300: provide tooltip for maximizeToggleButton (special case).
Browse files Browse the repository at this point in the history
  • Loading branch information
jrenaat committed Mar 10, 2015
1 parent 300cf5e commit 7141e33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Expand Up @@ -30,6 +30,8 @@ public interface WorkbenchConstants

String maximizePanel();

String minimizePanel();

String expandToolbar();

String collapseToolbar();
Expand Down
@@ -1,5 +1,6 @@
package org.uberfire.client.workbench.widgets.panel;

import org.uberfire.client.resources.i18n.WorkbenchConstants;
import org.uberfire.mvp.Command;

import com.github.gwtbootstrap.client.ui.Button;
Expand Down Expand Up @@ -28,6 +29,7 @@ public MaximizeToggleButton() {
setIcon( IconType.CHEVRON_UP );
setIconSize( IconSize.SMALL );
setSize( ButtonSize.MINI );
setTitle( WorkbenchConstants.INSTANCE.maximizePanel() );
addClickHandler( new ClickHandler() {
@Override
public void onClick( ClickEvent event ) {
Expand All @@ -45,10 +47,12 @@ public void click() {
if ( wasMaximized ) {
if ( unmaximizeCommand != null ) {
unmaximizeCommand.execute();
setTitle( WorkbenchConstants.INSTANCE.maximizePanel() );
}
} else {
if ( maximizeCommand != null ) {
maximizeCommand.execute();
setTitle( WorkbenchConstants.INSTANCE.minimizePanel() );
}
}
}
Expand Down Expand Up @@ -100,8 +104,10 @@ public void setMaximized( boolean maximized ) {
this.maximized = maximized;
if ( maximized ) {
setIcon( IconType.CHEVRON_DOWN );
setTitle( WorkbenchConstants.INSTANCE.minimizePanel() );
} else {
setIcon( IconType.CHEVRON_UP );
setTitle( WorkbenchConstants.INSTANCE.maximizePanel() );
}
}
}
@@ -1,4 +1,5 @@
maximizePanel=Maximize panel to fit full screen
minimizePanel=Minimize panel to its previous size
expandToolbar=Expand Toolbar
collapseToolbar=Collapse Toolbar

0 comments on commit 7141e33

Please sign in to comment.