Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package org.litesoft.datt.client.ui.widgets;

import org.litesoft.GWT.client.widgets.Button;
import org.litesoft.GWT.client.widgets.*;
import org.litesoft.GWT.forms.client.*;
import org.litesoft.datt.client.boviews.*;
import org.litesoft.uispecification.*;

import com.google.gwt.user.client.ui.*;

import static org.litesoft.uispecification.FormWidgetAspectCtrl.*;
import static org.litesoft.uispecification.FormWidgetCtrl.*;

public class StoryFieldsPanel extends SizeableVerticalSplitPairPanel implements StoryViewNames {
    private Widget mPointerField;

    public StoryFieldsPanel( FormBinder<StoryView> pFB, FormEngine pFE, Button pTaskButton ) {
        stretchable();

        add( createUpperPanel( pFB, pFE, pTaskButton ) );
        add( pFB.add( aChanges ) );
    }

    private Widget createUpperPanel( FormBinder<StoryView> pFB, FormEngine pFE, Button pTaskButton ) {
        SizeableVerticalPanel zPanel = new SizeableVerticalPanel().stretchable();

        zPanel.add( mPointerField = pFB.add( aName ) );
        zPanel.add( pFB.add( aDescription ) );
        zPanel.add( createIsDonePlusPriority( pFB ) );

        SizeableHorizontalPanel zHorizontalPanel = new SizeableHorizontalPanel().stretchableHorizontally();
        zHorizontalPanel.add( pFB.add( aCreatorFullName ) );
        zHorizontalPanel.add( new SizeableSpacer().stretchableHorizontally() );
        if ( pTaskButton != null ) {
            zHorizontalPanel.add( pFE.addButton( Visible( Edit ).enable( Edit_Existing_NoChanges ), pTaskButton ) );
        }

        zPanel.add( zHorizontalPanel );

        return zPanel;
    }

    public Widget getPointerField() {
        return mPointerField;
    }

    private Widget createIsDonePlusPriority( FormBinder<StoryView> pFB ) {
        SizeableHorizontalPanel zPanel = new SizeableHorizontalPanel().stretchableHorizontally();
        zPanel.add( pFB.add( aIsDone ) );
        zPanel.add( new SizeableSpacer( 10 ) ); // todo: put back .stretchableHorizontally() );
        zPanel.add( pFB.add( aShowDone ) );
        return zPanel;
    }

    public static WidgetCtrlMap createWidgetCtrlMap( FormWidgetCtrl pDefaultCtrl ) {
        WidgetCtrlMap zWidgetCtrlMap = new WidgetCtrlMap( pDefaultCtrl );

        zWidgetCtrlMap.add( SEARCH_FILTER.unique(), aName );
        zWidgetCtrlMap.add( SEARCH_FILTER, aDescription );
        zWidgetCtrlMap.add( SEARCH_FILTER.enable( FormWidgetAspectCtrl.Search ), aCreatorFullName );
        zWidgetCtrlMap.add( SEARCH_ONLY.searchFilter(), aShowDone );
        zWidgetCtrlMap.add( EDIT_ONLY, aIsDone );
        zWidgetCtrlMap.add( Visible( Existing ).enable( No ), aChanges );

        return zWidgetCtrlMap;
    }
}

Commits for litesoft/trunk/Java/DATT/src/org/litesoft/datt/client/ui/widgets/StoryFieldsPanel.java

Diff revisions: vs.
Revision Author Commited Message
948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

539 Diff Diff markcmarkc Mon 03 Oct, 2011 00:35:01 +0000
496 Diff Diff GeorgeS picture GeorgeS Sun 11 Sep, 2011 16:58:00 +0000
430 GeorgeS picture GeorgeS Sat 20 Aug, 2011 19:46:21 +0000