当前位置: 首页>>代码示例>>Java>>正文


Java VaadinIcons类代码示例

本文整理汇总了Java中com.vaadin.icons.VaadinIcons的典型用法代码示例。如果您正苦于以下问题:Java VaadinIcons类的具体用法?Java VaadinIcons怎么用?Java VaadinIcons使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


VaadinIcons类属于com.vaadin.icons包,在下文中一共展示了VaadinIcons类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: enter

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    if (!isLoggedIn()) {
        getUI().getNavigator().navigateTo(LoginView.VIEW_NAME);
        return;
    }
    addComponent(new HeadingLabel("会員名簿", VaadinIcons.BULLETS));

    printAllMembers();

    Button homeButton = new Button("会員メニュー", click -> getUI().getNavigator().navigateTo(MenuView.VIEW_NAME));
    homeButton.setIcon(VaadinIcons.USER);
    addComponent(homeButton);
    setComponentAlignment(homeButton, Alignment.MIDDLE_CENTER);
}
 
开发者ID:JavaTrainingCourse,项目名称:obog-manager,代码行数:16,代码来源:MemberListView.java

示例2: enter

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    addComponent(new HeadingLabel("ログアウト確認", VaadinIcons.INFO_CIRCLE));
    addComponent(new Label("ログアウトします。"));

    HorizontalLayout buttonArea = new HorizontalLayout();
    buttonArea.setSpacing(true);
    addComponent(buttonArea);
    setComponentAlignment(buttonArea, Alignment.MIDDLE_CENTER);

    Button cancelButton = new Button("キャンセル", click -> getUI().getNavigator().navigateTo(MenuView.VIEW_NAME));
    buttonArea.addComponent(cancelButton);

    Button logoutButton = new Button("ログアウト", click -> {
        membershipService.logout();
        getUI().getNavigator().navigateTo(FrontView.VIEW_NAME);
    });
    logoutButton.setIcon(VaadinIcons.SIGN_OUT);
    logoutButton.setStyleName(ValoTheme.BUTTON_PRIMARY);
    buttonArea.addComponent(logoutButton);
}
 
开发者ID:JavaTrainingCourse,项目名称:obog-manager,代码行数:22,代码来源:LogoutConfirmView.java

示例3: enter

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    addComponent(new HeadingLabel("参加登録完了", VaadinIcons.CHECK));
    addComponent(new Label("参加登録が完了し、確認メールを送信しました。"));
    Label addressLabel = new Label("しばらく待ってもメールが来ない場合は、お手数ですが " + appReply + " までご連絡ください。");
    addressLabel.setCaption("お願い");
    addressLabel.setIcon(VaadinIcons.LIGHTBULB);
    addComponent(addressLabel);
    Button homeButton = new Button("ホーム", click -> getUI().getNavigator().navigateTo(FrontView.VIEW_NAME));
    homeButton.setIcon(VaadinIcons.HOME);
    addComponent(homeButton);
    setComponentAlignment(homeButton, Alignment.MIDDLE_CENTER);
}
 
开发者ID:JavaTrainingCourse,项目名称:obog-manager,代码行数:14,代码来源:ThanksView.java

示例4: enter

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    addComponent(new HeadingLabel("パスワードリセット要求送信完了", VaadinIcons.INFO_CIRCLE));
    addComponent(new Label("入力された E-mail アドレスへパスワードリセットの案内メールを送信しました。"));
    Label addressLabel = new Label("しばらく待ってもメールが来ない場合は、お手数ですが " + appReply + " までご連絡ください。");
    addressLabel.setCaption("お願い");
    addressLabel.setIcon(VaadinIcons.LIGHTBULB);
    addComponent(addressLabel);
    Button homeButton = new Button("ホーム", click -> getUI().getNavigator().navigateTo(FrontView.VIEW_NAME));
    homeButton.setIcon(VaadinIcons.HOME);
    addComponent(homeButton);
    setComponentAlignment(homeButton, Alignment.MIDDLE_CENTER);
}
 
开发者ID:JavaTrainingCourse,项目名称:obog-manager,代码行数:14,代码来源:TokenSentView.java

示例5: AboutWindow

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
public AboutWindow() {
    super("このアプリについて");
    center();
    setModal(true);
    setWidth(400, Unit.PIXELS);
    setHeight(300, Unit.PIXELS);

    VerticalLayout layout = new VerticalLayout();
    layout.setSpacing(true);
    layout.setSizeFull();
    layout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER);
    setContent(layout);

    layout.addComponent(new Label("<b><a href=\"https://github.com/JavaTrainingCourse/obog-manager\">" +
            "obog-manager</a></b> v" + Version.OBOG_MANAGER_VERSION, ContentMode.HTML));
    layout.addComponent(new Label("<b>AUTHORS</b><br/>" + String.join("<br/>", Version.INSTANCE.getAuthors()), ContentMode.HTML));
    layout.addComponent(new Label("<div align=\"center\">Powered by " + VaadinIcons.VAADIN_V.getHtml() +
            " Vaadin Framework<br/>(<a href=\"https://goo.gl/IIztDT\">紹介スライド</a>)</div>",
            ContentMode.HTML));

    Button closeButton = new Button("閉じる", e -> close());
    layout.addComponent(closeButton);
    layout.setComponentAlignment(closeButton, Alignment.BOTTOM_CENTER);
}
 
开发者ID:JavaTrainingCourse,项目名称:obog-manager,代码行数:25,代码来源:AboutWindow.java

示例6: createMenuButton

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
private Button createMenuButton(VaadinIcons icon, String caption, Supplier<CustomComponent> content) {

    final Button button = new Button(caption, (e) -> {
      contentLayout.removeAllComponents();
      contentLayout.addComponent(content.get());
    });
    button.setIcon(icon);
    button.addStyleName(ValoTheme.BUTTON_HUGE);
    button.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_TOP);
    button.addStyleName(ValoTheme.BUTTON_BORDERLESS);
    button.addStyleName(ValoTheme.MENU_ITEM);
    button.setWidth("100%");

    button.setId(buttonID().apply(MainView.class, caption));

    return button;
  }
 
开发者ID:Java-Publications,项目名称:javamagazin-009-microkernel,代码行数:18,代码来源:MainView.java

示例7: dialog1

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
public void dialog1() {
	// tag::dialog1[]
	Dialog dialog = Components.dialog() // <1>
			.draggable(false) // <2>
			.closable(true) // <3>
			.resizable(true) // <4>
			.modal(true) // <5>
			.message("Dialog message", "dialog.message.code") // <6>
			.okButtonConfigurator(cfg -> cfg.caption("Done").icon(VaadinIcons.CHECK_CIRCLE_O)) // <7>
			.withCloseListener((window, action) -> { // <8>
				// ...
			}).build();

	dialog.open(); // <9>

	dialog.close(); // <10>
	// end::dialog1[]
}
 
开发者ID:holon-platform,项目名称:holon-vaadin,代码行数:19,代码来源:ExampleDialog.java

示例8: test

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Test
public void test() {
    Person p1 = new Person(1, "John", LocalDate.of(1990, Month.JANUARY, 2));
    Person p2 = new Person(1, "George", LocalDate.of(1991, Month.JUNE, 19));
    Person p3 = new Person(1, "Tim", LocalDate.of(1995, Month.APRIL, 7));
    SerializablePredicate<Person> predicate = this::isBeforeJan1992;

    FRadioButtonGroup<Person> radio = new FRadioButtonGroup<Person>().withCaption("My ComboBox", true)
                                                                     .withWidth(300, Unit.PIXELS)
                                                                     .withItems(p1, p2, p3)
                                                                     .withItemCaptionGenerator(p -> p.getName())
                                                                     .withItemIconGenerator(p -> VaadinIcons.USER)
                                                                     .withItemEnabledProvider(predicate);

    assertEquals("My ComboBox", radio.getCaption());
    assertTrue(radio.isCaptionAsHtml());
    assertEquals(300, radio.getWidth(), 0);
    assertEquals(Unit.PIXELS, radio.getWidthUnits());
    assertEquals(3, ((ListDataProvider<Person>) radio.getDataProvider()).getItems().size());
    assertEquals(predicate, radio.getItemEnabledProvider());
}
 
开发者ID:viydaag,项目名称:vaadin-fluent-api,代码行数:23,代码来源:FRadioButtonGroupTest.java

示例9: test

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@Test
public void test() {
    FRichTextArea area = new FRichTextArea().withCaption("test")
                                            .withEnabled(false)
                                            .withIcon(VaadinIcons.AIRPLANE)
                                            .withId("textId")
                                            .withValue("some text")
                                            .withVisible(false)
                                            .withValueChangeMode(ValueChangeMode.TIMEOUT)
                                            .withValueChangeTimeout(5000);

    assertEquals("test", area.getCaption());
    assertFalse(area.isEnabled());
    assertEquals(VaadinIcons.AIRPLANE, area.getIcon());
    assertEquals("textId", area.getId());
    assertEquals("some text", area.getValue());
    assertFalse(area.isVisible());
    assertEquals(ValueChangeMode.TIMEOUT, area.getValueChangeMode());
    assertEquals(5000, area.getValueChangeTimeout());
}
 
开发者ID:viydaag,项目名称:vaadin-fluent-api,代码行数:21,代码来源:FRichTextAreaTest.java

示例10: test

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@Test
public void test() {
    FTextArea area = new FTextArea().withCaption("test")
                                    .withEnabled(false)
                                    .withIcon(VaadinIcons.AIRPLANE)
                                    .withId("textId")
                                    .withPlaceholder("enter text")
                                    .withValue("some text")
                                    .withVisible(false)
                                    .withValueChangeMode(ValueChangeMode.TIMEOUT)
                                    .withValueChangeTimeout(5000)
                                    .withRows(20)
                                    .withWordWrap(false);

    assertEquals("test", area.getCaption());
    assertFalse(area.isEnabled());
    assertEquals(VaadinIcons.AIRPLANE, area.getIcon());
    assertEquals("textId", area.getId());
    assertEquals("enter text", area.getPlaceholder());
    assertEquals("some text", area.getValue());
    assertFalse(area.isVisible());
    assertEquals(ValueChangeMode.TIMEOUT, area.getValueChangeMode());
    assertEquals(5000, area.getValueChangeTimeout());
    assertEquals(20, area.getRows());
    assertFalse(area.isWordWrap());
}
 
开发者ID:viydaag,项目名称:vaadin-fluent-api,代码行数:27,代码来源:FTextAreaTest.java

示例11: testButton

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@Test
public void testButton() {
    FButton button = new FButton().withCaption("My button")
                                  .withIcon(VaadinIcons.ARROW_BACKWARD)
                                  .withIconAlternateText("backward")
                                  .withClickListener(click -> System.out.println("clicked"))
                                  .withClickShortcut(ShortcutAction.KeyCode.ENTER, null)
                                  .withBlurListener(blur -> System.out.println("lost focus"))
                                  .withFocusListener(focus -> System.out.println("gain focus"))
                                  .withTabIndex(5)
                                  .withDisableOnClick(true);

    assertEquals("My button", button.getCaption());
    assertEquals(VaadinIcons.ARROW_BACKWARD, button.getIcon());
    assertEquals("backward", button.getIconAlternateText());
    assertEquals(5, button.getTabIndex());
    assertEquals(1, button.getListeners(ClickEvent.class).size());
    assertEquals(1, button.getListeners(FocusEvent.class).size());
    assertEquals(1, button.getListeners(BlurEvent.class).size());
    assertTrue(button.getClickShortcut() != null);
    assertTrue(button.isDisableOnClick());

}
 
开发者ID:viydaag,项目名称:vaadin-fluent-api,代码行数:24,代码来源:FButtonTest.java

示例12: testNativeButton

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@Test
public void testNativeButton() {
    FNativeButton button = new FNativeButton().withCaption("My button")
                                              .withIcon(VaadinIcons.ARROW_BACKWARD)
                                              .withIconAlternateText("backward")
                                              .withClickListener(click -> System.out.println("clicked"))
                                              .withClickShortcut(ShortcutAction.KeyCode.ENTER, null)
                                              .withBlurListener(blur -> System.out.println("lost focus"))
                                              .withFocusListener(focus -> System.out.println("gain focus"))
                                              .withTabIndex(5)
                                              .withDisableOnClick(true);

    assertEquals("My button", button.getCaption());
    assertEquals(VaadinIcons.ARROW_BACKWARD, button.getIcon());
    assertEquals("backward", button.getIconAlternateText());
    assertEquals(5, button.getTabIndex());
    assertEquals(1, button.getListeners(ClickEvent.class).size());
    assertEquals(1, button.getListeners(FocusEvent.class).size());
    assertEquals(1, button.getListeners(BlurEvent.class).size());
    assertTrue(button.isDisableOnClick());

}
 
开发者ID:viydaag,项目名称:vaadin-fluent-api,代码行数:23,代码来源:FButtonTest.java

示例13: test

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
@Test
public void test() {
    FNotification notif = new FNotification("", Type.WARNING_MESSAGE).withCaption("My notif")
                                                                     .withDelayMsec(3000)
                                                                     .withDescription("description")
                                                                     .withHtmlContentAllowed(true)
                                                                     .withIcon(VaadinIcons.ARCHIVE)
                                                                     .withPosition(Position.TOP_RIGHT)
                                                                     .withStyleName("test");

    assertEquals("My notif", notif.getCaption());
    assertEquals(3000, notif.getDelayMsec());
    assertEquals("description", notif.getDescription());
    assertTrue(notif.isHtmlContentAllowed());
    assertEquals(VaadinIcons.ARCHIVE, notif.getIcon());
    assertEquals(Position.TOP_RIGHT, notif.getPosition());
    assertEquals("test", notif.getStyleName());
}
 
开发者ID:viydaag,项目名称:vaadin-fluent-api,代码行数:19,代码来源:FNotificationTest.java

示例14: ArmorTypeGrid

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
public ArmorTypeGrid() {
    super();
    //        withProperties("name", "proficiencyType", "baseArmorClass", "maxDexBonus", "stealthDisavantage", "minStrength");
    //        withColumnHeaders("Nom", "Maitrise", "Classe d'armure", "Bonus max dextérité", "Désavantage furtivité", "Force minimum");
    //        
    //        getColumn("maxDexBonus").setRenderer(new ModifierRenderer());
    //        getColumn("baseArmorClass").setRenderer(new ModifierRenderer());
    //        
    //        Grid.Column stealthDisavantage = getColumn("stealthDisavantage");
    //        stealthDisavantage.setRenderer(new HtmlRenderer(),
    //            new StringToBooleanConverter(
    //                FontAwesome.CHECK_CIRCLE_O.getHtml(),
    //                FontAwesome.CIRCLE_O.getHtml()));
    
    StringToBooleanConverter converter = new StringToBooleanConverter("", VaadinIcons.CHECK_CIRCLE_O.getHtml(),
            VaadinIcons.CIRCLE_THIN.getHtml());
    addColumn(ArmorType::getName).setCaption("Nom").setId("name");
    addColumn(ArmorType::getProficiencyType).setCaption("Maitrise").setId("proficiencyType");
    addColumn(ArmorType::getBaseArmorClass, new ModifierRenderer()).setCaption("Classe d'armure").setId("baseArmorClass");
    addColumn(ArmorType::getMaxDexBonus, new ModifierRenderer()).setCaption("Bonus max dextérité").setId("maxDexBonus");
    addColumn(armorType -> converter.convertToPresentation(armorType.getStealthDisavantage(), new ValueContext()), new HtmlRenderer())
            .setCaption("Désavantage furtivité");
    addColumn(ArmorType::getMinStrength).setCaption("Force minimum").setId("minStrength");

}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:26,代码来源:ArmorTypeGrid.java

示例15: EquipmentGrid

import com.vaadin.icons.VaadinIcons; //导入依赖的package包/类
public EquipmentGrid() {
    super();
    //        withProperties("name", "type", "isPurchasable", "isSellable");
    //        withColumnHeaders("Nom", "Type", "Achetable", "Vendable");
    //
    //        getColumn("isPurchasable").setRenderer(new HtmlRenderer(),
    //                new StringToBooleanConverter(FontAwesome.CHECK_CIRCLE_O.getHtml(), FontAwesome.CIRCLE_O.getHtml()));
    //
    //        getColumn("isSellable").setRenderer(new HtmlRenderer(),
    //                new StringToBooleanConverter(FontAwesome.CHECK_CIRCLE_O.getHtml(), FontAwesome.CIRCLE_O.getHtml()));

    StringToBooleanConverter converter = new StringToBooleanConverter("", VaadinIcons.CHECK_CIRCLE_O.getHtml(),
            VaadinIcons.CIRCLE_THIN.getHtml());

    addColumn(Equipment::getName).setCaption("Nom").setId("name");
    addColumn(Equipment::getType).setCaption("Type").setId("type");
    addColumn(equipment -> converter.convertToPresentation(equipment.getIsPurchasable(), new ValueContext()), new HtmlRenderer())
            .setCaption("Achetable");
    addColumn(equipment -> converter.convertToPresentation(equipment.getIsSellable(), new ValueContext()), new HtmlRenderer())
            .setCaption("Vendable");
}
 
开发者ID:viydaag,项目名称:dungeonstory-java,代码行数:22,代码来源:EquipmentGrid.java


注:本文中的com.vaadin.icons.VaadinIcons类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。