litesoft
Diff Revisions
49
vs
105
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/forms/client/components/impls/input/FormTimestampPicker.java
|
@@ -3,6 +3,7 @@ |
3 |
3 |
|
|
4 |
4 |
|
import java.util.*; |
5 |
5 |
|
|
|
6 |
+ |
import org.litesoft.GWT.client.widgets.*; |
6 |
7 |
|
import org.litesoft.GWT.forms.client.components.nonpublic.*; |
7 |
8 |
|
import org.litesoft.core.simpletypes.temporal.*; |
8 |
9 |
|
import org.litesoft.core.simpletypes.temporal.nonpublic.*; |
|
@@ -86,13 +87,14 @@ |
86 |
87 |
|
{ |
87 |
88 |
|
private SimpleTimestamp mExitValue = null; |
88 |
89 |
|
private int mTimeFields; |
|
90 |
+ |
private Button mOkButton; |
89 |
91 |
|
|
90 |
92 |
|
public MyPicker( String pCancelText, String pOKText, TimeRes pTimeRes ) |
91 |
93 |
|
{ |
92 |
94 |
|
mTimeFields = pTimeRes.getIndex() + 1; |
93 |
95 |
|
mTimeFieldsPanel = new TimePickerFieldsPanel( "litesoft-TimestampTimePickerFieldsPanel", mTimeFields, this ); |
94 |
96 |
|
addExtensionPanel( mTimeFieldsPanel ); |
95 |
|
- |
addDialogButtonPanel( pCancelText, pOKText ); |
|
97 |
+ |
addDialogButtonPanel( new RedButton( pCancelText ), mOkButton = new GreenButton( pOKText ) ); |
96 |
98 |
|
} |
97 |
99 |
|
|
98 |
100 |
|
public int getTimeFields() |
|
@@ -118,9 +120,9 @@ |
118 |
120 |
|
} |
119 |
121 |
|
|
120 |
122 |
|
@Override |
121 |
|
- |
protected void dialogButtonPanelClicked( int pButtonIndex ) |
|
123 |
+ |
protected void dialogButtonClicked( Button pButton ) |
122 |
124 |
|
{ |
123 |
|
- |
if ( pButtonIndex != 0 ) // 'OK' button |
|
125 |
+ |
if ( mOkButton == pButton ) |
124 |
126 |
|
{ |
125 |
127 |
|
mExitValue = new SimpleTimestamp( new SimpleDate( selectedDate() ), mTimeFieldsPanel.getSimpleTime() ); |
126 |
128 |
|
} |