本文整理汇总了Java中gwt.material.design.client.constants.Color类的典型用法代码示例。如果您正苦于以下问题:Java Color类的具体用法?Java Color怎么用?Java Color使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Color类属于gwt.material.design.client.constants包,在下文中一共展示了Color类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: QueryView
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public QueryView() {
splitPanel = new MaterialSplitPanel();
splitPanel.setHeight(Window.getClientHeight() - 102 + "px");
splitPanel.setBarPosition(25);
leftPanel = new MaterialPanel();
leftPanel.setBackgroundColor(Color.WHITE);
leftPanel.setGrid("s6 l3");
leftScrollPanel = new ScrollPanel();
leftScrollPanel.setHeight(Window.getClientHeight() - 130 + "px");
rightPanel = new MaterialPanel();
rightPanel.setBackgroundColor(Color.GREY_LIGHTEN_2);
rightPanel.setGrid("s6 l9");
rightScrollPanel = new ScrollPanel();
rightScrollPanel.setHeight(Window.getClientHeight() - 130 + "px");
splitPanel.add(leftPanel);
splitPanel.add(rightPanel);
add(splitPanel);
}
开发者ID:lumongo,项目名称:lumongo,代码行数:22,代码来源:QueryView.java
示例2: InboxCollapsible
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public InboxCollapsible(InboxDTO dto) {
initWidget(uiBinder.createAndBindUi(this));
lblCategory.setText(dto.getCategory());
lblCategory.setTextColor(Color.fromStyleName(dto.getColor()));
if(dto.getIconType() != null) {
lblCategory.setIconType(dto.getIconType());
imgCol.removeFromParent();
}
if(dto.getImageUrl() != null) {
imgCategory.setUrl(dto.getImageUrl());
}
lblDescription.setText(dto.getDescription());
if(dto.getChildren().size() > 0) {
MaterialCollapsible colapsChildren = new MaterialCollapsible();
for(InboxDTO child : dto.getChildren()) {
colapsChildren.add(new InboxCollapsible(child));
colapsBody.add(colapsChildren);
}
}else {
colapsBody.removeFromParent();
}
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-patterns,代码行数:24,代码来源:InboxCollapsible.java
示例3: ClassroomBanner
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public ClassroomBanner() {
setBackgroundColor(Color.WHITE);
addStyleName(res.style().view());
setShadow(1);
MaterialRow row = new MaterialRow();
MaterialColumn textColumn = new MaterialColumn();
textColumn.setGrid("s12 m6");
Heading title = new Heading(HeadingSize.H1);
title.setText("Vsite digitalna učionica");
title.addStyleName(res.style().title());
title.setTextColor(Color.BLUE_GREY);
textColumn.add(title);
row.add(textColumn);
MaterialColumn imageColumn = new MaterialColumn();
imageColumn.setGrid("s12 m6");
MaterialImage banner = new MaterialImage(res.elearning());
banner.addStyleName(res.style().image());
imageColumn.add(banner);
row.add(imageColumn);
add(row);
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:25,代码来源:ClassroomBanner.java
示例4: TocTitle
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public TocTitle(String title, String description, String href) {
setBackgroundColor(Color.GREY_LIGHTEN_5);
setShadow(1);
addStyleName(res.style().view());
link = new MaterialLink();
link.addStyleName(res.style().link());
link.setHref(href);
header = new Heading(HeadingSize.H4);
header.addStyleName(res.style().title());
link.add(header);
add(href != null ? link : header);
paragraph = new Paragraph();
paragraph.addStyleName(res.style().description());
add(paragraph);
setTitle(title);
setDescription(description);
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:23,代码来源:TocTitle.java
示例5: LecturersBanner
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public LecturersBanner() {
setBackgroundColor(Color.WHITE);
addStyleName(res.style().view());
setShadow(1);
MaterialRow row = new MaterialRow();
MaterialColumn textColumn = new MaterialColumn();
textColumn.setGrid("s12 m6");
Heading title = new Heading(HeadingSize.H1);
title.setText("Predavači");
title.addStyleName(res.style().title());
title.setTextColor(Color.BLUE_GREY);
textColumn.add(title);
row.add(textColumn);
MaterialColumn imageColumn = new MaterialColumn();
imageColumn.setGrid("s12 m6");
MaterialImage banner = new MaterialImage(res.recturers());
banner.addStyleName(res.style().image());
imageColumn.add(banner);
row.add(imageColumn);
add(row);
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:25,代码来源:LecturersBanner.java
示例6: createDropDown
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
private MaterialDropDown createDropDown() {
MaterialDropDown dropDown = new MaterialDropDown();
dropDown.setTextColor(Color.WHITE);
dropDown.getElement().setClassName(OPTIONS_BUTTON_CSS_CLASS);
dropDown.add(createConfirmationMenuItem(Texts.OPTIONS_DELETE_ALL, Texts.REMOVE_FAVS_WARNING,
favouritesModifyEvent, new FavouritesModify(FavouritesModify.ModificationType.REMOVE_ALL)));
dropDown.add(createConfirmationMenuItem(Texts.OPTIONS_IMPORT_DEMO, Texts.RESTORE_DEFAULT_FAVS_WARNING,
favouritesModifyEvent, new FavouritesModify(FavouritesModify.ModificationType.RESTORE_DEFAULT)));
//dropDown.add(createSimpleMenuItem(Texts.OPTIONS_SWITCH_MAP_SCHEMA, mapTypeChangeEvent, new MapViewTypeChange()));
dropDown.add(createDivider());
MaterialLink helpLink = new MaterialLink(Texts.HELP_TITLE);
helpLink.addClickHandler(clickEvent -> modal.show(Texts.HELP_TITLE, Texts.HELP_DESCRIPTION));
dropDown.add(helpLink);
return dropDown;
}
开发者ID:baldram,项目名称:tristar-eye,代码行数:19,代码来源:ContextMenu.java
示例7: testStructure
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public void testStructure() {
// given
final String TEXT = "text";
MaterialChip chip = getWidget();
// when / then
chip.setText(TEXT);
assertEquals(TEXT, chip.getText());
assertEquals(TEXT, chip.getChipLabel().getText());
// given
final IconType icon = IconType.POLYMER;
// when / then
chip.setIconType(icon);
chip.setIconColor(Color.RED);
assertEquals(icon, chip.getIcon().getIconType());
assertEquals(Color.RED, chip.getIconColor());
assertEquals(chip.getChipLabel(), chip.getWidget(0));
assertEquals(chip.getIcon(), chip.getWidget(1));
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:23,代码来源:MaterialChipTest.java
示例8: testActiveState
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public void testActiveState() {
// given
MaterialSearch search = getWidget();
// when / then
search.setActive(true);
assertNotNull(search.getIconClose());
assertNotNull(search.getIconSearch());
assertEquals(Color.BLACK, search.getIconClose().getIconColorMixin().getTextColor());
assertEquals(Color.BLACK, search.getIconSearch().getIconColorMixin().getTextColor());
search.setActive(false);
assertEquals(Color.WHITE, search.getIconClose().getIconColorMixin().getTextColor());
assertEquals(Color.WHITE, search.getIconSearch().getIconColorMixin().getTextColor());
// when / then
search.open();
assertTrue(search.isActive());
checkOpenHandler(search);
search.close();
assertFalse(search.isActive());
checkCloseHandler(search);
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:25,代码来源:MaterialSearchTest.java
示例9: setColor
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public static void setColor(Color color, Color darkerColor, Color lighterColor) {
final long DURATION = 1000 * 60 * 60 * 24 * 14; //duration remembering login - 2 weeks
Date expires = new Date(System.currentTimeMillis() + DURATION);
Cookies.setCookie(COLOR, color.getCssName(), expires, null, "/", false);
for (MaterialWidget w : map.keySet()) {
switch (map.get(w)) {
case REGULAR_SHADE:
w.setBackgroundColor(color);
break;
case DARKER_SHADE:
w.setBackgroundColor(darkerColor);
break;
case LIGHTER_SHADE:
w.setBackgroundColor(lighterColor);
break;
default:
break;
}
}
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-demo,代码行数:22,代码来源:ThemeManager.java
示例10: getBundle
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public static ThemeLoader.ThemeBundle getBundle() {
if (getColor() == Color.AMBER) {
return ThemeAmber.INSTANCE;
} else if (getColor() == Color.BLUE) {
return ThemeBlue.INSTANCE;
} else if (getColor() == Color.BROWN) {
return ThemeBrown.INSTANCE;
} else if (getColor() == Color.GREEN) {
return ThemeGreen.INSTANCE;
} else if (getColor() == Color.GREY) {
return ThemeGrey.INSTANCE;
} else if (getColor() == Color.ORANGE) {
return ThemeOrange.INSTANCE;
} else if (getColor() == Color.PINK) {
return ThemePink.INSTANCE;
} else if (getColor() == Color.PURPLE) {
return ThemePurple.INSTANCE;
} else if (getColor() == Color.RED) {
return ThemeRed.INSTANCE;
} else if (getColor() == Color.YELLOW) {
return ThemeYellow.INSTANCE;
}
return ThemeBlue.INSTANCE;
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-demo,代码行数:25,代码来源:ThemeManager.java
示例11: CustomTextBox
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public CustomTextBox(boolean hasButton) {
addStyleName(MainResources.GSS.searchBox());
textBox = new TextBox();
textBox.setStyleName(MainResources.GSS.searchBoxInput());
add(textBox);
if (hasButton) {
button = new MaterialLink();
button.setIconType(IconType.SEARCH);
button.setIconColor(Color.WHITE);
add(button);
}
}
开发者ID:lumongo,项目名称:lumongo,代码行数:17,代码来源:CustomTextBox.java
示例12: FilterQueryWidget
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public FilterQueryWidget() {
addStyleName(MainResources.GSS.searchBox());
textBox = new TextBox();
textBox.setStyleName(MainResources.GSS.searchBoxInput());
add(textBox);
plusButton = new MaterialLink();
plusButton.setIconType(IconType.ADD);
plusButton.setIconColor(Color.WHITE);
add(plusButton);
minusButton = new MaterialLink();
minusButton.setIconType(IconType.REMOVE);
minusButton.setIconColor(Color.WHITE);
add(minusButton);
}
开发者ID:lumongo,项目名称:lumongo,代码行数:21,代码来源:FilterQueryWidget.java
示例13: addFilter
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
private void addFilter(String key, String value) {
Heading keyLabel = new Heading(HeadingSize.H4);
keyLabel.setText(key + ":");
keyLabel.addStyleName(res.style().filterKey());
filtersPanel.add(keyLabel);
Heading valueLabel = new Heading(HeadingSize.H4);
valueLabel.setText(value);
valueLabel.setTextColor(Color.GREY);
valueLabel.addStyleName(res.style().filterValue());
filtersPanel.add(valueLabel);
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:12,代码来源:ClassroomView.java
示例14: LectureCard
import gwt.material.design.client.constants.Color; //导入依赖的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
示例15: LecturerCard
import gwt.material.design.client.constants.Color; //导入依赖的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
示例16: CourseCard
import gwt.material.design.client.constants.Color; //导入依赖的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
示例17: LectureBanner
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public LectureBanner(Lecture lecture) {
setBackgroundColor(Color.WHITE);
setShadow(1);
addStyleName(res.style().view());
MaterialRow titleRow = new MaterialRow();
MaterialColumn titleColumn = new MaterialColumn();
titleColumn.setGrid("s12");
title = new Heading(HeadingSize.H1);
title.addStyleName(res.style().title());
title.setTextColor(Color.BLUE_GREY);
titleColumn.add(title);
titleRow.add(titleColumn);
add(titleRow);
MaterialRow descriptionRow = new MaterialRow();
MaterialColumn descriptionColumn = new MaterialColumn();
descriptionColumn.setGrid("s12");
description = new MaterialLabel();
description.setTextColor(Color.GREY_DARKEN_1);
description.addStyleName("flow-text");
descriptionColumn.add(description);
descriptionRow.add(descriptionColumn);
add(descriptionRow);
if (lecture != null)
setLecture(lecture);
}
开发者ID:vsite-hr,项目名称:mentor,代码行数:31,代码来源:LectureBanner.java
示例18: getFavAddButton
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
private MaterialButton getFavAddButton(Integer objectId) {
MaterialButton button = new MaterialButton();
button.addClickHandler(clickEvent -> handleFavouriteSection(objectId, button));
button.setType(ButtonType.FLAT);
button.setIconType(IconType.FAVORITE);
button.setClass(FAVOURITES_ADD_CSS);
button.setBackgroundColor(Color.WHITE);
button.setType(ButtonType.FLOATING);
markFavouriteSelection(favouriteCameras.contains(objectId), button);
return button;
}
开发者ID:baldram,项目名称:tristar-eye,代码行数:12,代码来源:CameraDialog.java
示例19: createNavBarOptions
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
MaterialButton createNavBarOptions() {
MaterialButton moreButton = new MaterialButton();
moreButton.add(createDropDown());
moreButton.setType(ButtonType.FLAT);
moreButton.setIconColor(Color.WHITE);
moreButton.setIconPosition(IconPosition.LEFT);
moreButton.setIconType(IconType.MORE_VERT);
moreButton.getElement().addClassName(NAV_OPTIONS_CSS_CLASS);
return moreButton;
}
开发者ID:baldram,项目名称:tristar-eye,代码行数:14,代码来源:ContextMenu.java
示例20: setupComputedBackgroundColor
import gwt.material.design.client.constants.Color; //导入依赖的package包/类
public static String setupComputedBackgroundColor(Color color) {
MaterialWidget temp = new MaterialWidget(Document.get().createDivElement());
temp.setBackgroundColor(color);
RootPanel.get().add(temp);
String computed = getComputedBackgroundColor(temp.getElement()).toLowerCase();
temp.removeFromParent();
return computed;
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:9,代码来源:ColorHelper.java
注:本文中的gwt.material.design.client.constants.Color类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论