Package com.gwtext.client.widgets.grid

Examples of com.gwtext.client.widgets.grid.Renderer


        }, new ColumnConfig() {
            {
                setHeader( constants.Name() );
                setSortable( true );
                setDataIndex( "assetName" ); //NON-NLS
                setRenderer( new Renderer() {
                    public String render(Object value,
                                         CellMetadata cellMetadata,
                                         Record record,
                                         int rowIndex,
                                         int colNum,
View Full Code Here


                setHeader( constants.Type() );
                setSortable( true );
                setDataIndex( "type" );
                setWidth( 100 );
                setAlign( TextAlign.CENTER );
                setRenderer( new Renderer() {
                    public String render(Object value,
                                         CellMetadata cellMetadata,
                                         Record record,
                                         int rowIndex,
                                         int colNum,
View Full Code Here

        new ColumnConfig() {
          {
              setDataIndex("severity")//NON-NLS
            setHeader(constants.Severity());
            setSortable(true);
            setRenderer(new Renderer() {
              public String render(Object value,
                  CellMetadata cellMetadata, Record record,
                  int rowIndex, int colNum, Store store) {
                Integer i = (Integer) value;
                if (i.intValue() == 0) {
                  return "<img src='images/error.gif'/>";
                } else if (i.intValue() == 1) {
                  return "<img src='images/information.gif'/>";
                } else {
                  return "";
                }
              }
            });
            setWidth(50);
          }
        }, new ColumnConfig() {
          {
            setHeader(constants.Timestamp());
            setSortable(true);
            setDataIndex("timestamp");
            setWidth(180);
          }
        }, new ColumnConfig() {
          {
            setHeader(constants.Message());
            setSortable(true);
            setDataIndex("message"); //NON-NLS
            setWidth(580);

            setRenderer(new Renderer() {
              public String render(Object value,
                  CellMetadata cellMetadata, Record record,
                  int rowIndex, int colNum, Store store) {

                if (value != null) {
View Full Code Here

                        setupHeader();
                        setSortable( true );
                        setDataIndex( header );
                        if ( header.equals( "Name" ) ) { //name is special !
                            setWidth( 220 );
                            setRenderer( new Renderer() {
                                public String render(Object value,
                                                     CellMetadata cellMetadata,
                                                     Record record,
                                                     int rowIndex,
                                                     int colNum,
                                                     Store store) {
                                    String fmtIcon = "images/" + EditorLauncher.getAssetFormatIcon( record.getAsString( "format" ) );
                                    String desc = record.getAsString( "Description" );
                                    if ( desc == null ) {
                                        desc = "";
                                    }
                                    return Format.format( "<img src='{0}'/>&nbsp;<b>{1}</b><br/><small>{2}</small>",
                                                          new String[]{fmtIcon, (String) value, desc} );
                                }
                            } );
                        } else if ( headerType.equals( "class java.util.Calendar" ) ) {
                            setRenderer( new Renderer() {
                                public String render(Object value,
                                                     CellMetadata cellMetadata,
                                                     Record record,
                                                     int rowIndex,
                                                     int colNum,
View Full Code Here

            {
                setDataIndex( "num" ); //NON-NLS
                setWidth( 60 );
                setSortable( false );
                setHeader( "Row Number" );
                setRenderer( new Renderer() {
                    public String render(Object value,
                                         CellMetadata cellMetadata,
                                         Record record,
                                         int rowIndex,
                                         int colNum,
View Full Code Here

                        setupHeader();
                        setSortable( true );
                        setDataIndex( header );
                        if ( header.equals( "Name" ) ) { //name is special !
                            setWidth( 220 );
                            setRenderer( new Renderer() {
                                public String render(Object value,
                                                     CellMetadata cellMetadata,
                                                     Record record,
                                                     int rowIndex,
                                                     int colNum,
                                                     Store store) {
                                    String fmtIcon = "images/" + EditorLauncher.getAssetFormatIcon( record.getAsString( "format" ) );
                                    String desc = record.getAsString( "Description" );
                                    if ( desc == null ) {
                                        desc = "";
                                    }
                                    return Format.format( "<img src='{0}'/>&nbsp;<b>{1}</b><br/><small>{2}</small>",
                                                          new String[]{fmtIcon, (String) value, desc} );
                                }
                            } );
                        } else if ( headerType.equals( "class java.util.Calendar" ) ) {
                          setWidth( 120 );
                            setRenderer( new Renderer() {
                                public String render(Object value,
                                                     CellMetadata cellMetadata,
                                                     Record record,
                                                     int rowIndex,
                                                     int colNum,
View Full Code Here

        new ColumnConfig() {
          {
              setDataIndex("severity")//NON-NLS
            setHeader(constants.Severity());
            setSortable(true);
            setRenderer(new Renderer() {
              public String render(Object value,
                  CellMetadata cellMetadata, Record record,
                  int rowIndex, int colNum, Store store) {
                Integer i = (Integer) value;
                if (i.intValue() == 0) {
                  return "<img src='images/error.gif'/>";
                } else if (i.intValue() == 1) {
                  return "<img src='images/information.gif'/>";
                } else {
                  return "";
                }
              }
            });
            setWidth(50);
          }
        }, new ColumnConfig() {
          {
            setHeader(constants.Timestamp());
            setSortable(true);
            setDataIndex("timestamp");
            setWidth(180);
          }
        }, new ColumnConfig() {
          {
            setHeader(constants.Message());
            setSortable(true);
            setDataIndex("message"); //NON-NLS
            setWidth(580);

            setRenderer(new Renderer() {
              public String render(Object value,
                  CellMetadata cellMetadata, Record record,
                  int rowIndex, int colNum, Store store) {

                if (value != null) {
View Full Code Here

        }, new ColumnConfig() {
            {
                setHeader( constants.Name() );
                setSortable( true );
                setDataIndex( "assetName" ); //NON-NLS
                setRenderer( new Renderer() {
                    public String render(Object value,
                                         CellMetadata cellMetadata,
                                         Record record,
                                         int rowIndex,
                                         int colNum,
View Full Code Here

                setHeader( constants.Type() );
                setSortable( true );
                setDataIndex( "type" );
                setWidth( 100 );
                setAlign( TextAlign.CENTER );
                setRenderer( new Renderer() {
                    public String render(Object value,
                                         CellMetadata cellMetadata,
                                         Record record,
                                         int rowIndex,
                                         int colNum,
View Full Code Here

            {
                setDataIndex( "num" ); //NON-NLS
                setWidth( 60 );
                setSortable( false );
                setHeader( "Row Number" );
                setRenderer( new Renderer() {
                    public String render(Object value,
                                         CellMetadata cellMetadata,
                                         Record record,
                                         int rowIndex,
                                         int colNum,
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.grid.Renderer

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.