public void setEditableFields(boolean editable) { for (TextField textField : textFieldMap.values()) { textField.setEditable(editable); } } }
public void setBandDefinition(BandDefinition bandDefinition) { bandDefinitionDs.setItem(bandDefinition); name.setEditable((bandDefinition == null || bandDefinition.getParent() != null) && isUpdatePermitted()); }
!Strings.isNullOrEmpty(entity.getName()) && (entity.getName().endsWith(HORIZONTAL_TPL) || entity.getName().endsWith(VERTICAL_TPL))) { textField.setEditable(false); textField.setEditable(isUpdatePermitted()); return textField; });
protected void setComponentsEditable() { if (getItem().getStartDate() != null) { procDefinitionLookup.setEditable(false); } if (getItem().getStartedBy() != null && !userSession.getCurrentOrSubstitutedUser().equals(getItem().getStartedBy())) { entityNameLookup.setEditable(false); entityIdPickerField.setEditable(false); entityEditorNameField.setEditable(false); } }
@PostConstruct public void init() { layout = uiComponents.create(HBoxLayout.class); layout.setStyleName("c-listeditor-layout"); layout.setWidth("100%"); displayValuesField = uiComponents.create(TextField.NAME); displayValuesField.setStyleName("c-listeditor-text"); displayValuesField.setEditable(false); Button openEditorBtn = uiComponents.create(Button.class); openEditorBtn.setIconFromSet(CubaIcon.PICKERFIELD_LOOKUP); openEditorBtn.setStyleName("c-listeditor-button"); openEditorBtn.setCaption(""); openEditorBtn.addClickListener(e -> openEditor()); layout.add(displayValuesField); layout.add(openEditorBtn); layout.expand(displayValuesField); }
protected void addRow(Object value, ComponentContainer parent, boolean isReadOnly) { BoxLayout row = componentsFactory.createComponent(HBoxLayout.class); row.setSpacing(true); row.setWidthFull(); TextField valueField = componentsFactory.createComponent(TextField.class); valueField.setValue(value); valueField.setEditable(!isReadOnly); row.add(valueField); row.expand(valueField); Button btnRemove = componentsFactory.createComponent(Button.class); btnRemove.setIconFromSet(CubaIcon.TIMES); btnRemove.setDescription(messages.getMessage(getClass(), "editAttribute.array.btnRemove")); Action removeRowAction = new BaseAction("removeRow") .withCaption("") .withHandler(actionPerformedEvent -> parent.remove(row) ); removeRowAction.setEnabled(!isReadOnly); btnRemove.setAction(removeRowAction); row.add(btnRemove); parent.add(row); }
TextField<String> textField = uiComponents.create(TextField.NAME); textField.setValue(item.getDisplayedCurrentValue()); textField.setEditable(false); return textField;
protected Pair<TextField, HBoxLayout> createEditComponents(String loggerName, Level level) { final TextField loggerNameField = componentsFactory.createComponent(TextField.class); loggerNameField.setValue(loggerName); loggerNameField.setEditable(false); loggerNameField.setFrame(this); loggerNameField.setWidth("100%");
nameTypeOptionsGroup.setVisible(false); entityNameLookupField.setVisible(false); nameField.setEditable(false); timeoutSecField.focus(); } else {
textField.setValue(value.getLocalizedValue()); textField.setStyleName("c-dateintervaleditor-text"); textField.setEditable(false); layout.add(textField);