本文整理汇总了Java中org.gwtbootstrap3.client.ui.constants.ImageType类的典型用法代码示例。如果您正苦于以下问题:Java ImageType类的具体用法?Java ImageType怎么用?Java ImageType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ImageType类属于org.gwtbootstrap3.client.ui.constants包,在下文中一共展示了ImageType类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupUserBox
import org.gwtbootstrap3.client.ui.constants.ImageType; //导入依赖的package包/类
private void setupUserBox(final SocialUser socialUser,
Image userImage,
final ParameterizedCommand<String> onClick) {
final org.gwtbootstrap3.client.ui.Image image = new org.gwtbootstrap3.client.ui.Image(userImage.getUrl());
image.setType(ImageType.CIRCLE);
image.setPixelSize(140,
140);
if (onClick != null) {
image.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
onClick.execute(socialUser.getUserName());
}
});
}
panel.insert(image,
0);
createLink(socialUser,
onClick);
if (socialUser.getEmail().isEmpty()) {
//Hide element so that box is the same size for all users
desc.getElement().getStyle().setVisibility(Style.Visibility.HIDDEN);
desc.setText(".");
} else {
desc.setText(socialUser.getEmail());
}
}
示例2: addMedia
import org.gwtbootstrap3.client.ui.constants.ImageType; //导入依赖的package包/类
public void addMedia(final Media media) {
final Column column = new Column(ColumnSize.XS_4);
final Button trash = new Button();
trash.setIcon(IconType.TRASH);
final ThumbnailPanel thumbnail = new ThumbnailPanel() {{
add(new Image(media.getPreviewURI()) {{
setType(ImageType.CIRCLE);
setHeight("140px");
setWidth("140px");
}});
add(new Caption() {{
add(new Paragraph(media.getExternalURI()) {{
getElement().getStyle().setProperty("maxWidth",
"180px");
}});
add(new Paragraph() {{
add(trash);
}});
}});
}};
trash.addClickHandler(getTrashClickHandler(media,
column));
column.add(thumbnail);
library.add(column);
mediaRef.put(media.getPath(),
column);
}
示例3: DisplayerSubTypeImageWidget
import org.gwtbootstrap3.client.ui.constants.ImageType; //导入依赖的package包/类
public DisplayerSubTypeImageWidget(ImageResource selectedImage,
ImageResource unselectedImage,
String tooltip,
boolean initiallySelected) {
initWidget(container);
isSelected = initiallySelected;
if (selectedImage != null) {
selected = new Image(selectedImage);
selected.setType(ImageType.THUMBNAIL);
selected.setTitle(tooltip);
selected.setVisible(isSelected);
selected.addStyleName("selDispSubtype"); //for selenium
container.setWidget(0, 0, selected);
}
if (unselectedImage != null) {
unselected = new Image(unselectedImage);
unselected.setType(ImageType.THUMBNAIL);
unselected.setTitle(tooltip);
unselected.setVisible(!isSelected);
unselected.getElement().getStyle().setCursor(Style.Cursor.POINTER);
container.setWidget(0, 1, unselected);
}
}
示例4: setType
import org.gwtbootstrap3.client.ui.constants.ImageType; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setType(final ImageType type) {
StyleHelper.addEnumStyleName(this, type);
}
示例5: getType
import org.gwtbootstrap3.client.ui.constants.ImageType; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public ImageType getType() {
return ImageType.fromStyleName(getStyleName());
}
示例6: setType
import org.gwtbootstrap3.client.ui.constants.ImageType; //导入依赖的package包/类
@Override
public void setType(final ImageType type) {
StyleHelper.addEnumStyleName(this, type);
}
示例7: getType
import org.gwtbootstrap3.client.ui.constants.ImageType; //导入依赖的package包/类
@Override
public ImageType getType() {
return ImageType.fromStyleName(getStyleName());
}