Skip to content

Commit

Permalink
BZ-1195300: Added tooltips for a number of icon buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrenaat committed Mar 13, 2015
1 parent eb29d91 commit 9f9f766
Show file tree
Hide file tree
Showing 16 changed files with 48 additions and 16 deletions.
Expand Up @@ -137,6 +137,7 @@ public DefaultSelectionEventManager.SelectAction translateSelectionEvent(CellPre

Button newUnitButton = new Button();
newUnitButton.setIcon(IconType.PLUS);
newUnitButton.setTitle( Constants.INSTANCE.Deploy_A_New_Unit() );
newUnitButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Expand Down
Expand Up @@ -178,6 +178,7 @@ public DefaultSelectionEventManager.SelectAction translateSelectionEvent(

Button configRepoButton = new Button();
configRepoButton.setIcon(IconType.COG);
configRepoButton.setTitle( Constants.INSTANCE.ConfigurationPanel() );
configRepoButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Expand Down
Expand Up @@ -41,11 +41,17 @@ public interface Constants extends Messages {

String New_Item();

String Select_Date();

String Day();

String Week();

String Month();

String Today();

String Previous();

String Next();
}
Expand Up @@ -34,6 +34,7 @@
import org.jboss.errai.security.shared.api.identity.User;
import org.jbpm.console.ng.ga.model.GenericSummary;
import org.jbpm.console.ng.gc.client.experimental.grid.base.ExtendedPagedTable;
import org.jbpm.console.ng.gc.client.i18n.Constants;
import org.uberfire.ext.widgets.common.client.common.BusyPopup;
import org.uberfire.ext.services.shared.preferences.GridGlobalPreferences;
import org.uberfire.ext.services.shared.preferences.GridPreferencesStore;
Expand Down Expand Up @@ -144,6 +145,7 @@ public void displayNotification( String text ) {
public void initGenericToolBar() {
Button refreshButton = new Button();
refreshButton.setIcon( IconType.REFRESH );
refreshButton.setTitle( Constants.INSTANCE.Refresh() );
refreshButton.addClickHandler( new ClickHandler() {
@Override
public void onClick( ClickEvent event ) {
Expand Down
Expand Up @@ -210,6 +210,7 @@ public HandlerRegistration addValueChangeHandler(final ValueChangeHandler<Date>

private void initCalendarIcon() {
calendarIcon.setIcon(IconType.CALENDAR);
calendarIcon.setTitle( Constants.INSTANCE.Select_Date() );
calendarIcon.setIconSize(IconSize.LARGE);
calendarIcon.addClickHandler(new ClickHandler() {
@Override
Expand All @@ -236,14 +237,16 @@ public void onValueChange(ValueChangeEvent<Date> event) {

private void initPrevNextTodayButtons() {
previousButton.setIcon(IconType.CARET_LEFT);
previousButton.setIconSize(IconSize.LARGE);
previousButton.addClickHandler(new ClickHandler() {
previousButton.setTitle( Constants.INSTANCE.Previous() );
previousButton.setIconSize( IconSize.LARGE );
previousButton.addClickHandler( new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
adjustDate(true);
public void onClick( ClickEvent event ) {
adjustDate( true );
}
});
nextButton.setIcon(IconType.CARET_RIGHT);
} );
nextButton.setIcon( IconType.CARET_RIGHT );
nextButton.setTitle( Constants.INSTANCE.Next() );
nextButton.setIconSize(IconSize.LARGE);
nextButton.addClickHandler(new ClickHandler() {
@Override
Expand Down
Expand Up @@ -174,15 +174,17 @@ public void setListContainer(CalendarListContainer listContainer) {

private void initPrevNextTodayButtons() {
previousButton.setIcon(IconType.CARET_LEFT);
previousButton.setIconSize(IconSize.SMALL);
previousButton.addClickHandler(new ClickHandler() {
previousButton.setTitle( Constants.INSTANCE.Previous() );
previousButton.setIconSize( IconSize.SMALL );
previousButton.addClickHandler( new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
adjustDate(true);
public void onClick( ClickEvent event ) {
adjustDate( true );
updateTodayButtonEnabled();
}
});
nextButton.setIcon(IconType.CARET_RIGHT);
} );
nextButton.setIcon( IconType.CARET_RIGHT );
nextButton.setTitle( Constants.INSTANCE.Next() );
nextButton.setIconSize(IconSize.SMALL);
nextButton.addClickHandler(new ClickHandler() {
@Override
Expand Down Expand Up @@ -349,6 +351,7 @@ public HandlerRegistration addValueChangeHandler(final ValueChangeHandler<Date>

private void initCalendarIcon() {
calendarIcon.setIcon(IconType.CALENDAR);
calendarIcon.setTitle( Constants.INSTANCE.Select_Date() );
calendarIcon.setIconSize(IconSize.SMALL);
calendarIcon.addClickHandler(new ClickHandler() {
@Override
Expand Down
Expand Up @@ -2,7 +2,10 @@ Actions=Actions
Refresh=Refresh
No_Items_Found=No items found
New_Item=New Item
Select_Date=Select Date
Day=Day
Week=Week
Month=Month
Today=Today
Today=Today
Previous=Previous
Next=Next
Expand Up @@ -287,6 +287,7 @@ private void addUserControl( Boolean addCurrentUser ) {

Button removeUserButton = new Button();
removeUserButton.setIcon( IconType.MINUS_SIGN );
removeUserButton.setTitle( Constants.INSTANCE.Remove_User() );
removeUserButton.addClickHandler( new ClickHandler() {

@Override
Expand Down Expand Up @@ -315,6 +316,7 @@ private void addGroupControl() {

Button removeGroupButton = new Button();
removeGroupButton.setIcon( IconType.MINUS_SIGN );
removeGroupButton.setTitle( Constants.INSTANCE.Remove_Group() );
removeGroupButton.addClickHandler( new ClickHandler() {

@Override
Expand Down
Expand Up @@ -142,6 +142,7 @@ public Button getCloseButton() {
return new Button() {
{
setIcon( IconType.REMOVE );
setTitle( Constants.INSTANCE.Close() );
setSize( MINI );
addClickHandler( new ClickHandler() {
@Override
Expand Down Expand Up @@ -173,6 +174,7 @@ public IsWidget getRefreshButton() {
return new Button() {
{
setIcon( IconType.REFRESH );
setTitle( Constants.INSTANCE.Refresh() );
setSize( MINI );
addClickHandler( new ClickHandler() {
@Override
Expand Down
Expand Up @@ -299,7 +299,8 @@ public void onClick(ClickEvent event) {
private void initExtraButtons() {
Button newTaskButton = new Button();
newTaskButton.setTitle(constants.New_Task());
newTaskButton.setIcon(IconType.PLUS_SIGN);
newTaskButton.setIcon( IconType.PLUS_SIGN );
newTaskButton.setTitle( Constants.INSTANCE.New_Task() );
newTaskButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Expand Down
Expand Up @@ -197,5 +197,5 @@ public interface Constants extends Messages {

String Low();


String Close();
}
Expand Up @@ -81,3 +81,4 @@ TaskCreatedWithId=Task Created and Started (id = {0})
High=High
Medium=Medium
Low=Low
Close=Close
Expand Up @@ -71,6 +71,7 @@ public Button getCloseButton() {
return new Button() {
{
setIcon( IconType.REMOVE );
setTitle( Constants.INSTANCE.Close() );
setSize( MINI );
addClickHandler( new ClickHandler() {
@Override
Expand All @@ -87,6 +88,7 @@ public IsWidget getRefreshButton() {
return new Button() {
{
setIcon( IconType.REFRESH );
setTitle( Constants.INSTANCE.Refresh() );
setSize( MINI );
addClickHandler( new ClickHandler() {
@Override
Expand Down
Expand Up @@ -171,6 +171,7 @@ public IsWidget getRefreshButton() {
return new Button() {
{
setIcon( IconType.REFRESH );
setTitle( Constants.INSTANCE.Refresh() );
setSize( MINI );
addClickHandler( new ClickHandler() {
@Override
Expand All @@ -187,6 +188,7 @@ public IsWidget getCloseButton() {
return new Button() {
{
setIcon( IconType.REMOVE );
setTitle( Constants.INSTANCE.Close() );
setSize( MINI );
addClickHandler( new ClickHandler() {
@Override
Expand Down
Expand Up @@ -236,4 +236,6 @@ public interface Constants extends Messages {
String VariableValueUpdated(String variableName);

String Ok();

String Close();
}
Expand Up @@ -100,4 +100,5 @@ Owner=owner
Project=Project
Loading=Loading...
VariableValueUpdated=Variable {0} updated
Ok=Ok
Ok=Ok
Close=Close

0 comments on commit 9f9f766

Please sign in to comment.