本文整理汇总了Java中com.google.gwt.dom.client.Style.Float类的典型用法代码示例。如果您正苦于以下问题:Java Float类的具体用法?Java Float怎么用?Java Float使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Float类属于com.google.gwt.dom.client.Style包,在下文中一共展示了Float类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildUI
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
private void buildUI() {
final HorizontalPanel searchStuff = new HorizontalPanel();
mainPanel.setWidth("100%");
searchStuff.add(placesMap);
searchStuff.add(searchWidget);
FlowPanel titleContainer = new FlowPanel();
titleContainer.setStyleName("titleContainer");
Label miwContainer = new Label();
miwContainer.getElement().getStyle().setFloat(Float.LEFT);
Label titleLabel = new Label();
titleLabel.setStyleName("titleLabel");
titleLabel.setText("The Journey");
titleContainer.add(miwContainer);
titleContainer.add(titleLabel);
mainPanel.add(titleContainer);
mainPanel.add(searchStuff);
mainPanel.add(timePanel);
}
示例2: CMLoginBox
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
protected CMLoginBox(
AuthManager authManager,
HistoryProvider historyProvider,
EventBus eventBus,
IneDispatch ineDispatch,
DescriptorStore descriptorStore,
FormFactory formFactory) {
super(
authManager,
historyProvider,
eventBus,
ineDispatch,
descriptorStore,
formFactory);
getElement().getStyle().setFloat(Float.RIGHT);
}
示例3: setSortIcon
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
public void setSortIcon(MaterialIcon sortIcon) {
removeSortIcon();
this.sortIcon = sortIcon;
if(sortIcon != null) {
IconSize iconSize = this.sortIcon.getIconSize();
if(iconSize == null) {
this.sortIcon.setIconSize(IconSize.SMALL);
}
this.sortIcon.getElement().getStyle().setFloat(Float.LEFT);
headerWrap.insert(this.sortIcon, 0);
}
}
示例4: addLeft
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
public HTMLStream addLeft( Widget widget )
{
Element container = addPrivate( widget );
container.getStyle().setFloat( Float.LEFT );
return this;
}
示例5: addRight
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
public HTMLStream addRight( Widget widget )
{
Element container = addPrivate( widget );
container.getStyle().setFloat( Float.RIGHT );
return this;
}
示例6: TranslatorLoginBox
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
protected TranslatorLoginBox(
AuthManager authManager,
HistoryProvider historyProvider,
EventBus eventBus,
IneDispatch ineDispatch,
DescriptorStore descriptorStore,
FormFactory formFactory) {
super(authManager, historyProvider, eventBus, ineDispatch, descriptorStore, formFactory);
getElement().getStyle().setFloat(Float.RIGHT);
}
示例7: createUI
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
private void createUI() {
mainPanel.add(icon);
icon.setVisible(false);
mainPanel.add(checkPanel);
mainPanel.add(textWidget);
textWidget.setStyleName(GeneralRes.INST.get().GeneralStyle().ineCheckBoxText());
checkPanel.setStyleName(GeneralRes.INST.get().GeneralStyle().ineCheckBox());
checkPanel.getElement().getStyle().setPosition(Position.STATIC);
mainPanel.getElement().getStyle().setDisplay(Display.INLINE_BLOCK);
icon.getElement().getStyle().setFloat(Float.LEFT);
icon.getElement().getStyle().setPaddingRight(6.0, Unit.PX);
}
示例8: onAttach
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
@Override
protected void onAttach() {
super.onAttach();
Timer t = new Timer() {
@Override
public void run() {
Log.debug("Monitoring widget attached:" + name);
try {
Style style = getElement().getStyle();
int absoluteLeft = getAbsoluteLeft();
if (absoluteLeft < Window.getClientWidth() / 2) {
style.setFloat(Float.LEFT);
Log.debug("Monitoring widget:" + name + " floating to left:" + absoluteLeft);
} else {
style.setWidth(50, Unit.PCT);
style.setFloat(Float.RIGHT);
Log.debug("Monitoring widget:" + name + " floating to right:" + absoluteLeft);
}
} catch (Exception e) {
Log.error(e.getMessage(), e);
}
}
};
t.schedule(1000);
}
示例9: setFloat
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
@Override
public void setFloat(Float floatAlign) {
getFloatMixin().setCssName(floatAlign);
}
示例10: getFloat
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
@Override
public Float getFloat() {
return StyleHelper.fromStyleName(Float.class, getFloatMixin().getCssName());
}
示例11: getFloatMixin
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
protected CssNameMixin<MaterialWidget, Float> getFloatMixin() {
if (floatMixin == null) {
floatMixin = new CssNameMixin<>(this);
}
return floatMixin;
}
示例12: build
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
private void build() {
container = new CssFloatLayoutContainer();
FieldLabel fl01 = new FieldLabel(firstName,
"Vorname");
fl01.setLabelWidth(192);
container.add(fl01,
new CssFloatData(1,
new Margins(6,
12,
6,
12)));
FieldLabel fl02 = new FieldLabel(name,
"Name");
fl02.setLabelWidth(192);
container.add(fl02,
new CssFloatData(1,
new Margins(6,
12,
6,
12)));
FieldLabel fl03 = new FieldLabel(street,
"Strasse");
fl03.setLabelWidth(192);
container.add(fl03,
new CssFloatData(1,
new Margins(6,
12,
6,
12)));
FieldLabel fl04 = new FieldLabel(city,
"Ort");
fl04.setLabelWidth(192);
container.add(fl04,
new CssFloatData(1,
new Margins(6,
12,
6,
12)));
CssFloatLayoutContainer buttonContainer = new CssFloatLayoutContainer();
buttonContainer.setStyleFloat(Float.RIGHT);
container.add(buttonContainer,
new CssFloatData(1));
buttonContainer.add(cancelButton,
new CssFloatData(64,
new Margins(10)));
buttonContainer.add(saveButton,
new CssFloatData(64,
new Margins(10)));
}
示例13: initialize
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void initialize() {
// --
// Banner container.
// --
final LayoutContainer headerContainer = Layouts.border();
headerContainer.add(createProjectBannerPanel(), Layouts.borderLayoutData(LayoutRegion.CENTER, Margin.RIGHT));
headerContainer.add(createAmendmentsPanel(), Layouts.borderLayoutData(LayoutRegion.EAST, AMENDMENTS_PANEL_WIDTH));
// --
// Menu container.
// --
final Map<Page, String> linksMap = new LinkedHashMap<Page, String>();
linksMap.put(Page.PROJECT_DASHBOARD, I18N.CONSTANTS.projectTabDashboard());
linksMap.put(Page.PROJECT_DETAILS, I18N.CONSTANTS.projectDetails());
linksMap.put(Page.PROJECT_LOGFRAME, I18N.CONSTANTS.projectTabLogFrame());
linksMap.put(Page.PROJECT_INDICATORS_MANAGEMENT, I18N.CONSTANTS.projectTabIndicators());
linksMap.put(Page.PROJECT_INDICATORS_MAP, I18N.CONSTANTS.projectTabMap());
linksMap.put(Page.PROJECT_INDICATORS_ENTRIES, I18N.CONSTANTS.projectTabDataEntry());
linksMap.put(Page.PROJECT_TEAM_MEMBERS, I18N.CONSTANTS.projectTabTeamMembers());
linksMap.put(Page.PROJECT_CALENDAR, I18N.CONSTANTS.projectTabCalendar());
linksMap.put(Page.PROJECT_REPORTS, I18N.CONSTANTS.projectTabReports());
final Grid buttonsGrid = new Grid(1, 2);
exportButton = Forms.button(I18N.CONSTANTS.export(), IconImageBundle.ICONS.excel());
deleteButton = Forms.button(I18N.CONSTANTS.deleteProjectAnchor(), IconImageBundle.ICONS.remove());
buttonsGrid.setWidget(0, 0, exportButton);
buttonsGrid.setWidget(0, 1, deleteButton);
buttonsGrid.getElement().getStyle().setFloat(Float.RIGHT);
subMenu = new SubMenuWidget(Orientation.HORIZONTAL, linksMap);
subMenu.asWidget().getElement().getStyle().setFloat(Float.LEFT);
final FlowPanel menuContainer = new FlowPanel();
menuContainer.add(subMenu.asWidget());
menuContainer.add(buttonsGrid);
// --
// Center container.
// --
subViewPlaceHolder = Layouts.fit();
// --
// Main layout.
// --
final LayoutContainer mainContainer = Layouts.vBox();
mainContainer.add(headerContainer, Layouts.vBoxData(Margin.BOTTOM));
mainContainer.add(menuContainer);
add(mainContainer, Layouts.borderLayoutData(LayoutRegion.NORTH, Layouts.BANNER_PANEL_HEIGHT, Margin.BOTTOM));
add(subViewPlaceHolder);
}
示例14: renderToRightSide
import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
@Override
public void renderToRightSide() {
getElement().getStyle().setFloat(Float.RIGHT);
}