Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.FlexTable


  String password;
 
  public LoginPanel() {
    VerticalPanel loginPanel = new VerticalPanel();
    FormPanel frmLogin = new FormPanel();
    FlexTable login = new FlexTable();
    Label lblUsername = new Label("Username");
    Label lblPassword = new Label("Password");
    TextBox txtUsername = new TextBox();
    PasswordTextBox txtPassword = new PasswordTextBox();
    Button btnLogin = new Button("Login");
    HTML loginTitle = new HTML();
   
    txtUsername.setWidth("160px");
    txtPassword.setWidth("160px");
   
    loginTitle.setHTML("<h3>Login</h3>");
    loginTitle.setStyleName("loginPanelTitle");
   
    login.setWidget(0,0,lblUsername);
    login.setWidget(0,1,txtUsername);
    login.setWidget(1,0,lblPassword);
    login.setWidget(1,1,txtPassword);
    login.setWidget(2,0,btnLogin);
   
    frmLogin.add(login);
    LoginHandler loginHandler = new LoginHandler();
    btnLogin.addClickHandler(loginHandler);
    btnLogin.addKeyUpHandler(loginHandler);
View Full Code Here


    private void showErrors(List<BuilderResultLine> rs) {
        results.clear();
        results.setVisible(true);

        FlexTable errTable = new FlexTable();
        errTable.setStyleName("build-Results");
        for (int i = 0; i < rs.size(); i++) {
            int row = i;
            final BuilderResultLine res = rs.get(i);
            errTable.setWidget(row,
                    0,
                    new Image(ImageResources.INSTANCE.error()));
            if (res.getAssetFormat().equals("package")) {
                errTable.setText(row,
                        1,
                        TestScenarioConstants.INSTANCE.packageConfigurationProblem1() + res.getMessage());
            } else {
                errTable.setText(row,
                        1,
                        "[" + res.getAssetName() + "] " + res.getMessage());
            }

        }
View Full Code Here

//    }

    private Widget doAuditView(List<String[]> auditLog) {
        VerticalPanel vp = new VerticalPanel();
        vp.add(new HTML("<hr/>"));
        FlexTable g = new FlexTable();
        int row = 0;
        boolean firing = false;
        for (int i = 0; i < auditLog.size(); i++) {
            String[] lg = auditLog.get(i);

            int id = Integer.parseInt(lg[0]);
            if (id <= 7) {
                if (id <= 3) {
                    if (!firing) {
                        g.setWidget(row,
                                0,
                                getEventImage(lg[0]));
                        g.setWidget(row,
                                1,
                                new SmallLabel(lg[1]));
                    } else {
                        g.setWidget(row,
                                1,
                                hz(getEventImage(lg[0]),
                                        new SmallLabel(lg[1])));
                    }
                    row++;
                } else if (id == 6) {
                    firing = true;
                    g.setWidget(row,
                            0,
                            getEventImage(lg[0]));
                    g.setWidget(row,
                            1,
                            new SmallLabel("<b>" + lg[1] + "</b>"));
                    row++;
                } else if (id == 7) {
                    firing = false;
                } else {
                    g.setWidget(row,
                            0,
                            getEventImage(lg[0]));
                    g.setWidget(row,
                            1,
                            new SmallLabel("<font color='grey'>" + lg[1] + "</font>"));
                    row++;
                }
            } else {
                g.setWidget(row,
                        0,
                        new Image(AuditEventsImages.INSTANCE.miscEvent()));
                g.setWidget(row,
                        1,
                        new SmallLabel("<font color='grey'>" + lg[1] + "</font>"));
                row++;
            }
        }
View Full Code Here

public class CreateUserPanel extends Composite {
 
  public CreateUserPanel() {
    VerticalPanel loginPanel = new VerticalPanel();
    FormPanel frmCreateUser = new FormPanel();
    FlexTable createUser = new FlexTable();
    Label lblUsername = new Label("Username");
    Label lblPassword = new Label("Password");
    TextBox txtUsername = new TextBox();
    PasswordTextBox txtPassword = new PasswordTextBox();
    Button btnCreateUser = new Button("Create User");
    HTML createUserTitle = new HTML();
   
    txtUsername.setWidth("160px");
    txtPassword.setWidth("160px");
   
    createUserTitle.setHTML("<h3>Login</h3>");
    createUserTitle.setStyleName("loginPanelTitle");
   
    createUser.setWidget(0,0,lblUsername);
    createUser.setWidget(0,1,txtUsername);
    createUser.setWidget(1,0,lblPassword);
    createUser.setWidget(1,1,txtPassword);
    createUser.setWidget(2,0,btnCreateUser);
   
    frmCreateUser.add(createUser);
    CreateUserHandler createUserHandler = new CreateUserHandler();
    btnCreateUser.addClickHandler(createUserHandler);
    btnCreateUser.addKeyUpHandler(createUserHandler);
View Full Code Here

      super.onRender(target, index);

      setElement(DOM.createDiv(), target, index);
      setStyleName("x-grid3-footer-row");

      table = new FlexTable();
      table.setStyleName("x-grid3-row-table");
      table.setCellPadding(0);
      table.setCellSpacing(0);

      int cols = cm.getColumnCount();
View Full Code Here

    private final ScenarioParentWidget parent;

    public ActivateRuleFlowWidget(FixtureList retList,
                                  Scenario sc,
                                  ScenarioParentWidget parent) {
        FlexTable outer = new FlexTable();
        render(retList,
                outer,
                sc);

        this.parent = parent;
View Full Code Here

        outer.setWidget( 0,
                0,
                new SmallLabel( TestScenarioConstants.INSTANCE.ExpectRules() ) );
        initWidget( outer );

        FlexTable data = render( rfl,
                scenario );
        outer.setWidget( 1,
                0,
                data );
    }
View Full Code Here

                data );
    }

    private FlexTable render(final FixtureList rfl,
                             final Scenario sc) {
        FlexTable data = new DirtyableFlexTable();

        for ( int i = 0; i < rfl.size(); i++ ) {
            final VerifyRuleFired v = (VerifyRuleFired) rfl.get( i );

            if ( showResults && v.getSuccessResult() != null ) {
                if ( !v.getSuccessResult().booleanValue() ) {
                    data.setWidget( i,
                            0,
                            new Image( CommonImages.INSTANCE.warning() ) );
                    data.setWidget( i,
                            4,
                            new HTML( TestScenarioConstants.INSTANCE.ActualResult(v.getActualResult().toString()) ) );

                    data.getCellFormatter().addStyleName( i,
                            4,
                            "testErrorValue" ); //NON-NLS

                } else {
                    data.setWidget( i,
                            0,
                            new Image( TestScenarioImages.INSTANCE.testPassed() ) );
                }

            }
            data.setWidget( i,
                    1,
                    new SmallLabel( v.getRuleName() + ":" ) );
            data.getFlexCellFormatter().setAlignment( i,
                    1,
                    HasHorizontalAlignment.ALIGN_RIGHT,
                    HasVerticalAlignment.ALIGN_MIDDLE );

            final ListBox b = new ListBox();
            b.addItem( TestScenarioConstants.INSTANCE.firedAtLeastOnce(),
                    "y" );
            b.addItem( TestScenarioConstants.INSTANCE.didNotFire(),
                    "n" );
            b.addItem( TestScenarioConstants.INSTANCE.firedThisManyTimes(),
                    "e" );
            final TextBox num = new TextBox();
            num.setVisibleLength( 5 );

            if ( v.getExpectedFire() != null ) {
                b.setSelectedIndex( (v.getExpectedFire().booleanValue()) ? 0 : 1 );
                num.setVisible( false );
            } else {
                b.setSelectedIndex( 2 );
                String xc = (v.getExpectedCount() != null) ? "" + v.getExpectedCount().intValue() : "0";
                num.setText( xc );
            }

            b.addChangeHandler( new ChangeHandler() {
                public void onChange(ChangeEvent event) {
                    String s = b.getValue( b.getSelectedIndex() );
                    if ( s.equals( "y" ) || s.equals( "n" ) ) {
                        num.setVisible( false );
                        v.setExpectedFire( (s.equals( "y" )) ? Boolean.TRUE : Boolean.FALSE );
                        v.setExpectedCount( null );
                    } else {
                        num.setVisible( true );
                        v.setExpectedFire( null );
                        num.setText( "1" );
                        v.setExpectedCount( new Integer( 1 ) );
                    }
                }
            } );

            b.addItem( TestScenarioConstants.INSTANCE.ChooseDotDotDot() );

            num.addChangeHandler( new ChangeHandler() {
                public void onChange(ChangeEvent event) {
                    v.setExpectedCount( new Integer( num.getText() ) );
                }
            } );

            HorizontalPanel h = new HorizontalPanel();
            h.add( b );
            h.add( num );
            data.setWidget( i,
                    2,
                    h );

            Image del = CommonAltedImages.INSTANCE.DeleteItemSmall();
            del.setAltText(TestScenarioConstants.INSTANCE.RemoveThisRuleExpectation());
            del.setTitle(TestScenarioConstants.INSTANCE.RemoveThisRuleExpectation());
            del.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent w) {
                    if ( Window.confirm( TestScenarioConstants.INSTANCE.AreYouSureYouWantToRemoveThisRuleExpectation() ) ) {
                        rfl.remove( v );
                        sc.removeFixture( v );
                        outer.setWidget( 1,
                                0,
                                render( rfl,
                                        sc ) );
                    }
                }
            });

            data.setWidget( i,
                    3,
                    del );

            //we only want numbers here...
            num.addKeyPressHandler( new KeyPressHandler() {
View Full Code Here

    private void showErrors( List<BuilderResultLine> rs ) {
        results.clear();
        results.setVisible( true );

        FlexTable errTable = new FlexTable();
        errTable.setStyleName( "build-Results" );
        for ( int i = 0; i < rs.size(); i++ ) {
            int row = i;
            final BuilderResultLine res = rs.get( i );
            errTable.setWidget( row,
                                0,
                                new Image( ImageResources.INSTANCE.error() ) );
            if ( res.getAssetFormat().equals( "package" ) ) {
                errTable.setText( row,
                                  1,
                                  TestScenarioConstants.INSTANCE.packageConfigurationProblem1() + res.getMessage() );
            } else {
                errTable.setText( row,
                                  1,
                                  "[" + res.getAssetName() + "] " + res.getMessage() );
            }

        }
View Full Code Here

//    }

    private Widget doAuditView( List<String[]> auditLog ) {
        VerticalPanel vp = new VerticalPanel();
        vp.add( new HTML( "<hr/>" ) );
        FlexTable g = new FlexTable();
        int row = 0;
        boolean firing = false;
        for ( int i = 0; i < auditLog.size(); i++ ) {
            String[] lg = auditLog.get( i );

            int id = Integer.parseInt( lg[ 0 ] );
            if ( id <= 7 ) {
                if ( id <= 3 ) {
                    if ( !firing ) {
                        g.setWidget( row,
                                     0,
                                     getEventImage( lg[ 0 ] ) );
                        g.setWidget( row,
                                     1,
                                     new SmallLabel( lg[ 1 ] ) );
                    } else {
                        g.setWidget( row,
                                     1,
                                     hz( getEventImage( lg[ 0 ] ),
                                         new SmallLabel( lg[ 1 ] ) ) );
                    }
                    row++;
                } else if ( id == 6 ) {
                    firing = true;
                    g.setWidget( row,
                                 0,
                                 getEventImage( lg[ 0 ] ) );
                    g.setWidget( row,
                                 1,
                                 new SmallLabel( "<b>" + lg[ 1 ] + "</b>" ) );
                    row++;
                } else if ( id == 7 ) {
                    firing = false;
                } else {
                    g.setWidget( row,
                                 0,
                                 getEventImage( lg[ 0 ] ) );
                    g.setWidget( row,
                                 1,
                                 new SmallLabel( "<font color='grey'>" + lg[ 1 ] + "</font>" ) );
                    row++;
                }
            } else {
                g.setWidget( row,
                             0,
                             new Image( AuditEventsImages.INSTANCE.miscEvent() ) );
                g.setWidget( row,
                             1,
                             new SmallLabel( "<font color='grey'>" + lg[ 1 ] + "</font>" ) );
                row++;
            }
        }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.FlexTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.