Package com.inmethod.grid

Examples of com.inmethod.grid.IRenderable


    for (IGridColumn column : columns) {
      hide = renderOpenTag(column, i, columns.size(), response, hide);
     
      if (column.isLightWeight(getDefaultModel())) {
        // for lightweight columns get the renderable instance and render it
        IRenderable renderable = column.newCell(getDefaultModel());
        if (renderable == null) {
          throw new IllegalStateException(
              "Lightweight columns must return valid IRenderable instance in newCell(IModel model)");
        }
        response.write("<div class=\"");
        response.write(getInnerDivClass(column));
        response.write("\">");
        renderable.render(getDefaultModel(), response);
        response.write("</div>");
      } else {
        // for non-lightweight components get the actual component and render it
        Component component = get(column.getId());
        if (component == null) {
View Full Code Here


     * {@inheritDoc}
     */
    @Override
    public IRenderable newCell(IModel rowModel)
    {
        return new IRenderable()
        {
            public void render(IModel rowModel, Response response)
            {
                CharSequence value = getValue(rowModel);
                if (value != null)
View Full Code Here

            super("mimeType", headerModel, FolderDataSource.PROPERTY_MIME_TYPE);
        }

        @Override
        public IRenderable newCell(IModel rowModel) {
            return new IRenderable() {
                public void render(IModel rowModel, Response response) {
                    BrixNode node = (BrixNode) rowModel.getObject();
                    if (node instanceof BrixFileNode) {
                        String mime = ((BrixFileNode) node).getMimeType();
                        if (mime != null) {
View Full Code Here

            super("size", headerModel, FolderDataSource.PROPERTY_SIZE);
        }

        @Override
        public IRenderable newCell(IModel rowModel) {
            return new IRenderable() {
                public void render(IModel rowModel, Response response) {
                    BrixNode node = (BrixNode) rowModel.getObject();
                    if (node instanceof BrixFileNode) {
                        Long size = ((BrixFileNode) node).getContentLength();
View Full Code Here

TOP

Related Classes of com.inmethod.grid.IRenderable

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.