• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ColumnData类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.extjs.gxt.ui.client.widget.grid.ColumnData的典型用法代码示例。如果您正苦于以下问题:Java ColumnData类的具体用法?Java ColumnData怎么用?Java ColumnData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ColumnData类属于com.extjs.gxt.ui.client.widget.grid包,在下文中一共展示了ColumnData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setRenderer

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
@Override
public void setRenderer(GridCellRenderer renderer) {
	this.specificRender = renderer;
	super.setRenderer(new GridCellRenderer<ModelData>() {

		public String render(ModelData model, String property,
				ColumnData config, int rowIndex, int colIndex,
				ListStore<ModelData> store) {
			String text = specificRender.render(model, property, config, rowIndex, colIndex, store);
			
			config.css = "x-grid3-popup-col-td";
			if (permissions.getCurrentState().equals(CMDBPermissions.PermissionState.READONLY)) {
				
				return "<div class='x-grid3-popup-col x-grid3-popup-" + getId() + "'>" +
				text +
				"</div>";
			} else {
				return(text);
			}
		}
		
	});
	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:25,代码来源:PopupTextColumnConfig.java


示例2: init

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
protected void init() {
  setRenderer(new GridCellRenderer() {
    public String render(ModelData model, String property, ColumnData config, int rowIndex,
  		  int colIndex, ListStore store) {

  	  
  	  boolean v = getValue(model, property);
  	 
  	  String on = v ? "-on" : "";
  	  
  	  config.css = "x-grid3-check-col-td";
  	  if (readonly || !isModelEditable(model, property)) {
  	  		return "<div class='x-grid3-check-ro-col" + on + " x-grid3-cc-" +getId() + "'>&#160;</div>";
  	  } 
  	  		return "<div class='x-grid3-check-col" + on + " x-grid3-cc-" +getId() + "'>&#160;</div>";
  	  	
  	  }
  });
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:20,代码来源:MyCheckColumnConfig.java


示例3: init

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
protected void init() {
    setRenderer(new GridCellRenderer() {
      

	public String render(ModelData model, String property, ColumnData config, int rowIndex,
          int colIndex, ListStore store) {
    	  
    	String value = getStringValue(model, property);
	    
        config.css = "x-grid3-url-col-td";
        if (readonly) {
        	return "<div class='x-grid3-url-col x-grid3-url-" + getId() + "'>" +
        		"<a href='javascript:void()'>" + value + "</a>" +
        		"</div>";
        } else {
        	return(value);
        }
      }
    });
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:21,代码来源:URLColumnConfig.java


示例4: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
public Object render(final RuleModel model, String property,
                ColumnData config, int rowIndex, int colIndex,
                ListStore<RuleModel> store, Grid<RuleModel> grid) {

            if (!init) {
                init = true;
                grid.addListener(Events.ColumnResize, new ResizeListener(20));
            }

            LabelField field = new LabelField();
            field.setId(fieldId);
            field.setName(fieldId);
            field.setEmptyText("*");
            field.setFieldLabel(BeanKeyValue.NAME.getValue());
            field.setValue(BeanKeyValue.NAME.getValue());
            field.setReadOnly(true);

//            field.setWidth(initialWidth - 10);
            field.setAutoWidth(true);
            field.show();

            setFieldValue(model, field);
            
            return field;
        }
 
开发者ID:geoserver,项目名称:geofence,代码行数:26,代码来源:RuleGridWidget.java


示例5: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Object render(final ProjectFundingDTO model, final String property, final ColumnData config, final int rowIndex, final int colIndex,
		final ListStore<ProjectFundingDTO> store, final Grid<ProjectFundingDTO> grid) {

	// Creates the button with its icon.
	final PushButton editButton = new PushButton(IconImageBundle.ICONS.editLinkedProject().createImage());
	editButton.setStylePrimaryName(STYLE_EDIT_BUTTON);

	// Sets the button click handler.
	editButton.addClickHandler(new ClickHandler() {

		@Override
		public void onClick(final ClickEvent event) {
			view.getPresenterHandler().onLinkedProjectEditClickEvent(model, projectType);
		}
	});

	// Returns this button.
	return editButton;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:24,代码来源:LinkedProjectsEditButtonCellRender.java


示例6: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
@Override
public Object render(PivotGridPanel.PivotTableRow model, String property,
		ColumnData config, int rowIndex, int colIndex,
		ListStore<PivotGridPanel.PivotTableRow> store, Grid<PivotGridPanel.PivotTableRow> grid) {
	
	
	Double value = model.get(property);
	if(value == null) {
		return "";
	} else {
		String formattedValue = formatValue(model.getRowAxis(), value);
		if(model.getRowAxis().isTotal()) {
			return "<span class='" + PivotResources.INSTANCE.css().totalCell() + "'>" +
					formattedValue + "</span>";
		} else {
			return formattedValue;
		}
	}
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:20,代码来源:PivotCellRenderer.java


示例7: generatePossibleDuplicatesGrid

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
private Grid<ContactDTO> generatePossibleDuplicatesGrid() {
  ColumnConfig nameColumn = new ColumnConfig(ContactDTO.FULLNAME, I18N.CONSTANTS.fullName(), 250);
  ColumnConfig emailColumn = new ColumnConfig(ContactDTO.EMAIL, I18N.CONSTANTS.email(), 250);
  ColumnConfig actionsColumn = new ColumnConfig();
  actionsColumn.setWidth(100);
  actionsColumn.setRenderer(new GridCellRenderer<ContactDTO>() {
    @Override
    public Object render(final ContactDTO contact, String property, ColumnData config, int rowIndex, int colIndex, ListStore store, Grid grid) {
      Button button = Forms.button(I18N.CONSTANTS.dedupeContactUpdateButton());
      button.addSelectionListener(new SelectionListener<ButtonEvent>() {
        @Override
        public void componentSelected(ButtonEvent ce) {
          cardLayout.setActiveItem(secondStepContainer);
          secondStepHandler.initialize(contact.getId(), duplicatedPropertiesGrid.getStore());
          selectedContact = contact;
        }
      });

      return button;
    }
  });

  ColumnModel columnModel = new ColumnModel(Arrays.asList(nameColumn, emailColumn, actionsColumn));
  return new Grid<ContactDTO>(new ListStore<ContactDTO>(), columnModel);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:DedupeContactDialog.java


示例8: getGridCellRenderer

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
private GridCellRenderer<ModelData> getGridCellRenderer(){
	
	GridCellRenderer<ModelData> r = new GridCellRenderer<ModelData>(){
		@Override	public Object render(ModelData model, String property,ColumnData config, int rowIndex, int colIndex,
				ListStore<ModelData> store, Grid<ModelData> grid) {
			if(model.get(property).toString().equals("true")){
				config.style = "background-image: url("+ GWT.getHostPageBaseURL().toString() + "resources/icons/add.gif) !important; background-repeat: no-repeat;";
			}else{
				config.style = "background-color: white;";
			}
			return "";
		}
	};
	
	return r;
	
	
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:19,代码来源:PermissionFormGrid.java


示例9: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
@Override
public Object render(ModelData model, String property,
		ColumnData config, int rowIndex, int colIndex,
		ListStore store, Grid grid) {
	
	
	/*
	if(Integer.parseInt(property) <= holidays.size()){
		if(holidays.get(Integer.parseInt(property))){
			config.css = "x-treegrid-column-holiday"; 
		}
	}
	*/
	config.css = "x-treegrid-column-holiday"; 

	if(model.get(property) == null){
		return	"<span style='color: green'></span>";
	} else{
		return	"<span style='color: green'>" + model.get(property) + "</span>";
	}
}
 
开发者ID:treblereel,项目名称:Opensheet,代码行数:22,代码来源:HourGridCellRenderer.java


示例10: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
public String render(BeanObject model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BeanObject> store) {
	
	String booleanValue = (String) model.get(property).toString();

	StringBuffer sb = new StringBuffer();
	ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
	
	if(booleanValue.equals("true")){
		act.setText(isTruthStr);
	}else if(booleanValue.equals("false")){
		act.setText(isFailureStr);
	}
	
	if (act.getText() != null && act.getText().trim().length() > 0) {
		sb.append(act.getText());
	}

       return sb.toString();
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:20,代码来源:EmailSubscribeManager.java


示例11: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
public String render(BeanObject model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BeanObject> store) {
	
	String booleanValue = (String) model.get(property).toString();

	StringBuffer sb = new StringBuffer();
	ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
	
	if(booleanValue.equals("1")){
		act.setText(isTruthStr);
	}else if(booleanValue.equals("0")){
		act.setText(isFailureStr);
	}
	
	if (act.getText() != null && act.getText().trim().length() > 0) {
		sb.append(act.getText());
	}
       return sb.toString();
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:19,代码来源:EmailQueueManager.java


示例12: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
public String render(BeanObject model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<BeanObject> store) {
	
	String booleanValue = (String) model.get(property).toString();

	StringBuffer sb = new StringBuffer();
	ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
	
	if(booleanValue.equals("1")){
		act.setText(isTruthStr);
	}else if(booleanValue.equals("0")){
		act.setText(isFailureStr);
	}else if(booleanValue.equals("true")) {
		act.setText(isTruthStr);
	}else if(booleanValue.equals("false")) {
		act.setText(isFailureStr);
	}
	
	if (act.getText() != null && act.getText().trim().length() > 0) {
		sb.append(act.getText());
	}
       return sb.toString();
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:23,代码来源:MemberApplication.java


示例13: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
public Object render(BeanObject model, String property, ColumnData config,
        final int rowIndex, final int colIndex, ListStore<BeanObject> store,
        Grid<BeanObject> grid) {   
    int type = (Integer)model.get(IBonusType.SEND_TYPE);
    if (type == IBonusType.SEND_BY_USER) {
        return "按用户发放";
    } else if (type == IBonusType.SEND_BY_GOODS) {
        return "按商品发放";
    } else if (type == IBonusType.SEND_BY_ORDER) {
        return "按订单金额发放";
    } else if (type == IBonusType.SEND_BY_PRINT) {
        return "线下发放的红包";
    }
    
    throw new RuntimeException("Unknown send type: "+type);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:17,代码来源:BonusListPanel.java


示例14: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
public Object render(BeanObject model, String property,
				ColumnData config, int rowIndex, int colIndex,
				ListStore<BeanObject> store, Grid<BeanObject> grid) {
			
//			BeanObject bean = grid.getSelectionModel().getSelectedItem();
//			String time = bean.getString(IFavourableActivity.START_TIME);
//			System.out.println(time);
			ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
			System.out.println(act.getText() + " - " + act.getAction());
			String tmpAct = act.getText();
//			Long time = Long.parseLong(tmpAct);
			Date date = new Date();
//			act.setText(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date));
			act.setText(date + "");
			return act.getText();
		}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:17,代码来源:FavourableActivityListPanel.java


示例15: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
public Object render(BeanObject model, String property, ColumnData config, final int rowIndex, final int colIndex,
            ListStore<BeanObject> store, Grid<BeanObject> grid) {
//    public String render(BeanObject model, String property, ColumnData config,
//            final int rowIndex, final int colIndex, ListStore<BeanObject> store) {
        final IShopServiceAsync service = (IShopServiceAsync)Registry.get("service");
        
        Long id = (Long) model.get(property);
        service.getBean(modelName, id, new AsyncCallback<BeanObject>() {
            public synchronized void onSuccess(BeanObject props) {
                String value = props.get(propName);
                Element el = view.getCell(rowIndex, colIndex);
                String text = el.getInnerHTML();
                if (text.indexOf(">") > 0 && text.indexOf("</") > 0) {
                    text = text.substring(0, text.indexOf(">") + 1) + value + text.substring(text.indexOf("</"));
                }
                el.setInnerHTML(text);
            }

            public synchronized void onFailure(Throwable caught) {
                System.out.println("getBean onFailure("+caught);
            }
        });
        
        return "waiting";
    }
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:26,代码来源:BeanCellRenderer.java


示例16: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
public Object render(BeanObject model, String property, ColumnData config,
			final int rowIndex, final int colIndex, ListStore<BeanObject> store,
			Grid<BeanObject> grid) {   
		
			if(type.equals("contact")) {
				return "mobilePhone" + " : " + mobile + "<br>" +
				"phone" + " : " + tel + "<br>" +
				"email" + " : " + email;
//                return Resources.constants.ShippingAddress_mobilePhone() + " : " + mobile + "<br>" +
//                Resources.constants.ShippingAddress_phone() + " : " + tel + "<br>" +
//                Resources.constants.ShippingAddress_email() + " : " + email;
			}
			else if(type.equals("other")) {
				return "bestTime" + " : " + time + "<br>" +
				"build" + " : " + build ;
//                return Resources.constants.ShippingAddress_bestTime() + " : " + time + "<br>" +
//                Resources.constants.ShippingAddress_build() + " : " + build ;
			}
			else
				return country + " " + province + " " + city + "<br>" + district + "[" + zipcode + "]";
	}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:22,代码来源:UserAddressCellRenderer.java


示例17: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
public Object render(BeanObject model, String property, ColumnData config,
		int rowIndex, int colIndex, ListStore<BeanObject> store,
		Grid<BeanObject> grid) {
	
	RemoteService.getSpecialService().getShippingConfig(shippingId, new AsyncCallback<Map<String, String>>(){
		public void onFailure(Throwable caught) {
			caught.printStackTrace();
			Window.alert("ERROR: "+caught.getMessage());
		}
		public void onSuccess(Map<String, String> result) {
			if(type.equals("shippingFee"))
				fee = Double.parseDouble(result.get("base_fee"));
			else 
				fee = Double.parseDouble(result.get("freeMoney"));
		}
	});
	return null;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:19,代码来源:ShippingFeeCellRenderer.java


示例18: render

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
@Override
	public Object render(BeanObject model, String property, ColumnData config,
			final int rowIndex, final int colIndex, ListStore<BeanObject> store,
			Grid<BeanObject> grid) {   
//		String userId = model.getString(IOrderInfo.USER_ID);
		Date dateTime = new Date((Long)model.get(IOrderInfo.ADD_TIME));
		DateTimeFormat formatter = DateTimeFormat.getFormat("MM-dd HH:mm");
		final String timeStr = formatter.format(dateTime);
//		if ( userId == null ){
//			return Resources.constants.OrderList_anonymous() + "<br>" + timeStr;
//		}else{
//			new ReadService().getBean(ModelNames.USER, userId, new ReadService.Listener(){
//				@Override
//				public void onSuccess(BeanObject bean) {
//					setOrderTime( bean.getString(IUser.USER_NAME) + "<br>" + timeStr );
//				}
//	    	});
//		}
		return timeStr;
		
	}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:22,代码来源:OrderTimeCellRenderer.java


示例19: init

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
protected void init() {
	setEditor(getCIEditor());
	setRenderer(new GridCellRenderer() {
		public String render(ModelData model, String property, ColumnData cfg, int rowIndex,
				int colIndex, ListStore store) {

			String text = "";
			if (model instanceof CIModel) {
				text = ((CIModel)model).getNameAndIcon();
			} else if (model instanceof AttributeModel) {
				Object o = model.get(property);
				if (o == null) {
					return("");
				}
				if (o instanceof String) {
					return((String)o);
				}
				if (o instanceof Boolean) {
					return(o.toString());
				}
				if (o instanceof CIModel) {
					CIModel m = (CIModel)o;
					text = m.getAlias();
					if (text == null) {
						text = m.getDisplayName();
					}
					String url = m.get(CIModel.CI_ICON_PATH);
					if (url != null) {
						url = CMDBSession.get().getContentRepositoryURL() + "/" + url;
						text = "<a style='background-image:url(" + url + ");background-repeat: no-repeat; background-position: left center; font-size:16px;'>&nbsp;&nbsp;&nbsp;&nbsp&nbsp;</a>" + text;
					}
				}
			} else {
				Object value = model.get(property);
				text = EditorFactory.renderObject(value);
			}
			return(text);
		}
	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:41,代码来源:CITemplateColumnConfig.java


示例20: createMappedColumn

import com.extjs.gxt.ui.client.widget.grid.ColumnData; //导入依赖的package包/类
private ColumnConfig createMappedColumn() {
	ColumnConfig mapColumn = new ColumnConfig("x", "", 25);
       mapColumn.setRenderer(new GridCellRenderer<SiteDTO>() {
           @Override
           public Object render(SiteDTO model, String property, ColumnData config, int rowIndex, int colIndex, ListStore listStore, Grid grid) {
               if(model.hasCoords()) {
                   return "<div class='mapped'>&nbsp;&nbsp;</div>";
               } else {
                   return "<div class='unmapped'>&nbsp;&nbsp;</div>";
               }
           }
       });
	return mapColumn;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:15,代码来源:SiteColumnModelBuilder.java



注:本文中的com.extjs.gxt.ui.client.widget.grid.ColumnData类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DefaultFieldDeserializer类代码示例发布时间:2022-05-22
下一篇:
Java DeviceNotSupportedCause类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap