本文整理汇总了Java中com.google.gwt.user.client.ui.Frame.setWidth方法的典型用法代码示例。如果您正苦于以下问题:Java Frame.setWidth方法的具体用法?Java Frame.setWidth怎么用?Java Frame.setWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.Frame
的用法示例。
在下文中一共展示了Frame.setWidth方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFrame
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private Frame createFrame() {
final Frame frame = new Frame(DEFAULT_TEMPLATE_PATH);
frame.getElement().setId(DEFAULT_FRAME_NAME);
frame.setTitle(UIMessages.INSTANCE.previewTitle());
frame.setWidth("500px");
frame.setHeight("500px");
frame.getElement().getStyle().setBackgroundColor("gray");
frame.setVisible(true);
RootPanel.get().add(frame);
frame.addLoadHandler(new LoadHandler() {
@Override
public void onLoad(LoadEvent event) {
frame.getElement().getStyle().setBackgroundColor("white");
zoomPageComboBox.setValue(75);
}
});
return frame;
}
示例2: GreetingPartViewImpl
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public GreetingPartViewImpl() {
frame = new Frame();
frame.setWidth("100%");
frame.setHeight("100%");
frame.getElement().getStyle().setBorderStyle(Style.BorderStyle.NONE);
frame.getElement().getStyle().setVisibility(Style.Visibility.HIDDEN);
frame.getElement().setAttribute("id", "greetingFrame");
frame.getElement().setAttribute("tabindex", "0");
setContentWidget(frame);
frame.addLoadHandler(
event -> frame.getElement().getStyle().setVisibility(Style.Visibility.VISIBLE));
handleFrameEvents(frame.getElement());
}
示例3: showHelp
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
/**
* Shows the help dialogue.
*/
private void showHelp() {
try {
final DialogBox helpDialog = new DialogBox(true);
helpDialog.setGlassEnabled(true);
//Renders "help.html" in an iframe.
Frame frame = new Frame("Help.html");
frame.setWidth(CONSTANTS.HelpDialogWidth());
frame.setHeight(CONSTANTS.HelpDialogWidth());
frame.getElement().getStyle().setBorderWidth(0, Unit.PX);
helpDialog.setWidget(frame);
helpDialog.center();
helpDialog.show();
} catch (Exception exc) {
logManager.logError(ERROR_SHOWING_HELP_DIALOG, "Error on trying to display the help dialogue");
exc.printStackTrace();
}
}
示例4: setHelpURL
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public void setHelpURL(String url) {
Frame help = new Frame(GWT.getModuleBaseURL()+url);
help.setHeight(frameHeight);
help.setWidth(frameWidth);
layoutPanel.clear();
layoutPanel.add(closeButton);
layoutPanel.add(help);
}
示例5: WelcomeScreen
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public WelcomeScreen() {
Frame f = new Frame("welcome.html");
f.setWidth("100%");
f.setHeight("100%");
initWidget(f);
}
示例6: StaticContentScreen
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public StaticContentScreen() {
frame = new Frame();
frame.setWidth("100%");
frame.setHeight("100%");
initWidget(frame);
}
示例7: createExportComposite
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private void createExportComposite(final QPagingScrollTable table, HorizontalPanel hPanel) {
createExportLabelsAndImages();
final DisclosurePanel exportPanel = new DisclosurePanel("Export");
String[] labels = getExportLabels(table.getSource().getExportFormats());
Image[] exportImages = getExportImages(labels);
FlexTable gridExportPanel = new FlexTable();
hPanel.add(exportPanel);
exportPanel.add(gridExportPanel);
final Frame frame = new Frame();
frame.setHeight("0");
frame.setWidth("0");
frame.setVisible(false);
final String moduleRelativeURL = GWT.getModuleBaseURL() + "/rpc.export";
gridExportPanel.setWidget(0,0,frame);
final CheckBox generateColumnHeaderBox= new CheckBox("Generate Column Header");
gridExportPanel.getFlexCellFormatter().setColSpan(1,1, 7);
gridExportPanel.setWidget(2, 1,generateColumnHeaderBox);
gridExportPanel.getFlexCellFormatter().setColSpan(2,1,6);
for (int i = 0; i < labels.length; i++) {
exportImages[i].setStylePrimaryName("datagridexportlabel");
exportImages[i].setTitle(labels[i]);
gridExportPanel.setWidget(0, i+1,exportImages[i]);
exportImages[i].addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (event.getSource() instanceof Image) {
Image image = (Image) (event.getSource());
final String exportCode = image.getTitle();
RPCServiceAsync service = MainFactoryActions.createService();
AsyncCallback<?> callback = new AsyncCallback<Object>() {
@Override
public void onSuccess(Object result) {
String uuid = (String) result;
// set frame
frame.setUrl(moduleRelativeURL + "?uuid=" + uuid);
ClientApplicationContext.getInstance().setBusy(false);
}
@Override
public void onFailure(Throwable caught) {
ClientApplicationContext.getInstance().log("Export failed", "Export failed for " + exportCode + " ", true, true, caught);
ClientApplicationContext.getInstance().setBusy(false);
FunctionsExecutor.setProcessedBuiltIn(true);
}
};
List<DataContainerGVO> dList = new ArrayList<DataContainerGVO>();
// following loop is to maintain the order of rows while exporting.
for(int i=0;i<(table.getAbsoluteLastRowIndex()+1);i++){
dList.add(table.getRowValue(i));
}
service.prepareForExport(dList, exportCode, null, generateColumnHeaderBox.getValue().booleanValue(), callback);
}
}
});
}
}
示例8: createHtmlDialogBox
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public static DialogBox createHtmlDialogBox(String title, String HtmlUrl)
{
// Create a dialog box and set the caption text
final DialogBox dialogBox = new DialogBox();
dialogBox.ensureDebugId("cwHtmlDialogBox");
dialogBox.setText("BikeBingle: " + title);
// Create a table to layout the content
VerticalPanel dialogContents = new VerticalPanel();
dialogContents.setSpacing(4);
dialogBox.setWidget(dialogContents);
int h = Window.getClientHeight() - 80;
int w = Window.getClientWidth() - 200;
if (w < 400)
w = 400;
dialogBox.setWidth(Integer.toString(w) + "px");
dialogBox.setHeight(Integer.toString(h) + "px");
Frame f = new Frame(HtmlUrl);
f.getElement().setAttribute("frameBorder","0");
//f.getElement().setAttribute("scrolling","no");
f.setStylePrimaryName("borderlessFrameForHelpPanel");
f.setWidth(Integer.toString(w-10) + "px");
f.setHeight(Integer.toString(h-30) + "px");
dialogContents.add(f);
dialogContents.setCellHorizontalAlignment(f, HasHorizontalAlignment.ALIGN_CENTER);
// Add an image to the dialog
//Image image = new Image("dialog-error.png");;
//dialogContents.add(image);
//dialogContents.setCellHorizontalAlignment(image,HasHorizontalAlignment.ALIGN_CENTER);
// Add a close button at the bottom of the dialog
Button closeButton = new Button("Ok",
new ClickListener() {
public void onClick(Widget sender) {
dialogBox.hide();
}
});
closeButton.setWidth("100px");
closeButton.setStylePrimaryName("addStackPanel-Button");
dialogContents.add(closeButton);
if (LocaleInfo.getCurrentLocale().isRTL()) {
dialogContents.setCellHorizontalAlignment(closeButton,
HasHorizontalAlignment.ALIGN_LEFT);
} else {
dialogContents.setCellHorizontalAlignment(closeButton,
HasHorizontalAlignment.ALIGN_RIGHT);
}
// Return the dialog box
return dialogBox;
}