本文整理汇总了Java中com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel类的典型用法代码示例。如果您正苦于以下问题:Java CheckBoxSelectionModel类的具体用法?Java CheckBoxSelectionModel怎么用?Java CheckBoxSelectionModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CheckBoxSelectionModel类属于com.extjs.gxt.ui.client.widget.grid包,在下文中一共展示了CheckBoxSelectionModel类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initialize
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
public void initialize() {
setTitle(I18N.CONSTANTS.importProjectOrgUnitsPanelHeader());
// Building the grid.
final CheckBoxSelectionModel<ImportDetails> selectionModel = new CheckBoxSelectionModel<ImportDetails>();
final ColumnModel columnModel = createColumnModel(selectionModel);
grid = createGrid(columnModel, selectionModel);
grid.addPlugin(selectionModel);
// Creating the import button.
importButton = Forms.button(I18N.CONSTANTS.importItem());
// Preparing the popup.
setContent(grid);
addButton(importButton);
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:18,代码来源:ImportDetailsPopup.java
示例2: createGridPanel
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
private ContentPanel createGridPanel(String title, AbstractImagePrototype icon) {
final TreeStore<TreeGridFileModel> store = new TreeStore<TreeGridFileModel>();
final CheckBoxSelectionModel<TreeGridFileModel> selectionModel = createSelectionModel(store);
final TreeGrid<TreeGridFileModel> grid = new TreeGrid<TreeGridFileModel>(store, createColumnModel(selectionModel));
grid.setSelectionModel(selectionModel);
grid.addPlugin(selectionModel);
grid.getView().setForceFit(true);
final ToolBar bottomBar = new ToolBar();
bottomBar.add(new Status());
final ContentPanel panel = Panels.content(title);
panel.setIcon(icon);
panel.setHeight(200);
panel.add(grid);
panel.setBottomComponent(bottomBar);
return panel;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:22,代码来源:FileSelectionView.java
示例3: createSelectionModel
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
private CheckBoxSelectionModel<TreeGridFileModel> createSelectionModel(final TreeStore<TreeGridFileModel> store) {
final CheckBoxSelectionModel<TreeGridFileModel> selectionModel = new CheckBoxSelectionModel<TreeGridFileModel>();
selectionModel.addListener(Events.BeforeSelect, new Listener<SelectionEvent<TreeGridFileModel>>() {
@Override
public void handleEvent(SelectionEvent<TreeGridFileModel> be) {
final TreeGridFileModel model = be.getModel();
if(model.getChildren() != null) {
selectionModel.select(store.getChildren(model), true);
}
}
});
return selectionModel;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:17,代码来源:FileSelectionView.java
示例4: createColumnModel
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
private ColumnModel createColumnModel(CheckBoxSelectionModel<TreeGridFileModel> selectionModel) {
// Project / org unit / file name column.
final ColumnConfig nameColumnConfig = new ColumnConfig(TreeGridFileModel.NAME, I18N.CONSTANTS.sigmahOfflinePrepareOfflineFileTransferColumnName(), 200);
nameColumnConfig.setRenderer(new TreeGridCellRenderer());
// Last modification date column.
final ColumnConfig lastModificationColumnConfig = new ColumnConfig(TreeGridFileModel.LAST_MODIFICATION, I18N.CONSTANTS.sigmahOfflinePrepareOfflineFileTransferColumnLastModification(), 85);
// Author full name column.
final ColumnConfig authorColumnConfig = new ColumnConfig(TreeGridFileModel.AUTHOR, I18N.CONSTANTS.flexibleElementFilesListAuthor(), 100);
// Size column.
final ColumnConfig sizeColumnConfig = new ColumnConfig(TreeGridFileModel.SIZE, I18N.CONSTANTS.flexibleElementFilesListSize(), 85);
return new ColumnModel(Arrays.asList(
selectionModel.getColumn(),
nameColumnConfig,
lastModificationColumnConfig,
authorColumnConfig,
sizeColumnConfig
));
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:24,代码来源:FileSelectionView.java
示例5: initialize
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
public void initialize() {
// Building the grid.
final CheckBoxSelectionModel<ElementExtractedValue> selectionModel = new CheckBoxSelectionModel<ElementExtractedValue>();
final ColumnModel columnModel = createColumnModel(selectionModel);
grid = createGrid(columnModel, selectionModel);
grid.addPlugin(selectionModel);
// Creating the OK button.
confirmButton = Forms.button(I18N.CONSTANTS.ok());
// Preparing the popup.
setContent(grid);
addButton(confirmButton);
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:16,代码来源:ElementExtractedValuePopup.java
示例6: doUserAssignmentCheckGrid
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
private Grid<BaseModel> doUserAssignmentCheckGrid(){
final CheckBoxSelectionModel<BaseModel> sm = new CheckBoxSelectionModel<BaseModel>();
sm.getColumn().setMenuDisabled(true);
sm.getColumn().setFixed(true);
sm.setSelectionMode(SelectionMode.SIMPLE);
sm.getColumn().setSortable(false);
sm.getColumn().setDataIndex("selected");
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
configs.add(sm.getColumn());
ColumnConfig userConfig = new ColumnConfig("name", "User", 150);
userConfig.setFixed(true);
userConfig.setSortable(false);
userConfig.setMenuDisabled(true);
configs.add(userConfig);
ColumnModel cm = new ColumnModel(configs);
userAssignmentCheckGrid = new Grid<BaseModel>(new ListStore<BaseModel>(), cm);
userAssignmentCheckGrid.setLoadMask(true);
userAssignmentCheckGrid.setWidth(288);
userAssignmentCheckGrid.setHeight(400);
userAssignmentCheckGrid.addStyleName(".my-table-style");
userAssignmentCheckGrid.setBorders(true);
userAssignmentCheckGrid.setSelectionModel(sm);
userAssignmentCheckGrid.setAutoExpandColumn("name");
userAssignmentCheckGrid.getView().setEmptyText("no data");
userAssignmentCheckGrid.setId("userAssignmentCheckGridId");
return userAssignmentCheckGrid;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:34,代码来源:AddUserToAssignmentWindow.java
示例7: getPayPanel
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
public static ContentPanel getPayPanel(){
List<String> wantedFields = new ArrayList<String>();
wantedFields.add(IOrder.PAYMENT);
wantedFields.add(IOrder.PAYNOTE);
BasePagingLoader loader = new PagingListService().getLoader(ModelNames.ORDER, wantedFields);
final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
columns.add(new ColumnConfig(IOrder.PAYMENT, "名称", 80));
columns.add(new ColumnConfig(IOrder.PAYNOTE, "描述", 104));
columns.add(new ColumnConfig("handlingFee", "手续费", 80));
ColumnModel cm = new ColumnModel(columns);
Grid<BeanObject> grid = new EditorGrid<BeanObject>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
grid.setSize(750, 200);
final ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setSize(750, 200);
panel.setLayout(new FitLayout());
panel.setHeading("选择支付方式");
panel.add(grid);
return panel;
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:38,代码来源:SelectPayPanel.java
示例8: getColumnModel
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
/**
* Defines the column model for the triplets list grid.
*
* @param selectionModel
* The grid selection model.
* @param canEdit
* editing right of the current user.
* @return The column model.
*/
private ColumnConfig[] getColumnModel(GridSelectionModel<TripletValueDTO> selectionModel, boolean canEdit) {
final ColumnConfig codeColumn = new ColumnConfig();
codeColumn.setId("code");
codeColumn.setHeaderText(I18N.CONSTANTS.flexibleElementTripletsListCode());
codeColumn.setWidth(100);
final ColumnConfig nameColumn = new ColumnConfig();
nameColumn.setId("name");
nameColumn.setHeaderText(I18N.CONSTANTS.flexibleElementTripletsListName());
nameColumn.setWidth(100);
final ColumnConfig periodColumn = new ColumnConfig();
periodColumn.setId("period");
periodColumn.setHeaderText(I18N.CONSTANTS.flexibleElementTripletsListPeriod());
periodColumn.setWidth(60);
if (canEdit) {
// Adds editors to all column configs.
for(final ColumnConfig config : Arrays.asList(codeColumn, nameColumn, periodColumn)) {
final TextField<String> text = new TextField<String>();
text.setAllowBlank(false);
config.setEditor(new CellEditor(text));
}
}
if(selectionModel instanceof CheckBoxSelectionModel) {
return new ColumnConfig[] {
((CheckBoxSelectionModel<TripletValueDTO>) selectionModel).getColumn(),
codeColumn,
nameColumn,
periodColumn
};
} else {
return new ColumnConfig[] {
codeColumn,
nameColumn,
periodColumn
};
}
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:52,代码来源:TripletsListElementDTO.java
示例9: createCalendarsGridPanel
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
/**
* Creates the calendars panel + grid.
*
* @return The calendars panel.
*/
private Component createCalendarsGridPanel() {
// Calendars panel.
final ContentPanel calendarsPanel = Panels.content(I18N.CONSTANTS.projectTabCalendar());
// Calendars grid.
final ColumnConfig calendarName = new ColumnConfig("name", I18N.CONSTANTS.name(), 180);
final ColumnConfig calendarColor = new ColumnConfig("color", "", 20);
calendarColor.setStyle("");
calendarColor.setRenderer(new GridCellRenderer<CalendarWrapper>() {
@Override
public Object render(CalendarWrapper model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<CalendarWrapper> store,
Grid<CalendarWrapper> grid) {
final SimplePanel panel = new SimplePanel();
panel.setPixelSize(14, 14);
panel.getElement().getStyle().setMarginLeft(3, Unit.PX);
panel.setStyleName("calendar-fullday-event-" + model.getCalendar().getStyle());
return panel;
}
});
selectionModel = new CheckBoxSelectionModel<CalendarWrapper>();
final ColumnModel calendarColumnModel = new ColumnModel(Arrays.asList(selectionModel.getColumn(), calendarName, calendarColor));
calendarsStore = new ListStore<CalendarWrapper>();
final Grid<CalendarWrapper> calendarGrid = new Grid<CalendarWrapper>(calendarsStore, calendarColumnModel);
calendarGrid.setAutoExpandColumn("name");
calendarGrid.setSelectionModel(selectionModel);
calendarGrid.addPlugin(selectionModel);
calendarGrid.getView().setForceFit(true);
calendarsPanel.add(calendarGrid);
return calendarsPanel;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:46,代码来源:CalendarView.java
示例10: createGrid
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
private ContentPanel createGrid(){
ContentPanel cp = new ContentPanel();
cp.setWidth(600);
cp.setHeight(400);
final CheckBoxSelectionModel<BaseModel> sm = new CheckBoxSelectionModel<BaseModel>();
sm.getColumn().setMenuDisabled(true);
sm.getColumn().setSortable(false);
sm.getColumn().setDataIndex("selected");
sm.setSelectionMode(SelectionMode.MULTI);
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
configs.add(sm.getColumn());
ColumnConfig usersColumnConfig = new ColumnConfig("fullName", "Username", 150);
usersColumnConfig.setSortable(false);
usersColumnConfig.setMenuDisabled(true);
configs.add(usersColumnConfig);
ColumnConfig loginColumnConfig = new ColumnConfig("login", "Login", 150);
loginColumnConfig.setSortable(false);
loginColumnConfig.setMenuDisabled(true);
configs.add(loginColumnConfig);
ColumnConfig emailColumnConfig = new ColumnConfig("email", "email", 150);
emailColumnConfig.setSortable(false);
emailColumnConfig.setMenuDisabled(true);
configs.add(emailColumnConfig);
ColumnModel cm = new ColumnModel(configs);
usersGrid = new Grid<BaseModel>(new ListStore<BaseModel>(), cm);
usersGrid.setLoadMask(true);
usersGrid.setWidth(600);
usersGrid.setHeight(350);
usersGrid.addStyleName(".my-table-style");
usersGrid.setBorders(true);
usersGrid.setSelectionModel(sm);
usersGrid.setAutoExpandColumn("login");
usersGrid.getView().setEmptyText("no data");
usersGrid.setId("usersGridId");
cp.add(usersGrid);
return cp;
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:50,代码来源:ImportUsersFromExternalStoreGrid.java
示例11: PayPanel
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
public PayPanel(){
initJS(this);
Criteria criteria = new Criteria();
BasePagingLoader loader = new PagingListService().getLoader(ModelNames.PAYMENT, criteria);
loader.load(0, 10);
store = new ListStore<BeanObject>(loader);
toolBar = new PagingToolBar(10);
toolBar.bind(loader);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
columns.add(new ColumnConfig(IPayment.NAME, "名称", 80));
columns.add(new ColumnConfig(IPayment.DESCRIPTION, "描述", 200));
columns.add(new ColumnConfig(IPayment.FEE, "手续费", 80));
ColumnConfig actcol = new ColumnConfig("Action", "选取", 100);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
Grid<BeanObject> grid = new EditorGrid<BeanObject>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
grid.setSize(750, 200);
ActionCellRenderer render = new ActionCellRenderer(grid);
ActionCellRenderer.ActionInfo act = null;
act = new ActionCellRenderer.ActionInfo();
act.setImage("yes.gif");
act.setAction("choosePayment($id)");
render.addAction(act);
actcol.setRenderer(render);
final ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setLayout(new FitLayout());
panel.add(grid);
this.setSize(750, 200);
this.setHeading("选择支付方式");
this.add(panel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:51,代码来源:PayPanel.java
示例12: onRender
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
BasePagingLoader loader = new PagingListService().getLoader(
ModelNames.USERRANK, criteria);
loader.load(0, 10);
final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
toolBar = new PagingToolBar(10);
toolBar.bind(loader);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
columns.add(new ColumnConfig(IUserRank.NAME, "会员等级名称", 100));
columns.add(new ColumnConfig(IUserRank.MINPOINTS, "积分下限", 70));
columns.add(new ColumnConfig(IUserRank.MAXPOINTS, "积分上限", 70));
columns.add(new ColumnConfig(IUserRank.DISCOUNT, "初始折扣率", 70));
// columns.add(new CheckColumnConfig(IUserRank.SPECIAL, "特殊会员组", 120));
// columns.add(new CheckColumnConfig(IUserRank.SHOWPRICE, "显示价格", 80));
ColumnConfig actcol = new ColumnConfig("Action", Resources.constants
.GoodsList_action(), 120);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
Grid<BeanObject> grid = new EditorGrid<BeanObject>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
grid.setSelectionModel(smRowSelection);
ActionCellRenderer render = new ActionCellRenderer(grid);
ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
act = new ActionCellRenderer.ActionInfo();
act.setImage("icon_edit.gif");
act.setAction("updateMemberAction($id)");
act.setTooltip("编辑");
render.addAction(act);
act = new ActionCellRenderer.ActionInfo();
act.setImage("icon_trash.gif");
act.setAction("deleteMemberAction($id)");
act.setTooltip("删除");
render.addAction(act);
actcol.setRenderer(render);
final ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setIconStyle("icon-table");
panel.setHeading("会员等级");
panel.setLayout(new FitLayout());
panel.add(grid);
panel.setHeight(500);
panel.setWidth("100%");
panel.setBottomComponent(toolBar);
// panel.setButtonAlign(HorizontalAlignment.CENTER);
// panel.addButton(new com.extjs.gxt.ui.client.widget.button.Button(
// "添加会员级别", new SelectionListener<ButtonEvent>() {
// public void componentSelected(ButtonEvent ce) {
// NewMemberLevel.State state = new NewMemberLevel.State();
// state.execute();
// }
// }));
add(panel);
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
int w = event.getWidth() - 300;
panel.setWidth(w + "px");
}
});
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:80,代码来源:MemberLevelList.java
示例13: onRender
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
ContentPanel inforPanel = new ContentPanel();
inforPanel.setHeading(this.getCurState().getSnatch().getString(ISnatch.SNATCH_NAME));
HorizontalPanel infoContent = new HorizontalPanel();
infoContent.setSpacing(20);
Label sk = new Label("活动开始时间: ");
Label sv = new Label(this.getCurState().getSnatch().getString(ISnatch.START_TIME));
Label ek = new Label("活动结束时间: ");
Label ev = new Label(this.getCurState().getSnatch().getString(ISnatch.END_TIME));
infoContent.add(sk);
infoContent.add(sv);
infoContent.add(ek);
infoContent.add(ev);
inforPanel.add(infoContent);
BasePagingLoader loader = new PagingListService().getLoader(ModelNames.SNATCHLOG);
loader.load(0, 10);
store = new ListStore<BeanObject>(loader);
toolBar = new PagingToolBar(10);
toolBar.bind(loader);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
columns.add(new ColumnConfig("number", "编号", 50));
columns.add(new ColumnConfig(ISnatchLog.USER_ID, "出价用户", 150));
columns.add(new ColumnConfig(ISnatchLog.BID_TIME, "出价时间", 150));
columns.add(new ColumnConfig(ISnatchLog.BID_PRICE, "所出价格", 150));
ColumnModel cm = new ColumnModel(columns);
grid = new Grid<BeanObject>(store, cm);
// grid.setLoadMask(true);
// grid.setBorders(true);
grid.setSelectionModel(smRowSelection);
grid.addPlugin(smRowSelection);
grid.setHeight(250);
ContentPanel contentPanel = new ContentPanel();
contentPanel.setFrame(true);
contentPanel.setCollapsible(true);
contentPanel.setAnimCollapse(false);
contentPanel.setButtonAlign(HorizontalAlignment.CENTER);
contentPanel.setIconStyle("icon-table");
contentPanel.setLayout(new FitLayout());
contentPanel.add(grid);
contentPanel.setBottomComponent(toolBar);
topPanel.add(inforPanel);
topPanel.add(contentPanel);
add(topPanel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:56,代码来源:SearchSnatchPanel.java
示例14: onRender
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
ContentPanel inforPanel = new ContentPanel();
// inforPanel.setHeading(this.getCurState().getAuction().getString(IAuction.AUCTION_NAME));
HorizontalPanel infoContent = new HorizontalPanel();
infoContent.setSpacing(20);
Label sk = new Label("拍卖活动名称:");
Label sv = new Label(this.getCurState().getAuction().getString(IAuction.AUCTION_NAME));
Label ek = new Label("拍卖商品名称:");
Label ev = new Label(this.getCurState().getAuction().getString(IAuction.GOOD_NAME));
infoContent.add(sk);
infoContent.add(sv);
infoContent.add(ek);
infoContent.add(ev);
inforPanel.add(infoContent);
BasePagingLoader loader = new PagingListService().getLoader(ModelNames.AUCTIONLOG);
loader.load(0, 10);
store = new ListStore<BeanObject>(loader);
toolBar = new PagingToolBar(10);
toolBar.bind(loader);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
columns.add(new ColumnConfig(IAuctionLog.BID_USER, "买家", 150));
columns.add(new ColumnConfig(IAuctionLog.BID_PRICE, "出价", 150));
columns.add(new ColumnConfig(IAuctionLog.BID_TIME, "时间", 150));
columns.add(new ColumnConfig(IAuctionLog.LOG_ID, "状态", 150));
ColumnModel cm = new ColumnModel(columns);
grid = new Grid<BeanObject>(store, cm);
// grid.setLoadMask(true);
// grid.setBorders(true);
grid.setSelectionModel(smRowSelection);
grid.addPlugin(smRowSelection);
grid.setHeight(250);
ContentPanel contentPanel = new ContentPanel();
contentPanel.setFrame(true);
contentPanel.setCollapsible(true);
contentPanel.setAnimCollapse(false);
contentPanel.setButtonAlign(HorizontalAlignment.CENTER);
contentPanel.setIconStyle("icon-table");
contentPanel.setLayout(new FitLayout());
contentPanel.add(grid);
contentPanel.setBottomComponent(toolBar);
topPanel.add(inforPanel);
topPanel.add(contentPanel);
add(topPanel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:56,代码来源:SearchAuctionPanel.java
示例15: onRender
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
// final IShopServiceAsync service = getService();
// RpcProxy proxy = new RpcProxy() {
// public void load(Object loadConfig, AsyncCallback callback) {
// service.getPaymentMetaList((ListLoadConfig) loadConfig, callback);
// }
// };
// loader = new MyPagingListService().getLoader(
// ModelNames.PAYMENT_META);
// loader
// loader = new BaseListLoader(proxy);
loader.setRemoteSort(true);
// PagingToolBar toolBar = new PagingToolBar(pageSize);
// toolBar.bind(loader);
final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
store.addStoreListener(new StoreListener<BeanObject>() {
public void storeUpdate(StoreEvent<BeanObject> se) {
List<Record> changed = store.getModifiedRecords();
}
});
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
columns.add(new ColumnConfig(PaymentConfigMetaForm.ID, Resources.constants
.PaymentMetaList_ID(), 50));
ColumnConfig col = new ColumnConfig(PaymentConfigMetaForm.NAME, Resources.constants
.PaymentMetaList_NAME(), 100);
col.setEditor(new CellEditor(new TextField()));
columns.add(col);
columns.add(new ColumnConfig(PaymentConfigMetaForm.DESCRIPTION, Resources.constants
.PaymentMetaList_DESC(), 200));
columns.add(new ColumnConfig(PaymentConfigMetaForm.FEE, Resources.constants
.PaymentMetaList_PAYFEE(), 50));
columns.add(new ColumnConfig(PaymentConfigMetaForm.COD, Resources.constants
.PaymentMetaList_ISCOD(), 50));
columns.add(new ColumnConfig(PaymentConfigMetaForm.ORDER, Resources.constants
.PaymentMetaList_ORDER(), 50));
ColumnConfig actcol = new ColumnConfig("Action", Resources.constants
.PaymentMetaList_ACTION(), 100);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
Grid<BeanObject> grid = new EditorGrid<BeanObject>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
grid.setSelectionModel(smRowSelection);
ActionCellRenderer render = new ActionCellRenderer(grid);
actcol.setRenderer(render);
ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setIconStyle("icon-table");
// panel.setHeading("Paging Grid");
panel.setLayout(new FitLayout());
panel.add(grid);
panel.setSize(900, 350);
// panel.setBottomComponent(toolBar);
add(panel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:74,代码来源:PaymentMetaList.java
示例16: onRender
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
// loader
RpcProxy<ListLoadResult<BeanObject>> proxy = new RpcProxy<ListLoadResult<BeanObject>>() {
public void load(Object loadConfig, AsyncCallback<ListLoadResult<BeanObject>> callback) {
RemoteService.getSpecialService().getPaymentMetaList((ListLoadConfig) loadConfig, callback);
}
};
loader = new BaseListLoader<ListLoadResult<BeanObject>>(proxy);
// loader = new MyPagingListService().getLoader(
// ModelNames.PAYMENT_META);
loader.setRemoteSort(true);
final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
store.addStoreListener(new StoreListener<BeanObject>() {
public void storeUpdate(StoreEvent<BeanObject> se) {
List<Record> changed = store.getModifiedRecords();
}
});
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
columns.add(new ColumnConfig(PaymentConfigMetaForm.ID, Resources.constants
.PaymentMetaList_ID(), 100));
ColumnConfig col = new ColumnConfig(PaymentConfigMetaForm.NAME, Resources.constants
.PaymentMetaList_NAME(), 100);
col.setEditor(new CellEditor(new TextField<String>()));
columns.add(col);
columns.add(new ColumnConfig(PaymentConfigMetaForm.DESCRIPTION, Resources.constants
.PaymentMetaList_DESC(), 200));
columns.add(new ColumnConfig(PaymentConfigMetaForm.FEE, Resources.constants
.PaymentMetaList_PAYFEE(), 100));
columns.add(new ColumnConfig(PaymentConfigMetaForm.COD, Resources.constants
.PaymentMetaList_ISCOD(), 100));
columns.add(new ColumnConfig(PaymentConfigMetaForm.ORDER, Resources.constants
.PaymentMetaList_ORDER(), 100));
ColumnConfig actcol = new ColumnConfig("Action", Resources.constants
.PaymentMetaList_ACTION(), 100);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
Grid<BeanObject> grid = new EditorGrid<BeanObject>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
grid.setSelectionModel(smRowSelection);
grid.setAutoExpandColumn(PaymentConfigMetaForm.DESCRIPTION);
ActionCellRenderer render = new ActionCellRenderer(grid);
actcol.setRenderer(render);
final ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setIconStyle("icon-table");
// panel.setHeading("Paging Grid");
panel.setLayout(new FitLayout());
panel.add(grid);
panel.setHeight(500);
panel.setWidth("100%");
// panel.setBottomComponent(toolBar);
add(panel);
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
int w = event.getWidth() - 300;
panel.setWidth(w + "px");
}
});
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:79,代码来源:PaymentMetaListPanel.java
示例17: onRender
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
BasePagingLoader loader = new PagingListService().getLoader(
ModelNames.AGENCY, criteria);
loader.load(0, 10);
final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
toolBar = new PagingToolBar(10);
toolBar.bind(loader);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
columns.add(new ColumnConfig(IAgency.ID, "编号", 70));
columns.add(new ColumnConfig(IAgency.NAME, "办事处名称", 90));
columns.add(new ColumnConfig(IAgency.DESCRIPTION, "办事处描述", 180));
ColumnConfig actcol = new ColumnConfig("Action", Resources.constants.GoodsList_action(), 120);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
Grid<BeanObject> grid = new EditorGrid<BeanObject>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
grid.setSelectionModel(smRowSelection);
ActionCellRenderer render = new ActionCellRenderer(grid);
ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
act.setImage("icon_edit.gif");
act.setAction("checkAgencyAction($id)");
act.setTooltip("编辑");
render.addAction(act);
act = new ActionCellRenderer.ActionInfo();
act.setImage("icon_trash.gif");
act.setAction("deleteAgencyAction($id)");
act.setTooltip("删除");
render.addAction(act);
actcol.setRenderer(render);
ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setIconStyle("icon-table");
// panel.setHeading("Paging Grid");
panel.setLayout(new FitLayout());
panel.add(grid);
panel.setSize(800, 350);
panel.setBottomComponent(toolBar);
panel.setButtonAlign(HorizontalAlignment.CENTER);
//Add new agency
final com.extjs.gxt.ui.client.widget.button.Button addAgency = new com.extjs.gxt.ui.client.widget.button.Button("添加办事处");
addAgency.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
// add new magazine function
NewAgency.State state = new NewAgency.State();
state.execute();
}
});
panel.addButton(addAgency);
add(panel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:70,代码来源:AgencyList.java
示例18: onRender
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
RpcProxy<ListLoadResult<ShippingConfigMetaForm>> proxy = new RpcProxy<ListLoadResult<ShippingConfigMetaForm>>() {
public void load(Object loadConfig, AsyncCallback<ListLoadResult<ShippingConfigMetaForm>> callback) {
RemoteService.getSpecialService().getCombinedShippingMetaList((ListLoadConfig) loadConfig, callback);
}
};
loader = new BaseListLoader<ListLoadResult<ShippingConfigMetaForm>>(proxy);
loader.setRemoteSort(true);
final ListStore<ShippingConfigMetaForm> store = new ListStore<ShippingConfigMetaForm>(loader);
store.addStoreListener(new StoreListener<ShippingConfigMetaForm>() {
public void storeUpdate(StoreEvent<ShippingConfigMetaForm> se) {
List<Record> changed = store.getModifiedRecords();
}
});
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<ShippingConfigMetaForm> smRowSelection = new CheckBoxSelectionModel<ShippingConfigMetaForm>();
columns.add(smRowSelection.getColumn());
// columns.add(new ColumnConfig(ShippingConfigMetaForm.ID, Resources.constants
// .ShippingMetaList_ID(), 50));
ColumnConfig col = new ColumnConfig(ShippingConfigMetaForm.NAME, Resources.constants
.ShippingMetaList_NAME(), 100);
col.setEditor(new CellEditor(new TextField<String>()));
columns.add(col);
columns.add(new ColumnConfig(ShippingConfigMetaForm.DESCRIPTION, Resources.constants
.ShippingMetaList_DESC(), 200));
columns.add(new ColumnConfig(ShippingConfigMetaForm.INSURE, Resources.constants
.ShippingMetaList_INSURE(), 100));
columns.add(new ColumnConfig(ShippingConfigMetaForm.SUPPORTCOD, Resources.constants
.ShippingMetaList_COD(), 100));
columns.add(new ColumnConfig(ShippingConfigMetaForm.VERSION, Resources.constants
.ShippingMetaList_VERSION(), 100));
columns.add(new ColumnConfig(ShippingConfigMetaForm.AUTHOR, Resources.constants
.ShippingMetaList_AUTHOR(), 100));
ColumnConfig actcol = new ColumnConfig("Action", Resources.constants
.ShippingMetaList_ACTION(), 200);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
Grid<ShippingConfigMetaForm> grid = new EditorGrid<ShippingConfigMetaForm>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
grid.setSelectionModel(smRowSelection);
grid.setAutoExpandColumn(ShippingConfigMetaForm.NAME);
ActionCellRenderer render = new ActionCellRenderer(grid);
actcol.setRenderer(render);
final ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setIconStyle("icon-table");
// panel.setHeading("Paging Grid");
panel.setLayout(new FitLayout());
panel.add(grid);
panel.setHeight(500);
panel.setWidth("100%");
// panel.setBottomComponent(toolBar);
add(panel);
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
int w = event.getWidth() - 300;
panel.setWidth(w + "px");
}
});
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:77,代码来源:ShippingMetaListPanel.java
示例19: onRender
import com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel; //导入依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
loader= new IndexService().getLoader(getCurState().getContent());
toolBar = new PagingToolBar(10);
loader.load(0, 10);
toolBar.bind(loader);
final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
final CheckBoxSelectionModel<BeanObject> smRowSelection = new CheckBoxSelectionModel<BeanObject>();
columns.add(smRowSelection.getColumn());
ColumnConfig title = new ColumnConfig(IArticle.TITLE,
"文章标题", 200);
title.setEditor(new CellEditor(new TextField()));
columns.add(title);
ColumnConfig articleconent = new ColumnConfig("content",
"文章内容", 500);
columns.add(articleconent);
ColumnModel cm = new ColumnModel(columns);
Grid<BeanObject> grid = new EditorGrid<BeanObject>(store, cm);
grid.setSelectionModel(smRowSelection);
grid.setLoadMask(true);
grid.setBorders(true);
this.grid = grid;
TablePanel.add(grid);
TablePanel.setFrame(true);
TablePanel.setCollapsible(true);
TablePanel.setAnimCollapse(false);
TablePanel.setButtonAlign(HorizontalAlignment.CENTER);
TablePanel.setIconStyle("icon-table");
TablePanel.setLayout(new FitLayout());
TablePanel.setSize(800, 350);
TablePanel.setBottomComponent(toolBar);
TablePanel.setButtonAlign(HorizontalAlignment.CENTER);
add(TablePanel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:49,代码来源:ArticleContentPanel.java
注:本文中的com.extjs.gxt.ui.client.widget.grid.CheckBoxSelectionModel类示例整理自Github/M |
请发表评论