本文整理汇总了Java中com.google.gwt.dom.client.Style.VerticalAlign类的典型用法代码示例。如果您正苦于以下问题:Java VerticalAlign类的具体用法?Java VerticalAlign怎么用?Java VerticalAlign使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VerticalAlign类属于com.google.gwt.dom.client.Style包,在下文中一共展示了VerticalAlign类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPlatforms
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
@Override
public void setPlatforms(List<Platform> platforms) {
for (int i=0;i<platforms.size();i++) {
Platform platform = platforms.get(i);
Image image = new Image(Utils.getPlatformIcon(platform));
image.setTitle(Utils.getPlatformText(platform));
image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
Label label = new Label(Utils.getPlatformText(platform));
platformsPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
platformsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
platformsPanel.add(image);
platformsPanel.setCellWidth(image, "32px");
platformsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
platformsPanel.add(label);
if (i < platforms.size()-1) {
label.getElement().getStyle().setPaddingRight(10, Unit.PX);
}
label.getElement().getStyle().setPaddingLeft(8, Unit.PX);
}
}
示例2: setFeatures
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
@Override
public void setFeatures(List<Feature> features) {
for (int i=0;i<features.size();i++) {
Feature feature = features.get(i);
Image image = new Image(Utils.getFeatureIcon(feature));
image.setTitle(Utils.getFeatureText(feature));
image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
Label label = new Label(Utils.getFeatureText(feature));
featuresPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
featuresPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
featuresPanel.add(image);
featuresPanel.setCellWidth(image, "32px");
featuresPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
featuresPanel.add(label);
if (i < features.size()-1) {
label.getElement().getStyle().setPaddingRight(10, Unit.PX);
}
label.getElement().getStyle().setPaddingLeft(8, Unit.PX);
}
}
示例3: setSdkLanguages
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
@Override
public void setSdkLanguages(List<SdkLanguage> sdkLanguages) {
for (int i=0;i<sdkLanguages.size();i++) {
SdkLanguage sdkLanguage = sdkLanguages.get(i);
Image image = new Image(Utils.getSdkLanguageIcon(sdkLanguage));
image.setTitle(Utils.getSdkLanguageText(sdkLanguage));
image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
Label label = new Label(Utils.getSdkLanguageText(sdkLanguage));
sdkLanguagesPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
sdkLanguagesPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
sdkLanguagesPanel.add(image);
sdkLanguagesPanel.setCellWidth(image, "32px");
sdkLanguagesPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
sdkLanguagesPanel.add(label);
if (i < sdkLanguages.size()-1) {
label.getElement().getStyle().setPaddingRight(10, Unit.PX);
}
label.getElement().getStyle().setPaddingLeft(8, Unit.PX);
}
}
示例4: setPlatforms
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
@Override
public void setPlatforms(List<Platform> platforms) {
for (int i=0;i<platforms.size();i++) {
Platform platform = platforms.get(i);
Image image = new Image(Utils.getPlatformIcon(platform));
image.setTitle(Utils.getPlatformText(platform));
image.getElement().getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
Label label = new Label(Utils.getPlatformText(platform));
platformsPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
platformsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
platformsPanel.add(image);
platformsPanel.setCellWidth(image, "32px");
platformsPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT);
platformsPanel.add(label);
if (i < platforms.size()-1) {
label.getElement().getStyle().setPaddingRight(10, Unit.PX);
}
label.getElement().getStyle().setPaddingLeft(8, Unit.PX);
}
}
示例5: NullableCheckBox
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
public NullableCheckBox(Element elem) {
super(elem);
inputElem = InputElement.as(elem);
inputElem.setPropertyBoolean("indeterminate", true);
inputElem.getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
anchor.getStyle().setDisplay(Style.Display.INLINE_BLOCK);
anchor.getStyle().setPosition(Style.Position.RELATIVE);
anchor.getStyle().setHeight(100, Style.Unit.PCT);
anchor.getStyle().setVerticalAlign(Style.VerticalAlign.MIDDLE);
getElement().appendChild(anchor);
}
示例6: addGroup
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
public Object addGroup( String display, String name, Object parent )
{
int row = display != null ? table.getRowCount() : -1;
// create the new group
GroupInfo parentInfo = (GroupInfo) parent;
GroupInfo info = new GroupInfo( name, parentInfo, row );
// display the new group
if( display != null && row >= 0 )
{
table.setHTML( row, 0, display );
table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP );
table.getCellFormatter().getElement( row, 0 ).setAttribute( "colSpan", "2" );
table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingTop( 25, Unit.PX );
table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingBottom( 10, Unit.PX );
table.getCellFormatter().getElement( row, 0 ).getStyle().setFontWeight( FontWeight.BOLD );
}
return info;
}
示例7: addField
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
public Object addField( String display, String name, FieldType fieldType, Widget fieldWidget, Object parent )
{
int row = table.getRowCount();
// create the new field
GroupInfo parentInfo = (GroupInfo) parent;
FieldInfo info = new FieldInfo( name, parentInfo, row, fieldType, fieldWidget );
// Display the new field
if( display != null )
{
HTMLStream stream = new HTMLStream();
stream.addRight( new HTML( display ) );
stream.clFl();
table.setWidget( row, 0, stream );
}
table.setWidget( row, 1, info.widget );
table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP );
table.getCellFormatter().getElement( row, 1 ).getStyle().setVerticalAlign( VerticalAlign.TOP );
table.getCellFormatter().getElement( row, 0 ).getStyle().setFontWeight( FontWeight.BOLD );
return info;
}
示例8: updateTableRow
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
private void updateTableRow(final PlayerErrorInfo item, int row) {
bodyFlexTable.setText(row, 0, item.getTimestamp());
bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 0).getStyle().setVerticalAlign(VerticalAlign.TOP);
bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 0).getStyle().setLineHeight(16, Unit.PX);
String errorString =
// Integer.toString(item.getStatusCode()) + " - " +
item.getErrorMessage();
if (item.getStatusCode() != 0 && (errorRow == -1 || (item.getStatusCode() == 1 && row == 0))) {
errorString += " Click <a href='" + item.getHelpLink() + "' target='_blank'>here</a> for details on this error.";
}
bodyFlexTable.setHTML(row, 1, errorString);
// if (errorRow == -1 || (item.getStatusCode() == 1 && row == 0)) {
// bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 1).getStyle().setColor("red");
// }
bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 1).getStyle().setWhiteSpace(WhiteSpace.NORMAL);
bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 1).getStyle().setLineHeight(16, Unit.PX);
}
示例9: setVerticalAlignment
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
private void setVerticalAlignment(VerticalAlign align)
{
verticalAlignment = HasVerticalAlignment.class.getName();
switch (align)
{
case TOP:
verticalAlignment += ".ALIGN_TOP";
break;
case BOTTOM:
verticalAlignment += ".ALIGN_BOTTOM";
break;
case MIDDLE:
default:
verticalAlignment += ".ALIGN_MIDDLE";
break;
}
}
示例10: setImage
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
public void setImage(Image img) {
if (iImageElement != null)
iAnchor.removeChild(iImageElement);
if (img == null) return;
iImage = img;
iImageElement = img.getElement();
iImageElement.getStyle().setVerticalAlign(VerticalAlign.MIDDLE);
iAnchor.insertFirst(iImageElement);
}
示例11: getHorizontalPanel
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
private HorizontalPanel getHorizontalPanel() {
final HorizontalPanel horizontalGroup = new HorizontalPanel();
horizontalGroup.setSpacing(5);
horizontalGroup.getElement().getStyle()
.setVerticalAlign(VerticalAlign.MIDDLE);
return horizontalGroup;
}
示例12: getMapGroupTools
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
private HorizontalPanel getMapGroupTools() {
HorizontalPanel horizontalGroup = new HorizontalPanel();
horizontalGroup.setSpacing(5);
horizontalGroup.getElement().getStyle()
.setVerticalAlign(VerticalAlign.MIDDLE);
horizontalGroup.add(layerManagerTool);
horizontalGroup.add(layerCatalogTool);
horizontalGroup.add(basicToolBarTool);
return horizontalGroup;
}
示例13: getViewGroupTools
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
private HorizontalPanel getViewGroupTools() {
HorizontalPanel horizontalGroup = new HorizontalPanel();
horizontalGroup.setSpacing(5);
horizontalGroup.getElement().getStyle()
.setVerticalAlign(VerticalAlign.MIDDLE);
horizontalGroup.add(w3wTool);
horizontalGroup.add(mapToolTipTool);
horizontalGroup.add(graticuleTool);
return horizontalGroup;
}
示例14: getExtentGroupTools
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
private HorizontalPanel getExtentGroupTools() {
HorizontalPanel horizontalGroup = new HorizontalPanel();
horizontalGroup.setSpacing(5);
horizontalGroup.getElement().getStyle()
.setVerticalAlign(VerticalAlign.MIDDLE);
horizontalGroup.add(currentExtentTool);
horizontalGroup.add(customExtentTool);
horizontalGroup.add(lockCurrentExtentTool);
return horizontalGroup;
}
示例15: getProjectGroupTools
import com.google.gwt.dom.client.Style.VerticalAlign; //导入依赖的package包/类
private HorizontalPanel getProjectGroupTools() {
HorizontalPanel horizontalGroup = new HorizontalPanel();
horizontalGroup.setSpacing(5);
horizontalGroup.getElement().getStyle()
.setVerticalAlign(VerticalAlign.MIDDLE);
horizontalGroup.add(openProjectTool);
horizontalGroup.add(saveProjectTool);
horizontalGroup.add(infoProjectTool);
return horizontalGroup;
}