本文整理汇总了Java中com.extjs.gxt.ui.client.Style.HorizontalAlignment类的典型用法代码示例。如果您正苦于以下问题:Java HorizontalAlignment类的具体用法?Java HorizontalAlignment怎么用?Java HorizontalAlignment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HorizontalAlignment类属于com.extjs.gxt.ui.client.Style包,在下文中一共展示了HorizontalAlignment类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createFormPanel
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
/**
* Creates the form panel.
*/
private void createFormPanel()
{
formPanel = new FormPanel();
formPanel.setFrame(true);
formPanel.setHeaderVisible(false);
formPanel.setAutoHeight(true);
FieldSet fieldSet = new FieldSet();
fieldSet.setHeading("Search Management");
fieldSet.setCheckboxToggle(false);
fieldSet.setCollapsible(false);
FormLayout layout = new FormLayout();
fieldSet.setLayout(layout);
search = new Button("Search", new SelectionListener<ButtonEvent>()
{
@Override
public void componentSelected(ButtonEvent ce)
{
Dispatcher.forwardEvent(GeofenceEvents.SHOW_SEARCH_USER_WIDGET);
}
});
ButtonBar bar = new ButtonBar();
bar.setAlignment(HorizontalAlignment.CENTER);
bar.add(search);
Button p = new Button("get AOIs");
Button q = new Button("get Features");
bar.add(p);
bar.add(q);
fieldSet.add(bar);
formPanel.add(fieldSet);
}
开发者ID:geoserver,项目名称:geofence,代码行数:45,代码来源:UserSearchComponent.java
示例2: buildToolbar
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
/**
* Builds the actions toolbar.
*
* @return The actions toolbar.
*/
private ToolBar buildToolbar() {
// Save button.
saveButton = Forms.button(I18N.CONSTANTS.save(), IconImageBundle.ICONS.save());
saveButton.setEnabled(false);
// Actions toolbar.
final ToolBar toolBar = new ToolBar();
toolBar.setAlignment(HorizontalAlignment.LEFT);
toolBar.setBorders(false);
toolBar.add(saveButton);
toolBar.add(new FillToolItem());
return toolBar;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:22,代码来源:ProjectDetailsView.java
示例3: buildToolbar
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
/**
* Builds the actions toolbar.
*
* @return The actions toolbar.
*/
private ToolBar buildToolbar() {
// Save button.
saveButton = Forms.button(I18N.CONSTANTS.save(), IconImageBundle.ICONS.save());
saveButton.setEnabled(false);
// Actions toolbar.
final ToolBar toolBar = new ToolBar();
toolBar.setAlignment(HorizontalAlignment.LEFT);
toolBar.setBorders(false);
toolBar.add(saveButton);
// ExportForm button
exportButton = Forms.button(I18N.CONSTANTS.export(), IconImageBundle.ICONS.excel());
toolBar.add(new FillToolItem());
toolBar.add(exportButton);
return toolBar;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:OrgUnitDetailsView.java
示例4: AddDepartmentToAssignmentWindow
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
public AddDepartmentToAssignmentWindow(final Integer assignmentId,final ProjectPanel projectPanel){
this.projectPanel=projectPanel;
setWidth(310);
setHeight(300);
// setFrame(true);
setClosable(true);
setHeaderVisible(true);
setBodyBorder(true);
this.setOnEsc(true);
setButtonAlign(HorizontalAlignment.CENTER);
setLayout(new ColumnLayout());
doDepartmentPanel();
setData(assignmentId);
show();
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:21,代码来源:AddDepartmentToAssignmentWindow.java
示例5: buildCurrentRegionLabel
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
private void buildCurrentRegionLabel(){
currentRegionPanel = new ContentPanel();
currentRegionPanel.setHeaderVisible(false);
TableRowLayout tableLayout = new TableRowLayout();
tableLayout.setWidth("100%");
tableLayout.setBorder(0);
tableLayout.setCellHorizontalAlign(HorizontalAlignment.CENTER);
tableLayout.setCellVerticalAlign(VerticalAlignment.BOTTOM);
currentRegionPanel.setLayout(tableLayout);
currentRegionPanel.setHeight(40);
current_Label = new LabelField();
current_name = RegionForm.getHiddenNameField();
current_type = RegionForm.getTypeField();
currentRegionPanel.add(current_Label);
currentRegionPanel.add(current_name);
currentRegionPanel.add(current_type);
super.add(currentRegionPanel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:24,代码来源:RegionPanel.java
示例6: PasswordAccessAuditDialog
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
public PasswordAccessAuditDialog(Password password)
{
this.setSize("350", "460");
this.setHeading(textMessages.passwordAccessAuditLog());
VBoxLayout boxLayout = new VBoxLayout();
boxLayout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
this.setLayout(boxLayout);
this.setModal(true);
this.setResizable(false);
gridStore = new ListStore<PasswordAccessAuditData>();
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
ColumnConfig columnConfigDate = new ColumnConfig(Constants.DATE, textMessages.dateAccessed(), 130);
columnConfigDate.setDateTimeFormat(DateTimeFormat.getFormat(textMessages.displayDateFormat()));
configs.add(columnConfigDate);
ColumnConfig columnConfigUser = new ColumnConfig(Constants.USER, textMessages.userAccessed(), 160);
configs.add(columnConfigUser);
Grid<PasswordAccessAuditData> grid = new Grid<PasswordAccessAuditData>(gridStore, new ColumnModel(configs));
grid.setStripeRows(true);
add(grid);
grid.setSize("320px", "390px");
grid.setBorders(true);
Button closeButton = new Button(textMessages.close(), new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
doClose();
}
});
setButtonAlign(HorizontalAlignment.CENTER);
addButton(closeButton);
loadAccessAuditData(password.getId());
}
开发者ID:alfameCom,项目名称:salasanasiilo,代码行数:37,代码来源:PasswordAccessAuditDialog.java
示例7: AssignmentDetailPanel
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
public AssignmentDetailPanel(ContentPanel contentPanel){
this.parentPanel=contentPanel;
setWidth("100%");
setHeight(300);
setFrame(true);
setHeaderVisible(false);
setPadding(0);
setBodyBorder(false);
setLabelAlign(LabelAlign.TOP);
setButtonAlign(HorizontalAlignment.CENTER);
doDetailPanel();
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:15,代码来源:AssignmentDetailPanel.java
示例8: AssignmentDepartmentPanel
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
public AssignmentDepartmentPanel(){
setWidth(700);
setHeight(300);
setFrame(true);
setHeaderVisible(false);
setBodyBorder(false);
setButtonAlign(HorizontalAlignment.CENTER);
setLayout(new ColumnLayout());
doDepartmentPanel();
doDetailPanel();
}
开发者ID:treblereel,项目名称:Opensheet,代码行数:15,代码来源:AssignmentDepartmentPanel.java
示例9: onRender
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
basePanel.setHeading(Resources.constants.OrderDetail_baseInfo());
renderBasePanel();
add(basePanel);
btnEditConsignee = new Button(Resources.constants.OrderDetail_edit());
consigneePanel.setHeading(Resources.constants.OrderDetail_consigneeInfo(), btnEditConsignee);
renderConsigneePanel();
add(consigneePanel);
btnEditGoods = new Button(Resources.constants.OrderDetail_edit());
goodsPanel.setHeading(Resources.constants.OrderDetail_goodsInfo(), btnEditGoods);
renderGoodsPanel();
add(goodsPanel);
btnEditFee = new Button(Resources.constants.OrderDetail_edit());
feePanel.setHeading(Resources.constants.OrderDetail_feeInfo(), btnEditFee);
renderFeePanel();
add(feePanel);
operationPanel.setFrame(true);
operationPanel.setCollapsible(true);
operationPanel.setAnimCollapse(false);
operationPanel.setButtonAlign(HorizontalAlignment.CENTER);
operationPanel.setIconStyle("icon-table");
// operationPanel.setLayout(new FitLayout());
// operationPanel.setHeight(300);
// operationPanel.setWidth("100%");
operationPanel.setHeading(Resources.constants.OrderDetail_operationInfo());
renderOperationPanel();
add(operationPanel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:36,代码来源:OrderDetailPanel.java
示例10: afterRender
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
@Override
protected void afterRender() {
// super.afterRender();
//TODO 添加按钮
super.add(formPanel);
FormLayout fl = new FormLayout();
fl.setLabelWidth(150);
fl.setLabelPad(50);
formPanel.setLayout(fl);
setupPanelLayout();
btnOk = new Button("确定");
btnOk.addSelectionListener(selectionListener);
btnPre = new Button("上一步", new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
OrderGoodsPanel.State newState = new OrderGoodsPanel.State();
newState.setIsEdit(false);
newState.setUserId(getCurState().getUserId());
newState.setId(getCurState().getOrderId());
newState.execute();
}
});
btnNext = new Button("下一步");
btnNext.addSelectionListener(selectionListener);
btnCancel = new Button("取消", new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
cancel();
}
});
formPanel.setButtonAlign(HorizontalAlignment.CENTER);
formPanel.addButton(btnOk);
formPanel.addButton(btnPre);
formPanel.addButton(btnNext);
formPanel.addButton(btnCancel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:39,代码来源:ConsigneePanel.java
示例11: getPayPanel
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的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
示例12: onRender
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
basePanel.setLayout(new BorderLayout());
basePanel.setStyleAttribute("padding", "10px");
super.add(basePanel);
FormLayout fl = new FormLayout();
fl.setLabelWidth(150);
fl.setLabelPad(50);
formPanel.setLayout(fl);
initCommentLayout();
initReplyLayout();
btnNew.setText(Resources.constants.ok());
btnReset.setText(Resources.constants.reset());
formPanel.setButtonAlign(HorizontalAlignment.CENTER);
formPanel.addButton(btnNew);
formPanel.addButton(btnReset);
btnNew.addSelectionListener(selectionListener);
btnReset.addSelectionListener(
new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent sender) {
formPanel.reset();
}
}
);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:35,代码来源:CommentPanel.java
示例13: onRender
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
protected void onRender(com.google.gwt.user.client.Element parent, int index) {
super.onRender(parent, index);
add(contentPanel);
Button searchBt = new Button("搜索", new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
criteria.removeAll();
if (!goodsNameTxt.getText().trim().equals("")) {
criteria.addCondition(new Condition(IGoods.NAME, Condition.EQUALS, goodsNameTxt.getText()));
}
toolBar.refresh();
}
});
HorizontalPanel goodsSearchPanel = new HorizontalPanel();
goodsSearchPanel.add(new Label("商品名称: "));
goodsSearchPanel.add(goodsNameTxt);
goodsSearchPanel.add(searchBt);
contentPanel.createPanel(IGoods.NAME, null,goodsSearchPanel);
final ListStore<BeanObject> store= onInitailization();
final ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setIconStyle("icon-table");
panel.setLayout(new FitLayout());
panel.add(grid);
panel.setSize(880, 350);
panel.setBottomComponent(toolBar);
add(panel);
HorizontalPanel datePickerOPeratePanel = initDatePickerPanel(store);
add(datePickerOPeratePanel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:40,代码来源:UpdateGoodsOnSellAuto.java
示例14: afterRender
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
@Override
protected void afterRender() {
super.afterRender();
// add(formPanel);
super.add(formPanel);
// formPanel.setBodyBorder(false);
//formPanel.setWidth(800);
FormLayout fl = new FormLayout();
fl.setLabelWidth(150);
fl.setLabelPad(50);
formPanel.setLayout(fl);
formPanel.setWidth("100%");
setupPanelLayout();
btnNew.setText(Resources.constants.ok());
btnReset.setText(Resources.constants.reset());
// panel.add(btnNew);
// panel.add(btnCancel);
formPanel.setButtonAlign(HorizontalAlignment.CENTER);
formPanel.addButton(btnNew);
formPanel.addButton(btnReset);
btnNew.addSelectionListener(selectionListener);
btnReset.addSelectionListener(
new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent sender) {
formPanel.reset();
}
}
);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:38,代码来源:BaseEntityEditPanel.java
示例15: updateInputForm
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
protected boolean updateInputForm(LayoutContainer container, List<CIModel> model) {
final FormPanel editForm = new FormPanel();
editForm.setWidth("100%");
editForm.setHeight("100%");
editForm.setScrollMode(Scroll.AUTO);
editForm.setFrame(true);
editForm.setFieldWidth(60);
editForm.setLabelWidth(100);
editForm.setButtonAlign(HorizontalAlignment.CENTER);
if (model.size() == 0) {
editForm.setHeading("Can't edit!!!!");
} else if (model.size() > 1) {
editForm.setHeading("Edit Multiple CI");
} else {
editForm.setHeading("Edit CI " + model.get(0).getDisplayName());
}
editForm.setIconStyle("icon-form");
editForm.setStyleAttribute("padding", "0");
if (model.size() > 0) {
CIModel m = model.get(0);
/*
m.getChildren(mdr, new AsyncCallback<List<? extends ModelData>>() {
public void onFailure(Throwable arg0) {
// TODO Auto-generated method stub
}
public void onSuccess(List<? extends ModelData> arg0) {
for (AttributeModel a : (List<AttributeModel>)arg0) {
// TODO: Switch on type, etc...
if (a.isComplex()) {
continue;
}
List<ValueModel> values = a.getValues();
if (values.size() == 0) {
editForm.add(getField(a, null));
} else if (values.size() == 1) {
editForm.add(getField(a, values.get(0)));
} else {
for (ValueModel v : values) {
editForm.add(getField(a, v));
}
}
}
editForm.layout();
}
});
*/
}
container.removeAll();
container.add(editForm);
container.layout();
return(true);
}
开发者ID:luox12,项目名称:onecmdb,代码行数:62,代码来源:CIInstanceBrowser.java
示例16: LoginWidget
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
/**
* Instantiates a new login widget.
*/
public LoginWidget()
{
FormLayout layout = new FormLayout();
layout.setLabelWidth(90);
layout.setDefaultWidth(175);
setLayout(layout);
setButtonAlign(HorizontalAlignment.LEFT);
setButtons("");
setIcon(Resources.ICONS.user());
setHeading(I18nProvider.getMessages().loginWidgetTitle());
setModal(true);
setBodyBorder(true);
setBodyStyle("padding: 8px;background: none");
setWidth(320);
setResizable(false);
setClosable(false);
KeyListener keyListener = new KeyListener()
{
@Override
public void componentKeyUp(ComponentEvent event)
{
if (userName.isDirty() || password.isDirty())
{
boolean loginInfoOk = validate();
if (loginInfoOk && (event.getKeyCode() == '\r'))
{
event.cancelBubble();
onSubmit();
}
}
}
};
userName = new TextField<String>();
userName.setMinLength(USERNAME_MIN_LENGTH);
userName.setFieldLabel(I18nProvider.getMessages().usernameLabel());
userName.addKeyListener(keyListener);
add(userName);
password = new TextField<String>();
password.setMinLength(PASSWORD_MIN_LENGTH);
password.setPassword(true);
password.setFieldLabel(I18nProvider.getMessages().passwordLabel());
password.addKeyListener(keyListener);
add(password);
setFocusWidget(userName);
}
开发者ID:geoserver,项目名称:geofence,代码行数:55,代码来源:LoginWidget.java
示例17: prepareAfterGetContacts
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
private Runnable prepareAfterGetContacts(ContentPanel mainPanel, final ListStore<ContactDTO> store) {
Runnable afterGetContacts;
final ToolBar actionsToolBar = new ToolBar();
actionsToolBar.setAlignment(HorizontalAlignment.LEFT);
actionsToolBar.add(Forms.button(I18N.CONSTANTS.addItem(), IconImageBundle.ICONS.add(), new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
showContactSelector(store);
}
}));
final Label offlineLabel = new Label(I18N.CONSTANTS.sigmahContactsOfflineUnavailable());
actionsToolBar.add(offlineLabel);
mainPanel.setTopComponent(actionsToolBar);
// if offline mode, no contact can be used
actionsToolBar.setEnabled(!Profiler.INSTANCE.isOfflineMode());
offlineLabel.setVisible(Profiler.INSTANCE.isOfflineMode());
if (eventBus != null) {
eventBus.addHandler(OfflineEvent.getType(), new OfflineHandler() {
@Override
public void handleEvent(OfflineEvent event) {
final boolean isOffline = ApplicationState.OFFLINE == event.getState();
actionsToolBar.setEnabled(!isOffline && !isReadOnly(store));
offlineLabel.setVisible(isOffline);
}
});
}
final Listener<StoreEvent<ContactDTO>> listener = new ContactStoreEventListener(store, actionsToolBar);
afterGetContacts = new Runnable() {
@Override
public void run() {
actionsToolBar.setEnabled(!Profiler.INSTANCE.isOfflineMode() && !isReadOnly(store));
store.addListener(Store.BeforeAdd, listener);
store.addListener(Store.Add, listener);
store.addListener(Store.BeforeClear, listener);
store.addListener(Store.Clear, listener);
store.addListener(Store.Remove, listener);
handlerManager.fireEvent(new RequiredValueEvent(store.getCount() > 0, true));
}
};
return afterGetContacts;
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:50,代码来源:ContactListElementDTO.java
示例18: initialize
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void initialize() {
gridRequiredElements = new Grid<FlexibleElementDTO>(new ListStore<FlexibleElementDTO>(), getRequiredElementsColumModel());
gridRequiredElements.setAutoExpandColumn(FlexibleElementDTO.LABEL);
gridRequiredElements.getView().setForceFit(true);
// Phases tab panel
tabPanelPhases = new TabPanel();
tabPanelPhases.setPlain(true);
tabPanelPhases.setTabScroll(true);
tabPanelPhases.setAnimScroll(true);
tabPanelPhases.addStyleName(X_BORDER_PANEL);
tabPanelPhases.addStyleName(WHITE_TAB_BODY);
// Toolbar
toolBar = new ToolBar();
toolBar.setAlignment(HorizontalAlignment.LEFT);
toolBar.setBorders(false);
buttonSavePhase = Forms.button(I18N.CONSTANTS.projectSavePhaseButton(), IconImageBundle.ICONS.save());
buttonActivatePhase = Forms.button(I18N.CONSTANTS.projectClosePhaseButton(), IconImageBundle.ICONS.activate());
buttonPhaseGuide = Forms.button(I18N.CONSTANTS.projectPhaseGuideHeader(), IconImageBundle.ICONS.info());
buttonActivatePhase.setEnabled(false);
buttonSavePhase.setEnabled(false);
buttonPhaseGuide.setEnabled(false);
toolBar.add(buttonActivatePhase);
toolBar.add(new SeparatorToolItem());
toolBar.add(buttonSavePhase);
toolBar.add(new SeparatorToolItem());
toolBar.add(buttonPhaseGuide);
// Tab item main panel
panelProjectModel = Layouts.border(false, PROJECT_CURRENT_PHASE_PANEL);
panelProjectModel.setBorders(false);
panelSelectedPhase = Layouts.fit(false);
requiredElementContentPanel = new ContentPanel(new FitLayout());
requiredElementContentPanel.add(gridRequiredElements);
panelProjectModel.add(requiredElementContentPanel,
Layouts.borderLayoutData(LayoutRegion.WEST, Layouts.LEFT_COLUMN_WIDTH, Margin.HALF_RIGHT, Margin.HALF_BOTTOM, Margin.HALF_LEFT));
final ContentPanel cp2 = Panels.content(I18N.CONSTANTS.phaseDetails(), Layouts.fitLayout());
cp2.setScrollMode(Scroll.AUTOY);
cp2.setTopComponent(toolBar);
cp2.add(panelSelectedPhase, Layouts.fitData(Margin.HALF_TOP, Margin.HALF_RIGHT, Margin.HALF_BOTTOM, Margin.HALF_LEFT));
panelProjectModel.add(cp2, Layouts.borderLayoutData(LayoutRegion.CENTER, Margin.HALF_RIGHT, Margin.HALF_BOTTOM));
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:57,代码来源:PhasesView.java
示例19: MagazineManager
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
/**
* 初始化界面。
*/
public MagazineManager() {
curState = new State();
BasePagingLoader loader = new PagingListService().getLoader(ModelNames.MAILTEMPLATE, criteria);
loader.load(0, 10);
store = new ListStore<BeanObject>(loader);
toolBar = new PagingToolBar(10);
toolBar.bind(loader);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
ColumnConfig title = new ColumnConfig(IMailTemplate.SUBJECT, "杂志标题", 200);
columns.add(title);
columns.add(new ColumnConfig(IMailTemplate.LASTMODIFY, "杂志上次编辑时间", 160));
columns.add(new ColumnConfig(IMailTemplate.LASTSEND, "杂志上次发送时间", 160));
ColumnConfig insert = new ColumnConfig("insert", "插入发送队列", 160);
columns.add(insert);
ColumnConfig actcol = new ColumnConfig("Action", "操作", 100);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
grid = new Grid<BeanObject>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
ActionCellRenderer render = new ActionCellRenderer(grid);
ActionCellRenderer insertRender = new ActionCellRenderer(grid);
ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
act.setImage("icon_edit.gif");
act.setAction("editMagazine($id)");
act.setTooltip("编辑");
render.addAction(act);
act = new ActionCellRenderer.ActionInfo();
act.setImage("icon_trash.gif");
act.setAction("deleteMagazine($id)");
act.setTooltip("删除");
render.addAction(act);
act = new ActionCellRenderer.ActionInfo();
act.setText("插入队列");
act.setAction("insertMagazine($id)");
act.setTooltip("插入队列");
insertRender.addAction(act);
actcol.setRenderer(render);
insert.setRenderer(insertRender);
ContentPanel panel = new ContentPanel();
panel.setFrame(true);
panel.setCollapsible(true);
panel.setAnimCollapse(false);
panel.setButtonAlign(HorizontalAlignment.CENTER);
panel.setIconStyle("icon-table");
panel.setLayout(new FitLayout());
panel.add(grid);
panel.setSize(850, 350);
panel.setBottomComponent(toolBar);
panel.setHeading("邮件杂志列表");
panel.setButtonAlign(HorizontalAlignment.LEFT);
// 添加新杂志
final com.extjs.gxt.ui.client.widget.button.Button addMagazine = new com.extjs.gxt.ui.client.widget.button.Button("添加新杂志");
addMagazine.addSelectionListener(new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) {
// add new magazine function
NewMagazine.State state = new NewMagazine.State();
state.execute();
}
});
panel.addButton(addMagazine);
add(panel);
initJS(this);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:76,代码来源:MagazineManager.java
示例20: createGrid
import com.extjs.gxt.ui.client.Style.HorizontalAlignment; //导入依赖的package包/类
private void createGrid() {
BasePagingLoader loader = new PagingListService().getLoader(ModelNames.BRAND);
loader.load(0, 50);
final ListStore<BeanObject> store = new ListStore<BeanObject>(loader);
store.addStoreListener(new StoreListener<BeanObject>() {
public void storeUpdate(StoreEvent<BeanObject> se) {
List<Record> changed = store.getModifiedRecords();
}
});
toolBar = new PagingToolBar(50);
toolBar.bind(loader);
List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
// CheckBoxSelectionModel<BeanObject> sm = new
// CheckBoxSelectionModel<BeanObject>();
// columns.add(sm.getColumn());
columns.add(new ColumnConfig(IBrand.NAME, "品牌名称", 80));
columns.add(new ColumnConfig(IBrand.SITE, "品牌网址", 150));
columns.add(new ColumnConfig(IBrand.DESC, "品牌描述", 230));
columns.add(new ColumnConfig(IBrand.ORDER, "排序", 50));
columns.add(new CheckColumnConfig(IBrand.SHOW, "是否显示", 80));
ColumnConfig actcol = new ColumnConfig("Action", "操作", 140);
columns.add(actcol);
ColumnModel cm = new ColumnModel(columns);
Grid<BeanObject> grid = new Grid<BeanObject>(store, cm);
grid.setLoadMask(true);
grid.setBorders(true);
// grid.setSelectionModel(sm);
// grid.setAutoExpandColumn("forum");
ActionCellRenderer render = new ActionCellRenderer(grid);
ActionCellRenderer.ActionInfo act = new ActionCellRenderer.ActionInfo();
act.setText("编辑 ");
act.setAction("changeBrand($id)");
act.setTooltip(Resources.constants.GoodsList_action_edit());
render.addAction(act);
act = new ActionCellRenderer.ActionInfo();
act.setText(" 删除");
act.setAction("deleteBrand($id)");
act.setTooltip(Resources.constants.GoodsList_action_delete());
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(750, 350);
panel.setBottomComponent(toolBar);
panel.setButtonAlign(HorizontalAlignment.CENTER);
vp.add(panel);
}
开发者ID:jbosschina,项目名称:jcommerce,代码行数:68,代码来源:DatabaseRestore.java
注:本文中的com.extjs.gxt.ui.client.Style.HorizontalAlignment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论