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


Java Label类代码示例

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


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

示例1: wrapInputInFormGroup

import org.apache.ecs.html.Label; //导入依赖的package包/类
private Element wrapInputInFormGroup(final IModelElement<?> e, final ConcreteElement element,
        final String additionalClass) {
    final Div divFormGroup = new Div();
    divFormGroup.setClass("form-group");
    final Label label = createLabel(e, null);
    divFormGroup.addElement(label);
    final Div divCol = new Div();
    divCol.setClass("col-sm-4");
    setGridColumnId(e, divCol);
    if (Strings.isNotBlank(additionalClass)) {
        Attributes.merge(element, "class", additionalClass);
    }
    divCol.addElement(element);
    divFormGroup.addElement(divCol);
    return divFormGroup;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:17,代码来源:HtmlComponentBuilder.java

示例2: wrapComponent

import org.apache.ecs.html.Label; //导入依赖的package包/类
@Override
protected Element wrapComponent(DomainElementI<?> e, Element element) {
       //<div class="control-group">
       Div controlGroup = new Div();
       controlGroup.addAttribute(ATTR_CLASS, "control-group");
       if (isInputButton(element))
           ((Input) element).setValue(e.getPrompt());
       else {
           //  <label for="vertrag.Vertragsnummer" class="control-label">Salutation</label>
           Label label = createLabel(e, element);
           label.addAttribute(ATTR_CLASS, "control-label");
           controlGroup.addElement(label);
       }
       //  <div class="controls controls-row">
       Div controlsRow = new Div();
       controlsRow.addAttribute(ATTR_CLASS, "controls");
       //    <select class="span4" wicket:id="vertrag.Vertragsnummer" id="vertrag.Vertragsnummer" size="1"><option>[option]</option></select>
       controlsRow.addElement(element);
       //  </div>
       controlGroup.addElement(controlsRow);
       //</div> 
       return controlGroup;
   }
 
开发者ID:Nocket,项目名称:nocket,代码行数:24,代码来源:DefaultStylingStrategy.java

示例3: wrapCheckBoxInFormGroup

import org.apache.ecs.html.Label; //导入依赖的package包/类
private Element wrapCheckBoxInFormGroup(final CheckBoxInputModelElement e, final Input input) {
    final Div divFormGroup = new Div();
    divFormGroup.setClass("form-group");
    final Div divCol = new Div();
    divCol.setClass("col-sm-offset-2 col-sm-4");
    setGridColumnId(e, divCol);
    final Div divCheckbox = new Div();
    divCheckbox.setClass("checkbox");
    final Label label = createLabel(e, input);
    divCheckbox.addElement(label);
    divCol.addElement(divCheckbox);
    divFormGroup.addElement(divCol);
    return divFormGroup;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:15,代码来源:HtmlComponentBuilder.java

示例4: createLabel

import org.apache.ecs.html.Label; //导入依赖的package包/类
/**
 * About how to create labels in wicket: https://cwiki.apache.org/confluence/display/WICKET/Wicket%27s+XHTML+tags
 */
private Label createLabel(final IModelElement<?> e, final Input input) {
    final Label label = new Label();
    label.addAttribute("wicket:for", e.getWicketId());
    if (input == null) {
        label.setClass("control-label col-sm-2");
    } else {
        label.addElement(input);
    }
    final XML wicketLabel = new XML("wicket:label");
    wicketLabel.setTagText(e.getStaticTitle());
    label.addElement(wicketLabel);
    return label;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:17,代码来源:HtmlComponentBuilder.java

示例5: createLabel

import org.apache.ecs.html.Label; //导入依赖的package包/类
public Label createLabel(DomainElementI<?> de, Element e) {
	Label label = new Label();
	String prompt = de.getPrompt();
	// Wicket doesn't support Labels for button-types input fields which we
	// are using for file downloads
	if (isInputButton(e)) {
		label.setTagText(prompt);
	} else {
		label.addAttribute(ATTR_WICKET_ID, de.getWicketId() + ".label");
		label.addAttribute("for", de.getWicketId());
		label.addElement(de.getPrompt());
	}
	return label;
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:15,代码来源:AbstractStylingStrategyImpl.java

示例6: createFieldset

import org.apache.ecs.html.Label; //导入依赖的package包/类
public FieldSet createFieldset(HeadlineElement<?> headlineElement) {
	// <fieldset><legend><label>my.text</label></legend></fieldset>
	FieldSet fieldset = new FieldSet();
	Label label = createFieldsetHeaderLabel(headlineElement);
	fieldset.addElement(new Legend(label));
	return fieldset;
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:8,代码来源:AbstractStylingStrategyImpl.java

示例7: createFieldsetHeaderLabel

import org.apache.ecs.html.Label; //导入依赖的package包/类
public Label createFieldsetHeaderLabel(HeadlineElement<?> headlineElement) {
	Label label = new Label();
	WebDomainProperties configuration = getProperties();
	String key;
	if (configuration.isLocalizationWicket()) {
		key = headlineElement.getWicketId() + ".text";
	} else {
		// package.ClassName._property.text
		key = FormBuilder.buildPromptIdentifier(headlineElement
				.getAccessor().getClassRef(), headlineElement.getMethod(),
				headlineElement.getPrompt());
	}
	label.addElement(key);
	return label;
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:16,代码来源:AbstractStylingStrategyImpl.java

示例8: visitFieldsetOpen

import org.apache.ecs.html.Label; //导入依赖的package包/类
@Override
public void visitFieldsetOpen(HeadlineElement<E> e) {
    TR tablerow = new TR();
    //TODO JL: Legend is not allowed any more in a table cells since HTML  although it looks fine
    Legend legend = new Legend();
    Label label = componentBuilder.createFieldsetHeaderLabel(e);
    legend.addElement(label);
    tablerow.addElement(new TD().setColSpan(5).addElement(legend));
    maybeAdd(tablerow);
    collectedButtons.push(new ArrayList<Element>());
}
 
开发者ID:Nocket,项目名称:nocket,代码行数:12,代码来源:HtmlGeneratorVisitorTablegrid.java

示例9: makeField

import org.apache.ecs.html.Label; //导入依赖的package包/类
/**
 * Description of the Method
 * 
 * @param labeltext
 *            Description of the Parameter
 * @param value
 *            Description of the Parameter
 * @param e
 *            Description of the Parameter
 * @return Description of the Return Value
 */

public static TR makeField(String labeltext, String value, Element e)
{

	TD left = new TD().setAlign("right");

	Label label = new Label().addElement(labeltext);

	left.addElement(label);

	TD right = new TD().setAlign("left");

	right.addElement(e);

	TR row = new TR();

	row.addElement(left);

	row.addElement(right);

	return (row);
}
 
开发者ID:RIGS-IT,项目名称:sonar-xanitizer,代码行数:34,代码来源:ECSFactory.java

示例10: makeOption

import org.apache.ecs.html.Label; //导入依赖的package包/类
/**
 * Description of the Method
 * 
 * @param labeltext
 *            Description of the Parameter
 * @param value
 *            Description of the Parameter
 * @param e
 *            Description of the Parameter
 * @return Description of the Return Value
 */

public static TR makeOption(String labeltext, String value, Element e)
{

	TD left = new TD().setAlign("left").setWidth("10%");

	left.addElement(e);

	TD right = new TD().setAlign("right");

	Label label = new Label().addElement(labeltext);

	right.addElement(label);

	TR row = new TR();

	row.addElement(right);

	row.addElement(left);

	return (row);
}
 
开发者ID:RIGS-IT,项目名称:sonar-xanitizer,代码行数:34,代码来源:ECSFactory.java

示例11: createFieldsetHeaderLabel

import org.apache.ecs.html.Label; //导入依赖的package包/类
public Label createFieldsetHeaderLabel(HeadlineElement<?> headlineElement); 
开发者ID:Nocket,项目名称:nocket,代码行数:2,代码来源:StylingStrategyI.java

示例12: createLabel

import org.apache.ecs.html.Label; //导入依赖的package包/类
public Label createLabel(DomainElementI<?> de, Element e); 
开发者ID:Nocket,项目名称:nocket,代码行数:2,代码来源:StylingStrategyI.java


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