本文整理汇总了Java中com.google.gwt.user.client.ui.DisclosurePanel.setContent方法的典型用法代码示例。如果您正苦于以下问题:Java DisclosurePanel.setContent方法的具体用法?Java DisclosurePanel.setContent怎么用?Java DisclosurePanel.setContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.DisclosurePanel
的用法示例。
在下文中一共展示了DisclosurePanel.setContent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MediaControlUI
import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
/**
* Instantiates a new media control ui.
*/
public MediaControlUI()
{
setTitle("Media Control");
setSpacing(5);
DisclosurePanel tableSelectionDisclosurePanel = new DisclosurePanel("Tables Online");
add(tableSelectionDisclosurePanel);
tableSelectionDisclosurePanel.setOpen(true);
tableSelectionDisclosurePanel.setWidth("270px");
devicesOnline = new DevicesOnlineWidget();
tableSelectionDisclosurePanel.setContent(devicesOnline);
devicesOnline.setMultipleSelectionAllowed(true);
devicesOnline.setSize("270px", "100px");
devicesOnline.setDeviceType("tables");
devicesOnline.setAllTablesCheckBoxOffset("120px");
devicesOnline.setAllTablesCheckOptionEnabled(true);
devicesOnline.updateList();
mainButtons();
networkFlickButtons();
reloadContentsControls();
additionalControls();
}
示例2: onSuccess
import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
public void onSuccess(List<PacketBbsThread> result) {
for (final PacketBbsThread thread : result) {
final LazyPanel lazyPanel = new LazyPanel() {
@Override
protected Widget createWidget() {
DecoratorPanel decoratorPanel = new DecoratorPanel();
decoratorPanel.setWidget(new PanelThread((int) thread.id, thread.title));
return decoratorPanel;
}
};
OpenHandler<DisclosurePanel> openHandler = new OpenHandler<DisclosurePanel>() {
@Override
public void onOpen(OpenEvent<DisclosurePanel> event) {
lazyPanel.ensureWidget();
}
};
DisclosurePanel disclosurePanel = new DisclosurePanel(thread.title);
disclosurePanel.setContent(lazyPanel);
disclosurePanel.addOpenHandler(openHandler);
add(disclosurePanel);
}
}
示例3: ProjectorControlPanel
import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
/**
* Instantiates a new projector control panel.
*/
public ProjectorControlPanel()
{
setTitle("Projector Control");
setSpacing(5);
DisclosurePanel pnlProjectors = new DisclosurePanel("Projectors");
pnlProjectors.setOpen(true);
add(pnlProjectors);
pnlProjectors.setWidth("272px");
VerticalPanel verticalProjectorPanel = new VerticalPanel();
pnlProjectors.setContent(verticalProjectorPanel);
projectorsOnline = new DevicesOnlineWidget();
pnlProjectors.setContent(projectorsOnline);
projectorsOnline.setMultipleSelectionAllowed(true);
projectorsOnline.setSize("270px", "100px");
projectorsOnline.setDeviceType("projectors");
projectorsOnline.setAllTablesCheckBoxOffset("120px");
projectorsOnline.setAllTablesCheckOptionEnabled(true);
projectorsOnline.updateList();
DisclosurePanel tableSelectionDisclosurePanel = new DisclosurePanel("Tables");
add(tableSelectionDisclosurePanel);
tableSelectionDisclosurePanel.setOpen(true);
tableSelectionDisclosurePanel.setWidth("272");
tablesOnline = new DevicesOnlineWidget();
tableSelectionDisclosurePanel.setContent(tablesOnline);
tablesOnline.setMultipleSelectionAllowed(true);
tablesOnline.setSize("270px", "100px");
tablesOnline.setDeviceType("tables");
tablesOnline.setAllTablesCheckBoxOffset("120px");
tablesOnline.setAllTablesCheckOptionEnabled(true);
tablesOnline.updateList();
transferButtons();
manageSelectedProjectors();
tablesOnline.updateList();
}
示例4: SwotForGrowPanel
import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
public SwotForGrowPanel(final String mode, final RiaContext ctx) {
i18n = ctx.getI18n();
if(!QuestionAnswerBean.O_PART.equals(mode)) {
this.setVisible(false);
return;
}
setStyleName("mf-swotForGrowPanel");
ctx.setSwotForGrowPanel(this);
/*
* view mode
*/
viewPanel = new HorizontalPanel();
viewPanel.setStyleName("mf-swotHead");
swotSectionLabel = new HTML();
swotSectionLabel.setText(i18n.swot());
swotSectionLabel.setTitle(i18n.strenghtsToThreats());
swotSectionLabel.setStyleName("mf-swotLeftTitle");
viewPanel.add(swotSectionLabel);
VerticalPanel rightPanel=new VerticalPanel();
rightPanel.setStyleName("mf-swotRightPanel");
checklistDocumentation=new HTML(i18n.swotChecklistDocumentation());
checklistDocumentation.setStyleName("mf-checklistDocumentation");
rightPanel.add(checklistDocumentation);
swotChart = new SwotChart(ctx);
final DisclosurePanel disclosurePanel=new DisclosurePanel(i18n.analysisDetails());
disclosurePanel.setAnimationEnabled(true);
disclosurePanel.setContent(swotChart);
rightPanel.add(disclosurePanel);
swotSectionLabel.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if(ctx.getGrowPanel().isRdWr()) {
disclosurePanel.setOpen(!disclosurePanel.isOpen());
}
}
});
viewPanel.add(rightPanel);
add(viewPanel);
}
示例5: ActionPlanForGrowPanel
import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
public ActionPlanForGrowPanel(final String mode, final RiaContext ctx) {
i18n = ctx.getI18n();
if(!QuestionAnswerBean.W_PART.equals(mode)) {
this.setVisible(false);
return;
}
setStyleName("mf-actionPlanForGrowPanel");
/*
* view mode
*/
viewPanel = new HorizontalPanel();
viewPanel.setStyleName("mf-actionPlanHead");
actionPlanSectionLabel = new HTML();
actionPlanSectionLabel.setHTML(i18n.action()+"<br/>"+i18n.plan());
actionPlanSectionLabel.setTitle(i18n.actionPlanTowardsAchievingThisGoal());
actionPlanSectionLabel.setStyleName("mf-actionPlanLeftTitle");
viewPanel.add(actionPlanSectionLabel);
VerticalPanel rightPanel=new VerticalPanel();
rightPanel.setStyleName("mf-actionPlanRightPanel");
checklistDocumentation=new HTML(i18n.actionPlanChecklistDocumentation());
checklistDocumentation.setStyleName("mf-checklistDocumentation");
rightPanel.add(checklistDocumentation);
actionItemsTable = new FlexTable();
actionItemsTable.setStyleName("mf-viewActionPlan");
final DisclosurePanel disclosurePanel=new DisclosurePanel(i18n.actionPlanDetails());
disclosurePanel.setAnimationEnabled(true);
disclosurePanel.setContent(actionItemsTable);
rightPanel.add(disclosurePanel);
actionPlanSectionLabel.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
disclosurePanel.setOpen(!disclosurePanel.isOpen());
}
});
viewPanel.add(rightPanel);
add(viewPanel);
}
示例6: createAdvancedForm
import com.google.gwt.user.client.ui.DisclosurePanel; //导入方法依赖的package包/类
/**
* Create a form that contains undisclosed advanced options.
*/
@ShowcaseSource
private Widget createAdvancedForm() {
// Create a table to layout the form options
FlexTable layout = new FlexTable();
layout.setCellSpacing(6);
layout.setWidth("300px");
FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();
// Add a title to the form
layout.setHTML(0, 0, constants.cwDisclosurePanelFormTitle());
cellFormatter.setColSpan(0, 0, 2);
cellFormatter.setHorizontalAlignment(
0, 0, HasHorizontalAlignment.ALIGN_CENTER);
// Add some standard form options
layout.setHTML(1, 0, constants.cwDisclosurePanelFormName());
layout.setWidget(1, 1, new TextBox());
layout.setHTML(2, 0, constants.cwDisclosurePanelFormDescription());
layout.setWidget(2, 1, new TextBox());
// Create some advanced options
HorizontalPanel genderPanel = new HorizontalPanel();
String[] genderOptions = constants.cwDisclosurePanelFormGenderOptions();
for (int i = 0; i < genderOptions.length; i++) {
genderPanel.add(new RadioButton("gender", genderOptions[i]));
}
Grid advancedOptions = new Grid(2, 2);
advancedOptions.setCellSpacing(6);
advancedOptions.setHTML(0, 0, constants.cwDisclosurePanelFormLocation());
advancedOptions.setWidget(0, 1, new TextBox());
advancedOptions.setHTML(1, 0, constants.cwDisclosurePanelFormGender());
advancedOptions.setWidget(1, 1, genderPanel);
// Add advanced options to form in a disclosure panel
DisclosurePanel advancedDisclosure = new DisclosurePanel(
constants.cwDisclosurePanelFormAdvancedCriteria());
advancedDisclosure.setAnimationEnabled(true);
advancedDisclosure.ensureDebugId("cwDisclosurePanel");
advancedDisclosure.setContent(advancedOptions);
layout.setWidget(3, 0, advancedDisclosure);
cellFormatter.setColSpan(3, 0, 2);
// Wrap the contents in a DecoratorPanel
DecoratorPanel decPanel = new DecoratorPanel();
decPanel.setWidget(layout);
return decPanel;
}