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


Java ListItem.getIndex方法代码示例

本文整理汇总了Java中org.apache.wicket.markup.html.list.ListItem.getIndex方法的典型用法代码示例。如果您正苦于以下问题:Java ListItem.getIndex方法的具体用法?Java ListItem.getIndex怎么用?Java ListItem.getIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.wicket.markup.html.list.ListItem的用法示例。


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

示例1: updateProcessStep

import org.apache.wicket.markup.html.list.ListItem; //导入方法依赖的package包/类
public void updateProcessStep(ListItem<String> listItem, int step) {

        /* CSS Management */
        if(listItem.getIndex() < currentStep) {
            listItem.add(new AttributeAppender("class", new Model<>("step_visited"), ""));
        } else if(listItem.getIndex() == currentStep) {
            listItem.add(new AttributeAppender("class", new Model<>("step_current"), ""));
        } else if(listItem.getIndex() > currentStep) {
            listItem.add(new AttributeAppender("class", new Model<>("step_future"), ""));
        }

        if(listItem.getIndex() == 0) {
            listItem.add(new AttributeAppender("class", new Model<>(" first"), ""));
        }

        if(listItem.getIndex() == stepsNumber - 1) {
            listItem.add(new AttributeAppender("class", new Model<>(" last"), ""));
        }

    }
 
开发者ID:orange-cloudfoundry,项目名称:elpaaso-core,代码行数:21,代码来源:DesignerSteppedProcessPanel.java

示例2: getPlusClassModifier

import org.apache.wicket.markup.html.list.ListItem; //导入方法依赖的package包/类
protected String getPlusClassModifier(ListItem<T> item){
    if(buttonsDisabled()){
        return CSS_DISABLED;
    }

    int size = getModelObject().size();
    if (size <= 1) {
        return "";
    }
    if (item.getIndex() == size - 1) {
        return "";
    }

    return CSS_DISABLED;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:16,代码来源:MultiValueDropDownPanel.java

示例3: isAddButtonVisible

import org.apache.wicket.markup.html.list.ListItem; //导入方法依赖的package包/类
protected boolean isAddButtonVisible(ListItem<T> item) {
    if (isMultiple) {
        int size = getModelObject().size();
        if (size <= 1) {
            return true;
        }
        if (item.getIndex() == size - 1) {
            return true;
        }
    }
    return false;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:13,代码来源:GenericMultiValueLabelEditPanel.java

示例4: isAddButtonVisible

import org.apache.wicket.markup.html.list.ListItem; //导入方法依赖的package包/类
protected boolean isAddButtonVisible(ListItem<T> item) {
    int size = getModelObject().size();
    if (size <= 1) {
        return true;
    }
    if (item.getIndex() == size - 1) {
        return true;
    }

    return false;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:12,代码来源:MultiValueTextFormGroup.java

示例5: getPlusClassModifier

import org.apache.wicket.markup.html.list.ListItem; //导入方法依赖的package包/类
protected String getPlusClassModifier(ListItem<T> item){
    int size = getModelObject().size();
    if (size <= 1) {
        return "";
    }
    if (item.getIndex() == size - 1) {
        return "";
    }

    return CSS_DISABLED;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:12,代码来源:MultiValueTextPanel.java

示例6: isAddButtonVisible

import org.apache.wicket.markup.html.list.ListItem; //导入方法依赖的package包/类
protected boolean isAddButtonVisible(ListItem<ObjectPolicyConfigurationTypeDto> item) {
   int size = getModelObject().size();
    if (size <= 1) {
        return true;
    }
    if (item.getIndex() == size - 1) {
        return true;
    }

    return false;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:12,代码来源:ObjectPolicyConfigurationEditor.java

示例7: isAddButtonVisible

import org.apache.wicket.markup.html.list.ListItem; //导入方法依赖的package包/类
protected boolean isAddButtonVisible(ListItem item) {
	int size = model.getObject().getPropertyConstraintsList().size();
	if (size <= 1) {
		return true;
	}
	if (item.getIndex() == size - 1) {
		return true;
	}

	return false;
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:12,代码来源:ObjectPolicyPanel.java

示例8: AddonsInfoPanel

import org.apache.wicket.markup.html.list.ListItem; //导入方法依赖的package包/类
/**
 * Main constructor
 *
 * @param id              ID to assign to panel
 * @param installedAddons Name list of installed addons
 * @param noEnabledAddons True if no addons are enabled
 */
public AddonsInfoPanel(String id, List<AddonInfo> installedAddons, boolean noEnabledAddons) {
    super(id);
    add(new CssClass("addons-table"));

    final boolean currentLicenseValid = addonsManager.isLicenseInstalled();

    MarkupContainer addonTable = new WebMarkupContainer("addonTable");
    boolean noAddons = installedAddons.isEmpty();
    boolean admin = authorizationService.isAdmin();

    addonTable.setVisible(!noAddons);
    addonTable.setOutputMarkupId(true);

    Component listView = new ListView<AddonInfo>("addonItem", installedAddons) {
        @Override
        protected void populateItem(ListItem<AddonInfo> item) {
            AddonInfo addonInfo = item.getModelObject();

            item.add(new ExternalLink("name", getAddonUrl(addonInfo.getAddonName()),
                    addonInfo.getAddonDisplayName()));
            item.add(new Label("image", "").add(new CssClass("addon-" + addonInfo.getAddonName())));

            String stateString = getAddonStatus(addonInfo.getAddonState());
            item.add(new Label("status", stateString));
            if (item.getIndex() % 2 == 0) {
                item.add(new CssClass("even"));
            }
        }
    };
    addonTable.add(listView);
    add(addonTable);

    add(new Label("addonsDisabled", "No addons available")
            .setVisible(currentLicenseValid && !noAddons && noEnabledAddons));

    add(new Label("noAddons", "No add-ons currently installed.").setVisible(noAddons));

    String licenseRequiredMessage = addonsWebManager.getLicenseRequiredMessage(
            WicketUtils.absoluteMountPathForPage(LicensePage.class));
    Label noLicenseKeyLabel = new Label("noLicenseKey", licenseRequiredMessage);
    noLicenseKeyLabel.setVisible(
            admin && !currentLicenseValid && !noAddons && noEnabledAddons);
    noLicenseKeyLabel.setEscapeModelStrings(false);

    add(noLicenseKeyLabel);
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:54,代码来源:AddonsInfoPanel.java


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