|
24 | 24 | @FrameTitle("Employee Management System") |
25 | 25 | public class TabbedPaneView extends Composite<FlexLayout> { |
26 | 26 |
|
27 | | - public TabbedPaneView() { |
28 | | - getBoundComponent() |
29 | | - .setDirection(FlexDirection.COLUMN) |
30 | | - .setMargin("var(--dwc-size-m)"); |
| 27 | + public TabbedPaneView() { |
| 28 | + getBoundComponent() |
| 29 | + .setDirection(FlexDirection.COLUMN) |
| 30 | + .setMargin("var(--dwc-size-m)"); |
31 | 31 |
|
32 | | - TabbedPane employeeManager = new TabbedPane(); |
| 32 | + TabbedPane employeeManager = new TabbedPane(); |
33 | 33 |
|
34 | | - Icon detailsIcon = TablerIcon.create("id"); |
35 | | - FlexLayout detailsForm = new FlexLayout() |
36 | | - .setDirection(FlexDirection.COLUMN) |
37 | | - .setStyle("padding-top", "var(--dwc-size-xs)"); |
| 34 | + Icon detailsIcon = TablerIcon.create("id"); |
| 35 | + FlexLayout detailsForm = new FlexLayout() |
| 36 | + .setDirection(FlexDirection.COLUMN) |
| 37 | + .setStyle("padding-top", "var(--dwc-size-xs)"); |
38 | 38 |
|
39 | | - ChoiceBox departmentChoice = new ChoiceBox("Department") |
40 | | - .setStyle("margin-bottom", "1rem"); |
41 | | - departmentChoice.insert("Marketing", "Engineering", "Sales", "HR"); |
42 | | - departmentChoice.selectIndex(0); |
| 39 | + ChoiceBox departmentChoice = new ChoiceBox("Department") |
| 40 | + .setStyle("margin-bottom", "1rem"); |
| 41 | + departmentChoice.insert("Marketing", "Engineering", "Sales", "HR"); |
| 42 | + departmentChoice.selectIndex(0); |
43 | 43 |
|
44 | | - detailsForm.add( |
45 | | - new TextField("Employee ID").setValue("EMP001") |
46 | | - .setStyle("margin-bottom", "var(--dwc-size-xs)") |
47 | | - .setStyle("margin-right", "var(--dwc-size-s)"), |
48 | | - new TextField("Full Name").setValue("Sarah Johnson") |
49 | | - .setStyle("margin-bottom", "var(--dwc-size-xs)") |
50 | | - .setStyle("margin-right", "var(--dwc-size-s)"), |
51 | | - departmentChoice, |
52 | | - new Button("Update Details", ButtonTheme.PRIMARY) |
53 | | - ); |
54 | | - employeeManager.addTab(new Tab("Details", detailsIcon), detailsForm); |
| 44 | + detailsForm.add( |
| 45 | + new TextField("Employee ID").setValue("EMP001") |
| 46 | + .setStyle("margin-bottom", "var(--dwc-size-xs)") |
| 47 | + .setStyle("margin-right", "var(--dwc-size-s)"), |
| 48 | + new TextField("Full Name").setValue("Sarah Johnson") |
| 49 | + .setStyle("margin-bottom", "var(--dwc-size-xs)") |
| 50 | + .setStyle("margin-right", "var(--dwc-size-s)"), |
| 51 | + departmentChoice, |
| 52 | + new Button("Update Details", ButtonTheme.PRIMARY) |
| 53 | + ); |
| 54 | + employeeManager.addTab(new Tab("Details", detailsIcon), detailsForm); |
55 | 55 |
|
56 | | - Icon payrollIcon = TablerIcon.create("cash"); |
57 | | - FlexLayout payrollSection = new FlexLayout() |
58 | | - .setDirection(FlexDirection.COLUMN) |
59 | | - .setStyle("padding-top", "var(--dwc-size-xs)"); |
| 56 | + Icon payrollIcon = TablerIcon.create("cash"); |
| 57 | + FlexLayout payrollSection = new FlexLayout() |
| 58 | + .setDirection(FlexDirection.COLUMN) |
| 59 | + .setStyle("padding-top", "var(--dwc-size-xs)"); |
60 | 60 |
|
61 | | - payrollSection.add( |
62 | | - new Alert("Payroll processing scheduled for Friday") |
63 | | - .setTheme(Theme.INFO) |
64 | | - .setStyle("margin-bottom", "var(--dwc-size-s)"), |
65 | | - new NumberField("Annual Salary").setValue(65000.0) |
66 | | - .setStyle("margin-right", "var(--dwc-size-xs)"), |
67 | | - new NumberField("Hours This Week").setValue(40.0) |
68 | | - .setStyle("margin-right", "var(--dwc-size-xs)"), |
69 | | - new Button("Process Payroll", ButtonTheme.SUCCESS) |
70 | | - ); |
71 | | - employeeManager.addTab(new Tab("Payroll", payrollIcon), payrollSection); |
| 61 | + payrollSection.add( |
| 62 | + new Alert("Payroll processing scheduled for Friday") |
| 63 | + .setTheme(Theme.INFO) |
| 64 | + .setStyle("margin-bottom", "var(--dwc-size-s)"), |
| 65 | + new NumberField("Annual Salary").setValue(65000.0) |
| 66 | + .setStyle("margin-right", "var(--dwc-size-xs)"), |
| 67 | + new NumberField("Hours This Week").setValue(40.0) |
| 68 | + .setStyle("margin-right", "var(--dwc-size-xs)"), |
| 69 | + new Button("Process Payroll", ButtonTheme.SUCCESS) |
| 70 | + ); |
| 71 | + employeeManager.addTab(new Tab("Payroll", payrollIcon), payrollSection); |
72 | 72 |
|
73 | | - Icon performanceIcon = TablerIcon.create("chart-bar"); |
74 | | - FlexLayout performanceSection = new FlexLayout() |
75 | | - .setDirection(FlexDirection.COLUMN) |
76 | | - .setStyle("padding-top", "var(--dwc-size-m)") |
77 | | - .setStyle("overflow", "visible"); |
| 73 | + Icon performanceIcon = TablerIcon.create("chart-bar"); |
| 74 | + FlexLayout performanceSection = new FlexLayout() |
| 75 | + .setDirection(FlexDirection.COLUMN) |
| 76 | + .setStyle("padding-top", "var(--dwc-size-m)") |
| 77 | + .setStyle("overflow", "visible"); |
78 | 78 |
|
79 | | - performanceSection.add( |
80 | | - new ProgressBar("Q1 Goals Progress").setValue(85) |
81 | | - .setStyle("margin-bottom", "var(--dwc-size-s)"), |
82 | | - new ProgressBar("Training Completion").setValue(60) |
83 | | - .setStyle("margin-bottom", "var(--dwc-size-s)"), |
84 | | - new Button("View Full Report", ButtonTheme.DEFAULT) |
85 | | - ); |
86 | | - employeeManager.addTab(new Tab("Performance", performanceIcon), performanceSection); |
| 79 | + performanceSection.add( |
| 80 | + new ProgressBar("Q1 Goals Progress").setValue(85) |
| 81 | + .setStyle("margin-bottom", "var(--dwc-size-s)"), |
| 82 | + new ProgressBar("Training Completion").setValue(60) |
| 83 | + .setStyle("margin-bottom", "var(--dwc-size-s)"), |
| 84 | + new Button("View Full Report", ButtonTheme.DEFAULT) |
| 85 | + ); |
| 86 | + employeeManager.addTab(new Tab("Performance", performanceIcon), performanceSection); |
87 | 87 |
|
88 | | - getBoundComponent().add( |
89 | | - new H3("Employee Management System"), |
90 | | - new Paragraph("Select different tabs to manage employee information:"), |
91 | | - employeeManager |
92 | | - ); |
93 | | - } |
| 88 | + getBoundComponent().add( |
| 89 | + new H3("Employee Management System"), |
| 90 | + new Paragraph("Select different tabs to manage employee information:"), |
| 91 | + employeeManager |
| 92 | + ); |
| 93 | + } |
94 | 94 | } |
0 commit comments