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

Java ContentPanel类代码示例

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

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



ContentPanel类属于com.extjs.gxt.ui.client.widget包,在下文中一共展示了ContentPanel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
}
 
开发者ID:afbytes,项目名称:OneCMDBwithMaven,代码行数:20,代码来源:RegistrationWindow.java


示例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();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:19,代码来源:MDRConfigureWindow.java


示例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());
			*/
		}
		
	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:21,代码来源:CIPropertyPanel.java


示例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();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:19,代码来源:PropertyNavigationTree.java


示例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();
	
	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:19,代码来源:MDRTransformFinished.java


示例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);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:25,代码来源:AppView.java


示例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();
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:32,代码来源:FormWindow.java


示例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;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:42,代码来源:Panels.java


示例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;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:22,代码来源:FileSelectionView.java


示例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;
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:20,代码来源:EmailSubscribeManager.java


示例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);
}
 
开发者ID:jbosschina,项目名称:jcommerce,代码行数:24,代码来源:RegionPanel.java


示例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);
}
 
开发者ID:alfameCom,项目名称:salasanasiilo,代码行数:35,代码来源:WebPasswordSafe.java


示例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);
	*/
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:35,代码来源:MDRConfigureWindow.java


示例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();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:33,代码来源:CIGroupDesignWindow.java


示例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();
			}
		}
		
	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:37,代码来源:CIInstanceEditableReferenceTree.java


示例16: initUI

import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
protected void initUI() {
	setLayout(new FitLayout());
	
	ContentPanel panel = new ContentPanel();
	panel.setHeaderVisible(false);
	panel.setLayout(new FitLayout());
	panel.add(selector);
	
	
	add(panel);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:12,代码来源:ContentSelectUploadDialog.java


示例17: getComponent

import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected Component getComponent(ValueResult valueResult, boolean enabled) {
	final boolean canAdd = enabled && userCanPerformChangeType(ValueEventChangeType.ADD);
	
	final ContentPanel component = new ContentPanel();
	component.setHeadingText(getLabel());

	// Setting up the report store
	final List<?> reports = valueResult.getValuesObject();

	final ListStore<ReportReference> store = new ListStore<ReportReference>();
	if (reports != null)
		store.add((List<ReportReference>) reports);

	// Creating the toolbar
	if (canAdd) {
		component.setTopComponent(createToolbar(store));
	}

	// Creating the grid
	final FlexibleGrid<ReportReference> reportGrid = new FlexibleGrid<ReportReference>(store, null, createColumnModel(enabled));
	reportGrid.setAutoExpandColumn("name");
	reportGrid.setVisibleElementsCount(5);

	component.add(reportGrid);

	return component;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:32,代码来源:ReportListElementDTO.java


示例18: doAutoHeight

import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
/**
 * Adjusts the grid height for the current elements number.
 * 
 * @param grid
 *          The grid.
 * @param cp
 *          The grid's parent panel.
 */
private void doAutoHeight(Grid<IndicatorDTO> grid, ContentPanel cp) {
	if (grid.isViewReady()) {
		cp.setHeight((grid.getView().getBody().isScrollableX() ? 20 : 0)
			+ grid.el().getFrameWidth("tb")
			+ grid.getView().getHeader().getHeight()
			+ cp.getFrameHeight()
			+ grid.getView().getBody().firstChild().getHeight());
	}
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:18,代码来源:IndicatorsListElementDTO.java


示例19: initialize

import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void initialize() {

	// --
	// Center panel.
	// --

	add(createProjectDashboardPanel(), Layouts.borderLayoutData(LayoutRegion.CENTER, Margin.LEFT));

	// --
	// East panel.
	// --

	final ContentPanel remindersPanel = Panels.content(I18N.CONSTANTS.reminders(), false, Layouts.vBoxLayout());
	remindersPanel.add(createRemindersPanel(), Layouts.vBoxData());
	remindersPanel.add(createMonitoredPointsPanel(), Layouts.vBoxData());

	final BorderLayoutData eastData = Layouts.borderLayoutData(LayoutRegion.WEST, Layouts.LEFT_COLUMN_WIDTH);
	eastData.setCollapsible(true);
	add(remindersPanel, eastData);

	// --
	// South panel.
	// --

	final BorderLayoutData southData = Layouts.borderLayoutData(LayoutRegion.SOUTH, Layouts.SOUTH_PANEL_HEIGHT, Margin.TOP);
	southData.setCollapsible(true);
	add(createLinkedProjectsPanel(), southData);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:33,代码来源:ProjectDashboardView.java


示例20: buildHeaderPanel

import com.extjs.gxt.ui.client.widget.ContentPanel; //导入依赖的package包/类
/**
 * Builds the log frame header panel.
 * 
 * @return The main objective panel.
 */
private ContentPanel buildHeaderPanel() {

	// --
	// Title field.
	// --

	titleField = Forms.label(I18N.CONSTANTS.logFrameActionTitle());
	titleField.addListener(Events.Select, new Listener<BaseEvent>() {

		@Override
		public void handleEvent(final BaseEvent be) {
			mainObjectiveField.focus();
		}

	});

	// --
	// Main objective field.
	// --

	mainObjectiveField = Forms.text(I18N.CONSTANTS.logFrameMainObjective(), false);
	mainObjectiveField.addStyleName(STYLE_FLEXIBILITY_TEXT_FIELD);

	// --
	// Header form panel.
	// --

	final FormPanel headerFormPanel = Forms.panel(LABEL_WIDTH);
	headerFormPanel.setPadding(0, false);

	headerFormPanel.add(titleField);
	headerFormPanel.add(mainObjectiveField);

	return headerFormPanel;
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:41,代码来源:ProjectLogFrameView.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java Row类代码示例发布时间:2022-05-22
下一篇:
Java RowStyles类代码示例发布时间: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