本文整理汇总了Java中com.google.gwt.user.client.ui.SimplePanel.setSize方法的典型用法代码示例。如果您正苦于以下问题:Java SimplePanel.setSize方法的具体用法?Java SimplePanel.setSize怎么用?Java SimplePanel.setSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.SimplePanel
的用法示例。
在下文中一共展示了SimplePanel.setSize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateLegend
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
protected void generateLegend(int i, String ras) {
String c = "col" + i;
HTMLPanel html = new HTMLPanel("<span id='" + c + "'></span>");
SimplePanel p = new SimplePanel();
p.setSize("20px", "20px");
p.getElement().getStyle().setBackgroundColor(colorsArray[i]);
p.setStyleName("colorBox");
HorizontalPanel hp = new HorizontalPanel();
hp.setStyleName("margin-bottom");
hp.add(p);
String htmlString = "<b>" + ras + "</b>";
HTMLPanel htm = new HTMLPanel( htmlString );
hp.add(htm);
html.add(hp, c);
legend.add(html);
}
示例2: createLabelPanel
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
private void createLabelPanel() {
panelForItem =new SimplePanel();
panelForItem.setStylePrimaryName("listViewItemStyle");
panelForItem.setSize(ComponentConstants.LISTVIEW_PREFERRED_WIDTH + "px",
ComponentConstants.LISTVIEW_PREFERRED_HEIGHT + "px");
panelForItem.add(labelInItem);
listViewWidget.add(panelForItem);
}
示例3: onModuleLoad
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
@Override
public void onModuleLoad() {
GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
public void onUncaughtException(Throwable e) {
Log.log(Level.SEVERE, e.getMessage(), e);
MaterialToast.fireToast("Unknown error, please reload application");
}
});
Theme.bundle(); // inject
workPanel = new SimplePanel();
workPanel.setSize("100%", "100%");
ActivityMapper activityMapper = new MentorActivityMapper();
ActivityManager activityManager = new ActivityManager(activityMapper, MentorBus.get());
activityManager.setDisplay(workPanel);
Element loader = Document.get().getElementById("loader");
if (loader != null)
loader.removeFromParent();
RootPanel.get().add(workPanel, 0, 0);
Places.handler().handleCurrentHistory(); // goes to the place represented on URL, else default place
}
示例4: TablePanel
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public TablePanel(String name, Loader<TableDataView> loader) {
setInit(false);
this.name = name;
dataModel = new DataSetTableModel(loader);
dataModel.addHandler(modelEventHandler);
mainWrapper = new SimplePanel();
mainWrapper.addStyleName("mainWrapper");
mainWrapper.setSize("100%", "100%");
mainPanel.setSize("100%", "100%");
mainPanel.addStyleName("mainPanel");
DOM.setStyleAttribute(mainPanel.getElement(), "borderSpacing", "0px");
toolbarWrapper = new HorizontalPanel();
toolbarWrapper.setStyleName("firefly-toolbar");
stateId = name;
mainWrapper.add(mainPanel);
initWidget(mainWrapper);
sinkEvents(Event.ONMOUSEOVER);
WebEventManager.getAppEvManager().addListener(Name.DOWNLOAD_REQUEST_READY, new WebEventListener() {
public void eventNotify(WebEvent ev) {
if (ev.getName().equals(Name.DOWNLOAD_REQUEST_READY)) {
if (ev.getSource() instanceof DownloadRequest) {
downloadRequest = (DownloadRequest) ev.getSource();
}
}
}
});
helpButton.setVisible(false);
}
示例5: BaseRegion
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public BaseRegion(String id, String title, Widget widget, String width, String height) {
this.id = id;
this.title = title;
holder = new SimplePanel();
holder.setSize("100%", "100%");
if (widget != null) {
setContent(widget);
}
mainPanel = new SimplePanel(holder);
mainPanel.setSize(width, height);
mainPanel.getElement().setId("region-" + id);
setAlign(ALIGN_LEFT);
adjust(mainPanel, holder);
}
示例6: makeCenter
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
protected static SimplePanel makeCenter() {
final SimplePanel center = new SimplePanel();
center.setSize("100%", "100%");
return center;
}