List of usage examples for javax.swing WindowConstants DISPOSE_ON_CLOSE
int DISPOSE_ON_CLOSE
To view the source code for javax.swing WindowConstants DISPOSE_ON_CLOSE.
Click Source Link
From source file:op.care.med.inventory.DlgOpenStock.java
/** * This method is called from within the constructor to * initialize the form.// w w w . ja va 2 s. c o m * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { lbl1 = new JLabel(); cmbBestID = new JComboBox<>(); lbl2 = new JLabel(); btnClose = new JButton(); btnOK = new JButton(); //======== this ======== setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); setResizable(false); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout( "default, $lcgap, default:grow, 2*($lcgap, default), $lcgap, default:grow, $lcgap, default", "default, $lgap, fill:default, 21dlu, default, $lgap, default")); //---- lbl1 ---- lbl1.setText("Die Packung mit der Nummer:"); lbl1.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lbl1, CC.xy(3, 3)); //---- cmbBestID ---- cmbBestID.setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbBestID.setFont(new Font("Arial", Font.PLAIN, 14)); cmbBestID.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { cmbBestIDItemStateChanged(e); } }); contentPane.add(cmbBestID, CC.xy(5, 3)); //---- lbl2 ---- lbl2.setText("anbrechen."); lbl2.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lbl2, CC.xywh(7, 3, 3, 1)); //---- btnClose ---- btnClose.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnClose.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCloseActionPerformed(e); } }); contentPane.add(btnClose, CC.xy(7, 5)); //---- btnOK ---- btnOK.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnOK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnOKActionPerformed(e); } }); contentPane.add(btnOK, CC.xy(9, 5)); setSize(455, 165); setLocationRelativeTo(getOwner()); }
From source file:op.care.med.structure.DlgTradeForm.java
/** * This method is called from within the constructor to * initialize the form.//ww w.ja v a 2s.c om * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new JPanel(); txtZusatz = new JTextField(); cmbForm = new JComboBox<>(); panel2 = new JPanel(); btnAdd = new JButton(); hSpacer1 = new JPanel(null); btnEdit = new JButton(); panel4 = new JPanel(); cbExpiresAfterOpened = new JCheckBox(); hSpacer2 = new JPanel(null); txtExpiresIn = new JTextField(); hSpacer3 = new JPanel(null); cmbDaysWeeks = new JComboBox(); cbWeightControlled = new JCheckBox(); panel1 = new JPanel(); btnCancel = new JButton(); btnOK = new JButton(); //======== this ======== setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); setResizable(false); setModal(true); Container contentPane = getContentPane(); contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS)); //======== jPanel1 ======== { jPanel1.setLayout(new FormLayout( "14dlu, $lcgap, default, $lcgap, default:grow, $lcgap, default, $lcgap, 14dlu", "fill:14dlu, 2*($lgap, fill:default), $lgap, default, 2*($lgap, fill:default), $lgap, 14dlu")); //---- txtZusatz ---- txtZusatz.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(txtZusatz, CC.xywh(3, 3, 5, 1)); //---- cmbForm ---- cmbForm.setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbForm.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(cmbForm, CC.xywh(3, 5, 3, 1)); //======== panel2 ======== { panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS)); //---- btnAdd ---- btnAdd.setText(null); btnAdd.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnAdd.setBorder(null); btnAdd.setBorderPainted(false); btnAdd.setContentAreaFilled(false); btnAdd.setPressedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/pressed.png"))); btnAdd.addActionListener(e -> btnAddActionPerformed(e)); panel2.add(btnAdd); panel2.add(hSpacer1); //---- btnEdit ---- btnEdit.setText(null); btnEdit.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/edit3.png"))); btnEdit.setBorder(null); btnEdit.setBorderPainted(false); btnEdit.setContentAreaFilled(false); btnEdit.setPressedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/pressed.png"))); btnEdit.addActionListener(e -> btnEditActionPerformed(e)); panel2.add(btnEdit); } jPanel1.add(panel2, CC.xy(7, 5)); //======== panel4 ======== { panel4.setLayout(new BoxLayout(panel4, BoxLayout.X_AXIS)); //---- cbExpiresAfterOpened ---- cbExpiresAfterOpened.setText("expiresAfterOpened"); cbExpiresAfterOpened.addItemListener(e -> cbExpiresAfterOpenedItemStateChanged(e)); panel4.add(cbExpiresAfterOpened); panel4.add(hSpacer2); //---- txtExpiresIn ---- txtExpiresIn.setColumns(10); txtExpiresIn.setEnabled(false); txtExpiresIn.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtExpiresInFocusLost(e); } }); panel4.add(txtExpiresIn); panel4.add(hSpacer3); //---- cmbDaysWeeks ---- cmbDaysWeeks.setEnabled(false); cmbDaysWeeks.addItemListener(e -> cmbDaysWeeksItemStateChanged(e)); panel4.add(cmbDaysWeeks); } jPanel1.add(panel4, CC.xywh(3, 7, 5, 1)); //---- cbWeightControlled ---- cbWeightControlled.setText("text"); cbWeightControlled.addItemListener(e -> cbWeightControlledItemStateChanged(e)); jPanel1.add(cbWeightControlled, CC.xywh(3, 9, 5, 1)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS)); //---- btnCancel ---- btnCancel.setIcon(new ImageIcon(getClass().getResource("/artwork/16x16/cancel.png"))); btnCancel.setText(null); btnCancel.addActionListener(e -> btnCancelActionPerformed(e)); panel1.add(btnCancel); //---- btnOK ---- btnOK.setIcon(new ImageIcon(getClass().getResource("/artwork/16x16/apply.png"))); btnOK.setText(null); btnOK.addActionListener(e -> btnOKActionPerformed(e)); panel1.add(btnOK); } jPanel1.add(panel1, CC.xywh(5, 11, 3, 1, CC.RIGHT, CC.DEFAULT)); } contentPane.add(jPanel1); setSize(425, 220); setLocationRelativeTo(getOwner()); }
From source file:op.care.nursingprocess.DlgNursingProcess.java
/** * This method is called from within the constructor to * initialize the form.// w ww . j a va 2 s. c om * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel5 = new JPanel(); lblTopic = new JLabel(); txtStichwort = new JTextField(); lblCat = new JLabel(); cmbKategorie = new JComboBox<>(); panel4 = new JPanel(); lblSituation = new JLabel(); btnPopoutSituation = new JButton(); jScrollPane3 = new JScrollPane(); txtSituation = new JTextArea(); panel5 = new JPanel(); lblGoal = new JLabel(); btnPopoutGoal = new JButton(); jScrollPane1 = new JScrollPane(); txtZiele = new JTextArea(); lblFirstRevision = new JLabel(); jdcKontrolle = new JDateChooser(); panel2 = new JPanel(); jspPlanung = new JScrollPane(); tblPlanung = new JTable(); panel3 = new JPanel(); btnAddIntervention = new JButton(); panel1 = new JPanel(); btnCancel = new JButton(); btnSave = new JButton(); //======== this ======== setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("14dlu, $lcgap, 280dlu:grow, $ugap, pref, $lcgap, 14dlu", "fill:14dlu, $lgap, fill:default:grow, $rgap, pref, $lgap, 14dlu")); //======== jPanel5 ======== { jPanel5.setLayout(new FormLayout("default, $lcgap, default:grow", "fill:default, $rgap, default, 2*($lgap, fill:default:grow), $lgap, 70dlu, $lgap, pref")); //---- lblTopic ---- lblTopic.setFont(new Font("Arial", Font.PLAIN, 14)); lblTopic.setText("Stichwort"); jPanel5.add(lblTopic, CC.xy(1, 1, CC.DEFAULT, CC.TOP)); //---- txtStichwort ---- txtStichwort.setFont(new Font("Arial", Font.BOLD, 20)); txtStichwort.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtStichwortFocusGained(e); } }); jPanel5.add(txtStichwort, CC.xy(3, 1)); //---- lblCat ---- lblCat.setFont(new Font("Arial", Font.PLAIN, 14)); lblCat.setText("Kategorie"); jPanel5.add(lblCat, CC.xy(1, 3)); //---- cmbKategorie ---- cmbKategorie .setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbKategorie.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel5.add(cmbKategorie, CC.xy(3, 3)); //======== panel4 ======== { panel4.setLayout(new BorderLayout()); //---- lblSituation ---- lblSituation.setFont(new Font("Arial", Font.PLAIN, 14)); lblSituation.setText("Situation"); panel4.add(lblSituation, BorderLayout.CENTER); //---- btnPopoutSituation ---- btnPopoutSituation.setText(null); btnPopoutSituation.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/popup.png"))); btnPopoutSituation.setBorderPainted(false); btnPopoutSituation.setContentAreaFilled(false); btnPopoutSituation .setSelectedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/pressed.png"))); btnPopoutSituation.setBorder(null); btnPopoutSituation.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnPopoutSituation.addActionListener(e -> btnPopoutSituationActionPerformed(e)); panel4.add(btnPopoutSituation, BorderLayout.EAST); } jPanel5.add(panel4, CC.xy(1, 5, CC.DEFAULT, CC.TOP)); //======== jScrollPane3 ======== { //---- txtSituation ---- txtSituation.setColumns(20); txtSituation.setLineWrap(true); txtSituation.setRows(5); txtSituation.setWrapStyleWord(true); txtSituation.setFont(new Font("Arial", Font.PLAIN, 14)); txtSituation.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtSituationFocusGained(e); } }); jScrollPane3.setViewportView(txtSituation); } jPanel5.add(jScrollPane3, CC.xy(3, 5)); //======== panel5 ======== { panel5.setLayout(new BorderLayout()); //---- lblGoal ---- lblGoal.setFont(new Font("Arial", Font.PLAIN, 14)); lblGoal.setText("Ziele"); panel5.add(lblGoal, BorderLayout.CENTER); //---- btnPopoutGoal ---- btnPopoutGoal.setText(null); btnPopoutGoal.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/popup.png"))); btnPopoutGoal.setBorderPainted(false); btnPopoutGoal.setContentAreaFilled(false); btnPopoutGoal .setSelectedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/pressed.png"))); btnPopoutGoal.setBorder(null); btnPopoutGoal.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnPopoutGoal.addActionListener(e -> btnPopoutGoalActionPerformed(e)); panel5.add(btnPopoutGoal, BorderLayout.EAST); } jPanel5.add(panel5, CC.xy(1, 7, CC.DEFAULT, CC.TOP)); //======== jScrollPane1 ======== { //---- txtZiele ---- txtZiele.setColumns(20); txtZiele.setLineWrap(true); txtZiele.setRows(5); txtZiele.setWrapStyleWord(true); txtZiele.setFont(new Font("Arial", Font.PLAIN, 14)); txtZiele.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtZieleFocusGained(e); } }); jScrollPane1.setViewportView(txtZiele); } jPanel5.add(jScrollPane1, CC.xy(3, 7)); //---- lblFirstRevision ---- lblFirstRevision.setFont(new Font("Arial", Font.PLAIN, 14)); lblFirstRevision.setText("Erste Kontrolle am"); jPanel5.add(lblFirstRevision, CC.xy(1, 11)); //---- jdcKontrolle ---- jdcKontrolle.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel5.add(jdcKontrolle, CC.xy(3, 11)); } contentPane.add(jPanel5, CC.xy(3, 3, CC.DEFAULT, CC.FILL)); //======== panel2 ======== { panel2.setLayout(new FormLayout("default:grow", "default, $lgap, default")); //======== jspPlanung ======== { jspPlanung.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { jspPlanungComponentResized(e); } }); //---- tblPlanung ---- tblPlanung.setModel(new DefaultTableModel( new Object[][] { { null, null, null, null }, { null, null, null, null }, { null, null, null, null }, { null, null, null, null }, }, new String[] { "Title 1", "Title 2", "Title 3", "Title 4" })); tblPlanung.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); tblPlanung.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { tblPlanungMousePressed(e); } }); jspPlanung.setViewportView(tblPlanung); } panel2.add(jspPlanung, CC.xy(1, 1)); //======== panel3 ======== { panel3.setLayout(new BoxLayout(panel3, BoxLayout.X_AXIS)); //---- btnAddIntervention ---- btnAddIntervention.setText(null); btnAddIntervention.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnAddIntervention.setContentAreaFilled(false); btnAddIntervention.setBorderPainted(false); btnAddIntervention.setBorder(null); btnAddIntervention .setPressedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png"))); btnAddIntervention.addActionListener(e -> btnAddInterventionActionPerformed(e)); panel3.add(btnAddIntervention); } panel2.add(panel3, CC.xy(1, 3)); } contentPane.add(panel2, CC.xy(5, 3)); //======== panel1 ======== { panel1.setLayout(new HorizontalLayout(5)); //---- btnCancel ---- btnCancel.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnCancel.setText(null); btnCancel.addActionListener(e -> btnCancelActionPerformed(e)); panel1.add(btnCancel); //---- btnSave ---- btnSave.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnSave.setText(null); btnSave.addActionListener(e -> btnSaveActionPerformed(e)); panel1.add(btnSave); } contentPane.add(panel1, CC.xy(5, 5, CC.RIGHT, CC.DEFAULT)); setSize(1145, 695); setLocationRelativeTo(getOwner()); }
From source file:op.care.prescription.DlgDiscontinue.java
/** * This method is called from within the constructor to * initialize the form.// www. j ava2 s.c o m * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc=" Erzeugter Quelltext ">//GEN-BEGIN:initComponents private void initComponents() { lblQuestion = new JLabel(); cmbArztAb = new JComboBox(); cmbKHAb = new JComboBox(); panel1 = new JPanel(); btnCancel = new JButton(); btnOK = new JButton(); //======== this ======== setResizable(false); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); setModalityType(Dialog.ModalityType.APPLICATION_MODAL); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("$rgap, 200dlu:grow, $lcgap, $rgap", "$rgap, $lgap, default, 2*($lgap, fill:16dlu), $lgap, fill:default, $lgap, $rgap")); //---- lblQuestion ---- lblQuestion.setText("Wer hat die Verordnung abgesetzt ?"); lblQuestion.setFont(new Font("Arial", Font.PLAIN, 18)); contentPane.add(lblQuestion, CC.xy(2, 3)); //---- cmbArztAb ---- cmbArztAb.setModel(new DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbArztAb.setFont(new Font("Arial", Font.PLAIN, 14)); cmbArztAb.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { cmbArztAbKeyPressed(e); } }); contentPane.add(cmbArztAb, CC.xy(2, 5)); //---- cmbKHAb ---- cmbKHAb.setModel(new DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbKHAb.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(cmbKHAb, CC.xy(2, 7)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS)); //---- btnCancel ---- btnCancel.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnCancel.setText(null); btnCancel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCancelActionPerformed(e); } }); panel1.add(btnCancel); //---- btnOK ---- btnOK.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnOK.setText(null); btnOK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnOKActionPerformed(e); } }); panel1.add(btnOK); } contentPane.add(panel1, CC.xy(2, 9, CC.RIGHT, CC.DEFAULT)); setSize(490, 175); setLocationRelativeTo(getOwner()); }
From source file:op.care.prescription.DlgOnDemand.java
/** * This method is called from within the constructor to * initialize the form./*from w ww. j a v a2 s . c om*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new JPanel(); txtMed = new JXSearchField(); cmbMed = new JComboBox<>(); panel4 = new JPanel(); btnMedWizard = new JButton(); cmbIntervention = new JComboBox<>(); txtSit = new JXSearchField(); cmbSit = new JComboBox<>(); panel3 = new JPanel(); btnAddSit = new JButton(); txtIntervention = new JXSearchField(); jPanel2 = new JPanel(); lblNumber = new JLabel(); lblDose = new JLabel(); lblMaxPerDay = new JLabel(); txtMaxTimes = new JTextField(); lblX = new JLabel(); txtEDosis = new JTextField(); lblCheckResultAfter = new JLabel(); cmbCheckAfter = new JComboBox<>(); jPanel3 = new JPanel(); pnlOFF = new JPanel(); rbActive = new JRadioButton(); rbDate = new JRadioButton(); txtOFF = new JTextField(); jScrollPane3 = new JScrollPane(); txtBemerkung = new JTextPane(); lblText = new JLabel(); pnlON = new JPanel(); cmbDocON = new JComboBox<>(); cmbHospitalON = new JComboBox<>(); panel1 = new JPanel(); btnClose = new JButton(); btnSave = new JButton(); //======== this ======== setModalityType(Dialog.ModalityType.APPLICATION_MODAL); setResizable(false); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("14dlu, $lcgap, default, 6dlu, 355dlu, $lcgap, 14dlu", "14dlu, $lgap, fill:default:grow, $lgap, fill:default, $lgap, 14dlu")); //======== jPanel1 ======== { jPanel1.setBorder(null); jPanel1.setLayout(new FormLayout("68dlu, $lcgap, pref:grow, $lcgap, pref", "3*(16dlu, $lgap), default, $lgap, fill:113dlu:grow, $lgap, 60dlu")); //---- txtMed ---- txtMed.setFont(new Font("Arial", Font.PLAIN, 14)); txtMed.setPrompt("Medikamente"); txtMed.setFocusBehavior(PromptSupport.FocusBehavior.HIGHLIGHT_PROMPT); txtMed.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtMedActionPerformed(e); } }); txtMed.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtMedFocusGained(e); } }); jPanel1.add(txtMed, CC.xy(1, 1)); //---- cmbMed ---- cmbMed.setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbMed.setFont(new Font("Arial", Font.PLAIN, 14)); cmbMed.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { cmbMedItemStateChanged(e); } }); jPanel1.add(cmbMed, CC.xy(3, 1)); //======== panel4 ======== { panel4.setLayout(new BoxLayout(panel4, BoxLayout.LINE_AXIS)); //---- btnMedWizard ---- btnMedWizard.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnMedWizard.setBorderPainted(false); btnMedWizard.setBorder(null); btnMedWizard.setContentAreaFilled(false); btnMedWizard.setToolTipText("Neues Medikament eintragen"); btnMedWizard.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnMedWizard.setSelectedIcon( new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png"))); btnMedWizard.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnMedActionPerformed(e); } }); panel4.add(btnMedWizard); } jPanel1.add(panel4, CC.xy(5, 1)); //---- cmbIntervention ---- cmbIntervention .setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbIntervention.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(cmbIntervention, CC.xywh(3, 5, 3, 1)); //---- txtSit ---- txtSit.setPrompt("Situationen"); txtSit.setFont(new Font("Arial", Font.PLAIN, 14)); txtSit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtSitActionPerformed(e); } }); jPanel1.add(txtSit, CC.xy(1, 3)); //---- cmbSit ---- cmbSit.setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbSit.setFont(new Font("Arial", Font.PLAIN, 14)); cmbSit.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { cmbSitItemStateChanged(e); } }); cmbSit.addPropertyChangeListener("model", new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent e) { cmbSitPropertyChange(e); } }); jPanel1.add(cmbSit, CC.xy(3, 3)); //======== panel3 ======== { panel3.setLayout(new BoxLayout(panel3, BoxLayout.LINE_AXIS)); //---- btnAddSit ---- btnAddSit.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnAddSit.setBorderPainted(false); btnAddSit.setBorder(null); btnAddSit.setContentAreaFilled(false); btnAddSit.setToolTipText("Neue Situation eintragen"); btnAddSit.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnAddSit.setSelectedIcon( new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png"))); btnAddSit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSituationActionPerformed(e); } }); panel3.add(btnAddSit); } jPanel1.add(panel3, CC.xy(5, 3, CC.RIGHT, CC.DEFAULT)); //---- txtIntervention ---- txtIntervention.setFont(new Font("Arial", Font.PLAIN, 14)); txtIntervention.setPrompt("Massnahmen"); txtIntervention.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtMassActionPerformed(e); } }); jPanel1.add(txtIntervention, CC.xy(1, 5)); //======== jPanel2 ======== { jPanel2.setLayout(new FormLayout("default, $lcgap, pref, $lcgap, default, $lcgap, 37dlu:grow", "23dlu, fill:22dlu, $ugap, default")); //---- lblNumber ---- lblNumber.setText("Anzahl"); jPanel2.add(lblNumber, CC.xy(3, 1)); //---- lblDose ---- lblDose.setText("Dosis"); jPanel2.add(lblDose, CC.xy(7, 1, CC.CENTER, CC.DEFAULT)); //---- lblMaxPerDay ---- lblMaxPerDay.setText("Max. Tagesdosis:"); jPanel2.add(lblMaxPerDay, CC.xy(1, 2)); //---- txtMaxTimes ---- txtMaxTimes.setHorizontalAlignment(SwingConstants.CENTER); txtMaxTimes.setText("1"); txtMaxTimes.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtMaxTimesActionPerformed(e); } }); txtMaxTimes.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtMaxTimesFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtMaxTimesFocusLost(e); } }); jPanel2.add(txtMaxTimes, CC.xy(3, 2)); //---- lblX ---- lblX.setText("x"); jPanel2.add(lblX, CC.xy(5, 2)); //---- txtEDosis ---- txtEDosis.setHorizontalAlignment(SwingConstants.CENTER); txtEDosis.setText("1.0"); txtEDosis.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtEDosisFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtEDosisFocusLost(e); } }); txtEDosis.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { txtEDosisActionPerformed(e); } }); jPanel2.add(txtEDosis, CC.xy(7, 2)); //---- lblCheckResultAfter ---- lblCheckResultAfter.setText("Nachkontrolle:"); jPanel2.add(lblCheckResultAfter, CC.xy(1, 4)); //---- cmbCheckAfter ---- cmbCheckAfter.setModel(new DefaultComboBoxModel<>(new String[] { "keine Nachkontrolle", "nach 1 Stunde", "nach 2 Stunden", "nach 3 Stunden" })); jPanel2.add(cmbCheckAfter, CC.xywh(3, 4, 5, 1)); } jPanel1.add(jPanel2, CC.xywh(1, 9, 5, 1, CC.CENTER, CC.TOP)); } contentPane.add(jPanel1, CC.xy(5, 3)); //======== jPanel3 ======== { jPanel3.setBorder(null); jPanel3.setLayout(new FormLayout("149dlu", "3*(fill:default, $lgap), fill:100dlu:grow")); //======== pnlOFF ======== { pnlOFF.setBorder(new TitledBorder("Absetzung")); pnlOFF.setLayout(new FormLayout("pref, 86dlu:grow", "fill:17dlu, $lgap, fill:17dlu")); //---- rbActive ---- rbActive.setText("text"); rbActive.setSelected(true); rbActive.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { rbActiveItemStateChanged(e); } }); pnlOFF.add(rbActive, CC.xywh(1, 1, 2, 1)); //---- rbDate ---- rbDate.setText(null); rbDate.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { rbDateItemStateChanged(e); } }); pnlOFF.add(rbDate, CC.xy(1, 3)); //---- txtOFF ---- txtOFF.setEnabled(false); txtOFF.setFont(new Font("Arial", Font.PLAIN, 14)); txtOFF.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtOFFFocusLost(e); } }); pnlOFF.add(txtOFF, CC.xy(2, 3)); } jPanel3.add(pnlOFF, CC.xy(1, 3)); //======== jScrollPane3 ======== { //---- txtBemerkung ---- txtBemerkung.addCaretListener(new CaretListener() { @Override public void caretUpdate(CaretEvent e) { txtBemerkungCaretUpdate(e); } }); jScrollPane3.setViewportView(txtBemerkung); } jPanel3.add(jScrollPane3, CC.xy(1, 7)); //---- lblText ---- lblText.setText("Bemerkung:"); jPanel3.add(lblText, CC.xy(1, 5)); //======== pnlON ======== { pnlON.setBorder(new TitledBorder("Ansetzung")); pnlON.setLayout(new FormLayout("119dlu:grow", "17dlu, $lgap, fill:17dlu")); //---- cmbDocON ---- cmbDocON.setModel( new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbDocON.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { cmbDocONKeyPressed(e); } }); pnlON.add(cmbDocON, CC.xy(1, 1)); //---- cmbHospitalON ---- cmbHospitalON.setModel( new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); pnlON.add(cmbHospitalON, CC.xy(1, 3)); } jPanel3.add(pnlON, CC.xy(1, 1)); } contentPane.add(jPanel3, CC.xy(3, 3)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.LINE_AXIS)); //---- btnClose ---- btnClose.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnClose.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnClose.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCloseActionPerformed(e); } }); panel1.add(btnClose); //---- btnSave ---- btnSave.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnSave.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnSave.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSaveActionPerformed(e); } }); panel1.add(btnSave); } contentPane.add(panel1, CC.xy(5, 5, CC.RIGHT, CC.DEFAULT)); setSize(1035, 515); setLocationRelativeTo(getOwner()); //---- bgMedikament ---- ButtonGroup bgMedikament = new ButtonGroup(); bgMedikament.add(rbActive); bgMedikament.add(rbDate); }
From source file:op.care.prescription.DlgRegular.java
/** * This method is called from within the constructor to * initialize the form.//from w w w . j a va 2s . c om * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new JPanel(); txtMed = new JXSearchField(); cmbMed = new JComboBox<>(); panel4 = new JPanel(); btnMed = new JButton(); cmbIntervention = new JComboBox<>(); txtIntervention = new JXSearchField(); jPanel8 = new JPanel(); jspDosis = new JScrollPane(); tblDosis = new JTable(); panel2 = new JPanel(); btnAddDosis = new JButton(); jPanel3 = new JPanel(); pnlOFF = new JPanel(); rbActive = new JRadioButton(); rbDate = new JRadioButton(); txtTo = new JTextField(); rbEndOfPackage = new JRadioButton(); jScrollPane3 = new JScrollPane(); txtBemerkung = new JTextPane(); lblText = new JLabel(); pnlON = new JPanel(); cmbDocON = new JComboBox<>(); btnAddGP = new JButton(); cmbHospitalON = new JComboBox<>(); btnAddHospital = new JButton(); panel1 = new JPanel(); btnClose = new JButton(); btnSave = new JButton(); lblTX = new JLabel(); //======== this ======== setModalityType(Dialog.ModalityType.APPLICATION_MODAL); setResizable(false); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("$rgap, $lcgap, default, $lcgap, pref, $lcgap, $rgap", "$rgap, $lgap, fill:default:grow, $lgap, fill:default, $lgap, $rgap")); //======== jPanel1 ======== { jPanel1.setBorder(null); jPanel1.setLayout(new FormLayout("68dlu, $lcgap, 284dlu, $lcgap, pref", "2*(16dlu, $lgap), default, $lgap, fill:default:grow")); //---- txtMed ---- txtMed.setFont(new Font("Arial", Font.PLAIN, 14)); txtMed.setPrompt("Medikamente"); txtMed.setFocusBehavior(PromptSupport.FocusBehavior.HIGHLIGHT_PROMPT); txtMed.addActionListener(e -> txtMedActionPerformed(e)); txtMed.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtMedFocusGained(e); } }); jPanel1.add(txtMed, CC.xy(1, 1)); //---- cmbMed ---- cmbMed.setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbMed.setFont(new Font("Arial", Font.PLAIN, 14)); cmbMed.addItemListener(e -> cmbMedItemStateChanged(e)); jPanel1.add(cmbMed, CC.xy(3, 1)); //======== panel4 ======== { panel4.setLayout(new BoxLayout(panel4, BoxLayout.LINE_AXIS)); //---- btnMed ---- btnMed.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnMed.setBorderPainted(false); btnMed.setBorder(null); btnMed.setContentAreaFilled(false); btnMed.setToolTipText("Neues Medikament eintragen"); btnMed.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnMed.setSelectedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png"))); btnMed.addActionListener(e -> btnMedActionPerformed(e)); panel4.add(btnMed); } jPanel1.add(panel4, CC.xy(5, 1)); //---- cmbIntervention ---- cmbIntervention .setModel(new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbIntervention.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(cmbIntervention, CC.xywh(3, 3, 3, 1)); //---- txtIntervention ---- txtIntervention.setFont(new Font("Arial", Font.PLAIN, 14)); txtIntervention.setPrompt("Massnahmen"); txtIntervention.addActionListener(e -> txtMassActionPerformed(e)); jPanel1.add(txtIntervention, CC.xy(1, 3)); //======== jPanel8 ======== { jPanel8.setBorder(new TitledBorder(null, "Dosis / H\u00e4ufigkeit", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new Font("Arial", Font.PLAIN, 14))); jPanel8.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel8.setLayout(new FormLayout("370dlu", "fill:default:grow, $lgap, pref")); //======== jspDosis ======== { jspDosis.setToolTipText(null); //---- tblDosis ---- tblDosis.setModel(new DefaultTableModel( new Object[][] { { null, null, null, null }, { null, null, null, null }, { null, null, null, null }, { null, null, null, null }, }, new String[] { "Title 1", "Title 2", "Title 3", "Title 4" })); tblDosis.setSurrendersFocusOnKeystroke(true); tblDosis.setToolTipText(null); tblDosis.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { tblDosisMousePressed(e); } }); jspDosis.setViewportView(tblDosis); } jPanel8.add(jspDosis, CC.xy(1, 1)); //======== panel2 ======== { panel2.setLayout(new BoxLayout(panel2, BoxLayout.LINE_AXIS)); //---- btnAddDosis ---- btnAddDosis.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnAddDosis.setBorderPainted(false); btnAddDosis.setBorder(null); btnAddDosis.setContentAreaFilled(false); btnAddDosis.setToolTipText("Neue Dosierung eintragen"); btnAddDosis.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnAddDosis.setSelectedIcon( new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png"))); btnAddDosis.addActionListener(e -> btnAddDosisActionPerformed(e)); panel2.add(btnAddDosis); } jPanel8.add(panel2, CC.xy(1, 3, CC.LEFT, CC.DEFAULT)); } jPanel1.add(jPanel8, CC.xywh(1, 7, 5, 1)); } contentPane.add(jPanel1, CC.xy(5, 3)); //======== jPanel3 ======== { jPanel3.setBorder(null); jPanel3.setLayout(new FormLayout("149dlu", "3*(fill:default, $lgap), fill:108dlu:grow, $lgap, 60dlu")); //======== pnlOFF ======== { pnlOFF.setBorder(new TitledBorder("Absetzung")); pnlOFF.setLayout(new FormLayout("pref, 86dlu:grow", "2*(fill:17dlu, $lgap), fill:17dlu")); //---- rbActive ---- rbActive.setText("text"); rbActive.setSelected(true); rbActive.addItemListener(e -> rbActiveItemStateChanged(e)); pnlOFF.add(rbActive, CC.xywh(1, 1, 2, 1)); //---- rbDate ---- rbDate.setText(null); rbDate.addItemListener(e -> rbDateItemStateChanged(e)); pnlOFF.add(rbDate, CC.xy(1, 3)); //---- txtTo ---- txtTo.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtToFocusLost(e); } }); pnlOFF.add(txtTo, CC.xy(2, 3)); //---- rbEndOfPackage ---- rbEndOfPackage.setText("text"); rbEndOfPackage.addItemListener(e -> rbEndOfPackageItemStateChanged(e)); pnlOFF.add(rbEndOfPackage, CC.xywh(1, 5, 2, 1)); } jPanel3.add(pnlOFF, CC.xy(1, 3)); //======== jScrollPane3 ======== { //---- txtBemerkung ---- txtBemerkung.addCaretListener(e -> txtBemerkungCaretUpdate(e)); jScrollPane3.setViewportView(txtBemerkung); } jPanel3.add(jScrollPane3, CC.xy(1, 7)); //---- lblText ---- lblText.setText("Bemerkung:"); jPanel3.add(lblText, CC.xy(1, 5)); //======== pnlON ======== { pnlON.setBorder(new TitledBorder("Ansetzung")); pnlON.setLayout(new FormLayout("119dlu:grow, $lcgap, default", "default, $lgap, default")); //---- cmbDocON ---- cmbDocON.setModel( new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cmbDocON.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { cmbDocONKeyPressed(e); } }); pnlON.add(cmbDocON, CC.xy(1, 1)); //---- btnAddGP ---- btnAddGP.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnAddGP.setBorderPainted(false); btnAddGP.setBorder(null); btnAddGP.setContentAreaFilled(false); btnAddGP.setToolTipText("Neues Medikament eintragen"); btnAddGP.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnAddGP.setSelectedIcon( new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png"))); btnAddGP.addActionListener(e -> btnAddGPActionPerformed(e)); pnlON.add(btnAddGP, CC.xy(3, 1)); //---- cmbHospitalON ---- cmbHospitalON.setModel( new DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); pnlON.add(cmbHospitalON, CC.xy(1, 3)); //---- btnAddHospital ---- btnAddHospital.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnAddHospital.setBorderPainted(false); btnAddHospital.setBorder(null); btnAddHospital.setContentAreaFilled(false); btnAddHospital.setToolTipText("Neues Medikament eintragen"); btnAddHospital.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnAddHospital.setSelectedIcon( new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png"))); btnAddHospital.addActionListener(e -> btnAddHospitalActionPerformed(e)); pnlON.add(btnAddHospital, CC.xy(3, 3)); } jPanel3.add(pnlON, CC.xy(1, 1)); } contentPane.add(jPanel3, CC.xy(3, 3)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.LINE_AXIS)); //---- btnClose ---- btnClose.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnClose.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnClose.addActionListener(e -> btnCloseActionPerformed(e)); panel1.add(btnClose); //---- btnSave ---- btnSave.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnSave.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnSave.addActionListener(e -> btnSaveActionPerformed(e)); panel1.add(btnSave); } contentPane.add(panel1, CC.xy(5, 5, CC.RIGHT, CC.DEFAULT)); //---- lblTX ---- lblTX.setText(null); lblTX.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/ambulance2.png"))); contentPane.add(lblTX, CC.xy(3, 5)); setSize(1015, 640); setLocationRelativeTo(getOwner()); //---- bgMedikament ---- ButtonGroup bgMedikament = new ButtonGroup(); bgMedikament.add(rbActive); bgMedikament.add(rbDate); bgMedikament.add(rbEndOfPackage); }
From source file:op.controlling.DlgQMSPlan.java
/** * This method is called from within the constructor to * initialize the form.// w ww . j a v a 2 s.co m * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { pnlLeft = new JPanel(); lblTitle = new JLabel(); txtTitle = new JTextField(); lblNotify = new JideLabel(); cmbNotify = new JComboBox(); jScrollPane3 = new JScrollPane(); txtDescription = new JTextArea(); lblDescription = new JideLabel(); scrollPane1 = new JScrollPane(); lstNotify = new JList(); lblTags = new JLabel(); panel1 = new JPanel(); btnCancel = new JButton(); btnSave = new JButton(); //======== this ======== setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("14dlu, $lcgap, pref:grow, $ugap, pref", "fill:14dlu, $lgap, fill:default:grow, $rgap, pref, $lgap, 14dlu")); //======== pnlLeft ======== { pnlLeft.setLayout(new FormLayout("pref, $lcgap, default:grow, $lcgap, pref, $lcgap, default:grow", "default, $lgap, fill:default, $rgap, fill:default:grow, $lgap, 40dlu, $rgap, default")); //---- lblTitle ---- lblTitle.setFont(new Font("Arial", Font.PLAIN, 18)); lblTitle.setText("Stichwort"); lblTitle.setHorizontalAlignment(SwingConstants.CENTER); pnlLeft.add(lblTitle, CC.xy(3, 1)); //---- txtTitle ---- txtTitle.setFont(new Font("Arial", Font.PLAIN, 20)); txtTitle.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtTitleFocusGained(e); } }); pnlLeft.add(txtTitle, CC.xy(3, 3)); //---- lblNotify ---- lblNotify.setText("text"); lblNotify.setOrientation(1); lblNotify.setFont(new Font("Arial", Font.PLAIN, 18)); lblNotify.setHorizontalAlignment(SwingConstants.CENTER); lblNotify.setClockwise(false); pnlLeft.add(lblNotify, CC.xywh(5, 3, 1, 3)); //---- cmbNotify ---- cmbNotify.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { cmbNotifyItemStateChanged(e); } }); pnlLeft.add(cmbNotify, CC.xy(7, 3)); //======== jScrollPane3 ======== { //---- txtDescription ---- txtDescription.setColumns(20); txtDescription.setLineWrap(true); txtDescription.setRows(5); txtDescription.setWrapStyleWord(true); txtDescription.setFont(new Font("Arial", Font.PLAIN, 14)); txtDescription.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtDescriptionFocusGained(e); } }); jScrollPane3.setViewportView(txtDescription); } pnlLeft.add(jScrollPane3, CC.xy(3, 5)); //---- lblDescription ---- lblDescription.setFont(new Font("Arial", Font.PLAIN, 18)); lblDescription.setText("Situation"); lblDescription.setOrientation(1); lblDescription.setClockwise(false); pnlLeft.add(lblDescription, CC.xy(1, 5, CC.DEFAULT, CC.CENTER)); //======== scrollPane1 ======== { //---- lstNotify ---- lstNotify.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); lstNotify.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { lstNotifyValueChanged(e); } }); scrollPane1.setViewportView(lstNotify); } pnlLeft.add(scrollPane1, CC.xy(7, 5)); //---- lblTags ---- lblTags.setFont(new Font("Arial", Font.PLAIN, 18)); lblTags.setText("Markierung"); lblTags.setHorizontalAlignment(SwingConstants.CENTER); pnlLeft.add(lblTags, CC.xywh(3, 9, 5, 1)); } contentPane.add(pnlLeft, CC.xy(3, 3)); //======== panel1 ======== { panel1.setLayout(new HorizontalLayout(5)); //---- btnCancel ---- btnCancel.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnCancel.setText(null); btnCancel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCancelActionPerformed(e); } }); panel1.add(btnCancel); //---- btnSave ---- btnSave.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnSave.setText(null); btnSave.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSaveActionPerformed(e); } }); panel1.add(btnSave); } contentPane.add(panel1, CC.xy(3, 5, CC.RIGHT, CC.DEFAULT)); setSize(710, 495); setLocationRelativeTo(getOwner()); }
From source file:op.FrmMain.java
/** * This method is called from within the constructor to * initialize the form.//from w ww . j a va2 s .co m * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { pnlMain = new JPanel(); pnlMainMessage = new JPanel(); btnTX = new JButton(); panel1 = new JPanel(); pnlIcons = new JPanel(); lblMainMsg = new JLabel(); btnExit = new JButton(); lblSubMsg = new JideLabel(); btnHelp = new JButton(); pbMsg = new JProgressBar(); btnReload = new JButton(); splitPaneLeft = new JideSplitPane(); pnlCard = new JPanel(); pnlWait = new JPanel(); lblWait = new JLabel(); pbTimeout = new JProgressBar(); panel2 = new JPanel(); btnResetSplitpane = new JButton(); statusBar = new StatusBar(); //======== this ======== setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); setTitle("Offene-Pflege.de"); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { thisWindowClosing(e); } }); Container contentPane = getContentPane(); contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS)); //======== pnlMain ======== { pnlMain.setLayout(new FormLayout("0dlu, $lcgap, pref, $lcgap, left:default:grow, 2*($rgap)", "$rgap, pref, $rgap, default:grow, 3dlu, $nlgap, bottom:pref, $lgap, 0dlu")); //======== pnlMainMessage ======== { pnlMainMessage.setBackground(new Color(220, 223, 208)); pnlMainMessage.setBorder(new SoftBevelBorder(SoftBevelBorder.RAISED)); pnlMainMessage.setLayout(new FormLayout( "0dlu, $lcgap, 23dlu, $lcgap, default:grow, $lcgap, min, $lcgap, 0dlu", "0dlu, $lgap, 15dlu, $lgap, fill:11dlu, $lgap, fill:pref:grow, $lgap, pref, $lgap, 0dlu")); //---- btnTX ---- btnTX.setIcon(new ImageIcon(getClass().getResource("/artwork/32x32/ambulance2.png"))); btnTX.setBorder(null); btnTX.setBorderPainted(false); btnTX.setSelectedIcon(null); btnTX.setToolTipText("Verlegungsbericht drucken"); btnTX.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnTX.setPressedIcon( new ImageIcon(getClass().getResource("/artwork/32x32/ambulance2_pressed.png"))); btnTX.setContentAreaFilled(false); btnTX.addActionListener(e -> btnTXActionPerformed(e)); pnlMainMessage.add(btnTX, CC.xywh(3, 3, 1, 3)); //======== panel1 ======== { panel1.setOpaque(false); panel1.setLayout(new BoxLayout(panel1, BoxLayout.LINE_AXIS)); //======== pnlIcons ======== { pnlIcons.setOpaque(false); pnlIcons.setLayout(new BoxLayout(pnlIcons, BoxLayout.LINE_AXIS)); } panel1.add(pnlIcons); //---- lblMainMsg ---- lblMainMsg.setText("OPDE"); lblMainMsg.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 22)); lblMainMsg.setForeground(new Color(105, 80, 69)); lblMainMsg.setHorizontalAlignment(SwingConstants.CENTER); lblMainMsg.setIcon(null); lblMainMsg.setHorizontalTextPosition(SwingConstants.LEADING); panel1.add(lblMainMsg); } pnlMainMessage.add(panel1, CC.xy(5, 3, CC.CENTER, CC.DEFAULT)); //---- btnExit ---- btnExit.setIcon(new ImageIcon(getClass().getResource("/artwork/32x32/lock.png"))); btnExit.setBorder(null); btnExit.setBorderPainted(false); btnExit.setOpaque(false); btnExit.setContentAreaFilled(false); btnExit.setToolTipText("Abmelden"); btnExit.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnExit.setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/lock_pressed.png"))); btnExit.addActionListener(e -> btnExitActionPerformed(e)); pnlMainMessage.add(btnExit, CC.xywh(7, 3, 1, 3)); //---- lblSubMsg ---- lblSubMsg.setText("OPDE"); lblSubMsg.setFont(new Font("Arial", Font.PLAIN, 14)); lblSubMsg.setForeground(new Color(105, 80, 69)); lblSubMsg.setHorizontalAlignment(SwingConstants.CENTER); lblSubMsg.setVerticalAlignment(SwingConstants.TOP); pnlMainMessage.add(lblSubMsg, CC.xywh(5, 5, 1, 3)); //---- btnHelp ---- btnHelp.setText(null); btnHelp.setIcon(new ImageIcon(getClass().getResource("/artwork/32x32/help.png"))); btnHelp.setBorderPainted(false); btnHelp.setContentAreaFilled(false); btnHelp.setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/help_pressed.png"))); btnHelp.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnHelp.addActionListener(e -> btnHelpActionPerformed(e)); pnlMainMessage.add(btnHelp, CC.xywh(3, 7, 1, 3)); //---- pbMsg ---- pbMsg.setValue(50); pbMsg.setFont(new Font("Arial Rounded MT Bold", Font.PLAIN, 12)); pbMsg.setForeground(new Color(105, 80, 69)); pnlMainMessage.add(pbMsg, CC.xy(5, 9, CC.FILL, CC.FILL)); //---- btnReload ---- btnReload.setIcon(new ImageIcon(getClass().getResource("/artwork/32x32/reload0000.png"))); btnReload.setBorder(null); btnReload.setBorderPainted(false); btnReload.setOpaque(false); btnReload.setContentAreaFilled(false); btnReload.setToolTipText("Ansicht aktualisieren"); btnReload.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnReload .setPressedIcon(new ImageIcon(getClass().getResource("/artwork/32x32/reload_pressed.png"))); btnReload.addActionListener(e -> btnReloadActionPerformed(e)); pnlMainMessage.add(btnReload, CC.xywh(7, 7, 1, 3)); } pnlMain.add(pnlMainMessage, CC.xywh(3, 2, 4, 1, CC.DEFAULT, CC.FILL)); //---- splitPaneLeft ---- splitPaneLeft.setOneTouchExpandable(true); splitPaneLeft.setProportionalLayout(true); splitPaneLeft.setShowGripper(true); splitPaneLeft.addPropertyChangeListener("dividerLocation", e -> splitPaneLeftPropertyChange(e)); pnlMain.add(splitPaneLeft, CC.xy(3, 4, CC.FILL, CC.FILL)); //======== pnlCard ======== { pnlCard.setLayout(new CardLayout()); //======== pnlWait ======== { pnlWait.setLayout(new BorderLayout()); //---- lblWait ---- lblWait.setText("text"); lblWait.setFont(new Font("Arial", Font.BOLD, 22)); lblWait.setHorizontalAlignment(SwingConstants.CENTER); pnlWait.add(lblWait, BorderLayout.CENTER); } pnlCard.add(pnlWait, "cardWait"); } pnlMain.add(pnlCard, CC.xy(5, 4, CC.FILL, CC.FILL)); pnlMain.add(pbTimeout, CC.xywh(3, 5, 4, 1, CC.FILL, CC.DEFAULT)); //======== panel2 ======== { panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS)); //---- btnResetSplitpane ---- btnResetSplitpane.setText(null); btnResetSplitpane .setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/view_top_bottom.png"))); btnResetSplitpane.setAlignmentY(1.0F); btnResetSplitpane.addActionListener(e -> btnResetSplitpaneActionPerformed(e)); panel2.add(btnResetSplitpane); //---- statusBar ---- statusBar.setBackground(new Color(238, 238, 238)); statusBar.setAlignmentY(1.0F); panel2.add(statusBar); } pnlMain.add(panel2, CC.xywh(3, 7, 4, 1, CC.FILL, CC.BOTTOM)); } contentPane.add(pnlMain); setSize(945, 695); setLocationRelativeTo(getOwner()); }
From source file:op.system.DlgLogin.java
/** * This method is called from within the constructor to * initialize the printerForm.//from w w w . j a va 2s. c o m * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the PrinterForm Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel2 = new JPanel(); lblOPDE = new JLabel(); btnAbout = new JButton(); lblUsernamePassword = new JLabel(); txtUsername = new JTextField(); txtPassword = new JPasswordField(); panel1 = new JPanel(); btnExit = new JButton(); hSpacer1 = new JPanel(null); btnLogin = new JButton(); //======== this ======== setModalityType(Dialog.ModalityType.APPLICATION_MODAL); setResizable(false); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowActivated(WindowEvent e) { thisWindowActivated(e); } }); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("13dlu, default, 13dlu", "13dlu, $lgap, fill:48dlu:grow, $lgap, default, $lgap, 13dlu")); //======== jPanel2 ======== { jPanel2.setBorder(new EmptyBorder(5, 5, 5, 5)); jPanel2.setOpaque(false); jPanel2.setLayout(new VerticalLayout(10)); //---- lblOPDE ---- lblOPDE.setText("Offene-Pflege.de"); lblOPDE.setFont(new Font("Arial", Font.PLAIN, 24)); lblOPDE.setHorizontalAlignment(SwingConstants.CENTER); jPanel2.add(lblOPDE); //---- btnAbout ---- btnAbout.setIcon(new ImageIcon(getClass().getResource("/artwork/256x256/opde-logo.png"))); btnAbout.setBorderPainted(false); btnAbout.setBorder(null); btnAbout.setOpaque(false); btnAbout.setContentAreaFilled(false); btnAbout.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnAbout.setToolTipText(null); btnAbout.addActionListener(e -> btnAboutActionPerformed(e)); jPanel2.add(btnAbout); //---- lblUsernamePassword ---- lblUsernamePassword.setText("text"); lblUsernamePassword.setFont(new Font("Arial", Font.PLAIN, 18)); jPanel2.add(lblUsernamePassword); //---- txtUsername ---- txtUsername.setFont(new Font("Arial", Font.PLAIN, 18)); txtUsername.addActionListener(e -> txtUsernameActionPerformed(e)); txtUsername.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtUsernameFocusGained(e); } }); jPanel2.add(txtUsername); //---- txtPassword ---- txtPassword.setFont(new Font("Arial", Font.PLAIN, 18)); txtPassword.addActionListener(e -> txtPasswordActionPerformed(e)); txtPassword.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtPasswordFocusGained(e); } }); jPanel2.add(txtPassword); } contentPane.add(jPanel2, CC.xy(2, 3, CC.FILL, CC.DEFAULT)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS)); //---- btnExit ---- btnExit.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/exit.png"))); btnExit.addActionListener(e -> btnExitActionPerformed(e)); panel1.add(btnExit); panel1.add(hSpacer1); //---- btnLogin ---- btnLogin.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnLogin.setActionCommand("btnLogin"); btnLogin.addActionListener(e -> DoLogin(e)); panel1.add(btnLogin); } contentPane.add(panel1, CC.xy(2, 5, CC.RIGHT, CC.DEFAULT)); setSize(320, 540); setLocationRelativeTo(getOwner()); }
From source file:org.apache.cayenne.modeler.dialog.datadomain.CacheSyncConfigController.java
/** * Creates and shows a new modal dialog window. *///from w w w . ja va2 s . c o m public void startup() { DataChannelDescriptor domain = (DataChannelDescriptor) eventController.getProject().getRootNode(); String factory = (String) domain.getProperties().get(DataRowStore.EVENT_BRIDGE_FACTORY_PROPERTY); view = new CacheSyncConfigView(); initView(); properties = new HashMap( ((DataChannelDescriptor) eventController.getProject().getRootNode()).getProperties()); // build cards, showing the one corresponding to DataDomain state prepareChildren(factory); view.pack(); view.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); view.setModal(true); makeCloseableOnEscape(); centerView(); view.setVisible(true); }