Subversion Repository Public Repository

litesoft

Diff Revisions 49 vs 136 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/CancelButton.java

Diff revisions: vs.
  @@ -3,10 +3,22 @@
3 3
4 4 import com.google.gwt.event.dom.client.*;
5 5
6 - public class CancelButton extends RedButton
6 + public class CancelButton extends RedButton implements ButtonFactory
7 7 {
8 + public static final String NAME = "Cancel";
9 +
10 + public static DefButtonNamedTypedFactory factory()
11 + {
12 + return factory( null );
13 + }
14 +
15 + public static DefButtonNamedTypedFactory factory( String pText )
16 + {
17 + return new DefButtonNamed( NAME ).red().text( pText );
18 + }
19 +
8 20 public CancelButton( ClickHandler pHandler )
9 21 {
10 - super( "Cancel", "Cancel/close this window/dialog", "", pHandler );
22 + super( NAME, "Cancel/close this window/dialog", "", pHandler );
11 23 }
12 24 }