本文整理汇总了Java中com.google.gwt.user.client.ui.SimplePanel.setWidget方法的典型用法代码示例。如果您正苦于以下问题:Java SimplePanel.setWidget方法的具体用法?Java SimplePanel.setWidget怎么用?Java SimplePanel.setWidget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.SimplePanel
的用法示例。
在下文中一共展示了SimplePanel.setWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MockBall
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
/**
* Creates a new MockBall component.
*
* @param editor editor of source file the component belongs to
*/
public MockBall(SimpleEditor editor) {
super(editor, TYPE, images.ball());
// Initialize mock ball UI
ballWidget = new SimplePanel();
ballWidget.setStylePrimaryName("ode-SimpleMockComponent");
// Create an appropriately sized ball
canvas = new GWTCanvas(diameter, diameter);
canvas.setPixelSize(diameter, diameter);
canvas.setBackgroundColor(GWTCanvas.TRANSPARENT);
fillCircle();
ballWidget.setWidget(canvas);
initComponent(ballWidget);
}
示例2: render
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
@Override
public void render(RendererCellReference rendererCellReference, final ComponentConnector componentConnector,
final SimplePanel panel) {
if (componentConnector != null) {
// render chart widgets deferred so measurements are correct. Do not render
// normal component widgets deferred as it causes some flicker when rerendering the grid
if (componentConnector.getClass().getName().equals("com.vaadin.addon.charts.shared.ChartConnector")) {
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
panel.setWidget(componentConnector.getWidget());
}
});
} else {
panel.setWidget(componentConnector.getWidget());
}
} else {
panel.clear();
}
}
示例3: setNodeWidget
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public void setNodeWidget(Widget nodeWidget) {
this.nodeWidget = nodeWidget;
addStyleName(CLASSNAME);
nodeCaptionDiv = DOM.createDiv();
nodeCaptionDiv.setPropertyString("className", CLASSNAME + "-caption");
Element wrapper = DOM.createDiv();
nodeCaptionSpan = DOM.createSpan();
DOM.appendChild(getElement(), nodeCaptionDiv);
DOM.appendChild(nodeCaptionDiv, wrapper);
DOM.appendChild(wrapper, nodeCaptionSpan);
if (BrowserInfo.get().isOpera()) {
/*
* Focus the caption div of the node to get keyboard navigation
* to work without scrolling up or down when focusing a node.
*/
nodeCaptionDiv.setTabIndex(-1);
}
FlowPanel nodeContent = new FlowPanel();
nodeContent.setStylePrimaryName(CLASSNAME + "-content");
setWidget(nodeContent);
nodeWidgetRoot = new SimplePanel();
nodeWidgetRoot.setStylePrimaryName(CLASSNAME + "-widget");
nodeWidgetRoot.setWidget(nodeWidget);
nodeContent.add(nodeWidgetRoot);
childNodeContainer = new FlowPanel();
childNodeContainer.setStyleName(CLASSNAME + "-children");
nodeContent.add(childNodeContainer);
}
示例4: render
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
@Override
public void render(RendererCellReference rendererCellReference, final ComponentConnector componentConnector,
final SimplePanel panel)
{
if (componentConnector != null) {
// render chart widgets deferred so measurements are correct. Do not render
// normal component widgets deferred as it causes some flicker when rerendering the grid
if (componentConnector.getClass().getName().equals("com.vaadin.addon.charts.shared.ChartConnector")) {
Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
@Override
public void execute() {
panel.setWidget(componentConnector.getWidget());
}
});
} else {
panel.setWidget(componentConnector.getWidget());
}
} else {
panel.clear();
}
}
示例5: generateIndicatorWidget
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
protected Widget generateIndicatorWidget(JSONObject v) {
VerticalPanel panel = new VerticalPanel();
GaugeImage img = new GaugeImage();
img.setEvidence( v.get( "p" ).isString().stringValue(), v.get( "m" ).isString().stringValue() );
SimplePanel pp = new SimplePanel();
pp.setWidget(img);
pp.setStyleName("contentResultsTable");
panel.add(pp);
panel.add( new HTML(
"Exposure: <font color='red'>" +
v.get( "e" ).isObject().get( "e" ).isNumber().doubleValue() +
"</font>") );
panel.setStyleName("headerTable");
panel.setHeight("100%");
return panel;
}
示例6: makeFixedSizeContainer
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public Panel makeFixedSizeContainer(int width, int height, boolean decorated) {
SimplePanel panel= new SimplePanel();
panel.setWidget(this);
panel.setPixelSize(width,height);
Panel retval= panel;
if (decorated) {
DecoratorPanel dp= new DecoratorPanel();
dp.setWidget(panel);
retval= dp;
}
return retval;
}
示例7: MockVideoPlayer
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
/**
* Creates a new MockVideoPlayer component.
*
* @param editor editor of source file the component belongs to
*/
public MockVideoPlayer(SimpleEditor editor) {
super(editor, TYPE, images.videoplayer());
// Initialize mock video UI
videoPlayerWidget = new SimplePanel();
videoPlayerWidget.setStylePrimaryName("ode-SimpleMockComponent");
videoPlayerWidget.setWidget(getIconImage());
initComponent(videoPlayerWidget);
}
示例8: MockSlider
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
/**
* Creates a new MockSlider component.
*
* @param editor editor of source file the component belongs to
*/
public MockSlider(SimpleEditor editor) {
super(editor, TYPE, images.slider());
// Initialize mock slider UI
sliderWidget = new SimplePanel();
sliderWidget.setStylePrimaryName("ode-SimpleMockComponent");
sliderWidget.setWidget(getIconImage());
initComponent(sliderWidget);
}
示例9: MockWebViewer
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
/**
* Creates a new MockWebViewer component.
*
* @param editor editor of source file the component belongs to
*/
public MockWebViewer(SimpleEditor editor) {
super(editor, TYPE, images.webviewer());
// Initialize mock WebViewer UI
SimplePanel webViewerWidget = new SimplePanel();
webViewerWidget.setStylePrimaryName("ode-SimpleMockContainer");
// TODO(halabelson): Center vertically as well as horizontally
webViewerWidget.addStyleDependentName("centerContents");
webViewerWidget.setWidget(largeImage);
initComponent(webViewerWidget);
}
示例10: makeMsg
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
private static Widget makeMsg(Widget w, String msgStyle, boolean makeScrollArea) {
SimplePanel panel= new SimplePanel();
DOM.setStyleAttribute(panel.getElement(),"fontSize", "120%");
panel.setWidget(w);
w.setStyleName(msgStyle);
return makeScrollArea ? new ScrollPanel(panel): panel;
}
示例11: DownloadGroupPanel
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
DownloadGroupPanel(MonitorItem monItem) {
SimplePanel topPanel= new SimplePanel();
initWidget(topPanel);
topPanel.setWidget(_content);
_monItem= monItem;
_oldBgStat = monItem.getStatus();
_title= monItem.getTitle();
_waitingMsg= ActivationFactory.getInstance().getWaitingMsg(monItem.getUIHint());
layout();
}
示例12: makeSideHeader
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
protected Widget makeSideHeader() {
Widget close = makeCloseButton(false);
SimplePanel panel= new SimplePanel();
panel.addStyleName(_ffCss.titleBgColor());
panel.addStyleName(_ffCss.titleColor());
panel.setHeight("100%");
VerticalPanel header = new VerticalPanel();
titleLabel.addStyleName("title-label");
titleLabel.setHeight("100%");
DOM.setStyleAttribute(titleLabel.getElement(), "cursor", "default");
GwtUtil.setStyle(header, "paddingTop", "3px");
titleLabel.setHTML(" ");
header.addStyleName(_ffCss.popupTitleVerticalBackground());
header.addStyleName(_ffCss.titleBgColor());
header.addStyleName(_ffCss.titleColor());
// header.addStyleName(_ffCss.popupBackground());
header.add(close);
header.add(titleLabel);
header.setCellHeight(titleLabel, "100%");
header.setWidth("15px");
header.setHeight("100%");
panel.setWidget(header);
return panel;
}
示例13: rightAlign
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public static Widget rightAlign(Widget w) {
SimplePanel wrapper = new SimplePanel();
wrapper.setWidth("100%");
wrapper.setWidget(w);
DOM.setElementAttribute(wrapper.getElement(), "align", "right");
return wrapper;
// HorizontalPanel hp = new HorizontalPanel();
// hp.setWidth("100%");
// hp.setHorizontalAlignment(HorizontalPanel.ALIGN_RIGHT);
// hp.add(w);
// return hp;
}
示例14: createInDiv
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
private static MiniPlotWidget createInDiv(SimplePanel panel,
String target,
String groupName,
boolean enableCatalogs) {
MiniPlotWidget mpw= makeMPW(groupName);
mpw.addStyleName("standard-border");
mpw.setCatalogButtonEnable(enableCatalogs);
panel.setWidget(mpw);
panel.addStyleName("fits-input-cmd-main-widget");
mpwMap.put(target, mpw);
return mpw;
}
示例15: init
import com.google.gwt.user.client.ui.SimplePanel; //导入方法依赖的package包/类
public boolean init() {
SimplePanel main = new SimplePanel();
form = createForm();
if (form != null) {
if (form.getFieldCount() > 0) {
addActionButtons();
}
main.setWidget(form);
searchPanel.setFormArea(main);
}
return true;
}