package Ġcom . cu up a . d ms . ui . layouts Ċ Ċ import Ġcom . cu up a . d ms . UI Constants Ċ import Ġcom . cu up a . d ms . storage . document . Document Ċ import Ġcom . cu up a . d ms . storage . tag . Tag Ċ import Ġcom . vaadin . flow . component . datepicker . DatePicker Ċ import Ġcom . vaadin . flow . component . list box . Multi Select ListBox Ċ import Ġcom . vaadin . flow . component . ordered layout . Flex Component Ċ import Ġcom . vaadin . flow . component . ordered layout . Horizontal Layout Ċ import Ġcom . vaadin . flow . component . ordered layout . Vertical Layout Ċ import Ġcom . vaadin . flow . component . text field . TextField Ċ import Ġcom . vaadin . flow . component . time picker . Time Picker Ċ Ċ abstract Ġclass ĠProperty Layout Ġ: ĠVertical Layout () Ġ{ ĊĊĠĠĠ Ġprotected Ġlateinit Ġvar Ġfilename : ĠTextField ĊĠĠĠ Ġprotected Ġlateinit Ġvar Ġsender : ĠTextField ĊĠĠĠ Ġprotected Ġlateinit Ġvar Ġdate : ĠDate Picker ĊĠĠĠ Ġprotected Ġlateinit Ġvar Ġtime : ĠTime Picker ĊĠĠĠ Ġprotected Ġval Ġtags Ġ= ĠMulti Select ListBox < Tag >() ĊĊĠĠĠ Ġabstract Ġfun Ġset Document ( document : ĠDocument , Ġtags : ĠList < Tag >) ĊĊĠĠĠ Ġfun Ġbuild Gui () Ġ{ ĊĠĠĠĠĠĠĠ Ġfilename Ġ= ĠTextField ( get Translation ( UI Constants . filename )) ĊĠĠĠĠĠĠĠ Ġsender Ġ= ĠTextField ( get Translation ( UI Constants . from )) ĊĠĠĠĠĠĠĠ Ġdate Ġ= ĠDate Picker ( get Translation ( UI Constants . date Of Rec ie pt )) ĊĠĠĠĠĠĠĠ Ġtime Ġ= ĠTime Picker ( get Translation ( UI Constants . time Of Rec ie pt )) ĊĊĠĠĠĠĠĠĠ Ġset Size Full () ĊĠĠĠĠĠĠĠ Ġset Horizontal Component Alignment ( Flex Component . Alignment . CENTER ) ĊĠĠĠĠĠĠĠ ĠjustifyContent Mode Ġ= ĠFlex Component . Just ify Content Mode . START ĊĠĠĠĠĠĠĠ Ġval Ġlayout Filename Ġ= ĠHorizontal Layout () ĊĠĠĠĠĠĠĠ Ġlayout Filename . min Width Ġ= ĠUI Constants . maxSize ĊĠĠĠĠĠĠĠ Ġlayout Filename . set Vertical Component Alignment ( Flex Component . Alignment . CENTER ) ĊĠĠĠĠĠĠĠ Ġlayout Filename . add ( filename ) ĊĠĠĠĠĠĠĠ Ġfilename . min Width Ġ= ĠUI Constants . maxSize ĊĠĠĠĠĠĠĠ Ġlayout Filename . justify Content Mode Ġ= ĠFlex Component . Just ify Content Mode . START ĊĠĠĠĠĠĠĠ Ġval Ġlayout Sender Ġ= Ġget Layout () ĊĠĠĠĠĠĠĠ Ġval Ġlayout Date And Time Ġ= ĠHorizontal Layout () ĊĠĠĠĠĠĠĠ Ġdate . min Width Ġ= ĠUI Constants . half Size ĊĠĠĠĠĠĠĠ Ġtime . min Width Ġ= ĠUI Constants . half Size ĊĠĠĠĠĠĠĠ Ġlayout Date And Time . add ( date , Ġtime ) ĊĠĠĠĠĠĠĠ Ġlayout Date And Time . set Flex Grow ( 1 . 0 , Ġdate , Ġtime ) ĊĠĠĠĠĠĠĠ Ġval Ġlayout Date Ġ= ĠHorizontal Layout () ĊĠĠĠĠĠĠĠ Ġlayout Date . min Width Ġ= ĠUI Constants . maxSize ĊĠĠĠĠĠĠĠ Ġlayout Date . set Vertical Component Alignment ( Flex Component . Alignment . CENTER ) ĊĠĠĠĠĠĠĠ Ġlayout Date . add ( layout Date And Time ) ĊĠĠĠĠĠĠĠ Ġlayout Date . justify Content Mode Ġ= ĠFlex Component . Just ify Content Mode . START ĊĠĠĠĠĠĠĠ Ġval Ġlayout Tags Ġ= Ġget Layout () ĊĠĠĠĠĠĠĠ Ġadd ( layout Filename , Ġlayout Sender , Ġlayout Date And Time , Ġlayout Tags ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget Layout (): ĠHorizontal Layout Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġlayout Ġ= ĠHorizontal Layout () ĊĠĠĠĠĠĠĠ Ġlayout . set Vertical Component Alignment ( Flex Component . Alignment . CENTER ) ĊĠĠĠĠĠĠĠ Ġlayout . min Width Ġ= ĠUI Constants . maxSize ĊĠĠĠĠĠĠĠ Ġsender . min Width Ġ= ĠUI Constants . maxSize ĊĠĠĠĠĠĠĠ Ġlayout . add ( sender ) ĊĠĠĠĠĠĠĠ Ġlayout . justify Content Mode Ġ= ĠFlex Component . Just ify Content Mode . START ĊĠĠĠĠĠĠĠ Ġreturn Ġlayout ĊĠĠĠ Ġ} Ċ } Ċ