本文整理匯總了Java中com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant方法的典型用法代碼示例。如果您正苦於以下問題:Java HasHorizontalAlignment.HorizontalAlignmentConstant方法的具體用法?Java HasHorizontalAlignment.HorizontalAlignmentConstant怎麽用?Java HasHorizontalAlignment.HorizontalAlignmentConstant使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.HasHorizontalAlignment
的用法示例。
在下文中一共展示了HasHorizontalAlignment.HorizontalAlignmentConstant方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: makeHoriPanel
import com.google.gwt.user.client.ui.HasHorizontalAlignment; //導入方法依賴的package包/類
public static HorizontalPanel makeHoriPanel(HasHorizontalAlignment.HorizontalAlignmentConstant halign,
HasVerticalAlignment.VerticalAlignmentConstant valign,
Widget... widgets) {
HorizontalPanel hp = new HorizontalPanel();
for (Widget w : widgets) {
hp.add(w);
}
if (halign != null) {
hp.setHorizontalAlignment(halign);
hp.setWidth("100%");
}
if (valign != null) {
hp.setVerticalAlignment(valign);
}
return hp;
}
示例2: getAlignment
import com.google.gwt.user.client.ui.HasHorizontalAlignment; //導入方法依賴的package包/類
private HasHorizontalAlignment.HorizontalAlignmentConstant getAlignment(FieldGroupTag fg) {
String align = fg.getAlign();
if (align == null || align.equalsIgnoreCase("left"))
return HasHorizontalAlignment.ALIGN_LEFT;
else if (align.equalsIgnoreCase("center"))
return HasHorizontalAlignment.ALIGN_CENTER;
else if (align.equalsIgnoreCase("right"))
return HasHorizontalAlignment.ALIGN_RIGHT;
else
return HasHorizontalAlignment.ALIGN_LEFT;
}
示例3: makeVertPanel
import com.google.gwt.user.client.ui.HasHorizontalAlignment; //導入方法依賴的package包/類
public static VerticalPanel makeVertPanel(HasHorizontalAlignment.HorizontalAlignmentConstant halign,
HasVerticalAlignment.VerticalAlignmentConstant valign,
Widget... widgets) {
VerticalPanel vp = new VerticalPanel();
for (Widget w : widgets) {
vp.add(w);
}
if (halign != null) {
vp.setHorizontalAlignment(halign);
}
if (valign != null) {
vp.setVerticalAlignment(valign);
}
return vp;
}
示例4: getCellData
import com.google.gwt.user.client.ui.HasHorizontalAlignment; //導入方法依賴的package包/類
@Override
public CellData getCellData(String colname) {
TableDataView.Align align = cmap.get(colname).getAlign();
HasHorizontalAlignment.HorizontalAlignmentConstant halign = align.equals(TableDataView.Align.LEFT) ?
HasHorizontalAlignment.ALIGN_LEFT : align.equals(TableDataView.Align.RIGHT) ?
HasHorizontalAlignment.ALIGN_RIGHT : HasHorizontalAlignment.ALIGN_CENTER;
return new CellData(String.valueOf(row.getValue(colname)), halign);
}
示例5: CellData
import com.google.gwt.user.client.ui.HasHorizontalAlignment; //導入方法依賴的package包/類
public CellData(String value, HasHorizontalAlignment.HorizontalAlignmentConstant halign,
HasVerticalAlignment.VerticalAlignmentConstant valign, boolean nowrap) {
this.value = value;
this.halign = halign;
this.valign = valign;
this.nowrap = nowrap;
}
示例6: setHalign
import com.google.gwt.user.client.ui.HasHorizontalAlignment; //導入方法依賴的package包/類
public void setHalign(HasHorizontalAlignment.HorizontalAlignmentConstant halign) {
this.halign = halign;
}
示例7: AlignRenderer
import com.google.gwt.user.client.ui.HasHorizontalAlignment; //導入方法依賴的package包/類
public AlignRenderer(HasHorizontalAlignment.HorizontalAlignmentConstant align) {
this.align = align;
}