Java 类com.google.gwt.dom.client.Style.Float 实例源码

项目:285_02_FA15G4    文件:MainWidget.java   
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);       

}
项目:ineform    文件:LoginPage.java   
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);
}
项目:gwt-material-table    文件:TableHeader.java   
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);
    }
}
项目:hexa.tools    文件:HTMLStream.java   
public HTMLStream addLeft( Widget widget )
{
    Element container = addPrivate( widget );

    container.getStyle().setFloat( Float.LEFT );

    return this;
}
项目:hexa.tools    文件:HTMLStream.java   
public HTMLStream addRight( Widget widget )
{
    Element container = addPrivate( widget );

    container.getStyle().setFloat( Float.RIGHT );

    return this;
}
项目:ineform    文件:LoginPage.java   
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);
}
项目:ineform    文件:IneCheckBox.java   
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);
}
项目:SmartMonitoring    文件:AbstractMonitoringWidget.java   
@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);

}
项目:gwt-material    文件:MaterialWidget.java   
@Override
public void setFloat(Float floatAlign) {
    getFloatMixin().setCssName(floatAlign);
}
项目:gwt-material    文件:MaterialWidget.java   
@Override
public Float getFloat() {
    return StyleHelper.fromStyleName(Float.class, getFloatMixin().getCssName());
}
项目:gwt-material    文件:MaterialWidget.java   
protected CssNameMixin<MaterialWidget, Float> getFloatMixin() {
    if (floatMixin == null) {
        floatMixin = new CssNameMixin<>(this);
    }
    return floatMixin;
}
项目:mvp4g-examples    文件:PersonView.java   
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)));
}
项目:sigmah    文件:ProjectView.java   
/**
 * {@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);
}
项目:ineform    文件:MenuItemView.java   
@Override
public void renderToRightSide() {
    getElement().getStyle().setFloat(Float.RIGHT);
}