當前位置: 首頁>>代碼示例>>Java>>正文


Java ViewChangeListener類代碼示例

本文整理匯總了Java中com.vaadin.navigator.ViewChangeListener的典型用法代碼示例。如果您正苦於以下問題:Java ViewChangeListener類的具體用法?Java ViewChangeListener怎麽用?Java ViewChangeListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ViewChangeListener類屬於com.vaadin.navigator包,在下文中一共展示了ViewChangeListener類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的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.navigator.ViewChangeListener; //導入依賴的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.navigator.ViewChangeListener; //導入依賴的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.navigator.ViewChangeListener; //導入依賴的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: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    addComponent(new HeadingLabel("パスワードリセット"));

    // パスパラメーターを取得
    String token = Stream.of(event.getParameters().split("/")).filter(s -> !s.isEmpty()).findFirst().orElse("");
    if (token.isEmpty()) {
        printRequestSection();
        return;
    }

    try {
        PasswordResetRequest request = attendanceService.getPasswordResetRequest(token);
        printResetSection(request);
    } catch (IllegalArgumentException e) {
        log.info("トークン検証失敗", e);
        ErrorView.show("無効なパラメーターです。", null);
    }
}
 
開發者ID:JavaTrainingCourse,項目名稱:obog-manager,代碼行數:20,代碼來源:ResetPasswordView.java

示例6: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    super.enter(event);
    String parameters = event.getParameters();
    if (!StringUtils.isEmpty(parameters)) {
        Map<String, String> paramMap = ViewUtil.stringToMap(parameters);
        try {
            Long daiId = Long.parseLong(paramMap.get(ViewUtil.DAI_ID_PARAM_KEY));
            LOG.info("Entered DAI View with Id:" + daiId);
            this.parentTable.setValue(null);
            this.parentTable.select(daiId);
            this.parentTable.setCurrentPageFirstItemIndex(getParentContainer().indexOfId(daiId));
        } catch (NumberFormatException ne) {
            LOG.warn("Invalid Parameters for DAI View. " + parameters);
        }
    }
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:18,代碼來源:ApplianceInstanceView.java

示例7: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    super.enter(event);
    String parameters = event.getParameters();
    if (!StringUtils.isEmpty(parameters)) {
        Map<String, String> paramMap = ViewUtil.stringToMap(parameters);
        try {
            Long mcId = Long.parseLong(paramMap.get(ViewUtil.MC_ID_PARAM_KEY));
            log.info("Entered MC View with Id:" + mcId);
            this.parentTable.select(mcId);
            this.parentTable.setCurrentPageFirstItemIndex(getParentContainer().indexOfId(mcId));
        } catch (NumberFormatException ne) {
            log.warn("Invalid Parameters for MC View. " + parameters);
        }
    }
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:17,代碼來源:ManagerConnectorView.java

示例8: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    super.enter(event);
    String parameters = event.getParameters();
    if (!StringUtils.isEmpty(parameters)) {
        Map<String, String> paramMap = ViewUtil.stringToMap(parameters);
        try {
            Long jobId = Long.parseLong(paramMap.get(ViewUtil.JOB_ID_PARAM_KEY));
            log.info("Entered Job View with Id:" + jobId);
            this.parentTable.select(jobId);
            this.parentTable.setCurrentPageFirstItemIndex(getParentContainer().indexOfId(jobId));
        } catch (NumberFormatException ne) {
            log.warn("Invalid Parameters for Job View. " + parameters);
        }
    }
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:17,代碼來源:JobView.java

示例9: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    super.enter(event);
    String parameters = event.getParameters();
    if (!StringUtils.isEmpty(parameters)) {
        Map<String, String> paramMap = ViewUtil.stringToMap(parameters);
        try {
            Long alertId = Long.parseLong(paramMap.get(ViewUtil.ALERT_ID_PARAM_KEY));
            log.info("Entered Alert View with Id:" + alertId);
            this.parentTable.setValue(null);
            this.parentTable.select(alertId);
            this.parentTable.setCurrentPageFirstItemIndex(getParentContainer().indexOfId(alertId));
        } catch (NumberFormatException ne) {
            log.warn("Invalid Parameters for Alert View. " + parameters);
        }
    }
}
 
開發者ID:opensecuritycontroller,項目名稱:osc-core,代碼行數:18,代碼來源:AlertView.java

示例10: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent viewChangeEvent) {
    super.enter(viewChangeEvent);
    log.info("{} viewed order list", getCurrentUser());

    String likeFilter = "%" + "" + "%";
    list.lazyLoadFrom(
                     (firstRow, asc, sortProperty) -> repository.findByOrderIdLikeIgnoreCaseOrderByIdDesc(
                             likeFilter,
                             new PageRequest(
                                     firstRow / PAGESIZE,
                                     PAGESIZE,
                                     asc ? Sort.Direction.ASC : Sort.Direction.DESC,
                                     sortProperty == null ? "id" : sortProperty
                             )
                     ),
                     () -> (int) repository.countByOrderIdLikeOrderByIdDesc(likeFilter),
                     PAGESIZE);
}
 
開發者ID:kumoregdev,項目名稱:kumoreg,代碼行數:20,代碼來源:OrderListView.java

示例11: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent viewChangeEvent) {
    super.enter(viewChangeEvent);
    String parameters = viewChangeEvent.getParameters();
    if (parameters == null || parameters.equals("")) {
        txtSearch.clear();
        attendeeBeanList.removeAllItems();
    } else {
        String searchString = viewChangeEvent.getParameters();
        tblResult.clear();
        if (txtSearch.getValue() != null && !txtSearch.getValue().equals(searchString)) {
            txtSearch.setValue(searchString);
        }
        handler.searchFor(searchString);
    }
    txtSearch.addValueChangeListener((Property.ValueChangeListener) valueChangeEvent -> search());
}
 
開發者ID:kumoregdev,項目名稱:kumoreg,代碼行數:18,代碼來源:AttendeeSearchView.java

示例12: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent viewChangeEvent) {
    super.enter(viewChangeEvent);
    String parameters = viewChangeEvent.getParameters();
    if (parameters != null && !parameters.trim().equals("")) {
        Integer badgeId;
        try {
            badgeId = Integer.parseInt(parameters);
            handler.showBadge(this, badgeId);
        } catch (NumberFormatException ex) {
            notifyError("Badge ID must be integer: " + parameters);
        }
    } else {
        // Create new badge type
        handler.showBadge(this, null);
    }
}
 
開發者ID:kumoregdev,項目名稱:kumoreg,代碼行數:18,代碼來源:BadgeEditView.java

示例13: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    checkDeveloperMode();
    try {
        if (!Objects.equals(event.getOldView(), event.getNewView())) {
            viewUrl = event.getViewName();
            viewDefinition = HybridbpmUI.getDashboardAPI().getViewDefinitionByUrl(viewUrl);
            tabSheet.removeSelectedTabChangeListener(this);
            createTabs();
            tabSheet.addSelectedTabChangeListener(this);
        }
        if (event.getParameters() != null && !event.getParameters().trim().isEmpty()) {
            openDashboardTab(event.getParameters());
        } else {
            TabDefinition td = ((DashboardTab) tabSheet.getTab(0).getComponent()).getTabDefinition();
            HybridbpmUI.getCurrent().getHybridbpmNavigator().navigateTo(viewUrl + "/" + td.getId());
        }
    } catch (Exception e) {
        logger.log(Level.SEVERE, e.getMessage(), e);
    }
}
 
開發者ID:hybridbpm,項目名稱:hybridbpm,代碼行數:22,代碼來源:DashboardView.java

示例14: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
    public void enter(ViewChangeListener.ViewChangeEvent viewChangeEvent) {
        removeAllComponents();

        setMargin(new MMarginInfo(false, true));
        add(new Header("Employee analysis").setHeaderLevel(2));

        List<Employee> employeeData = service.findAll();
        add(ageDistribution(employeeData));
        
        add(salaryDistribution(employeeData));
        //final Component funnel = createStatusFunnel(employeeData);
        final Component gender = genderDistribution(employeeData);
        //if (ScreenSize.getScreenSize() == ScreenSize.SMALL) {
            //addComponents(funnel, gender);
        	addComponents(gender);
//        } else {
//            //addComponent(new MHorizontalLayout(funnel, gender).withFullWidth());
//        }

    }
 
開發者ID:IBM-Cloud,項目名稱:onprem-integration-demo,代碼行數:22,代碼來源:AnalyzeView.java

示例15: enter

import com.vaadin.navigator.ViewChangeListener; //導入依賴的package包/類
@Override
public void enter(ViewChangeListener.ViewChangeEvent viewChangeEvent) {
    worldMap.removeAllComponents();
    LOpenStreetMapLayer osm = new LOpenStreetMapLayer();
    osm.setDetectRetina(true);
    worldMap.addComponent(osm);
    for (final Customer customer : service.findAll()) {
        if(customer.getLocation() != null) {
            LMarker marker = new LMarker(customer.getLocation());
            marker.addClickListener(new LeafletClickListener() {
                @Override
                public void onClick(LeafletClickEvent event) {
                    Notification.show(
                            "Customer: " + customer.getFirstName() + " " + customer.
                            getLastName());
                }
            });
            worldMap.addComponent(marker);
       }
    }
    worldMap.zoomToContent();
}
 
開發者ID:IBM-Cloud,項目名稱:onprem-integration-demo,代碼行數:23,代碼來源:MapView.java


注:本文中的com.vaadin.navigator.ViewChangeListener類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。