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

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


        } else {
            this.readOnly = readOnly;
        }

        layout.setWidget(0, 0, createTextBox());
        FlexCellFormatter formatter = layout.getFlexCellFormatter();
        formatter.setAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_BOTTOM);

        if (this.readOnly) {
            this.layout.addStyleName("editor-disabled-widget");
        }
View Full Code Here


                                  add( headerPanel );
                                  setStyleName( "fact-model-fact-edit-selections" );
                                  setWidth( "100%" );
                              }
                          } );
            FlexCellFormatter formatter = tb.getFlexCellFormatter();
            formatter.setColSpan( 0,
                                  0,
                                  2 );
            formatter.setStyleName( 0,
                                    0,
                                    factHeaderStyle );
            formatter.setHorizontalAlignment( 0,
                                              0,
                                              HasHorizontalAlignment.ALIGN_LEFT );

            for ( int j = 0; j < mm.fields.size(); j++ ) {
                final FieldMetaModel fm = (FieldMetaModel) mm.fields.get( j );
                String ms = Format.format( constants.FieldName(),
                                           fm.name );
                tb.setWidget( j + 1,
                              0,
                              new HTML( ms ) );
                formatter.setHorizontalAlignment( j + 1,
                                                  0,
                                                  HasHorizontalAlignment.ALIGN_RIGHT );

                HorizontalPanel type = new HorizontalPanel();
                type.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
                type.add( new SmallLabel( getDesc( fm ) ) );
                ImageButton del = new ImageButton( "images/delete_item_small.gif" ); //NON-NLS
                del.addClickListener( new ClickListener() {
                    public void onClick(Widget w) {
                        if ( Window.confirm( Format.format( constants.AreYouSureYouWantToRemoveTheField0(),
                                                            fm.name ) ) ) {
                            mm.fields.remove( fm );
                            editingFact = m.models.indexOf( mm );
                            renderEditor();
                        }
                    }
                } );

                ImageButton edit = new ImageButton( "images/edit.gif" ); //NON-NLS
                edit.addClickListener( new ClickListener() {
                    public void onClick(Widget arg0) {
                        showFieldEditor( m,
                                         mm,
                                         fm );
                    }
                } );

                type.add( edit );
                type.add( del );

                tb.setWidget( j + 1,
                              1,
                              type );
                formatter.setHorizontalAlignment( j + 1,
                                                  1,
                                                  HasHorizontalAlignment.ALIGN_LEFT );
            }

        }
View Full Code Here

        } ;
        layout = new FlexTable();
        ClickableLabel vh = new ClickableLabel(constants.VersionHistory1(), cl );
        layout.setWidget( 0, 0, vh );
        layout.getCellFormatter().setStyleName( 0, 0, "metadata-Widget" ); //NON-NLS
        FlexCellFormatter formatter = layout.getFlexCellFormatter();
        formatter.setHorizontalAlignment( 0,
                                          0,
                                          HasHorizontalAlignment.ALIGN_LEFT );

        refresh = new ImageButton( "images/refresh.gif" )//NON-NLS


        refresh.addClickListener( cl );

        layout.setWidget( 0,
                          1,
                          refresh );
        formatter.setHorizontalAlignment( 0,
                                          1,
                                          HasHorizontalAlignment.ALIGN_RIGHT );

        wrapper.setStyleName( "version-browser-Border" );
View Full Code Here

                                      history.addItem(s, row.id);
                                    }


                                                                        layout.setWidget( 1, 0, history );
                                                                        FlexCellFormatter formatter = layout.getFlexCellFormatter();

                                                                        formatter.setColSpan( 1,0,2 );

                                                                        Button open = new Button(constants.View());

                                                                        open.addClickListener( new ClickListener() {
                                                                            public void onClick(Widget w) {
                                                                              showVersion(history.getValue(history.getSelectedIndex()));
                                                                            }

                                                                        } );

                                                                        layout.setWidget( 2, 0, open );
                                                                        formatter.setColSpan( 2, 1, 3 );
                                                                        formatter.setHorizontalAlignment( 2,1,HasHorizontalAlignment.ALIGN_CENTER );

                                                                        showStaticIcon();

                                                                    }
View Full Code Here

        } ;
        layout = new FlexTable();
        ClickableLabel vh = new ClickableLabel(constants.VersionHistory1(), cl );
        layout.setWidget( 0, 0, vh );
        layout.getCellFormatter().setStyleName( 0, 0, "metadata-Widget" ); //NON-NLS
        FlexCellFormatter formatter = layout.getFlexCellFormatter();
        formatter.setHorizontalAlignment( 0,
                                          0,
                                          HasHorizontalAlignment.ALIGN_LEFT );

        refresh = new ImageButton( "images/refresh.gif" )//NON-NLS


        refresh.addClickListener( cl );

        layout.setWidget( 0,
                          1,
                          refresh );
        formatter.setHorizontalAlignment( 0,
                                          1,
                                          HasHorizontalAlignment.ALIGN_RIGHT );

        wrapper.setStyleName( "version-browser-Border" );
View Full Code Here

                                      history.addItem(s, row.id);
                                    }


                                                                        layout.setWidget( 1, 0, history );
                                                                        FlexCellFormatter formatter = layout.getFlexCellFormatter();

                                                                        formatter.setColSpan( 1,0,2 );

                                                                        Button open = new Button(constants.View());

                                                                        open.addClickListener( new ClickListener() {
                                                                            public void onClick(Widget w) {
                                                                              showVersion(history.getValue(history.getSelectedIndex()));
                                                                            }

                                                                        } );

                                                                        layout.setWidget( 2, 0, open );
                                                                        formatter.setColSpan( 2, 1, 3 );
                                                                        formatter.setHorizontalAlignment( 2,1,HasHorizontalAlignment.ALIGN_CENTER );

                                                                        showStaticIcon();

                                                                    }
View Full Code Here

                                  add( headerPanel );
                                  setStyleName( "fact-model-fact-edit-selections" );
                                  setWidth( "100%" );
                              }
                          } );
            FlexCellFormatter formatter = tb.getFlexCellFormatter();
            formatter.setColSpan( 0,
                                  0,
                                  2 );
            formatter.setStyleName( 0,
                                    0,
                                    factHeaderStyle );
            formatter.setHorizontalAlignment( 0,
                                              0,
                                              HasHorizontalAlignment.ALIGN_LEFT );

            for ( int j = 0; j < mm.fields.size(); j++ ) {
                final FieldMetaModel fm = (FieldMetaModel) mm.fields.get( j );
                String ms = Format.format( constants.FieldName(),
                                           fm.name );
                tb.setWidget( j + 1,
                              0,
                              new HTML( ms ) );
                formatter.setHorizontalAlignment( j + 1,
                                                  0,
                                                  HasHorizontalAlignment.ALIGN_RIGHT );

                HorizontalPanel type = new HorizontalPanel();
                type.setVerticalAlignment( HasVerticalAlignment.ALIGN_MIDDLE );
                type.add( new SmallLabel( getDesc( fm ) ) );
                ImageButton del = new ImageButton( "images/delete_item_small.gif" ); //NON-NLS
                del.addClickListener( new ClickListener() {
                    public void onClick(Widget w) {
                        if ( Window.confirm( Format.format( constants.AreYouSureYouWantToRemoveTheField0(),
                                                            fm.name ) ) ) {
                            mm.fields.remove( fm );
                            editingFact = m.models.indexOf( mm );
                            renderEditor();
                        }
                    }
                } );

                ImageButton edit = new ImageButton( "images/edit.gif" ); //NON-NLS
                edit.addClickListener( new ClickListener() {
                    public void onClick(Widget arg0) {
                        showFieldEditor( m,
                                         mm,
                                         fm );
                    }
                } );

                type.add( edit );
                type.add( del );

                tb.setWidget( j + 1,
                              1,
                              type );
                formatter.setHorizontalAlignment( j + 1,
                                                  1,
                                                  HasHorizontalAlignment.ALIGN_LEFT );
            }

        }
View Full Code Here

        }else{
            this.readOnly = readOnly;
        }

        layout.setWidget(0, 0, getPatternLabel());
        FlexCellFormatter formatter = layout.getFlexCellFormatter();
        formatter.setAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_BOTTOM);
        formatter.setStyleName(0, 0, "modeller-fact-TypeHeader");

        List<FieldConstraint> sortedConst = sortConstraints(pattern.getFieldConstraints());
        pattern.setFieldConstraints(sortedConst);
        drawConstraints(sortedConst);
View Full Code Here

        } else {
            this.readOnly = readOnly;
        }

        layout.setWidget(0, 0, createTextBox());
        FlexCellFormatter formatter = layout.getFlexCellFormatter();
        formatter.setAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_BOTTOM);

        if (this.readOnly) {
            this.layout.addStyleName("editor-disabled-widget");
        }
View Full Code Here

                          0,
                          createTextBox() );
        layout.setWidget( 0,
                          1,
                          createEditIcon() );
        FlexCellFormatter formatter = layout.getFlexCellFormatter();
        formatter.setAlignment( 0,
                                0,
                                HasHorizontalAlignment.ALIGN_LEFT,
                                HasVerticalAlignment.ALIGN_BOTTOM );
        //Let the TextArea expand the first cell to fit
        formatter.setWidth( 0,
                            0,
                            "1px" );

        formatter.setAlignment( 0,
                                1,
                                HasHorizontalAlignment.ALIGN_LEFT,
                                HasVerticalAlignment.ALIGN_TOP );

        if ( this.readOnly ) {
View Full Code Here

TOP

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

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.