本文整理汇总了Java中com.extjs.gxt.ui.client.widget.layout.FitLayout类的典型用法代码示例。如果您正苦于以下问题:Java FitLayout类的具体用法?Java FitLayout怎么用?Java FitLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FitLayout类属于com.extjs.gxt.ui.client.widget.layout包,在下文中一共展示了FitLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initUI
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的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: onRender
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
setLayout(new FitLayout());
ContentFile mdr = new ContentFile();
String mdrConf = item.getParams().get("mdrConfig");
if (mdrConf == null) {
mdrConf = CMDBSession.get().getConfig().get(Config.OneCMDBWebService);
}
mdr.setPath(mdrConf);
String configFile = item.getParams().get("tableconfig");
ContentFile config = new ContentFile(configFile);
String header = item.getParams().get("header");
EditableCIInstanceGrid grid = new EditableCIInstanceGrid(mdr, config, header);
add(grid);
layout();
}
示例3: onRender
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
setLayout(new FitLayout());
String customDef = item.getParams().get("customDefinition");
String root = item.getParams().get("rootElement");
String record = item.getParams().get("recordElement");
CustomViewSelectWidget sel = new CustomViewSelectWidget(root, record);
sel.setCustomFile(customDef);
add(sel);
layout();
}
示例4: initUI
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的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.layout.FitLayout; //导入依赖的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: initUI
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
public void initUI() {
List<AttributeColumnConfig> attrs = new ArrayList<AttributeColumnConfig>();
AttributeColumnConfig aCfg = new AttributeColumnConfig();
aCfg.setId(GroupDescriptionConfig.NAME);
aCfg.setName("Name");
aCfg.setType("xs:string");
attrs.add(aCfg);
aCfg = new AttributeColumnConfig();
aCfg.setId(GroupDescriptionConfig.ICON);
aCfg.setName("Icon");
aCfg.setType("xs:content");
attrs.add(aCfg);
aCfg = new AttributeColumnConfig();
aCfg.setId(GroupDescriptionConfig.DESCRIPTION);
aCfg.setName("Description");
aCfg.setType("xs:textarea");
attrs.add(aCfg);
InputFormWidget form = new InputFormWidget(config, attrs );
setLayout(new FitLayout());
add(form);
}
示例7: RuleManagementWidget
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
/**
* Instantiates a new rule management widget.
*
* @param rulesService
* the rules service
* @param gsUsersService
* the gs users service
* @param profilesService
* the profiles service
* @param instancesService
* the instances service
* @param workspacesService
* the workspaces service
*/
public RuleManagementWidget(RulesManagerRemoteServiceAsync rulesService,
GsUsersManagerRemoteServiceAsync gsUsersService,
ProfilesManagerRemoteServiceAsync profilesService,
InstancesManagerRemoteServiceAsync instancesService,
WorkspacesManagerRemoteServiceAsync workspacesService)
{
setMonitorWindowResize(true);
setHeaderVisible(false);
setFrame(true);
setLayout(new FitLayout());
setScrollMode(Scroll.NONE);
setAutoWidth(true);
setHeight(Constants.SOUTH_PANEL_DIMENSION - 25);
setRulesInfo(new RuleGridWidget(rulesService, gsUsersService, profilesService, instancesService,
workspacesService));
add(getRulesInfo().getGrid());
setBottomComponent(this.getRulesInfo().getToolBar());
}
示例8: UserManagementWidget
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
/**
* Instantiates a new user management widget.
*
* @param gsManagerServiceRemote
* the gs manager service remote
* @param profilesManagerServiceRemote
* the profiles manager service remote
*/
public UserManagementWidget(GsUsersManagerRemoteServiceAsync gsManagerServiceRemote,
ProfilesManagerRemoteServiceAsync profilesManagerServiceRemote)
{
setMonitorWindowResize(true);
setHeaderVisible(false);
setFrame(true);
setLayout(new FitLayout());
setScrollMode(Scroll.NONE);
setAutoWidth(true);
setHeight(Constants.SOUTH_PANEL_DIMENSION - 25);
setUsersInfo(new UserGridWidget(gsManagerServiceRemote, profilesManagerServiceRemote));
setBottomComponent(this.getUsersInfo().getToolBar());
add(getUsersInfo().getGrid());
}
示例9: LayerAttributesWidget
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
/**
* Instantiates a new layer attributes widget.
*
* @param model
* the model
* @param rulesService
* the rules service
*/
public LayerAttributesWidget(RuleModel model, RulesManagerRemoteServiceAsync rulesService)
{
this.theRule = model;
setHeaderVisible(false);
setFrame(true);
setHeight(330);
setLayout(new FitLayout());
setLayerAttributesInfo(new LayerAttributesGridWidget(this.theRule, rulesService));
add(getLayerAttributesInfo().getGrid());
super.setMonitorWindowResize(true);
setScrollMode(Scroll.NONE);
setBottomComponent(this.getLayerAttributesInfo().getToolBar());
}
示例10: LayerCustomPropsWidget
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
/**
* Instantiates a new layer custom props widget.
*
* @param model
* the model
* @param rulesService
* the rules service
*/
public LayerCustomPropsWidget(RuleModel model, RulesManagerRemoteServiceAsync rulesService)
{
this.model = model;
setHeaderVisible(false);
setFrame(true);
setHeight(330);
setLayout(new FitLayout());
setLayerCustomPropsInfo(new LayerCustomPropsGridWidget(model, rulesService));
add(getLayerCustomPropsInfo().getGrid());
super.setMonitorWindowResize(true);
setScrollMode(Scroll.NONE);
setBottomComponent(this.getLayerCustomPropsInfo().getToolBar());
}
示例11: initializeWindow
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
/**
* Initialize window.
*/
private void initializeWindow() {
initSize();
setResizable(false);
addWindowListener(new WindowListener() {
@Override
public void windowHide(WindowEvent we) {
reset();
}
});
setLayout(new FitLayout());
setModal(true);
setPlain(true);
}
示例12: content
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的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;
}
示例13: fitLayout
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
/**
* Builds a new {@link FitLayout}.
*
* @param transparent
* {@code true} to set a transparent background, {@code false} to set the default background.
* @param stylenames
* (optional) Style names added to the layout inner {@code target}.
* @return The {@link FitLayout} instance.
* @see FitLayout
*/
public static FitLayout fitLayout(final boolean transparent, final String... stylenames) {
return new FitLayout() {
@Override
protected void initTarget() {
super.initTarget();
if (transparent) {
target.addStyleName(LAYOUT_TRANSPARENT_STYLE_NAME);
}
if (ClientUtils.isNotEmpty(stylenames)) {
target.addStyleName(stylenames);
}
}
};
}
示例14: getDataSourcePreviewTab
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的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);
*/
}
示例15: onRender
import com.extjs.gxt.ui.client.widget.layout.FitLayout; //导入依赖的package包/类
@Override
protected void onRender(Element parent, int index) {
ContentFile mdr = new ContentFile();
String mdrConf = item.getParams().get("mdrConfig");
if (mdrConf == null) {
mdrConf = CMDBSession.get().getConfig().get(Config.OneCMDBWebService);
}
mdr.setPath(mdrConf);
super.onRender(parent, index);
setLayout(new FitLayout());
TabPanel tab = new TabPanel();
TabItem overviewItem = new TabItem("MDR Overview");
overviewItem.setLayout(new FitLayout());
overviewItem.add(new MDROverview(mdr, this.permissions));
TabItem detailTab = new TabItem("MDR Details");
detailTab.setLayout(new FitLayout());
detailTab.add(detail);
tab.add(overviewItem);
tab.add(detailTab);
add(tab);
layout();
if (getParent() instanceof Window) {
((Window)getParent()).addListener(Events.BeforeClose, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
HelpInfo.abort();
}
});
}
}