Subversion Repository Public Repository

litesoft

Diff Revisions 496 vs 539 for /trunk/Java/DATT/src/org/litesoft/datt/client/ui/widgets/StoryFieldsPanel.java

Diff revisions: vs.
  @@ -1,5 +1,6 @@
1 1 package org.litesoft.datt.client.ui.widgets;
2 2
3 + import org.litesoft.GWT.client.widgets.Button;
3 4 import org.litesoft.GWT.client.widgets.*;
4 5 import org.litesoft.GWT.forms.client.*;
5 6 import org.litesoft.datt.client.boviews.*;
  @@ -7,30 +8,38 @@
7 8
8 9 import com.google.gwt.user.client.ui.*;
9 10
10 - import static org.litesoft.uispecification.FormWidgetAspectCtrl.Existing;
11 - import static org.litesoft.uispecification.FormWidgetAspectCtrl.No;
11 + import static org.litesoft.uispecification.FormWidgetAspectCtrl.*;
12 12 import static org.litesoft.uispecification.FormWidgetCtrl.*;
13 13
14 14 public class StoryFieldsPanel extends SizeableVerticalSplitPairPanel implements StoryViewNames
15 15 {
16 16 private Widget mPointerField;
17 17
18 - public StoryFieldsPanel( FormBinder<StoryView> pFB )
18 + public StoryFieldsPanel( FormBinder<StoryView> pFB, FormEngine pFE, Button pTaskButton )
19 19 {
20 20 stretchable();
21 21
22 - add( createUpperPanel( pFB ) );
22 + add( createUpperPanel( pFB, pFE, pTaskButton ) );
23 23 add( pFB.add( aChanges ) );
24 24 }
25 25
26 - private Widget createUpperPanel( FormBinder<StoryView> pFB )
26 + private Widget createUpperPanel( FormBinder<StoryView> pFB, FormEngine pFE, Button pTaskButton )
27 27 {
28 28 SizeableVerticalPanel zPanel = new SizeableVerticalPanel().stretchable();
29 29
30 30 zPanel.add( mPointerField = pFB.add( aName ) );
31 31 zPanel.add( pFB.add( aDescription ) );
32 32 zPanel.add( createIsDonePlusPriority( pFB ) );
33 - zPanel.add( pFB.add( aCreatorFullName ) );
33 +
34 + SizeableHorizontalPanel zHorizontalPanel = new SizeableHorizontalPanel().stretchableHorizontally();
35 + zHorizontalPanel.add( pFB.add( aCreatorFullName ) );
36 + zHorizontalPanel.add( new SizeableSpacer().stretchableHorizontally() );
37 + if ( pTaskButton != null )
38 + {
39 + zHorizontalPanel.add( pFE.addButton( Visible( Edit ).enable( Edit_Existing_NoChanges ), pTaskButton ) );
40 + }
41 +
42 + zPanel.add( zHorizontalPanel );
34 43
35 44 return zPanel;
36 45 }