|
@@ -1,67 +1,67 @@ |
1 |
|
- |
package org.litesoft.datt.client.ui.widgets; |
2 |
|
- |
|
3 |
|
- |
import org.litesoft.GWT.client.widgets.Button; |
4 |
|
- |
import org.litesoft.GWT.client.widgets.*; |
5 |
|
- |
import org.litesoft.GWT.forms.client.*; |
6 |
|
- |
import org.litesoft.datt.client.boviews.*; |
7 |
|
- |
import org.litesoft.uispecification.*; |
8 |
|
- |
|
9 |
|
- |
import com.google.gwt.user.client.ui.*; |
10 |
|
- |
|
11 |
|
- |
import static org.litesoft.uispecification.FormWidgetAspectCtrl.*; |
12 |
|
- |
import static org.litesoft.uispecification.FormWidgetCtrl.*; |
13 |
|
- |
|
14 |
|
- |
public class StoryFieldsPanel extends SizeableVerticalSplitPairPanel implements StoryViewNames { |
15 |
|
- |
private Widget mPointerField; |
16 |
|
- |
|
17 |
|
- |
public StoryFieldsPanel( FormBinder<StoryView> pFB, FormEngine pFE, Button pTaskButton ) { |
18 |
|
- |
stretchable(); |
19 |
|
- |
|
20 |
|
- |
add( createUpperPanel( pFB, pFE, pTaskButton ) ); |
21 |
|
- |
add( pFB.add( aChanges ) ); |
22 |
|
- |
} |
23 |
|
- |
|
24 |
|
- |
private Widget createUpperPanel( FormBinder<StoryView> pFB, FormEngine pFE, Button pTaskButton ) { |
25 |
|
- |
SizeableVerticalPanel zPanel = new SizeableVerticalPanel().stretchable(); |
26 |
|
- |
|
27 |
|
- |
zPanel.add( mPointerField = pFB.add( aName ) ); |
28 |
|
- |
zPanel.add( pFB.add( aDescription ) ); |
29 |
|
- |
zPanel.add( createIsDonePlusPriority( pFB ) ); |
30 |
|
- |
|
31 |
|
- |
SizeableHorizontalPanel zHorizontalPanel = new SizeableHorizontalPanel().stretchableHorizontally(); |
32 |
|
- |
zHorizontalPanel.add( pFB.add( aCreatorFullName ) ); |
33 |
|
- |
zHorizontalPanel.add( new SizeableSpacer().stretchableHorizontally() ); |
34 |
|
- |
if ( pTaskButton != null ) { |
35 |
|
- |
zHorizontalPanel.add( pFE.addButton( Visible( Edit ).enable( Edit_Existing_NoChanges ), pTaskButton ) ); |
36 |
|
- |
} |
37 |
|
- |
|
38 |
|
- |
zPanel.add( zHorizontalPanel ); |
39 |
|
- |
|
40 |
|
- |
return zPanel; |
41 |
|
- |
} |
42 |
|
- |
|
43 |
|
- |
public Widget getPointerField() { |
44 |
|
- |
return mPointerField; |
45 |
|
- |
} |
46 |
|
- |
|
47 |
|
- |
private Widget createIsDonePlusPriority( FormBinder<StoryView> pFB ) { |
48 |
|
- |
SizeableHorizontalPanel zPanel = new SizeableHorizontalPanel().stretchableHorizontally(); |
49 |
|
- |
zPanel.add( pFB.add( aIsDone ) ); |
50 |
|
- |
zPanel.add( new SizeableSpacer( 10 ) ); // todo: put back .stretchableHorizontally() ); |
51 |
|
- |
zPanel.add( pFB.add( aShowDone ) ); |
52 |
|
- |
return zPanel; |
53 |
|
- |
} |
54 |
|
- |
|
55 |
|
- |
public static WidgetCtrlMap createWidgetCtrlMap( FormWidgetCtrl pDefaultCtrl ) { |
56 |
|
- |
WidgetCtrlMap zWidgetCtrlMap = new WidgetCtrlMap( pDefaultCtrl ); |
57 |
|
- |
|
58 |
|
- |
zWidgetCtrlMap.add( SEARCH_FILTER.unique(), aName ); |
59 |
|
- |
zWidgetCtrlMap.add( SEARCH_FILTER, aDescription ); |
60 |
|
- |
zWidgetCtrlMap.add( SEARCH_FILTER.enable( FormWidgetAspectCtrl.Search ), aCreatorFullName ); |
61 |
|
- |
zWidgetCtrlMap.add( SEARCH_ONLY.searchFilter(), aShowDone ); |
62 |
|
- |
zWidgetCtrlMap.add( EDIT_ONLY, aIsDone ); |
63 |
|
- |
zWidgetCtrlMap.add( Visible( Existing ).enable( No ), aChanges ); |
64 |
|
- |
|
65 |
|
- |
return zWidgetCtrlMap; |
66 |
|
- |
} |
67 |
|
- |
} |
|
1 |
+ |
package org.litesoft.datt.client.ui.widgets; |
|
2 |
+ |
|
|
3 |
+ |
import org.litesoft.GWT.client.widgets.Button; |
|
4 |
+ |
import org.litesoft.GWT.client.widgets.*; |
|
5 |
+ |
import org.litesoft.GWT.forms.client.*; |
|
6 |
+ |
import org.litesoft.datt.client.boviews.*; |
|
7 |
+ |
import org.litesoft.uispecification.*; |
|
8 |
+ |
|
|
9 |
+ |
import com.google.gwt.user.client.ui.*; |
|
10 |
+ |
|
|
11 |
+ |
import static org.litesoft.uispecification.FormWidgetAspectCtrl.*; |
|
12 |
+ |
import static org.litesoft.uispecification.FormWidgetCtrl.*; |
|
13 |
+ |
|
|
14 |
+ |
public class StoryFieldsPanel extends SizeableVerticalSplitPairPanel implements StoryViewNames { |
|
15 |
+ |
private Widget mPointerField; |
|
16 |
+ |
|
|
17 |
+ |
public StoryFieldsPanel( FormBinder<StoryView> pFB, FormEngine pFE, Button pTaskButton ) { |
|
18 |
+ |
stretchable(); |
|
19 |
+ |
|
|
20 |
+ |
add( createUpperPanel( pFB, pFE, pTaskButton ) ); |
|
21 |
+ |
add( pFB.add( aChanges ) ); |
|
22 |
+ |
} |
|
23 |
+ |
|
|
24 |
+ |
private Widget createUpperPanel( FormBinder<StoryView> pFB, FormEngine pFE, Button pTaskButton ) { |
|
25 |
+ |
SizeableVerticalPanel zPanel = new SizeableVerticalPanel().stretchable(); |
|
26 |
+ |
|
|
27 |
+ |
zPanel.add( mPointerField = pFB.add( aName ) ); |
|
28 |
+ |
zPanel.add( pFB.add( aDescription ) ); |
|
29 |
+ |
zPanel.add( createIsDonePlusPriority( pFB ) ); |
|
30 |
+ |
|
|
31 |
+ |
SizeableHorizontalPanel zHorizontalPanel = new SizeableHorizontalPanel().stretchableHorizontally(); |
|
32 |
+ |
zHorizontalPanel.add( pFB.add( aCreatorFullName ) ); |
|
33 |
+ |
zHorizontalPanel.add( new SizeableSpacer().stretchableHorizontally() ); |
|
34 |
+ |
if ( pTaskButton != null ) { |
|
35 |
+ |
zHorizontalPanel.add( pFE.addButton( Visible( Edit ).enable( Edit_Existing_NoChanges ), pTaskButton ) ); |
|
36 |
+ |
} |
|
37 |
+ |
|
|
38 |
+ |
zPanel.add( zHorizontalPanel ); |
|
39 |
+ |
|
|
40 |
+ |
return zPanel; |
|
41 |
+ |
} |
|
42 |
+ |
|
|
43 |
+ |
public Widget getPointerField() { |
|
44 |
+ |
return mPointerField; |
|
45 |
+ |
} |
|
46 |
+ |
|
|
47 |
+ |
private Widget createIsDonePlusPriority( FormBinder<StoryView> pFB ) { |
|
48 |
+ |
SizeableHorizontalPanel zPanel = new SizeableHorizontalPanel().stretchableHorizontally(); |
|
49 |
+ |
zPanel.add( pFB.add( aIsDone ) ); |
|
50 |
+ |
zPanel.add( new SizeableSpacer( 10 ) ); // todo: put back .stretchableHorizontally() ); |
|
51 |
+ |
zPanel.add( pFB.add( aShowDone ) ); |
|
52 |
+ |
return zPanel; |
|
53 |
+ |
} |
|
54 |
+ |
|
|
55 |
+ |
public static WidgetCtrlMap createWidgetCtrlMap( FormWidgetCtrl pDefaultCtrl ) { |
|
56 |
+ |
WidgetCtrlMap zWidgetCtrlMap = new WidgetCtrlMap( pDefaultCtrl ); |
|
57 |
+ |
|
|
58 |
+ |
zWidgetCtrlMap.add( SEARCH_FILTER.unique(), aName ); |
|
59 |
+ |
zWidgetCtrlMap.add( SEARCH_FILTER, aDescription ); |
|
60 |
+ |
zWidgetCtrlMap.add( SEARCH_FILTER.enable( FormWidgetAspectCtrl.Search ), aCreatorFullName ); |
|
61 |
+ |
zWidgetCtrlMap.add( SEARCH_ONLY.searchFilter(), aShowDone ); |
|
62 |
+ |
zWidgetCtrlMap.add( EDIT_ONLY, aIsDone ); |
|
63 |
+ |
zWidgetCtrlMap.add( Visible( Existing ).enable( No ), aChanges ); |
|
64 |
+ |
|
|
65 |
+ |
return zWidgetCtrlMap; |
|
66 |
+ |
} |
|
67 |
+ |
} |