当前位置: 首页>>代码示例>>Java>>正文


Java Float类代码示例

本文整理汇总了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);		

}
 
开发者ID:selu285-2015,项目名称:285_02_FA15G4,代码行数:22,代码来源:MainWidget.java

示例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);
}
 
开发者ID:inepex,项目名称:ineform,代码行数:17,代码来源:LoginPage.java

示例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);
    }
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:14,代码来源:TableHeader.java

示例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;
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:9,代码来源:HTMLStream.java

示例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;
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:9,代码来源:HTMLStream.java

示例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);
}
 
开发者ID:inepex,项目名称:ineform,代码行数:11,代码来源:LoginPage.java

示例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);
}
 
开发者ID:inepex,项目名称:ineform,代码行数:14,代码来源:IneCheckBox.java

示例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);

}
 
开发者ID:armangal,项目名称:SmartMonitoring,代码行数:30,代码来源:AbstractMonitoringWidget.java

示例9: setFloat

import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
@Override
public void setFloat(Float floatAlign) {
    getFloatMixin().setCssName(floatAlign);
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:5,代码来源:MaterialWidget.java

示例10: getFloat

import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
@Override
public Float getFloat() {
    return StyleHelper.fromStyleName(Float.class, getFloatMixin().getCssName());
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:5,代码来源:MaterialWidget.java

示例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;
}
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:7,代码来源:MaterialWidget.java

示例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)));
}
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:51,代码来源:PersonView.java

示例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);
}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:61,代码来源:ProjectView.java

示例14: renderToRightSide

import com.google.gwt.dom.client.Style.Float; //导入依赖的package包/类
@Override
public void renderToRightSide() {
    getElement().getStyle().setFloat(Float.RIGHT);
}
 
开发者ID:inepex,项目名称:ineform,代码行数:5,代码来源:MenuItemView.java


注:本文中的com.google.gwt.dom.client.Style.Float类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。