Package com.smartgwt.client.widgets.viewer

Examples of com.smartgwt.client.widgets.viewer.DetailViewerField


        tileGrid.setTileHeight(160);
        tileGrid.setCanReorderTiles(true);
        tileGrid.setShowAllRecords(true);
        tileGrid.setDataSource(yahooDS);

        DetailViewerField thumbnailField = new DetailViewerField("Thumbnail");
        thumbnailField.setType("image");
        DetailViewerField titleField = new DetailViewerField("Title");
        tileGrid.setFields(thumbnailField, titleField);

        final SearchForm form = new SearchForm();
        form.setTop(50);
        form.setNumCols(3);
View Full Code Here


        tileGrid.setTileHeight(150);
        tileGrid.setCanAcceptDrop(true);
        tileGrid.setCanDrag(true);
        tileGrid.setData(new TileRecord[]{});

        DetailViewerField pictureField = new DetailViewerField("picture");
        pictureField.setType("image");
        pictureField.setImageURLPrefix("animals/");
        DetailViewerField commonNameField = new DetailViewerField("commonName");

        tileGrid.setFields(pictureField, commonNameField);

        ListGrid listGrid = new ListGrid();
        listGrid.setWidth(300);
View Full Code Here

        final DetailViewer detailViewer = new DetailViewer();
        detailViewer.setWidth(500);
        detailViewer.setTop(250);
        detailViewer.setFields(
                new DetailViewerField("countryName", "Country"),
                new DetailViewerField("countryCode", "Code"),
                new DetailViewerField("government", "Government"));

        detailViewer.setEmptyMessage("Click a row in the grid");
        canvas.addChild(detailViewer);

        countryGrid.addRecordClickHandler(new RecordClickHandler() {
View Full Code Here

        tileGrid.setWidth100();
        tileGrid.setCanReorderTiles(true);
        tileGrid.setShowAllRecords(true);
        tileGrid.setData(CarData.getRecords());

        DetailViewerField pictureField = new DetailViewerField("picture");
        pictureField.setType("image");
        pictureField.setImageURLPrefix("cars/");
        pictureField.setImageWidth(186);
        pictureField.setImageHeight(120);

        DetailViewerField nameField = new DetailViewerField("name");
        DetailViewerField priceField = new DetailViewerField("price");

        tileGrid.setFields(pictureField, nameField, priceField);

        return tileGrid;
    }
View Full Code Here

        tileGrid.setShowAllRecords(true);

        tileGrid.setAutoFetchData(false);
        tileGrid.setAnimateTileChange(true);

        DetailViewerField nameField = new DetailViewerField("nodeTitle");
        nameField.setDetailFormatter(new DetailFormatter() {
            public String format(Object value, Record record, DetailViewerField field) {
                return value.toString();
            }
        });
        nameField.setCellStyle("thumbnailTitle");
       
        DetailViewerField iconField = new DetailViewerField("thumbnail");
        iconField.setType("image");
        iconField.setImageHeight(89);
        iconField.setImageWidth(119);
        iconField.setCellStyle("thumbnail");


        tileGrid.setFields(iconField, nameField);

View Full Code Here

        tileGrid.setTileDragAppearance(DragAppearance.OUTLINE);
        tileGrid.setDataSource(AnimalXmlDS.getInstance());

        tileGrid.setAnimateTileChange(true);

        DetailViewerField pictureField = new DetailViewerField("picture");
        DetailViewerField commonNameField = new DetailViewerField("commonName");
        commonNameField.setCellStyle("commonName");

        DetailViewerField lifeSpanField = new DetailViewerField("lifeSpan");
        lifeSpanField.setCellStyle("lifeSpan");
        lifeSpanField.setDetailFormatter(new DetailFormatter() {
            public String format(Object value, Record record, DetailViewerField field) {
                return "Lifespan: " + value;
            }
        });

        DetailViewerField statusField = new DetailViewerField("status");
        statusField.setCellStyleHandler(new CellStyleHandler() {
            public String execute(Object value, DetailViewerField field, Record record) {
                if ("Endangered".equals(value)) {
                    return "endangered";
                } else if ("Threatened".equals(value)) {
                    return "threatened";
View Full Code Here

        tileGrid.setShowAllRecords(true);
        tileGrid.setDataSource(AnimalXmlDS.getInstance());
        tileGrid.setAutoFetchData(true);
        tileGrid.setAnimateTileChange(true);

        DetailViewerField pictureField = new DetailViewerField("picture");
        DetailViewerField commonNameField = new DetailViewerField("commonName");
        commonNameField.setCellStyle("commonName");

        DetailViewerField lifeSpanField = new DetailViewerField("lifeSpan");
        lifeSpanField.setCellStyle("lifeSpan");
        lifeSpanField.setDetailFormatter(new DetailFormatter() {
            public String format(Object value, Record record, DetailViewerField field) {
                return "Lifespan: " + value;
            }
        });

        DetailViewerField statusField = new DetailViewerField("status");
        statusField.setCellStyleHandler(new CellStyleHandler() {
            public String execute(Object value, DetailViewerField field, Record record) {
                if("Endangered".equals(value)) {
                    return "endangered";
                } else if ("Threatened".equals(value)) {
                    return "threatened";
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.viewer.DetailViewerField

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.