org.projectforge.web.wicket.WicketUtils.setSize()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(83)

本文整理了Java中org.projectforge.web.wicket.WicketUtils.setSize()方法的一些代码示例,展示了WicketUtils.setSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WicketUtils.setSize()方法的具体详情如下:
包路径:org.projectforge.web.wicket.WicketUtils
类名称:WicketUtils
方法名:setSize

WicketUtils.setSize介绍

[英]Sets attribute size (only for TextFields) and style="length: width"; The width value is size + 0.5 em and for drop down choices size + 2em;
[中]设置属性大小(仅适用于文本字段)和style=“length:width”;宽度值为大小+0.5 em,下拉选择大小+2 em;

代码示例

代码示例来源:origin: micromata/projectforge

/**
 * Sets attribute size (only for TextFields) and style="length: width"; The width value is size + 0.5 em and for drop
 * down choices size + 2em;
 *
 * @param component
 * @param size
 * @return This for chaining.
 */
public static FormComponent<?> setSize(final FormComponent<?> component, final int size)
{
 return setSize(component, size, true);
}

代码示例来源:origin: micromata/projectforge

WicketUtils.setSize(amount, 8);
fs.add(amount);
final RequiredMinMaxNumberField<Integer> nextDays = new RequiredMinMaxNumberField<Integer>(fs.getTextFieldId(),
  new PropertyModel<Integer>(getSettings(), "nextDays"), 3, LiquidityForecastSettings.MAX_FORECAST_DAYS);
WicketUtils.setSize(nextDays, 4);
fs.add(nextDays);

代码示例来源:origin: micromata/projectforge

private void addParameterSettings(final int idx)
{
 final FieldsetPanel fs = gridBuilder.newFieldset(getString("scripting.script.parameterName") + " " + idx);
 final String parameterType = "parameter" + idx + "Type";
 final String parameterName = "parameter" + idx + "Name";
 final MaxLengthTextField name = new MaxLengthTextField(fs.getTextFieldId(), new PropertyModel<String>(data, parameterName));
 WicketUtils.setSize(name, 20);
 fs.add(name);
 // DropDownChoice type
 final LabelValueChoiceRenderer<ScriptParameterType> typeChoiceRenderer = new LabelValueChoiceRenderer<ScriptParameterType>(this,
   ScriptParameterType.values());
 final DropDownChoice<ScriptParameterType> typeChoice = new DropDownChoice<ScriptParameterType>(fs.getDropDownChoiceId(),
   new PropertyModel<ScriptParameterType>(data, parameterType), typeChoiceRenderer.getValues(), typeChoiceRenderer);
 typeChoice.setNullValid(true);
 typeChoice.setRequired(false);
 fs.add(typeChoice);
}

代码示例来源:origin: micromata/projectforge

WicketUtils.setFocus(nummernkreisField);
WicketUtils.setSize(nummernkreisField, 1);
fs.add(nummernkreisField);
fs.add(new DivTextPanel(fs.newChildId(), "."));
WicketUtils.setSize(bereichField, 3);
fs.add(bereichField);
fs.add(new DivTextPanel(fs.newChildId(), "."));
WicketUtils.setSize(teilbereichField, 2);
fs.add(teilbereichField);
fs.add(new DivTextPanel(fs.newChildId(), "."));
WicketUtils.setSize(endzifferField, 2);
fs.add(endzifferField);

代码示例来源:origin: micromata/projectforge

new PropertyModel<Integer>(ldapGroupValues, "gidNumber"), 1,
  65535);
WicketUtils.setSize(gidNumberField, 6);
fs.add(gidNumberField);
fs.addHelpIcon(gridBuilder.getString("ldap.gidNumber.tooltip"));

代码示例来源:origin: micromata/projectforge

WicketUtils.setFocus(nummernkreisField);
WicketUtils.setSize(nummernkreisField, 1);
fs.add(nummernkreisField);
fs.add(new DivTextPanel(fs.newChildId(), "."));
WicketUtils.setSize(bereichField, 3);
fs.add(bereichField);
fs.add(new DivTextPanel(fs.newChildId(), "."));
WicketUtils.setSize(teilbereichField, 2);
fs.add(teilbereichField);
fs.add(new DivTextPanel(fs.newChildId(), "."));
WicketUtils.setSize(kost2ArtField, 2);
fs.add(kost2ArtField);

代码示例来源:origin: micromata/projectforge

65535);
uidNumberField.setMarkupId("uidNumberField").setOutputMarkupId(true);
WicketUtils.setSize(uidNumberField, 6);
fs.add(uidNumberField);
fs.addHelpIcon(gridBuilder.getString("ldap.uidNumber.tooltip"));
  65535);
gidNumberField.setMarkupId("gidNumberField").setOutputMarkupId(true);
WicketUtils.setSize(gidNumberField, 6);
fs.add(gidNumberField);
dependentLdapPosixFormComponentsList.add(gidNumberField);
fs.add(sambaSIDNumberField);
sambaSIDNumberField.setOutputMarkupId(true);
WicketUtils.setSize(sambaSIDNumberField, 5);
fs.addHelpIcon(getString("ldap.sambaSID.tooltip"));
dependentLdapSambaFormComponentsList.add(sambaSIDNumberField);
fs.add(sambaPrimaryGroupSIDNumberField);
sambaPrimaryGroupSIDNumberField.setOutputMarkupId(true);
WicketUtils.setSize(sambaPrimaryGroupSIDNumberField, 5);
fs.addHelpIcon(getString("ldap.sambaPrimaryGroupSID.tooltip"));
dependentLdapSambaFormComponentsList.add(sambaPrimaryGroupSIDNumberField);

代码示例来源:origin: micromata/projectforge

"month"), monthChoiceRenderer.getValues(), monthChoiceRenderer);
monthChoice.setNullValid(false).setRequired(true);
WicketUtils.setSize(monthChoice, 2);
fs.add(monthChoice);
final MinMaxNumberField<Integer> year = new MinMaxNumberField<Integer>(InputPanel.WICKET_ID,
  new PropertyModel<Integer>(data, "year"), 1900, 2999);
WicketUtils.setSize(year, 4);
fs.add(year);

代码示例来源:origin: micromata/projectforge

WicketUtils.setSize(reminderDuration, 3);
setComponentProperties(reminderDuration, reminderOptionVisibility, true);

代码示例来源:origin: micromata/projectforge

WicketUtils.setSize(amount, 8);
fs.add(amount);
if (isNew() == false) {

代码示例来源:origin: micromata/projectforge

WicketUtils.setSize(number, 7);
fs.add(number);
if (isNew() == true) {

代码示例来源:origin: micromata/projectforge

data, "maxHours"),
  0, 9999);
WicketUtils.setSize(maxNumberField, 6);
fs.add(maxNumberField);
if (isNew() == false && getTaskTree().hasOrderPositions(data.getId(), true) == true) {
 WicketUtils.setSize(progressField, 3);
 fs.add(progressField);
 final MinMaxNumberField<BigDecimal> durationField = new MinMaxNumberField<BigDecimal>(InputPanel.WICKET_ID,
   new PropertyModel<BigDecimal>(data, "duration"), BigDecimal.ZERO, TaskEditForm.MAX_DURATION_DAYS);
 WicketUtils.setSize(durationField, 6);
 fs.add(durationField);
 dependentFormComponents[0] = durationField;
 final MinMaxNumberField<Integer> ganttPredecessorField = new MinMaxNumberField<Integer>(InputPanel.WICKET_ID,
   new PropertyModel<Integer>(data, "ganttPredecessorOffset"), Integer.MIN_VALUE, Integer.MAX_VALUE);
 WicketUtils.setSize(ganttPredecessorField, 6);
 fs.add(ganttPredecessorField);
 final PropertyModel<String> model = new PropertyModel<String>(data, "kost2BlackWhiteList");
 kost2BlackWhiteTextField = new MaxLengthTextField(InputPanel.WICKET_ID, model);
 WicketUtils.setSize(kost2BlackWhiteTextField, 10);
 fs.add(kost2BlackWhiteTextField);
 final LabelValueChoiceRenderer<Boolean> kost2listTypeChoiceRenderer = new LabelValueChoiceRenderer<Boolean>() //

代码示例来源:origin: micromata/projectforge

WicketUtils.setSize(field, 2);
dependentFormComponents[0] = field;
fs.add(field);
WicketUtils.setSize(field, 3);
fs.add(field);
fs.add(new DivTextPanel(fs.newChildId(), ".##.##"));

代码示例来源:origin: micromata/projectforge

99999999);
numberField.setMaxLength(8);
WicketUtils.setSize(numberField, 6);
fs.add(numberField);
if (NumberHelper.greaterZero(getData().getNumber()) == false) {

代码示例来源:origin: micromata/projectforge

data, "numberOfLicenses"),
  0, 999999);
WicketUtils.setSize(maxNumberField, 6);
fs.add(maxNumberField);

代码示例来源:origin: micromata/projectforge

final MinMaxNumberField<Integer> intervalNumberField = new MinMaxNumberField<>(InputPanel.WICKET_ID,
  new PropertyModel<Integer>(recurrenceData, "interval"), 0, 1000);
WicketUtils.setSize(intervalNumberField, 2);
recurrenceIntervalFieldset.add(intervalNumberField);
panel = new DivTextPanel(recurrenceIntervalFieldset.newChildId(), new Model<String>()

相关文章