Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/OldClient/src/org/litesoft/GWT/client/widgets/ContextMenuBGImageButton.java

Diff revisions: vs.
  @@ -1,55 +1,55 @@
1 - // This Source Code is in the Public Domain per: http://unlicense.org
2 - package org.litesoft.GWT.client.widgets;
3 -
4 - import org.litesoft.GWT.client.commands.*;
5 - import org.litesoft.commonfoundation.typeutils.*;
6 -
7 - import com.google.gwt.user.client.*;
8 -
9 - public class ContextMenuBGImageButton // extends BGImageButton
10 - {
11 - // todo: translate:
12 - // public ContextMenuBGImageButton( String pButtonName, String pEnabledToolTip )
13 - // {
14 - // this( pButtonName, pEnabledToolTip, null );
15 - // }
16 - //
17 - // public ContextMenuBGImageButton( String pButtonName, String pEnabledToolTip, Command pAltClickCommand )
18 - // {
19 - // super( pButtonName, pEnabledToolTip );
20 - // // todo: setEnabled( false );
21 - // mAltClickCommand = pAltClickCommand;
22 - // }
23 -
24 - private Command mAltClickCommand;
25 - private TextCommand[] mTextCommands = TextCommand.EMPTY_ARRAY;
26 -
27 - public void setTextCommands( TextCommand[] pTextCommands ) {
28 - mTextCommands = Objects.hasEntries( pTextCommands ) ? pTextCommands : TextCommand.EMPTY_ARRAY;
29 - // todo: setEnabled( mTextCommands.length != 0 );
30 - }
31 -
32 - // todo: ...
33 - // protected void onMouseUp( Event pEvent )
34 - // {
35 - // if ( (mAltClickCommand != null) && UtilsGwt.wasAltKeyDownOnCurrentEvent() )
36 - // {
37 - // DeferredCommand.addCommand( mAltClickCommand );
38 - // }
39 - // else if ( isEnabled() )
40 - // {
41 - // AbstractContextPopup zPopup = new ContextMenuPopup( mTextCommands, new PopupListener()
42 - // {
43 - // public void onPopupClosed( PopupPanel sender, boolean autoClosed )
44 - // {
45 - // mouseUp();
46 - // }
47 - // } );
48 - // zPopup.addStyleName( "FavoritesPopupMenu" );
49 - // zPopup.showContextPopup( pEvent, LeftRightRectContainmentStrategy.INSTANCE,
50 - // CommonRectangularPoint.LeftBottom, CommonRectangularPoint.LeftTop );
51 - // return;
52 - // }
53 - // super.onMouseUp( pEvent );
54 - // }
55 - }
1 + // This Source Code is in the Public Domain per: http://unlicense.org
2 + package org.litesoft.GWT.client.widgets;
3 +
4 + import org.litesoft.GWT.client.commands.*;
5 + import org.litesoft.commonfoundation.typeutils.*;
6 +
7 + import com.google.gwt.user.client.*;
8 +
9 + public class ContextMenuBGImageButton // extends BGImageButton
10 + {
11 + // todo: translate:
12 + // public ContextMenuBGImageButton( String pButtonName, String pEnabledToolTip )
13 + // {
14 + // this( pButtonName, pEnabledToolTip, null );
15 + // }
16 + //
17 + // public ContextMenuBGImageButton( String pButtonName, String pEnabledToolTip, Command pAltClickCommand )
18 + // {
19 + // super( pButtonName, pEnabledToolTip );
20 + // // todo: setEnabled( false );
21 + // mAltClickCommand = pAltClickCommand;
22 + // }
23 +
24 + private Command mAltClickCommand;
25 + private TextCommand[] mTextCommands = TextCommand.EMPTY_ARRAY;
26 +
27 + public void setTextCommands( TextCommand[] pTextCommands ) {
28 + mTextCommands = Objects.hasEntries( pTextCommands ) ? pTextCommands : TextCommand.EMPTY_ARRAY;
29 + // todo: setEnabled( mTextCommands.length != 0 );
30 + }
31 +
32 + // todo: ...
33 + // protected void onMouseUp( Event pEvent )
34 + // {
35 + // if ( (mAltClickCommand != null) && UtilsGwt.wasAltKeyDownOnCurrentEvent() )
36 + // {
37 + // DeferredCommand.addCommand( mAltClickCommand );
38 + // }
39 + // else if ( isEnabled() )
40 + // {
41 + // AbstractContextPopup zPopup = new ContextMenuPopup( mTextCommands, new PopupListener()
42 + // {
43 + // public void onPopupClosed( PopupPanel sender, boolean autoClosed )
44 + // {
45 + // mouseUp();
46 + // }
47 + // } );
48 + // zPopup.addStyleName( "FavoritesPopupMenu" );
49 + // zPopup.showContextPopup( pEvent, LeftRightRectContainmentStrategy.INSTANCE,
50 + // CommonRectangularPoint.LeftBottom, CommonRectangularPoint.LeftTop );
51 + // return;
52 + // }
53 + // super.onMouseUp( pEvent );
54 + // }
55 + }