/** * Sets the field width (defaults to 125). * * @param width the field width */ public void setWidth(int width) { this.width = width; field.setWidth(width); }
/** * Creates a new text field. */ public TextField() { messages = new TextFieldMessages(); setWidth(150); }
@Override protected void onResize(int width, int height) { super.onResize(width, height); if (textBox != null) { textBox.setWidth(getLayoutTarget().getWidth(true)); } else if (textArea != null) { textArea.setWidth(getLayoutTarget().getWidth(true)); } }
instanceDescriptionTextBox.setWidth(150);
profileNameTextBox.setWidth(150);
emailTextBox.setWidth(150); emailTextBox.setValue(model.getEmailAddress());
instanceNameTextBox.setWidth(150);
instanceBaseUrlTextBox.setWidth(150);
instanceUsernameTextBox.setWidth(150);
userPasswordTextBox.setWidth(150); userPasswordTextBox.setPassword(true); userPasswordTextBox.setValue(model.getPassword());
instancePasswordTextBox.setWidth(150); instancePasswordTextBox.setPassword(true);
propValue.setWidth(250); propValue.setAllowBlank(true); propValue.setValue(model.getPropValue());
propKey.setWidth(200); propKey.setAllowBlank(false); propKey.setValue(model.getPropKey());
field.setReadOnly(false); field.setWidth(COLUMN_PRIORITY_WIDTH - COLUMN_HEADER_OFFSET);
field.setRegex(CIDR_FORMAT); field.setAutoValidate(true); field.setWidth(COLUMN_IPRANGE_WIDTH - COLUMN_HEADER_OFFSET);
private void addMixedGroup(IndicatorGroup group) { // Layout in two rows // Field Label // Field Widget for (IndicatorDTO indicator : group.getIndicators()) { if(!indicator.isCalculated() && indicator.isVisible()) { Text fieldLabel = createLabel(indicator); fieldLabel.setStyleAttribute("marginTop", "8px"); fieldLabel.setStyleAttribute("marginBottom", "3px"); add(fieldLabel); TextField field = createField(indicator); if(indicator.getType() == FieldTypeClass.QUANTITY) { HBoxLayout rowLayout = new HBoxLayout(); rowLayout.setHBoxLayoutAlign(HBoxLayout.HBoxLayoutAlign.MIDDLE); Text unitsLabel = new Text(indicator.getUnits()); unitsLabel.setStyleAttribute("paddingLeft", "5px"); LayoutContainer row = new LayoutContainer(); row.setLayout(rowLayout); row.add(field); row.add(unitsLabel); add(row); } else { field.setWidth(TEXT_FIELD_WIDTH); add(field); } } } }
search.setWidth(100);