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
package org.litesoft.sampleapplication.sampleApplication.client;

import com.google.gwt.core.client.*;
import com.google.gwt.event.dom.client.*;
import com.google.gwt.user.client.ui.*;
import com.temp.foundation.widgets.*;
import com.temp.foundation.widgets.support.*;

public class SampleApplication implements EntryPoint {
    public void onModuleLoad() {
        Button button = new Button("Click me");
        Label fieldLabel = new Label("Name:");
        Label errorLabel = new Label("Error");
        HTML stateLabel = new HTML(" ");
        ActiveTextBox field = new ActiveTextBox();

        final InputWidgetChangeFilter<String> input = new InputWidgetChangeFilter<String>(new TextBoxBaseValueAdapter(field));
        input.addChangeHandler(new ChangeHandler() {
            @Override
            public void onChange(ChangeEvent event) {
                String value = input.getValue();
                System.out.println("Change: " + input.isChanged() + " '" + value + "'");
                if ("OK".equals(value)) {
                    input.setValue(value);
                }
            }
        });

        button.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                input.setValue(input.getValue() + "!");
                System.out.println("Clicked!");
            }
        });

        VerticalPanel zVPanel = new VerticalPanel();
        zVPanel.add(field);
        zVPanel.add(errorLabel);

        HorizontalPanel zHPanel = new HorizontalPanel();
        zHPanel.add(fieldLabel);
        zHPanel.add(new HTML("&nbsp;&nbsp;"));
        zHPanel.add(zVPanel);
        zHPanel.add(new HTML("&nbsp;"));
        zHPanel.add(stateLabel);

        zVPanel = new VerticalPanel();
        zVPanel.add(new HTML("&nbsp;"));
        zVPanel.add(zHPanel);
        zVPanel.add(new HTML("&nbsp;"));
        zVPanel.add(button);

        RootPanel zRootPanel = RootPanel.get("centeredWidget");
        zRootPanel.add(zVPanel);
    }
}

Commits for litesoft/trunk/GWT_Sandbox/FormEngine/src/org/litesoft/sampleapplication/sampleApplication/client/SampleApplication.java

Diff revisions: vs.
Revision Author Commited Message
592 Diff Diff GeorgeS picture GeorgeS Fri 20 Jan, 2012 20:23:50 +0000
590 Diff Diff GeorgeS picture GeorgeS Thu 19 Jan, 2012 23:33:20 +0000

New FormEngine

589 GeorgeS picture GeorgeS Wed 18 Jan, 2012 19:16:02 +0000

Unchecked & FE