Search in sources :

Example 1 with BoxShadowComponent

use of org.karnak.frontend.component.BoxShadowComponent in project karnak by OsiriX-Foundation.

the class MappingResultComponent method buildBadgeTitle.

/**
 * Build badge title
 *
 * @param title Title
 * @return BoxShadowComponent designed with the title
 */
private BoxShadowComponent buildBadgeTitle(final String title) {
    // Title
    Label label = new Label(title);
    label.getElement().getStyle().set("padding", "10px");
    // Badge
    BoxShadowComponent badgeTitle = new BoxShadowComponent(label);
    badgeTitle.getStyle().set("font-size", "revert").set("font-weight", "bolder");
    badgeTitle.getStyle().set("background-color", "var(--lumo-contrast-5pct)");
    badgeTitle.getStyle().set("color", "var(--lumo-primary-text-color)");
    return badgeTitle;
}
Also used : Label(com.vaadin.flow.component.html.Label) BoxShadowComponent(org.karnak.frontend.component.BoxShadowComponent)

Example 2 with BoxShadowComponent

use of org.karnak.frontend.component.BoxShadowComponent in project karnak by OsiriX-Foundation.

the class FormDICOM method init.

public void init(Binder<DestinationEntity> binder, ButtonSaveDeleteCancel buttonSaveDeleteCancel) {
    this.binder = binder;
    this.deIdentificationComponent.init(this.binder);
    this.filterBySOPClassesForm.init(this.binder);
    this.destinationCondition.init(this.binder);
    notificationComponent.init(this.binder);
    transferSyntaxComponent.init(this.binder);
    transcodeOnlyUncompressedComponent.init(this.binder);
    setSizeFull();
    aeTitle = new TextField("AETitle");
    description = new TextField("Description");
    hostname = new TextField("Hostname");
    port = new TextField("Port");
    useaetdest = new Checkbox("Use AETitle destination");
    activate = new Checkbox("Enable destination");
    // Define layout
    VerticalLayout destinationLayout = new VerticalLayout(UIS.setWidthFull(new HorizontalLayout(aeTitle, description)), destinationCondition, UIS.setWidthFull(new HorizontalLayout(hostname, port)));
    VerticalLayout transferLayout = new VerticalLayout(new HorizontalLayout(transferSyntaxComponent, transcodeOnlyUncompressedComponent));
    VerticalLayout useaetdestLayout = new VerticalLayout(new HorizontalLayout(useaetdest));
    VerticalLayout activateLayout = new VerticalLayout(activate);
    // Set padding
    destinationLayout.setPadding(true);
    transferLayout.setPadding(true);
    useaetdestLayout.setPadding(true);
    activateLayout.setPadding(true);
    // Add components
    add(UIS.setWidthFull(new BoxShadowComponent(destinationLayout)), UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(transferLayout))), UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(useaetdestLayout))), UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(notificationComponent))), UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(deIdentificationComponent))), UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(filterBySOPClassesForm))), UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(activateLayout))), UIS.setWidthFull(buttonSaveDeleteCancel));
    setElements();
    setBinder();
}
Also used : Checkbox(com.vaadin.flow.component.checkbox.Checkbox) TextField(com.vaadin.flow.component.textfield.TextField) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) BoxShadowComponent(org.karnak.frontend.component.BoxShadowComponent) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout)

Example 3 with BoxShadowComponent

use of org.karnak.frontend.component.BoxShadowComponent in project karnak by OsiriX-Foundation.

the class FormSTOW method init.

public void init(Binder<DestinationEntity> binder, ButtonSaveDeleteCancel buttonSaveDeleteCancel) {
    setSizeFull();
    this.binder = binder;
    this.deIdentificationComponent.init(this.binder);
    this.filterBySOPClassesForm.init(this.binder);
    this.destinationCondition.init(binder);
    notificationComponent.init(binder);
    transferSyntaxComponent.init(this.binder);
    transcodeOnlyUncompressedComponent.init(this.binder);
    this.description = new TextField("Description");
    this.url = new TextField("URL");
    this.urlCredentials = new TextField("URL credentials");
    this.headers = new TextArea("Headers");
    this.switchingAlbumsView = new SwitchingAlbumsView();
    this.activate = new Checkbox("Enable destination");
    // Define layout
    VerticalLayout destinationLayout = new VerticalLayout(UIS.setWidthFull(new HorizontalLayout(description)), destinationCondition, UIS.setWidthFull(new HorizontalLayout(url, urlCredentials)), UIS.setWidthFull(headers));
    VerticalLayout transferLayout = new VerticalLayout(new HorizontalLayout(transferSyntaxComponent, transcodeOnlyUncompressedComponent));
    VerticalLayout activateLayout = new VerticalLayout(activate);
    VerticalLayout switchingLayout = new VerticalLayout(switchingAlbumsView);
    // Set padding
    transferLayout.setPadding(true);
    destinationLayout.setPadding(true);
    activateLayout.setPadding(true);
    activateLayout.setPadding(true);
    // Add components
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(destinationLayout))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(transferLayout))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(notificationComponent))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(deIdentificationComponent))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(filterBySOPClassesForm))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(switchingLayout))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(activateLayout))));
    add(UIS.setWidthFull(buttonSaveDeleteCancel));
    setElements();
    setBinder();
}
Also used : TextArea(com.vaadin.flow.component.textfield.TextArea) Checkbox(com.vaadin.flow.component.checkbox.Checkbox) TextField(com.vaadin.flow.component.textfield.TextField) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) BoxShadowComponent(org.karnak.frontend.component.BoxShadowComponent) SwitchingAlbumsView(org.karnak.frontend.kheops.SwitchingAlbumsView) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout)

Aggregations

BoxShadowComponent (org.karnak.frontend.component.BoxShadowComponent)3 Checkbox (com.vaadin.flow.component.checkbox.Checkbox)2 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)2 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)2 TextField (com.vaadin.flow.component.textfield.TextField)2 Label (com.vaadin.flow.component.html.Label)1 TextArea (com.vaadin.flow.component.textfield.TextArea)1 SwitchingAlbumsView (org.karnak.frontend.kheops.SwitchingAlbumsView)1