private void updateFloatingLabelPosition(String value) { // Focused if (getStyleName().contains("focus")) { this.label.removeStyleName(RESTING); } // Not focused else { if (value == null || value.isEmpty()) this.label.addStyleName(RESTING); else this.label.removeStyleName(Styles.TextFields.FloatingLabel.RESTING); } }
private void updateFloatingLabelPosition(String value) { // Focused if (getStyleName().contains("focus")) { this.label.removeStyleName(RESTING); } // Not focused else { if (value == null || value.isEmpty()) this.label.addStyleName(RESTING); else this.label.removeStyleName(Styles.TextFields.FloatingLabel.RESTING); } }
public void setInactive(boolean updateIcon) { if (updateIcon) setStepLabel(Integer.toString(step)); this.stepLabel.removeStyleName(active.getBackgroundColorStyle()); this.stepLabel.removeStyleName(complete.getBackgroundColorStyle()); this.stepLabel.removeStyleName(invalid.getFontColorStyle()); this.stepLabel.addStyleName(inactive.getBackgroundColorStyle()); this.nameLabel.removeStyleName(Typography.FontWeight.MEDIUM); this.nameLabel.removeStyleName(invalid.getFontColorStyle()); if (infoLabel != null) this.infoLabel.removeStyleName(invalid.getFontColorStyle()); removeStyleName(ACTIVE); }
public void setComplete(boolean updateIcon) { if (updateIcon) setStepLabel(MaterialIcons.CHECK, MaterialIcons.Size.SMALL); this.stepLabel.removeStyleName(active.getBackgroundColorStyle()); this.stepLabel.removeStyleName(inactive.getBackgroundColorStyle()); this.stepLabel.removeStyleName(invalid.getFontColorStyle()); this.stepLabel.addStyleName(complete.getBackgroundColorStyle()); this.nameLabel.removeStyleName(Typography.FontWeight.MEDIUM); this.nameLabel.removeStyleName(invalid.getFontColorStyle()); if (infoLabel != null) this.infoLabel.removeStyleName(invalid.getFontColorStyle()); removeStyleName(ACTIVE); } }
private void updateFloatingLabelPosition(LocalDate value) { // Focused if (getStyleName().contains("focus")) { // Floating if (floatingLabelEnabled) this.label.removeStyleName(RESTING); // Non-floating else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } // Not focused else { // Floating if (floatingLabelEnabled) { if (value == null) this.label.addStyleName(RESTING); else this.label.removeStyleName(Styles.TextFields.FloatingLabel.RESTING); } // Non-floating else { if (value == null) this.label.removeStyleName(Styles.TextFields.FloatingLabel.HIDE); else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } } }
private void updateFloatingLabelPosition(T value) { // Focused if (getStyleName().contains("focus")) { // Floating if (floatingLabelEnabled) this.label.removeStyleName(Styles.TextFields.FloatingLabel.RESTING); // Non-floating else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } // Not focused else { // Floating if (floatingLabelEnabled) { if (value == null) this.label.addStyleName(Styles.TextFields.FloatingLabel.RESTING); else this.label.removeStyleName(Styles.TextFields.FloatingLabel.RESTING); } // Non-floating else { if (value == null) this.label.removeStyleName(Styles.TextFields.FloatingLabel.HIDE); else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } } }
private void updateFloatingLabelPosition(String value) { // Focused if (getStyleName().contains("focus")) { // Floating if (floatingLabelEnabled) this.label.removeStyleName(RESTING); // Non-floating else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } // Not focused else { // Floating if (floatingLabelEnabled) { if (value == null || value.isEmpty()) this.label.addStyleName(RESTING); else this.label.removeStyleName(Styles.TextFields.FloatingLabel.RESTING); } // Non-floating else { if (value == null || value.isEmpty()) this.label.removeStyleName(Styles.TextFields.FloatingLabel.HIDE); else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } } }
private void updateFloatingLabelPosition(String value) { // Focused if (getStyleName().contains("focus")) { // Floating if (floatingLabelEnabled) this.label.removeStyleName(RESTING); // Non-floating else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } // Not focused else { // Floating if (floatingLabelEnabled) { if (value == null || value.isEmpty()) this.label.addStyleName(RESTING); else this.label.removeStyleName(Styles.TextFields.FloatingLabel.RESTING); } // Non-floating else { if (value == null || value.isEmpty()) this.label.removeStyleName(Styles.TextFields.FloatingLabel.HIDE); else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } } }
public void setActive(boolean updateIcon) { if (updateIcon) setStepLabel(Integer.toString(step)); this.stepLabel.removeStyleName(complete.getBackgroundColorStyle()); this.stepLabel.removeStyleName(inactive.getBackgroundColorStyle()); this.stepLabel.removeStyleName(invalid.getFontColorStyle()); this.stepLabel.addStyleName(active.getBackgroundColorStyle()); this.nameLabel.addStyleName(Typography.FontWeight.MEDIUM); this.nameLabel.removeStyleName(invalid.getFontColorStyle()); if (infoLabel != null) this.infoLabel.removeStyleName(invalid.getFontColorStyle()); addStyleName(ACTIVE); }
private void updateFloatingLabelPosition(LocalDateTime value) { // Focused if (getStyleName().contains("focus")) { // Floating if (floatingLabelEnabled) this.label.removeStyleName(RESTING); // Non-floating else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } // Not focused else { // Floating if (floatingLabelEnabled) { if (value == null) this.label.addStyleName(RESTING); else this.label.removeStyleName(Styles.TextFields.FloatingLabel.RESTING); } // Non-floating else { if (value == null) this.label.removeStyleName(Styles.TextFields.FloatingLabel.HIDE); else this.label.addStyleName(Styles.TextFields.FloatingLabel.HIDE); } } }
public void setInvalid(boolean updateIcon) { if (updateIcon) setStepLabel(MaterialIcons.WARNING); this.stepLabel.removeStyleName(active.getBackgroundColorStyle()); this.stepLabel.removeStyleName(complete.getBackgroundColorStyle()); this.stepLabel.removeStyleName(inactive.getBackgroundColorStyle()); this.stepLabel.addStyleName(invalid.getFontColorStyle()); this.nameLabel.removeStyleName(Typography.FontWeight.MEDIUM); this.nameLabel.addStyleName(invalid.getFontColorStyle()); if (infoLabel != null) this.infoLabel.addStyleName(invalid.getFontColorStyle()); removeStyleName(ACTIVE); }
protected void updateDescriptionLayout(final String description) { descriptionLayout.removeAllComponents(); final Label descLabel = SPUIComponentProvider.createNameValueLabel("", description == null ? "" : description); /** * By default text will be truncated based on layout width. So removing * it as we need full description. */ descLabel.removeStyleName("label-style"); descLabel.setId(UIComponentIdProvider.DETAILS_DESCRIPTION_LABEL_ID); descriptionLayout.addComponent(descLabel); }
protected void updateDescriptionLayout(final String description) { descriptionLayout.removeAllComponents(); final Label descLabel = SPUIComponentProvider.createNameValueLabel("", description == null ? "" : description); /** * By default text will be truncated based on layout width. So removing * it as we need full description. */ descLabel.removeStyleName("label-style"); descLabel.setId(UIComponentIdProvider.DETAILS_DESCRIPTION_LABEL_ID); descriptionLayout.addComponent(descLabel); }
public void preferModeler() { if (!modelerPreferred) { modelerPreferred = true; if (enableHighlightWhenClicked) { selectEditor(modelerLayout); deselectEditor(tableEditorLayout); modelerLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD); tableEditorLabel.removeStyleName(ExplorerLayout.STYLE_LABEL_BOLD); } } if (editorSelectedListener != null) { editorSelectedListener.editorSelectionChanged(); } }
public void preferTableDrivenEditor() { if (modelerPreferred) { modelerPreferred = false; if (enableHighlightWhenClicked) { selectEditor(tableEditorLayout); deselectEditor(modelerLayout); tableEditorLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD); modelerLabel.removeStyleName(ExplorerLayout.STYLE_LABEL_BOLD); } } if (editorSelectedListener != null) { editorSelectedListener.editorSelectionChanged(); } }
public void setValue(Object newValue) throws ReadOnlyException, ConversionException { wrappedField.setValue(newValue); // Update label if(newValue != null) { if(selectedUser == null || !selectedUser.getId().equals(newValue)) { selectedUser = ProcessEngines.getDefaultProcessEngine().getIdentityService().createUserQuery().userId((String) newValue).singleResult(); } selectedUserLabel.setValue(getSelectedUserLabel()); selectedUserLabel.addStyleName(ExplorerLayout.STYLE_FORM_USER_SELECTED); selectedUserLabel.removeStyleName(ExplorerLayout.STYLE_FORM_NO_USER_SELECTED); } else { selectedUser = null; selectedUserLabel.setValue(i18nManager.getMessage(Messages.FORM_USER_NO_USER_SELECTED)); selectedUserLabel.addStyleName(ExplorerLayout.STYLE_FORM_NO_USER_SELECTED); selectedUserLabel.removeStyleName(ExplorerLayout.STYLE_FORM_USER_SELECTED); } }
titleLabel.setValue(this.title); titleLabel.setPrimaryStyleName(Typography.Dark.Table.Title.PRIMARY); titleLabel.removeStyleName(selectedFontColor.getFontColorStyle()); removeStyleName(selectedBackgroundColor.getBackgroundColorStyle()); persistentActions.forEach(button -> button.setVisible(true));
m_appIndicator.removeStyleName(OpenCmsTheme.TOOLABER_APP_INDICATOR_ONLINE);