Subversion Repository Public Repository

litesoft

Diff Revisions 49 vs 60 for /trunk/Java/GWT/OldClient/src/org/litesoft/GWT/forms/client/components/factories/others/UiInputActionWidgetFactory.java

Diff revisions: vs.
  @@ -1,17 +1,18 @@
1 1 // This Source Code is in the Public Domain per: http://litesoft.org/License.txt
2 2 package org.litesoft.GWT.forms.client.components.factories.others;
3 3
4 - import com.google.gwt.user.client.ui.*;
4 + import java.io.*;
5 +
5 6 import org.litesoft.GWT.client.widgets.nonpublic.*;
6 7 import org.litesoft.GWT.forms.client.components.factories.*;
7 8 import org.litesoft.GWT.forms.client.nonpublic.*;
8 - import org.litesoft.core.simpletypes.boxers.*;
9 9 import org.litesoft.core.util.*;
10 - import org.litesoft.rpcpassable.*;
11 10 import org.litesoft.ui.def.*;
12 11 import org.litesoft.ui.def.nonpublic.*;
13 12 import org.litesoft.ui.def.nonpublic.support.*;
14 13
14 + import com.google.gwt.user.client.ui.*;
15 +
15 16 public class UiInputActionWidgetFactory implements FormComponentFactory
16 17 {
17 18 public Widget create( FormInstanceComponentHandler pComponentHandler, UiDef pUiDef,
  @@ -29,8 +30,8 @@
29 30 private static final class MyFormAdapter extends FormButtonAdapter implements FormAttributeAdapter
30 31 {
31 32 private Integer mUniqueID;
32 - private BoxedBoolean mBaseValue = BoxedBoolean.FALSE;
33 - private BoxedBoolean mCurValue = BoxedBoolean.FALSE;
33 + private Boolean mBaseValue = Boolean.FALSE;
34 + private Boolean mCurValue = Boolean.FALSE;
34 35
35 36 public MyFormAdapter( FormInstanceComponentHandler pComponentHandler, //
36 37 AttributeMetaData pMD, UiInputActionDef pDef )
  @@ -47,9 +48,9 @@
47 48
48 49 public void onClick( Widget sender )
49 50 {
50 - if ( !BoxedBoolean.TRUE.equals( mCurValue ) )
51 + if ( !Boolean.TRUE.equals( mCurValue ) )
51 52 {
52 - mCurValue = BoxedBoolean.TRUE;
53 + mCurValue = Boolean.TRUE;
53 54 mComponentFormHandler.componentChangedState( true );
54 55 // send the attribute change
55 56 mComponentFormHandler.componentUpdatedValue( this, mCurValue );
  @@ -92,25 +93,25 @@
92 93 return !mBaseValue.equals( mCurValue );
93 94 }
94 95
95 - public RPCpassable getBaseValue()
96 + public Serializable getBaseValue()
96 97 {
97 98 return mBaseValue;
98 99 }
99 100
100 - public void setBaseValue( RPCpassable pBaseValue )
101 + public void setBaseValue( Serializable pBaseValue )
101 102 {
102 103 setCurrentValue( mBaseValue = convert( pBaseValue ) );
103 104 }
104 105
105 - public RPCpassable getCurrentValue()
106 + public Serializable getCurrentValue()
106 107 {
107 108 return mCurValue;
108 109 }
109 110
110 - public void setCurrentValue( RPCpassable pCurrentValue )
111 + public void setCurrentValue( Serializable pCurrentValue )
111 112 {
112 113 mCurValue = convert( pCurrentValue );
113 - setDisabled( BoxedBoolean.TRUE.equals( mCurValue ) );
114 + setDisabled( Boolean.TRUE.equals( mCurValue ) );
114 115 }
115 116
116 117 public String getUserValue()
  @@ -120,7 +121,7 @@
120 121
121 122 public void setUserValue( String pValue )
122 123 {
123 - setCurrentValue( new BoxedBoolean( UtilsCommon.toBoolean( pValue ) ) );
124 + setCurrentValue( UtilsCommon.toBoolean( pValue ) );
124 125 }
125 126
126 127 public void publishAnyPendingChanges()
  @@ -128,14 +129,14 @@
128 129 // Do nothing as Buttons do not do defferred processing
129 130 }
130 131
131 - public void updateValidOptions( RPCpassable[] pValidOptions )
132 + public void updateValidOptions( Serializable[] pValidOptions )
132 133 {
133 134 // Do nothing as Buttons do NOT support valid Options
134 135 }
135 136
136 - private BoxedBoolean convert( RPCpassable pValue )
137 + private Boolean convert( Serializable pValue )
137 138 {
138 - return BoxedBoolean.TRUE.equals( pValue ) ? BoxedBoolean.TRUE : BoxedBoolean.FALSE;
139 + return Boolean.TRUE.equals( pValue );
139 140 }
140 141 }
141 142 }