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); }
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); }
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); } }
public HTMLStream addLeft( Widget widget ) { Element container = addPrivate( widget ); container.getStyle().setFloat( Float.LEFT ); return this; }
public HTMLStream addRight( Widget widget ) { Element container = addPrivate( widget ); container.getStyle().setFloat( Float.RIGHT ); return this; }
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); }
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); }
@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); }
@Override public void setFloat(Float floatAlign) { getFloatMixin().setCssName(floatAlign); }
@Override public Float getFloat() { return StyleHelper.fromStyleName(Float.class, getFloatMixin().getCssName()); }
protected CssNameMixin<MaterialWidget, Float> getFloatMixin() { if (floatMixin == null) { floatMixin = new CssNameMixin<>(this); } return floatMixin; }
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))); }
/** * {@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); }
@Override public void renderToRightSide() { getElement().getStyle().setFloat(Float.RIGHT); }