Java Code Examples for gwt.material.design.client.constants.TextAlign
The following examples show how to use
gwt.material.design.client.constants.TextAlign. These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: gwt-material-demo Source File: IconsView.java License: Apache License 2.0 | 6 votes |
protected void getAllIcons() { for (IconType i : IconType.values()) { MaterialColumn column = new MaterialColumn(4, 3, 2); column.setTextAlign(TextAlign.CENTER); column.setPadding(40); MaterialIcon icon = new MaterialIcon(); icon.setIconSize(IconSize.MEDIUM); icon.setIconType(i); MaterialLabel label = new MaterialLabel(); label.setFontSize("0.8em"); label.setText(i.name().toUpperCase()); column.add(icon); column.add(label); iconsRow.add(column); } }
Example 2
Source Project: gwt-material-addins Source File: DateOfBirthPicker.java License: Apache License 2.0 | 6 votes |
protected void setupLayout() { // Month month.addStyleName("dob-month"); month.setGrid("s12 m5"); month.setCloseOnSelect(true); // Day day.addStyleName("dob-day"); day.setMask("00"); day.setFloat(Style.Float.LEFT); day.setTextAlign(TextAlign.CENTER); day.setPlaceholder("DD"); day.setGrid("s4 m3"); // Year year.addStyleName("dob-year"); year.setMask("0000"); year.setFloat(Style.Float.LEFT); year.setTextAlign(TextAlign.CENTER); year.setPlaceholder("YYYY"); year.setGrid("s8 m4"); }
Example 3
Source Project: gwt-material-addins Source File: LanguageSelectorItem.java License: Apache License 2.0 | 6 votes |
@Override protected void onLoad() { super.onLoad(); MaterialColumn imageColumn = new MaterialColumn(4,4,4); imageColumn.add(image); MaterialColumn nameColumn = new MaterialColumn(8,8,8); label.setTextColor(Color.BLACK); nameColumn.setPadding(0); nameColumn.setTextAlign(TextAlign.LEFT); nameColumn.add(label); if (language.getImage() != null) { add(imageColumn); } if (language.getName() != null) { add(nameColumn); } }
Example 4
Source Project: gwt-material-addins Source File: InfiniteScrollLoader.java License: Apache License 2.0 | 5 votes |
@Override protected void onLoad() { super.onLoad(); setTextAlign(TextAlign.CENTER); label.setText(message); label.setFontSize("1.2em"); label.setLineHeight(12); add(label); }
Example 5
Source Project: lumongo Source File: Header.java License: Apache License 2.0 | 4 votes |
public Header() { MaterialNavBar navBar = new MaterialNavBar(); navBar.setActivates("sideNav"); navBar.setType(NavBarType.FIXED); navBar.setWidth("100%"); navBar.setBackgroundColor(Color.GREY_DARKEN_2); MaterialNavSection navSection = new MaterialNavSection(); navSection.setTextAlign(TextAlign.RIGHT); navBar.add(navSection); sideNav = new MaterialSideNav(SideNavType.PUSH); sideNav.setWidth("60"); sideNav.setId("sideNav"); sideNav.setBackgroundColor(Color.GREY_LIGHTEN_3); sideNav.setCloseOnClick(true); sideNav.setType(SideNavType.PUSH); MaterialNavBrand navBrand = new MaterialNavBrand(); navBrand.add(new MaterialImage(MainResources.INSTANCE.logo())); navBrand.setHref("#"); navBrand.addClickHandler(clickEvent -> sideNav.hide()); sideNav.add(navBrand); { MaterialLink overView = new MaterialLink(IconType.INFO); overView.setTitle("Overview"); overView.addClickHandler(clickEvent -> MainController.get().goTo(new HomePlace())); sideNav.add(overView); } { MaterialLink indexes = new MaterialLink(IconType.SEARCH); indexes.setTitle("Query"); indexes.addClickHandler(clickEvent -> MainController.get().goTo(new QueryPlace(null))); sideNav.add(indexes); } add(navBar); add(sideNav); }
Example 6
Source Project: gwt-material Source File: HasTextAlign.java License: Apache License 2.0 | 2 votes |
/** * Set the text alignment. */ void setTextAlign(TextAlign align);
Example 7
Source Project: gwt-material Source File: HasTextAlign.java License: Apache License 2.0 | 2 votes |
/** * Get the text alignment. */ TextAlign getTextAlign();