本文整理汇总了Java中com.extjs.gxt.ui.client.widget.ContentPanel类的典型用法代码示例。如果您正苦于以下问题:Java ContentPanel类的具体用法?Java ContentPanel怎么用?Java ContentPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContentPanel类属于com.extjs.gxt.ui.client.widget包,在下文中一共展示了ContentPanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initUI
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
protected void initUI() {
BaseModel param = item.getParams();
String url = (String)param.get("url");
Frame f = new Frame();
f.setSize("100%", "100%");
ContentPanel cp = new ContentPanel();
cp.setHeaderVisible(false);
cp.setLayout(new FitLayout());
cp.add(f);
ToolBar bottom = new ToolBar();
CheckBox checkBox = new CheckBox();
checkBox.setBoxLabel("Don't show this again");
bottom.add(new AdapterToolItem(checkBox));
bottom.add(new FillToolItem());
bottom.add(new CloseTextToolItem(this));
cp.setBottomComponent(bottom);
add(cp);
layout();
}
示例2: reloadPreview
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
protected void reloadPreview(final ContentPanel panel) {
panel.removeAll();
PreviewTableWidget preview = new PreviewTableWidget(transformConfig);
/*
preview.addListener(CMDBEvents.MDR_GRID_AVAILIABLE, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
if (be.source instanceof GridModelConfig) {
setSourceColumns((GridModelConfig)be.source);
}
}
});
*/
panel.add(preview);
panel.layout();
}
示例3: updateModel
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
private void updateModel(final ContentPanel cp, final CIModel model) {
DeferredCommand.addCommand(new Command() {
public void execute() {
localData = new CIModelCollection();
localData.addCIModel("offspring", model);
baseData = localData.copy();
redraw();
/*
cp.remove(currentGrid);
currentGrid = new CIPropertyGrid(gridModelConfig, localData);
currentGrid.setPermissions(permissions);
cp.add(currentGrid);
cp.layout();
setHeader(getParent(), "Properties for " + model.getDisplayName());
*/
}
});
}
示例4: initUI
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
public void initUI() {
TreeStore<TreeModel> store = new TreeStore<TreeModel>();
store.add(root, true);
final Tree tree = new Tree();
TreeBinder<TreeModel> binder = new TreeBinder<TreeModel>(tree, store);
binder.setDisplayProperty(property);
ContentPanel cp = new ContentPanel();
cp.setHeaderVisible(false);
cp.setLayout(new FitLayout());
cp.add(tree);
add(cp);
layout();
}
示例5: initUI
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
public void initUI() {
setLayout(new FitLayout());
ContentPanel cp = new ContentPanel();
//cp.setFrame(true);
cp.setScrollMode(Scroll.AUTO);
cp.setLayout(new FitLayout());
cp.setHeaderVisible(false);
cp.setUrl("help/mdr/mdr-finish.html");
ToolBar bar = new ToolBar();
bar.add(new FillToolItem());
bar.add(this.save);
bar.add(this.finish);
cp.setTopComponent(bar);
add(cp);
layout();
}
示例6: createNorth
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
/**
* Creates the north.
*/
private void createNorth()
{
north = new ContentPanel();
north.setHeaderVisible(false);
north.addListener(Events.Resize, new Listener<BaseEvent>()
{
public void handleEvent(BaseEvent be)
{
Dispatcher.forwardEvent(GeoGWTEvents.UPDATE_MAP_SIZE);
// Dispatcher.forwardEvent(GeofenceEvents.UPDATE_SOUTH_SIZE);
}
});
BorderLayoutData data = new BorderLayoutData(LayoutRegion.NORTH,
Constants.NORTH_PANEL_DIMENSION);
data.setMargins(new Margins(0, 5, 0, 5));
data.setSplit(true);
viewport.add(north, data);
}
示例7: addField
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
/**
* Adds a field in the form.
*
* @param field
* The field.
* @param fieldLabelString
* The label of the field. Can be <code>null</code>.
*/
private void addField(Field<?> field, String fieldLabelString) {
// Builds the field label.
final Label fieldLabel = new Label(fieldLabelString);
fieldLabel.setWidth("165px");
fieldLabel.addStyleName("flexibility-element-label");
// Builds the field panel.
final ContentPanel fieldPanel = new ContentPanel();
fieldPanel.setBodyBorder(false);
fieldPanel.setHeaderVisible(false);
fieldPanel.setLayout(new HBoxLayout());
fieldPanel.add(fieldLabel, new HBoxLayoutData(new Margins(4, 20, 0, 0)));
final HBoxLayoutData flex = new HBoxLayoutData(new Margins(0, 20, 0, 0));
flex.setFlex(1);
fieldPanel.add(field, flex);
// Adds the field in the panel.
fieldsPanel.setHeight(FIELD_HEIGHT * fields.size());
fieldsPanel.add(fieldPanel, new VBoxLayoutData(new Margins(4, 0, 0, 0)));
fieldsPanel.layout();
}
示例8: content
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
/**
* Builds a new {@link ContentPanel}.
*
* @param title
* The panel header title (html is supported).
* If {@code null}, header is disabled and automatically hidden.
* @param collapsible
* {@code true} to set the panel collapsible (expand/collapse toggle button).
* @param layout
* The panel layout. If {@code null}, default {@link FitLayout} is set.
* @param scroll
* The {@link Scroll} configuration. If {@code null}, no scroll is set.
* @param stylenames
* (optional) Style names added to the panel component.
* {@code null} values are ignored.
* @return The {@link ContentPanel} instance.
* @see ContentPanel
*/
public static ContentPanel content(final String title, final boolean collapsible, final Layout layout, final Scroll scroll, final String... stylenames) {
final ContentPanel panel = new ContentPanel(layout != null ? layout : new FitLayout());
panel.setHeadingHtml(ClientUtils.isNotBlank(title) ? title : null);
panel.setHeaderVisible(ClientUtils.isNotBlank(title));
panel.setCollapsible(collapsible);
if (ClientUtils.isNotEmpty(stylenames)) {
for (final String stylename : stylenames) {
if (ClientUtils.isBlank(stylename)) {
continue;
}
panel.addStyleName(stylename);
}
}
if (scroll != null) {
panel.setScrollMode(scroll);
}
return panel;
}
示例9: createGridPanel
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的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;
}
示例10: getExportButtonPanel
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
private ContentPanel getExportButtonPanel() {
final ContentPanel exportButtonPanel = new ContentPanel();
// export file button
Button exportButton = new Button("导出列表");
exportButton.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
// download the file from the server
Window.Location.assign(GWT.getModuleBaseURL() + "downloadService/");
}
});
exportButtonPanel.add(exportButton);
exportButtonPanel.setWidth(850);
exportButtonPanel.setHeight(70);
exportButtonPanel.setFrame(true);
return exportButtonPanel;
}
示例11: buildCurrentRegionLabel
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的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);
}
示例12: onModuleLoad
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
public void onModuleLoad()
{
// menu panel
menuPanel = new ContentPanel(new FillLayout());
menuPanel.setHeaderVisible(false);
menuPanel.setBorders(false);
refreshMenu();
viewport = new Viewport();
viewport.setLayout(new RowLayout(Orientation.VERTICAL));
// title panel
topPanel = new ContentPanel();
HBoxLayout titleLayout = new HBoxLayout();
titleLayout.setPadding(new Padding(5));
titleLayout.setHBoxLayoutAlign(HBoxLayoutAlign.TOP);
topPanel.setLayout(titleLayout);
topPanel.setHeight(25);
topPanel.setHeaderVisible(false);
topPanel.setBorders(false);
refreshTopPanel();
viewport.add(topPanel, new RowData(1, -1));
//menu panel
viewport.add(menuPanel, new RowData(1, -1));
//main panel
mainPanel = new ContentPanel(new FillLayout());
mainPanel.setHeaderVisible(false);
viewport.add(mainPanel, new RowData(1, 1));
RootPanel.get().add(viewport);
log.info(textMessages.webpasswordsafeTitle(Constants.VERSION));
pingServer(this);
}
示例13: getDataSourcePreviewTab
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
private ContentPanel getDataSourcePreviewTab() {
final ContentPanel panel = new ContentPanel();
panel.setLayout(new FitLayout());
panel.getHeader().addTool(new ToolButton("x-tool-refresh", new SelectionListener<ComponentEvent>() {
@Override
public void componentSelected(ComponentEvent ce) {
reloadPreview(panel);
}
}));
preview = new PreviewTableWidget(transformConfig);
/*
preview.addListener(CMDBEvents.MDR_GRID_AVAILIABLE, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
if (be.source instanceof GridModelConfig) {
setSourceColumns((GridModelConfig)be.source);
}
}
});
*/
panel.add(preview);
return(panel);
/*
LayoutContainer container = new LayoutContainer();
container.setLayout(new FitLayout());
container.add(new WidgetComponent(new TextArea()));
return(container);
*/
}
示例14: onRender
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
mdr = new ContentFile();
String mdrConf = item.getParams().get("mdrConfig");
if (mdrConf == null) {
mdrConf = CMDBSession.get().getConfig().get(Config.OneCMDBWebService);
}
mdr.setPath(mdrConf);
List<String> roots = null;
Object o = item.getParams().get("rootCI");
if (o instanceof List) {
roots = item.getParams().get("rootCI");
}
ContentPanel panel = new ContentPanel();
panel.setHeaderVisible(false);
panel.setLayout(new FitLayout());
/*
QueryEditorWidget editor = new QueryEditorWidget(mdr, roots);
editor.setPermission(this.permissions);
panel.add(editor);
*/
//GroupTableWidget table = new GroupTableWidget("id", new GroupDescription());
//this.permissions.setCurrentState(CMDBPermissions.PermissionState.EDIT);
//table.setPermission(this.permissions);
//panel.add(table);
add(panel);
layout();
}
示例15: init
import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
public void init() {
setLayout(new RowLayout());
editContainer = new ContentPanel();
editContainer.setHeight("150px");
editContainer.setLayout(new RowLayout());
editContainer.setLayoutOnChange(true);
refTree = new CIInstanceReferenceTree(this.mdr, this.model);
refTree.setPermission(permissions);
/*
refTree.setReadonly(readonly);
refTree.setDeletable(deletable);
*/
add(refTree, new RowData(1,1));
add(editContainer, new RowData(1,-1));
refTree.addListener(CIInstanceReferenceTree.CI_SELECTED_EVENT, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
if (be.source instanceof CIModel) {
modelLocal = (CIModel)be.source;
modelBase = modelLocal.copy();
editCI = new EditableSingleCIGrid(mdr, modelLocal);
editCI.setPermissions(permissions);
//editCI.setReadonly(readonly);
editContainer.removeAll();
editContainer.setHeading("Attributes for " + modelLocal.getDisplayName());
editContainer.add(getToolBar(), new RowData(1,-1));
editContainer.add(editCI, new RowData(1,1));
editContainer.layout();
CIInstanceEditableReferenceTree.this.layout();
}
}
});
}