本文整理汇总了Java中gwt.material.design.client.constants.WavesType类的典型用法代码示例。如果您正苦于以下问题:Java WavesType类的具体用法?Java WavesType怎么用?Java WavesType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WavesType类属于gwt.material.design.client.constants包,在下文中一共展示了WavesType类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onLoad
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
@Override
protected void onLoad() {
super.onLoad();
// Add the next button
iconNext.setWaves(WavesType.DEFAULT);
iconNext.setCircle(true);
add(iconNext);
// Add the action label
add(actionLabel);
// Add the previous button
iconPrev.setWaves(WavesType.DEFAULT);
iconPrev.setCircle(true);
add(iconPrev);
// Register the handlers
registerHandler(iconNext.addClickHandler(clickEvent -> pager.next()));
registerHandler(iconPrev.addClickHandler(clickEvent -> pager.previous()));
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:22,代码来源:PageActionsPanel.java
示例2: setWaves
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
@Override
public void setWaves(WavesType waves) {
uiObject.removeStyleName(Waves.WAVES_STYLE);
if (this.waves != null) {
uiObject.removeStyleName(this.waves.getCssName());
}
this.waves = waves;
if (waves != null) {
boolean enabled = !(uiObject instanceof HasEnabled) || ((HasEnabled) uiObject).isEnabled();
if (enabled) {
uiObject.addStyleName(Waves.WAVES_STYLE);
}
uiObject.addStyleName(waves.getCssName());
if (enabled) {
Waves.detectAndApply(uiObject);
}
}
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:22,代码来源:WavesMixin.java
示例3: LectureCard
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
public LectureCard(Course course, Lecture lecture) {
setBackgroundColor(Color.WHITE);
setHoverable(true);
MaterialCardImage cardImage = new MaterialCardImage();
cardImage.setWaves(WavesType.LIGHT);
image = new MaterialImage();
cardImage.add(image);
add(cardImage);
MaterialCardContent cardContent = new MaterialCardContent();
title = new MaterialLink();
title.addStyleName(res.style().title());
cardContent.add(title);
description = new MaterialLabel();
description.addStyleName(res.style().description());
cardContent.add(description);
add(cardContent);
MaterialCardAction cardAction = new MaterialCardAction();
cardAction.setTextAlign(TextAlign.RIGHT);
unitsLink = new MaterialLink();
cardAction.add(unitsLink);
add(cardAction);
image.addClickHandler(e -> LectureCard.this.onImageClick());
setLecture(course, lecture);
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:32,代码来源:LectureCard.java
示例4: UnitWidget
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
protected UnitWidget() {
addStyleName(res.style().view());
titlePanel = new MaterialPanel();
titlePanel.addStyleName(res.style().titlePanel());
title = new Heading(HeadingSize.H4);
title.addStyleName(res.style().title());
titlePanel.add(title);
add(titlePanel);
contentRow = new MaterialRow();
contentRow.addStyleName(res.style().content());
add(contentRow);
nextRow = new MaterialRow();
nextRow.addStyleName(res.style().next());
nextRow.setVisible(false);
add(nextRow);
// MaterialIcon nextIcon = new MaterialIcon(IconType.NAVIGATE_NEXT);
// nextIcon.setIconPosition(IconPosition.LEFT);
// nextIcon.setMarginRight(0);
nextLink = new MaterialLink(IconType.NAVIGATE_NEXT);
nextLink.setIconPosition(IconPosition.LEFT);
nextLink.setWaves(WavesType.DEFAULT);
nextLink.addStyleName(res.style().nextLink());
nextLink.addClickHandler(e -> onNext());
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:32,代码来源:UnitWidget.java
示例5: LecturerCard
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
public LecturerCard(User lecturer) {
setBackgroundColor(Color.WHITE);
setHoverable(true);
MaterialCardImage cardImage = new MaterialCardImage();
cardImage.setWaves(WavesType.LIGHT);
image = new MaterialImage();
cardImage.add(image);
add(cardImage);
MaterialCardContent cardContent = new MaterialCardContent();
name = new MaterialLabel();
name.addStyleName(res.style().name());
cardContent.add(name);
// description = new MaterialLabel();
// description.addStyleName(res.style().description());
// cardContent.add(description);
add(cardContent);
MaterialCardAction cardAction = new MaterialCardAction();
cardAction.setTextAlign(TextAlign.RIGHT);
coursesLink = new MaterialLink();
cardAction.add(coursesLink);
add(cardAction);
setLecturer(lecturer);
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:30,代码来源:LecturerCard.java
示例6: CourseCard
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
public CourseCard(Course course) {
setBackgroundColor(Color.WHITE);
setHoverable(true);
MaterialCardImage cardImage = new MaterialCardImage();
cardImage.setWaves(WavesType.LIGHT);
image = new MaterialImage();
cardImage.add(image);
add(cardImage);
MaterialCardContent cardContent = new MaterialCardContent();
title = new MaterialLink();
title.addStyleName(res.style().title());
cardContent.add(title);
description = new MaterialLabel();
description.addStyleName(res.style().description());
cardContent.add(description);
add(cardContent);
MaterialCardAction cardAction = new MaterialCardAction();
cardAction.setTextAlign(TextAlign.RIGHT);
lecturesLink = new MaterialLink();
cardAction.add(lecturesLink);
add(cardAction);
image.addClickHandler(e -> CourseCard.this.onImageClick());
setCourse(course);
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:32,代码来源:CourseCard.java
示例7: init
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
@PostConstruct
public void init() {
txtFirstName.setPlaceholder("First Name");
txtFirstName.setGrid("l6 m6 s12");
txtLastName.setPlaceholder("Last Name");
txtLastName.setGrid("l6 m6 s12");
txtUserName.setPlaceholder("Username");
txtUserName.setGrid("l6 m6 s12");
txtEmail.setPlaceholder("Email");
txtEmail.setGrid("l6 m6 s12");
txtPassword.setPlaceholder("Password");
txtPassword.setType(InputType.PASSWORD);
txtPassword.setGrid("l6 m6 s12");
txtRePassword.setPlaceholder("Retype your Password");
txtRePassword.setGrid("l6 m6 s12");
txtRePassword.setType(InputType.PASSWORD);
btnLogin.setText("Login");
btnLogin.setType(ButtonType.FLAT);
btnLogin.setWaves(WavesType.DEFAULT);
btnSignUp.setText("Sign Up");
btnSignUp.setBackgroundColor("blue");
btnSignUp.setWaves(WavesType.DEFAULT);
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-errai,代码行数:31,代码来源:SignupPage.java
示例8: configureSimpleButtonLink
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
private void configureSimpleButtonLink(MaterialLink buttonLink, String label, TransitionTo<? extends BasePage> transitTo, boolean hideOnMobile) {
buttonLink.setText(label);
if (hideOnMobile) {
buttonLink.setHideOn(HideOn.HIDE_ON_MED_DOWN);
buttonLink.setWaves(WavesType.LIGHT);
buttonLink.setWaves(WavesType.DEFAULT);
}
buttonLink.addClickHandler(clickEvent -> handleMenuItemClick(transitTo));
}
开发者ID:baldram,项目名称:tristar-eye,代码行数:10,代码来源:NavigationBar.java
示例9: setWaves
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
@Override
public void setWaves(WavesType waves) {
super.setWaves(waves);
// Waves change to inline block.
// We need to retain 'block' display
setDisplay(Display.BLOCK);
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:9,代码来源:MaterialCollapsibleItem.java
示例10: newTabItem
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
protected MaterialTabItem newTabItem(int index) {
MaterialTabItem item = new MaterialTabItem();
item.setWaves(WavesType.DEFAULT);
MaterialLink link = new MaterialLink("Tab " + index);
link.setTextColor(Color.WHITE);
link.setHref("#dynamicTab" + index);
item.add(link);
MaterialLabel content = new MaterialLabel("Content " + index);
content.setId("dynamicTab" + index);
dynamicTabsRow.add(content);
return item;
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-demo,代码行数:13,代码来源:TabsView.java
示例11: createAndAddTabListItem
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
public MaterialTabItem createAndAddTabListItem(IconType iconType, String title, String dataTarget) {
MaterialTabItem tabItem = new MaterialTabItem();
tabItem.setWaves(WavesType.YELLOW);
tabItem.setGrid("s4");
MaterialLink materialLink = new MaterialLink(iconType);
materialLink.setHref(dataTarget);
materialLink.setText(title);
materialLink.setTextColor(Color.WHITE);
tabItem.add(materialLink);
materialTab.add(tabItem);
return tabItem;
}
开发者ID:lumongo,项目名称:lumongo,代码行数:16,代码来源:CustomTabPanel.java
示例12: drawRow
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
@Override
public TableRow drawRow(DataView<T> dataView, RowComponent<T> rowComponent, Object valueKey,
List<Column<T, ?>> columns, boolean redraw) {
T data = rowComponent.getData();
TableRow row = rowComponent.getWidget();
boolean draw = true;
if(row == null) {
// Create a new row element
row = new TableRow();
Style style = row.getElement().getStyle();
style.setDisplay(Display.NONE);
style.setProperty("height", getExpectedRowHeight() + "px");
style.setProperty("maxHeight", getExpectedRowHeight() + "px");
style.setProperty("minHeight", getExpectedRowHeight() + "px");
row.setStyleName(TableCssName.DATA_ROW);
rowComponent.setWidget(row);
if(!dataView.getSelectionType().equals(SelectionType.NONE)) {
TableData selection = drawSelectionCell();
row.add(selection);
}
} else if(!redraw && !rowComponent.isRedraw()) {
draw = false;
}
if(draw) {
// Build the columns
int colOffset = dataView.getColumnOffset();
int colSize = columns.size();
for(int c = 0; c < colSize; c++) {
int colIndex = c + colOffset;
Context context = new Context(rowComponent.getIndex(), colIndex, valueKey);
drawColumn(row, context, data, columns.get(c), colIndex, dataView.isHeaderVisible(colIndex));
}
rowComponent.setRedraw(false);
}
if(dataView.isUseRowExpansion()) {
if(!row.hasExpansionColumn()) {
TableData expand = new TableData();
expand.setId("colex");
MaterialIcon expandIcon = new MaterialIcon();
expandIcon.setId("expand");
expandIcon.setWidth("100%");
expandIcon.setIconType(IconType.KEYBOARD_ARROW_DOWN);
expandIcon.setWaves(WavesType.LIGHT);
expandIcon.getElement().getStyle().setCursor(Cursor.POINTER);
expand.add(expandIcon);
row.add(expand);
}
} else if(row.hasExpansionColumn()) {
row.removeExpansionColumn();
}
Scheduler.get().scheduleDeferred(() -> {
calculateRowHeight(rowComponent);
});
return row;
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:61,代码来源:BaseRenderer.java
示例13: testDrawRow
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
public void testDrawRow() throws Exception {
// given
BaseRenderer<Person> renderer = new BaseRenderer<>();
MaterialDataTable<Person> table = createTable();
table.setUseRowExpansion(true);
addSampleColumns(table);
table.setSelectionType(SelectionType.SINGLE);
table.setRenderer(renderer);
AbstractDataView<Person> dataView = (AbstractDataView<Person>)table.getView();
List<Column<Person, ?>> columns = dataView.getColumns();
Person person = new Person(1, "John", "Doe", "123456", "Catergory");
RowComponent<Person> rowComponent = dataView.getRowFactory().generate(dataView, person);
// when
TableRow tableRow = renderer.drawRow(dataView, rowComponent, dataView.getValueKey(person), columns, true);
// then
assertNotNull("TableRow should not be null.", tableRow);
Style style = tableRow.getElement().getStyle();
assertEquals(Style.Display.NONE.getCssName(), style.getDisplay());
assertEquals(renderer.getExpectedRowHeight() + "px", style.getProperty("height"));
assertEquals(renderer.getExpectedRowHeight() + "px", style.getProperty("maxHeight"));
assertEquals(renderer.getExpectedRowHeight() + "px", style.getProperty("minHeight"));
assertTrue(tableRow.getStyleName().contains(TableCssName.DATA_ROW));
assertEquals("RowComponent widget is not the rendered TableRow", tableRow, rowComponent.getWidget());
try {
TableData selectionCell = (TableData)tableRow.getWidget(0);
assertEquals("col0", selectionCell.getId());
assertTrue(selectionCell.getStyleName().contains(TableCssName.SELECTION));
} catch (ClassCastException ex) {
throw new AssertionError("Could not cast selection cell to TableData");
}
int colOffset = dataView.getColumnOffset();
assertEquals(4 + colOffset, tableRow.getWidgetCount());
assertTrue(tableRow.hasExpansionColumn());
TableData expandRow = tableRow.getExpansionColumn();
assertEquals("colex", expandRow.getId());
MaterialIcon expandIcon = (MaterialIcon)expandRow.getWidget(0);
assertEquals("expand", expandIcon.getId());
assertEquals("100%", expandIcon.getElement().getStyle().getWidth());
assertEquals(IconType.KEYBOARD_ARROW_DOWN, expandIcon.getIconType());
assertEquals(WavesType.LIGHT, expandIcon.getWaves());
assertEquals(Style.Cursor.POINTER.getCssName(), expandIcon.getElement().getStyle().getCursor());
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:54,代码来源:BaseRendererTest.java
示例14: getWaves
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
@Override
public WavesType getWaves() {
return waves;
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:5,代码来源:WavesMixin.java
示例15: MaterialPager
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
public MaterialPager() {
super(Document.get().createULElement(), CssName.PAGINATION);
setWaves(WavesType.DEFAULT);
removeStyleName(CssName.WAVES_EFFECT);
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:6,代码来源:MaterialPager.java
示例16: setWaves
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
/**
* Sets the ripple effect of any material elements
*/
void setWaves(WavesType waves);
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:5,代码来源:HasWaves.java
示例17: getWaves
import gwt.material.design.client.constants.WavesType; //导入依赖的package包/类
/**
* Get the waves type.
*/
WavesType getWaves();
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:5,代码来源:HasWaves.java
注:本文中的gwt.material.design.client.constants.WavesType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论