package org.hwo.pulscounter.ui; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import java.awt.GridBagLayout; import javax.swing.JButton; import java.awt.GridBagConstraints; import java.awt.Insets; import javax.swing.border.TitledBorder; import org.hwo.datetime.Date; import org.hwo.pulscounter.PulsCounter; import org.hwo.pulscounter.elements.WorkShift; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; public class InspectionMainFrame extends JFrame { private JPanel contentPane; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { InspectionMainFrame frame = new InspectionMainFrame(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public InspectionMainFrame() { setTitle("Inspektor"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 841, 607); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); GridBagLayout gbl_contentPane = new GridBagLayout(); gbl_contentPane.columnWidths = new int[]{0, 0}; gbl_contentPane.rowHeights = new int[]{0, 0, 0}; gbl_contentPane.columnWeights = new double[]{1.0, Double.MIN_VALUE}; gbl_contentPane.rowWeights = new double[]{1.0, 1.0, Double.MIN_VALUE}; contentPane.setLayout(gbl_contentPane); JPanel panel = new JPanel(); GridBagConstraints gbc_panel = new GridBagConstraints(); gbc_panel.insets = new Insets(0, 0, 5, 0); gbc_panel.fill = GridBagConstraints.BOTH; gbc_panel.gridx = 0; gbc_panel.gridy = 0; contentPane.add(panel, gbc_panel); GridBagLayout gbl_panel = new GridBagLayout(); gbl_panel.columnWidths = new int[]{0, 0}; gbl_panel.rowHeights = new int[]{0, 0}; gbl_panel.columnWeights = new double[]{0.0, Double.MIN_VALUE}; gbl_panel.rowWeights = new double[]{0.0, Double.MIN_VALUE}; panel.setLayout(gbl_panel); JButton btnNewButton = new JButton("Schichtdaten prüfen..."); btnNewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { WorkShift[] shifts = PulsCounter.getInspectorApplication().getWorkShifts(); Date d = new Date(); d.addDays(10); for (int i=0;i<40;i++){ for (int s = 0;s