org.bklab.flow.components.mix.Initials Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-vaadin-flow Show documentation
Show all versions of fluent-vaadin-flow Show documentation
Broderick Labs for fluent vaadin flow. Inherits common Vaadin components.
/*
* Copyright (c) 2008 - 2020. - Broderick Labs.
* Author: Broderick Johansson
* E-mail: [email protected]
* Modify date:2020-07-02 09:33:44
* _____________________________
* Project name: fluent-vaadin-flow
* Class name:org.bklab.flow.components.mix.Initials
* Copyright (c) 2008 - 2020. - Broderick Labs.
*/
package org.bklab.flow.components.mix;
import com.vaadin.flow.component.orderedlayout.FlexComponent;
import org.bklab.flow.layout.FlexBoxLayout;
import org.bklab.flow.util.lumo.FontSize;
import org.bklab.flow.util.lumo.FontWeight;
import org.bklab.flow.util.lumo.LumoStyles;
import org.bklab.flow.util.lumo.UIUtils;
import org.bklab.flow.util.css.BorderRadius;
public class Initials extends FlexBoxLayout {
private final String CLASS_NAME = "initials";
public Initials(String initials) {
setAlignItems(FlexComponent.Alignment.CENTER);
setBackgroundColor(LumoStyles.Color.Contrast._10);
setBorderRadius(BorderRadius.L);
setClassName(CLASS_NAME);
UIUtils.setFontSize(FontSize.S, this);
UIUtils.setFontWeight(FontWeight._600, this);
setHeight(LumoStyles.Size.M);
setJustifyContentMode(FlexComponent.JustifyContentMode.CENTER);
setWidth(LumoStyles.Size.M);
add(initials);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy