当前位置: 首页>>代码示例>>Java>>正文


Java ColumnData类代码示例

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


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


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