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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package org.litesoft.datt.client.ui.views.stories;

import org.litesoft.GWT.client.view.*;
import org.litesoft.GWT.client.widgets.*;
import org.litesoft.GWT.forms.client.*;
import org.litesoft.GWT.forms.client.components.*;
import org.litesoft.datt.client.boviews.*;

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

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

public class TaskDialog extends DialogView {
    public interface CallBack {
        public void saveTask( TaskView pTaskView );
    }

    private CallBack mCallBack;

    public enum EditType {
        Add,
        Update
    }

    private EditType mEditType;

    protected FormEngine mFE;
    private StoryView mStoryView;
    private TaskView mTaskView;

    public TaskDialog( StoryView pStoryView, EditType pEditType, CallBack pCallBack ) {
        super( title( pEditType + " Task" ), Opaqueness.None );

        mEditType = pEditType;
        mCallBack = pCallBack;
        mStoryView = pStoryView;

        if ( mEditType == EditType.Add ) {
            finishBuilding( "New Task" );
        }
    }

    private void finishBuilding( String pLabel ) {
        setViewTitle( pLabel );

        mFE = createFE( new WidgetCtrlMap( VISIBLE_AND_ACTIVE_ENABLED ) );

        add( createItemAndDescription() );
//        add( createRestoreDiscontinueOption() );

        mContent.setHorizontalAlignment( HasHorizontalAlignment.ALIGN_CENTER );

//        String zOrderStatus;
//        if ( mAdditionalOrder )
//        {
//            zOrderStatus = "Additional";
//        }
//        else
//        {
//            zOrderStatus = "Initial";
//        }
//
//        add( createOrderQuickCodePanel( zOrderStatus + " Order", pQuickCodeFieldLabel ) );
        add( new SizeableSpacer( 5 ).stretchable() );
    }

    private FormEngine createFE( WidgetCtrlMap pWidgetCtrlMap ) {
        return new FormEngine( pWidgetCtrlMap, FormEngine.Mode.EditRegular, null ) {
            @Override
            protected void changeOccurredOn( String pName, IFormComponent pComponent, boolean pChanged ) {
                super.changeOccurredOn( pName, pComponent, pChanged );
                changeOccured( pName, pComponent );
            }
        };
    }

    protected void changeOccured( String pName, IFormComponent pComponent ) {

    }

    public Widget createItemAndDescription() {
        HorizontalPanel zPanel = new HorizontalPanel();
        zPanel.addStyleName( "EditDialogDescriptionPanel" );
//        zPanel.add( new Label( TaskView.getName() ) );
        zPanel.add( new Spacer( 10 ) );
//        zPanel.add( new Label( TaskView.getDescription() ) );
        return zPanel;
    }
}

Commits for litesoft/trunk/Java/DATT/src/org/litesoft/datt/client/ui/views/stories/TaskDialog.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

676 Diff Diff markcmarkc Mon 14 May, 2012 00:51:32 +0000
606 Diff Diff markcmarkc Mon 05 Mar, 2012 01:57:13 +0000

Latest

605 Diff Diff markcmarkc Mon 05 Mar, 2012 01:26:53 +0000

Latest

604 markcmarkc Sun 04 Mar, 2012 21:45:48 +0000

Latest