本文整理汇总了Java中com.vaadin.ui.Link.setDescription方法的典型用法代码示例。如果您正苦于以下问题:Java Link.setDescription方法的具体用法?Java Link.setDescription怎么用?Java Link.setDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.Link
的用法示例。
在下文中一共展示了Link.setDescription方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateMgrLink
import com.vaadin.ui.Link; //导入方法依赖的package包/类
public static Object generateMgrLink(String caption, String url) {
Link mgrLink = new Link();
mgrLink.setCaption(caption);
mgrLink.setResource(new ExternalResource(url));
mgrLink.setDescription("Click to go to application");
mgrLink.setTargetName("_blank");
return mgrLink;
}
示例2: createInternalLink
import com.vaadin.ui.Link; //导入方法依赖的package包/类
private static Link createInternalLink(String fragment, HashMap<String, Object> paramMap, String linkCaption,
String linkDescription, ServerApi server) {
String jobLinkUrl = createInternalUrl(fragment, paramMap, server);
if (jobLinkUrl == null) {
return null;
}
Link jobLink = new Link();
jobLink.setCaption(linkCaption);
jobLink.setDescription(linkDescription);
jobLink.setResource(new ExternalResource(jobLinkUrl));
return jobLink;
}
示例3: getHelpLink
import com.vaadin.ui.Link; //导入方法依赖的package包/类
/**
* Generates help/documentation links from within management UI.
*
* @param uri
* to documentation site
*
* @return generated link
*/
public static Link getHelpLink(final String uri) {
final Link link = new Link("", new ExternalResource(uri));
link.setTargetName("_blank");
link.setIcon(FontAwesome.QUESTION_CIRCLE);
link.setDescription("Documentation");
return link;
}
示例4: getLink
import com.vaadin.ui.Link; //导入方法依赖的package包/类
/**
* Method to create a link.
*
* @param id
* of the link
* @param name
* of the link
* @param resource
* path of the link
* @param icon
* of the link
* @param targetOpen
* specify how the link should be open (f. e. new windows =
* _blank)
* @param style
* chosen style of the link. Might be {@code null} if no style
* should be used
* @return a link UI component
*/
public static Link getLink(final String id, final String name, final String resource, final FontAwesome icon,
final String targetOpen, final String style) {
final Link link = new Link(name, new ExternalResource(resource));
link.setId(id);
link.setIcon(icon);
link.setDescription(name);
link.setTargetName(targetOpen);
if (style != null) {
link.setStyleName(style);
}
return link;
}
示例5: VerticalComponentGroupTest
import com.vaadin.ui.Link; //导入方法依赖的package包/类
public VerticalComponentGroupTest() {
setDescription("This is VerticalComponentGroup test");
VerticalComponentGroup verticalComponentGroup = new VerticalComponentGroup(
"Vertical component group");
verticalComponentGroup.addComponent(new Button("Button"));
TextField tf = new TextField(
"A TextField with long caption text and 100% width textfield component");
verticalComponentGroup.addComponent(tf);
Link link = new Link("link caption", new ExternalResource(
"http://www.gizmag.com/"));
link.setDescription("link description text");
verticalComponentGroup.addComponent(link);
verticalComponentGroup.addComponent(new Switch("Switch"));
NumberField numberField = new NumberField("numberfield");
verticalComponentGroup.addComponent(numberField);
NavigationButton one = new NavigationButton("Navigation button");
one.setDescription("nav button description");
NavigationButton too = new NavigationButton(
"Navigation button with icon");
too.setIcon(new ThemeResource("../runo/icons/32/ok.png"));
too.setDescription("nav button description");
verticalComponentGroup.addComponent(one);
verticalComponentGroup.addComponent(too);
verticalComponentGroup.addComponent(new NavigationButton("Simple"));
verticalComponentGroup.addComponent(new Label(
"FIXME: Label, between buttons bugs"));
verticalComponentGroup.addComponent(new Button("Button too"));
verticalComponentGroup.addComponent(getOptiongroup());
addComponent(verticalComponentGroup);
verticalComponentGroup = new VerticalComponentGroup();
verticalComponentGroup.setCaption("Horizontal in vertical");
HorizontalButtonGroup horizontalGroup = getHorizontalGroup();
verticalComponentGroup.addComponent(horizontalGroup);
horizontalGroup = getHorizontalGroup();
horizontalGroup.addComponent(new Button("Third"));
horizontalGroup.setWidth("300px");
Iterator<Component> componentIterator = horizontalGroup
.getComponentIterator();
while (componentIterator.hasNext()) {
Component next = componentIterator.next();
next.setWidth("" + 100.0 / (double)horizontalGroup.getComponentCount() + "%");
}
verticalComponentGroup.addComponent(horizontalGroup);
horizontalGroup = getHorizontalGroup();
Iterator<Component> it = horizontalGroup.getComponentIterator();
it.next().setCaption("Only one here");
horizontalGroup.removeComponent(it.next());
verticalComponentGroup.addComponent(horizontalGroup);
addComponent(verticalComponentGroup);
}