本文整理匯總了Java中com.google.gwt.user.client.ui.VerticalPanel.clear方法的典型用法代碼示例。如果您正苦於以下問題:Java VerticalPanel.clear方法的具體用法?Java VerticalPanel.clear怎麽用?Java VerticalPanel.clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.VerticalPanel
的用法示例。
在下文中一共展示了VerticalPanel.clear方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: clearComponents
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
@Override
public void clearComponents() {
for (ComponentCategory category : categoryPanels.keySet()) {
VerticalPanel panel = categoryPanels.get(category);
panel.clear();
}
}
示例2: resize
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
public void resize() {
int px = getResizedWidth();
for (Widget w : widgets) {
if (!(w instanceof HTML)) {
VerticalPanel vp = ((VerticalPanel) w);
GwtUtil.setStyle(vp, "maxWidth", Integer.toString(px) + "px");
GwtUtil.setStyle(vp, "width", Integer.toString(px) + "px");
GwtUtil.setStyle(vp, "clear", "none");
for (Iterator<Widget> i = vp.iterator(); i.hasNext(); ) {
Widget c = i.next();
try {
if (panelMap.containsKey(vp)) {
int height = panelMap.get(vp).getCurrentPlot().getScreenHeight() + MPW_HEADER_HEIGHT;
int width = px - 8;
vp.clear();
vp.add(panelMap.get(vp).makeFixedSizeContainer(width, height, false));
vp.addStyleName("shadow");
GwtUtil.setStyles(vp, "margin", "2px",
"background","#E5E5E5 url(images/bg_boxgradient.png) repeat-x");
} else {
GwtUtil.setStyle(c, "maxWidth", Integer.toString(px) + "px");
GwtUtil.setStyle(c, "width", Integer.toString(px) + "px");
}
} catch (NullPointerException e) {
//todo: handle null pointer exception
}
}
}
}
}
示例3: initEditableMsg
import com.google.gwt.user.client.ui.VerticalPanel; //導入方法依賴的package包/類
/**
* init widget to edit main game message
* @param p_text
*/
private void initEditableMsg(VerticalPanel p_panel, String p_text)
{
p_panel.clear();
p_panel.add( m_text );
m_text.setPixelSize( 400, 350 );
m_text.setText( p_text );
m_text.addBlurHandler( this );
}