Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/DATT/src/org/litesoft/datt/client/ui/widgets/TaskFieldsPanel.java

Diff revisions: vs.
  @@ -1,52 +1,52 @@
1 - package org.litesoft.datt.client.ui.widgets;
2 -
3 - import org.litesoft.GWT.client.widgets.*;
4 - import org.litesoft.GWT.forms.client.*;
5 - import org.litesoft.datt.client.boviews.*;
6 - import org.litesoft.uispecification.*;
7 -
8 - import com.google.gwt.user.client.ui.*;
9 -
10 - import static org.litesoft.uispecification.FormWidgetCtrl.*;
11 -
12 - public class TaskFieldsPanel extends SizeableVerticalPanel implements TaskViewNames {
13 - private Widget mPointerField;
14 -
15 - public TaskFieldsPanel( FormBinder<TaskView> pFB ) {
16 - stretchable();
17 -
18 - add( mPointerField = pFB.add( aName ) );
19 - add( pFB.add( aDescription ) );
20 - add( createIsDonePlusPriority( pFB ) );
21 -
22 - SizeableHorizontalPanel zHorizontalPanel = new SizeableHorizontalPanel().stretchableHorizontally();
23 - zHorizontalPanel.add( pFB.add( aCreatorFullName ) );
24 - zHorizontalPanel.add( new SizeableSpacer().stretchableHorizontally() );
25 -
26 - add( zHorizontalPanel );
27 - }
28 -
29 - public Widget getPointerField() {
30 - return mPointerField;
31 - }
32 -
33 - private Widget createIsDonePlusPriority( FormBinder<TaskView> pFB ) {
34 - SizeableHorizontalPanel zPanel = new SizeableHorizontalPanel().stretchableHorizontally();
35 - zPanel.add( pFB.add( aIsDone ) );
36 - zPanel.add( new SizeableSpacer( 10 ) ); // todo: put back .stretchableHorizontally() );
37 - zPanel.add( pFB.add( aShowDone ) );
38 - return zPanel;
39 - }
40 -
41 - public static WidgetCtrlMap createWidgetCtrlMap( FormWidgetCtrl pDefaultCtrl ) {
42 - WidgetCtrlMap zWidgetCtrlMap = new WidgetCtrlMap( pDefaultCtrl );
43 -
44 - zWidgetCtrlMap.add( SEARCH_FILTER.unique(), aName );
45 - zWidgetCtrlMap.add( SEARCH_FILTER, aDescription );
46 - zWidgetCtrlMap.add( SEARCH_FILTER.enable( FormWidgetAspectCtrl.Search ), aCreatorFullName );
47 - zWidgetCtrlMap.add( SEARCH_ONLY.searchFilter(), aShowDone );
48 - zWidgetCtrlMap.add( EDIT_ONLY, aIsDone );
49 -
50 - return zWidgetCtrlMap;
51 - }
52 - }
1 + package org.litesoft.datt.client.ui.widgets;
2 +
3 + import org.litesoft.GWT.client.widgets.*;
4 + import org.litesoft.GWT.forms.client.*;
5 + import org.litesoft.datt.client.boviews.*;
6 + import org.litesoft.uispecification.*;
7 +
8 + import com.google.gwt.user.client.ui.*;
9 +
10 + import static org.litesoft.uispecification.FormWidgetCtrl.*;
11 +
12 + public class TaskFieldsPanel extends SizeableVerticalPanel implements TaskViewNames {
13 + private Widget mPointerField;
14 +
15 + public TaskFieldsPanel( FormBinder<TaskView> pFB ) {
16 + stretchable();
17 +
18 + add( mPointerField = pFB.add( aName ) );
19 + add( pFB.add( aDescription ) );
20 + add( createIsDonePlusPriority( pFB ) );
21 +
22 + SizeableHorizontalPanel zHorizontalPanel = new SizeableHorizontalPanel().stretchableHorizontally();
23 + zHorizontalPanel.add( pFB.add( aCreatorFullName ) );
24 + zHorizontalPanel.add( new SizeableSpacer().stretchableHorizontally() );
25 +
26 + add( zHorizontalPanel );
27 + }
28 +
29 + public Widget getPointerField() {
30 + return mPointerField;
31 + }
32 +
33 + private Widget createIsDonePlusPriority( FormBinder<TaskView> pFB ) {
34 + SizeableHorizontalPanel zPanel = new SizeableHorizontalPanel().stretchableHorizontally();
35 + zPanel.add( pFB.add( aIsDone ) );
36 + zPanel.add( new SizeableSpacer( 10 ) ); // todo: put back .stretchableHorizontally() );
37 + zPanel.add( pFB.add( aShowDone ) );
38 + return zPanel;
39 + }
40 +
41 + public static WidgetCtrlMap createWidgetCtrlMap( FormWidgetCtrl pDefaultCtrl ) {
42 + WidgetCtrlMap zWidgetCtrlMap = new WidgetCtrlMap( pDefaultCtrl );
43 +
44 + zWidgetCtrlMap.add( SEARCH_FILTER.unique(), aName );
45 + zWidgetCtrlMap.add( SEARCH_FILTER, aDescription );
46 + zWidgetCtrlMap.add( SEARCH_FILTER.enable( FormWidgetAspectCtrl.Search ), aCreatorFullName );
47 + zWidgetCtrlMap.add( SEARCH_ONLY.searchFilter(), aShowDone );
48 + zWidgetCtrlMap.add( EDIT_ONLY, aIsDone );
49 +
50 + return zWidgetCtrlMap;
51 + }
52 + }