本文整理汇总了Java中com.google.gwt.user.client.ui.Frame.setPixelSize方法的典型用法代码示例。如果您正苦于以下问题:Java Frame.setPixelSize方法的具体用法?Java Frame.setPixelSize怎么用?Java Frame.setPixelSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.Frame
的用法示例。
在下文中一共展示了Frame.setPixelSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ViewServletPopup
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public ViewServletPopup(String title, String url) {
super();
setTitle(title);
// so we can play with the dimensions...
int innerWidth = Window.getClientWidth()*2 / 3;
int innerHeight = Window.getClientHeight()*2 /3;
Frame frame = new Frame(url);
frame.addStyleName("uploadFrame");
frame.setPixelSize(innerWidth - 30,innerHeight);
FlowPanel panel = new FlowPanel();
panel.setPixelSize(innerWidth+6,innerHeight+30);
ClosePopupButton closeButton = new ClosePopupButton(this);
closeButton.addStyleName("uploadCloseButton");
panel.add(closeButton);
panel.add(frame);
setWidget(panel);
}
示例2: BinaryPopup
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public BinaryPopup(String url, boolean larger) {
super();
setTitle("Binary");
int width = Window.getClientWidth() / 2;
int height = Window.getClientHeight() / 2;
if(larger) {
width = Window.getClientWidth() * 4 / 5;
height = Window.getClientHeight() * 4 / 5;
}
Frame frame = new Frame(url);
frame.setPixelSize(width, height);
FlowPanel panel = new FlowPanel();
panel.setStylePrimaryName(UIConsts.VERTICAL_FLOW_PANEL_STYLENAME);
panel.setPixelSize(width+6, height+30);
panel.add(new SimplePanel(new ClosePopupButton(this)));
panel.add(frame);
setWidget(panel);
}
示例3: createHiddenFrame
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private void createHiddenFrame(PrintFinishedInfo info) {
final Frame frame = new Frame();
frame.setVisible(false);
UrlBuilder builder = new UrlBuilder(info.getUrl());
for (String name : info.getParams().keySet()) {
builder.addParameter(name, info.getParams().get(name));
}
frame.setUrl(builder.toString());
frame.setPixelSize(0, 0);
frame.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);
frame.getElement().getStyle().setBorderWidth(0, Style.Unit.PX);
frame.addLoadHandler(new LoadHandler() {
@Override
public void onLoad(LoadEvent event) {
frame.removeFromParent();
}
});
RootPanel.get().add(frame);
}