Java Code Examples for

The following are Jave code examples for showing how to use setVisible() of the class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: owsi-core-parent   File:   Source Code and License Vote up 6 votes
protected void addMenuElement(MarkupContainer menuContainer,
		Class<? extends Page> selectedPageClass,
		String name,
		Class<? extends Page> pageClass,
		PageParameters parameters,
		boolean isVisible) {
	BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>(name + "MenuLink", pageClass, parameters);
	link.setVisible(isVisible && isPageAccessible(pageClass));
	MarkupContainer container = new WebMarkupContainer(name + "MenuLinkContainer");
	if (pageClass.equals(selectedPageClass)) {
		container.add(new ClassAttributeAppender("active"));
Example 2
Project: openNaEF   File:   Source Code and License Vote up 5 votes
public static BookmarkablePageLink<Void> getLocationLink(String id, LocationDto dto) {
    PageParameters parameters = getParameters(dto);
    BookmarkablePageLink<Void> link = new BookmarkablePageLink<Void>(id, LocationViewPage.class, parameters);
    link.setEnabled(dto != null);
    link.setVisible(dto != null);
    return link;
Example 3
Project: MasterStats   File:   Source Code and License Vote up 5 votes
protected void populateItem(ListItem<ChampionMasteryItem> item) {
    ChampionMasteryItem mastery = item.getModelObject();
    ChampionStatisticItem championStatistic = null;
    // create boolean to storing whether or not element should be shown
    // set to false if mastery or championStatistic is null
    boolean visible = true;
    // check if mastery is null

    if (mastery != null) {
        championStatistic = PageDataProvider.getChampionStatisticById(mastery.getChampionId());
    } else {
        // if mastery is null create a new one and fill it with default data
        mastery = new ChampionMasteryItem();
        visible = false;
    if (championStatistic == null) {
        // if champion statistic is null use default champion for statistic
        championStatistic = PageDataProvider.championStatisticMap.get("bard");
        visible = false;

    // create link to champion page
    PageParameters linkParameters = new PageParameters();
    linkParameters.set(0, championStatistic.getKeyName());
    BookmarkablePageLink<String> link = new BookmarkablePageLink<>("champion_link",
            SingleChampionPage.class, linkParameters);

    // add champion portrait, name and mastery score as well as champion level
    link.add(new ExternalImage("champion_portrait", championStatistic.getPortraitUrl()));
    link.add(new Label("champion_name", championStatistic.getChampionName()));
    link.add(new Label("champion_stats", String.format("%s - Level %d", NumberFormatter.formatLong(
            mastery.getChampionPoints()), mastery.getChampionLevel())));

    // hide link if necessary
Example 4
Project: singular-server   File:   Source Code and License Vote up 5 votes
private MarkupContainer createHistoryLink(String id, IModel<BoxItemDataMap> boxItemModel) {
    BoxItemDataMap boxItem        = boxItemModel.getObject();
    PageParameters pageParameters = new PageParameters();
    if (boxItem.getFlowInstanceId() != null) {
        pageParameters.add(REQUIREMENT_ID, boxItem.getCod());
        pageParameters.add(INSTANCE_ID, boxItem.getFlowInstanceId());
        pageParameters.add(MODULE_PARAM_NAME, getModule().getCod());
        pageParameters.add(MENU_PARAM_NAME, getMenu());
    BookmarkablePageLink<?> historiLink = new BookmarkablePageLink<>(id, getHistoricoPage(), pageParameters);
    historiLink.setVisible(boxItem.getProcessBeginDate() != null);
    return historiLink;
Example 5
Project: elpaaso-core   File:   Source Code and License Vote up 5 votes
private void initComponents() {

            Label summaryResultLabel = new Label("summaryResultLabel",new StringResourceModel("", null));

            String key = "";
            logger.debug("looking for key");

            if (!canCreateEnvironment) {
                key = "";
            } else if (isLocked) {
                key = "";
            } else if (isLogicalDeploymentConsistent) {
                key = "";
            } else {
                key = "";
            statusLabel = new Label("archiValidatedLabel", new StringResourceModel(key, null));
            PageParameters newEnvPageParameters = new PageParameters(params);
            newEnvPageParameters.set("new", "1");

            BookmarkablePageLink<Page> newEnv = new BookmarkablePageLink<Page>("newEnvLink", SelectedReleasePage.class, newEnvPageParameters);
            newEnv.setVisible(isLogicalDeploymentConsistent && canCreateEnvironment);