List of usage examples for javax.swing BoxLayout X_AXIS
int X_AXIS
To view the source code for javax.swing BoxLayout X_AXIS.
Click Source Link
From source file:op.care.dfn.PnlDFN.java
/** * This method is called from within the constructor to * initialize the form./*from w w w . ja 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() { jspDFN = new JScrollPane(); cpDFN = new CollapsiblePanes(); //======== this ======== setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); //======== jspDFN ======== { jspDFN.setBorder(new BevelBorder(BevelBorder.RAISED)); //======== cpDFN ======== { cpDFN.setLayout(new BoxLayout(cpDFN, BoxLayout.X_AXIS)); } jspDFN.setViewportView(cpDFN); } add(jspDFN); }
From source file:op.care.med.inventory.DlgCloseStock.java
/** * This method is called from within the constructor to * initialize the form./* ww 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. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new JPanel(); jScrollPane1 = new JScrollPane(); txtInfo = new JTextPane(); rbLeer = new JRadioButton(); rbStellen = new JRadioButton(); txtLetzte = new JTextField(); lblEinheiten = new JLabel(); rbAbgelaufen = new JRadioButton(); jSeparator1 = new JSeparator(); jLabel2 = new JLabel(); jLabel3 = new JLabel(); rbGefallen = new JRadioButton(); cmbBestID = new JComboBox(); panel1 = new JPanel(); btnClose = new JButton(); btnOk = new JButton(); //======== this ======== setResizable(false); setModalityType(Dialog.ModalityType.APPLICATION_MODAL); Container contentPane = getContentPane(); contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.PAGE_AXIS)); //======== jPanel1 ======== { jPanel1.setBorder(null); jPanel1.setLayout(new FormLayout("14dlu, $lcgap, 145dlu, $lcgap, 41dlu, $lcgap, 93dlu, $lcgap, 14dlu", "14dlu, $lgap, fill:70dlu:grow, 4*($lgap, fill:default), $lgap, $rgap, $lgap, fill:default, $lgap, $rgap, $lgap, default, $lgap, 14dlu")); //======== jScrollPane1 ======== { //---- txtInfo ---- txtInfo.setEditable(false); txtInfo.setFont(new Font("Arial", Font.PLAIN, 14)); jScrollPane1.setViewportView(txtInfo); } jPanel1.add(jScrollPane1, CC.xywh(3, 3, 5, 1)); //---- rbLeer ---- rbLeer.setSelected(true); rbLeer.setText("Die Packung ist nun leer"); rbLeer.setFont(new Font("Arial", Font.PLAIN, 14)); rbLeer.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rbLeerActionPerformed(e); } }); jPanel1.add(rbLeer, CC.xy(3, 5)); //---- rbStellen ---- rbStellen.setText("Beim Vorab Stellen haben Sie die letzten "); rbStellen.setFont(new Font("Arial", Font.PLAIN, 14)); rbStellen.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rbStellenActionPerformed(e); } }); jPanel1.add(rbStellen, CC.xywh(3, 7, 2, 1)); //---- txtLetzte ---- txtLetzte.setText("jTextField1"); txtLetzte.setFont(new Font("Arial", Font.PLAIN, 14)); txtLetzte.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { txtLetzteFocusLost(e); } }); jPanel1.add(txtLetzte, CC.xy(5, 7)); //---- lblEinheiten ---- lblEinheiten.setText("Einheiten verbraucht."); lblEinheiten.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(lblEinheiten, CC.xy(7, 7)); //---- rbAbgelaufen ---- rbAbgelaufen.setText( "Die Packung ist abgelaufen oder wird nicht mehr ben\u00f6tigt. Bereit zur Entsorgung."); rbAbgelaufen.setFont(new Font("Arial", Font.PLAIN, 14)); rbAbgelaufen.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rbAbgelaufenActionPerformed(e); } }); jPanel1.add(rbAbgelaufen, CC.xywh(3, 9, 5, 1)); jPanel1.add(jSeparator1, CC.xywh(3, 13, 5, 1)); //---- jLabel2 ---- jLabel2.setText("Als n\u00e4chstes Packung soll die Nummer"); jLabel2.setFont(new Font("Arial", Font.PLAIN, 14)); jLabel2.setHorizontalAlignment(SwingConstants.TRAILING); jPanel1.add(jLabel2, CC.xy(3, 15)); //---- jLabel3 ---- jLabel3.setText("angebrochen werden."); jLabel3.setFont(new Font("Arial", Font.PLAIN, 14)); jPanel1.add(jLabel3, CC.xy(7, 15)); //---- rbGefallen ---- rbGefallen.setText( "<html>Die Packung ist <font color=\"red\">runter gefallen</font> oder <font color=\"red\">verschwunden</font> und muss ausgebucht werden.</html>"); rbGefallen.setFont(new Font("Arial", Font.PLAIN, 14)); rbGefallen.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rbGefallenActionPerformed(e); } }); jPanel1.add(rbGefallen, CC.xywh(3, 11, 5, 1)); //---- 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); } }); jPanel1.add(cmbBestID, CC.xy(5, 15)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS)); //---- btnClose ---- btnClose.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnClose.setText(null); btnClose.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCloseActionPerformed(e); } }); panel1.add(btnClose); //---- 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); } jPanel1.add(panel1, CC.xy(7, 19, CC.RIGHT, CC.DEFAULT)); } contentPane.add(jPanel1); pack(); setLocationRelativeTo(getOwner()); //---- buttonGroup1 ---- ButtonGroup buttonGroup1 = new ButtonGroup(); buttonGroup1.add(rbLeer); buttonGroup1.add(rbStellen); buttonGroup1.add(rbAbgelaufen); buttonGroup1.add(rbGefallen); }
From source file:op.care.med.inventory.DlgNewStocks.java
/** * This method is called from within the constructor to * initialize the form.//from w w w . ja v a 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=" Erzeugter Quelltext ">//GEN-BEGIN:initComponents private void initComponents() { mainPane = new JPanel(); lblPZN = new JLabel(); panel2 = new JPanel(); txtMedSuche = new JXSearchField(); hSpacer1 = new JPanel(null); btnMed = new JButton(); lblProd = new JLabel(); cmbMProdukt = new JComboBox<>(); lblInventory = new JLabel(); lblResident = new JLabel(); txtBWSuche = new JTextField(); lblAmount = new JLabel(); lblPack = new JLabel(); cmbPackung = new JComboBox<>(); lblExpires = new JLabel(); txtExpires = new JTextField(); panel3 = new JPanel(); lblWeightControl = new JLabel(); txtWeightControl = new JTextField(); lblRemark = new JLabel(); txtBemerkung = new JTextField(); btnPrint = new JToggleButton(); panel1 = new JPanel(); btnClose = new JButton(); btnApply = new JButton(); //======== this ======== setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); setTitle("Medikamente einbuchen"); setMinimumSize(new Dimension(640, 300)); Container contentPane = getContentPane(); contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.PAGE_AXIS)); //======== mainPane ======== { mainPane.setLayout(new FormLayout( "14dlu, $lcgap, default, $lcgap, 39dlu:grow, $lcgap, default:grow, $lcgap, 14dlu", "14dlu, 2*($lgap, fill:17dlu), $lgap, fill:default, $lgap, 17dlu, 4*($lgap, fill:17dlu), 10dlu, fill:default, $lgap, 14dlu")); //---- lblPZN ---- lblPZN.setText("PZN oder Suchbegriff"); lblPZN.setFont(new Font("Arial", Font.PLAIN, 14)); mainPane.add(lblPZN, CC.xy(3, 3)); //======== panel2 ======== { panel2.setLayout(new BoxLayout(panel2, BoxLayout.LINE_AXIS)); //---- txtMedSuche ---- txtMedSuche.setFont(new Font("Arial", Font.PLAIN, 14)); txtMedSuche.addActionListener(e -> txtMedSucheActionPerformed(e)); panel2.add(txtMedSuche); panel2.add(hSpacer1); //---- btnMed ---- btnMed.setBackground(Color.white); btnMed.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnMed.setToolTipText("Medikamente bearbeiten"); btnMed.setBorder(null); btnMed.setSelectedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png"))); btnMed.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnMed.addActionListener(e -> btnMedActionPerformed(e)); panel2.add(btnMed); } mainPane.add(panel2, CC.xywh(5, 3, 4, 1)); //---- lblProd ---- lblProd.setText("Produkt"); lblProd.setFont(new Font("Arial", Font.PLAIN, 14)); mainPane.add(lblProd, CC.xy(3, 5)); //---- cmbMProdukt ---- cmbMProdukt.setModel(new DefaultComboBoxModel<>(new String[] { })); cmbMProdukt.setFont(new Font("Arial", Font.PLAIN, 14)); cmbMProdukt.addItemListener(e -> cmbMProduktItemStateChanged(e)); mainPane.add(cmbMProdukt, CC.xywh(5, 5, 4, 1)); //---- lblInventory ---- lblInventory.setText("vorhandene Vorr\u00e4te"); lblInventory.setFont(new Font("Arial", Font.PLAIN, 14)); mainPane.add(lblInventory, CC.xy(3, 13)); //---- lblResident ---- lblResident.setText("Zuordnung zu Bewohner"); lblResident.setFont(new Font("Arial", Font.PLAIN, 14)); mainPane.add(lblResident, CC.xy(3, 17)); //---- txtBWSuche ---- txtBWSuche.setFont(new Font("Arial", Font.PLAIN, 14)); txtBWSuche.addCaretListener(e -> txtBWSucheCaretUpdate(e)); mainPane.add(txtBWSuche, CC.xy(5, 17)); //---- lblAmount ---- lblAmount.setText("Buchungsmenge"); lblAmount.setFont(new Font("Arial", Font.PLAIN, 14)); mainPane.add(lblAmount, CC.xy(3, 11)); //---- lblPack ---- lblPack.setText("Packung"); lblPack.setFont(new Font("Arial", Font.PLAIN, 14)); mainPane.add(lblPack, CC.xy(3, 7)); //---- cmbPackung ---- cmbPackung.setModel(new DefaultComboBoxModel<>(new String[] { })); cmbPackung.setFont(new Font("Arial", Font.PLAIN, 14)); cmbPackung.addItemListener(e -> cmbPackungItemStateChanged(e)); mainPane.add(cmbPackung, CC.xywh(5, 7, 4, 1)); //---- lblExpires ---- lblExpires.setText("expires"); lblExpires.setFont(new Font("Arial", Font.PLAIN, 14)); mainPane.add(lblExpires, CC.xy(3, 9)); //---- txtExpires ---- txtExpires.setFont(new Font("Arial", Font.PLAIN, 14)); txtExpires.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtExpiresFocusGained(e); } @Override public void focusLost(FocusEvent e) { txtExpiresFocusLost(e); } }); txtExpires.addActionListener(e -> txtExpiresActionPerformed(e)); mainPane.add(txtExpires, CC.xywh(5, 9, 3, 1, CC.DEFAULT, CC.FILL)); //======== panel3 ======== { panel3.setLayout(new FormLayout("pref, $lcgap, default:grow", "fill:17dlu")); //---- lblWeightControl ---- lblWeightControl.setText("weightcontrol"); lblWeightControl.setFont(new Font("Arial", Font.PLAIN, 14)); lblWeightControl.setBackground(Color.pink); panel3.add(lblWeightControl, CC.xy(1, 1)); //---- txtWeightControl ---- txtWeightControl.setFont(new Font("Arial", Font.PLAIN, 14)); txtWeightControl.setBackground(Color.pink); txtWeightControl.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtWeightControlFocusGained(e); } }); txtWeightControl.addCaretListener(e -> txtWeightControlCaretUpdate(e)); panel3.add(txtWeightControl, CC.xy(3, 1, CC.DEFAULT, CC.FILL)); } mainPane.add(panel3, CC.xy(7, 11)); //---- lblRemark ---- lblRemark.setText("Bemerkung"); lblRemark.setFont(new Font("Arial", Font.PLAIN, 14)); mainPane.add(lblRemark, CC.xy(3, 15)); //---- txtBemerkung ---- txtBemerkung.setFont(new Font("Arial", Font.PLAIN, 14)); txtBemerkung.addCaretListener(e -> txtBemerkungCaretUpdate(e)); mainPane.add(txtBemerkung, CC.xywh(5, 15, 4, 1)); //---- btnPrint ---- btnPrint.setSelectedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/printer-on.png"))); btnPrint.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/printer-off.png"))); btnPrint.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnPrint.setEnabled(false); btnPrint.addItemListener(e -> btnPrintItemStateChanged(e)); mainPane.add(btnPrint, CC.xy(3, 19, CC.RIGHT, CC.DEFAULT)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_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); //---- btnApply ---- btnApply.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnApply.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnApply.addActionListener(e -> btnApplyActionPerformed(e)); panel1.add(btnApply); } mainPane.add(panel1, CC.xywh(7, 19, 2, 1, CC.RIGHT, CC.DEFAULT)); } contentPane.add(mainPane); pack(); setLocationRelativeTo(getOwner()); }
From source file:op.care.med.inventory.DlgTX.java
/** * This method is called from within the constructor to * initialize the form./* www. ja v a 2s . com*/ * 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() { lblText = new JLabel(); txtText = new JTextField(); txtValue = new JTextField(); lblValue = new JLabel(); lblUnit = new JLabel(); lblWeightControl = new JLabel(); txtWeightControlled = new JTextField(); lblUnit2 = new JLabel(); panel1 = new JPanel(); btnCancel = new JButton(); btnBuchung = new JButton(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout( new FormLayout("default, $lcgap, default, $ugap, 141dlu:grow, $rgap, default, $lcgap, default", "2*(default, $lgap), fill:default, $lgap, default, $lgap, fill:default")); //---- lblText ---- lblText.setText("Buchungstext"); lblText.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lblText, CC.xy(3, 3, CC.DEFAULT, CC.TOP)); //---- txtText ---- txtText.setColumns(100); txtText.addActionListener(e -> txtTextActionPerformed(e)); contentPane.add(txtText, CC.xywh(5, 3, 3, 1)); //---- txtValue ---- txtValue.setHorizontalAlignment(SwingConstants.RIGHT); txtValue.setText("jTextField1"); txtValue.setFont(new Font("Arial", Font.PLAIN, 14)); txtValue.addCaretListener(e -> txtMengeCaretUpdate(e)); txtValue.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtMengeFocusGained(e); } }); txtValue.addActionListener(e -> txtValueActionPerformed(e)); contentPane.add(txtValue, CC.xy(5, 5)); //---- lblValue ---- lblValue.setText("Menge"); lblValue.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lblValue, CC.xy(3, 5)); //---- lblUnit ---- lblUnit.setHorizontalAlignment(SwingConstants.TRAILING); lblUnit.setText("jLabel4"); lblUnit.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lblUnit, CC.xy(7, 5)); //---- lblWeightControl ---- lblWeightControl.setText("Menge"); lblWeightControl.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lblWeightControl, CC.xy(3, 7)); //---- txtWeightControlled ---- txtWeightControlled.setHorizontalAlignment(SwingConstants.RIGHT); txtWeightControlled.setText("jTextField1"); txtWeightControlled.setFont(new Font("Arial", Font.PLAIN, 14)); txtWeightControlled.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtWeightControlledFocusGained(e); } }); txtWeightControlled.addCaretListener(e -> txtWeightControlledCaretUpdate(e)); contentPane.add(txtWeightControlled, CC.xy(5, 7)); //---- lblUnit2 ---- lblUnit2.setHorizontalAlignment(SwingConstants.TRAILING); lblUnit2.setText("g"); lblUnit2.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lblUnit2, CC.xy(7, 7, CC.LEFT, CC.DEFAULT)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS)); //---- btnCancel ---- btnCancel.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/cancel.png"))); btnCancel.addActionListener(e -> btnCancelActionPerformed(e)); panel1.add(btnCancel); //---- btnBuchung ---- btnBuchung.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/apply.png"))); btnBuchung.addActionListener(e -> btnBuchungActionPerformed(e)); panel1.add(btnBuchung); } contentPane.add(panel1, CC.xywh(5, 9, 3, 1, CC.RIGHT, CC.DEFAULT)); setSize(600, 165); setLocationRelativeTo(getOwner()); }
From source file:op.care.med.inventory.PnlInventory.java
/** * This method is called from within the constructor to * initialize the form./*from ww w.jav a 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() { jspInventory = new JScrollPane(); cpsInventory = new CollapsiblePanes(); //======== this ======== setLayout(new BoxLayout(this, BoxLayout.X_AXIS)); //======== jspInventory ======== { //======== cpsInventory ======== { cpsInventory.setLayout(new BoxLayout(cpsInventory, BoxLayout.X_AXIS)); } jspInventory.setViewportView(cpsInventory); } add(jspInventory); }
From source file:op.care.med.structure.DlgProduct.java
/** * This method is called from within the constructor to * initialize the form./* www . 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=" Erzeugter Quelltext ">//GEN-BEGIN:initComponents private void initComponents() { lblProductName = new JLabel(); txtName = new JTextField(); cmbAcme = new JComboBox<>(); lblAcme = new JLabel(); btnAdd = new JButton(); lblSideEffects = new JLabel(); scrollPane1 = new JScrollPane(); txtSideEffects = new JTextArea(); panel1 = new JPanel(); btnCancel = new JButton(); btnOK = new JButton(); //======== this ======== setModal(true); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("2*(default, $lcgap), default:grow, 2*($lcgap, default)", "default, 2*($lgap, fill:default), $lgap, fill:default:grow, $lgap, fill:default, $lgap, default")); //---- lblProductName ---- lblProductName.setText("Produktname"); lblProductName.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lblProductName, CC.xy(3, 3)); //---- txtName ---- txtName.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(txtName, CC.xywh(5, 3, 3, 1)); //---- cmbAcme ---- cmbAcme.setModel( new DefaultComboBoxModel<>(new String[] { "Eintrag 1", "Eintrag 2", "Eintrag 3", "Eintrag 4" })); cmbAcme.setFont(new Font("Arial", Font.PLAIN, 14)); cmbAcme.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { cmbAcmeItemStateChanged(e); } }); contentPane.add(cmbAcme, CC.xy(5, 5)); //---- lblAcme ---- lblAcme.setText("Hersteller"); lblAcme.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lblAcme, CC.xy(3, 5)); //---- btnAdd ---- btnAdd.setText(null); btnAdd.setIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add.png"))); btnAdd.setContentAreaFilled(false); btnAdd.setBorder(null); btnAdd.setSelectedIcon(new ImageIcon(getClass().getResource("/artwork/22x22/bw/add-pressed.png"))); btnAdd.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); btnAdd.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnAddActionPerformed(e); } }); contentPane.add(btnAdd, CC.xy(7, 5, CC.LEFT, CC.DEFAULT)); //---- lblSideEffects ---- lblSideEffects.setText("Hersteller"); lblSideEffects.setFont(new Font("Arial", Font.PLAIN, 14)); contentPane.add(lblSideEffects, CC.xy(3, 7, CC.DEFAULT, CC.TOP)); //======== scrollPane1 ======== { //---- txtSideEffects ---- txtSideEffects.setFont(new Font("Arial", Font.PLAIN, 14)); scrollPane1.setViewportView(txtSideEffects); } contentPane.add(scrollPane1, CC.xywh(5, 7, 3, 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(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCancelActionPerformed(e); } }); panel1.add(btnCancel); //---- btnOK ---- btnOK.setIcon(new ImageIcon(getClass().getResource("/artwork/16x16/apply.png"))); btnOK.setText(null); btnOK.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnOKActionPerformed(e); } }); panel1.add(btnOK); } contentPane.add(panel1, CC.xywh(5, 9, 3, 1, CC.RIGHT, CC.DEFAULT)); setSize(585, 285); setLocationRelativeTo(null); }
From source file:op.care.med.structure.DlgTradeForm.java
/** * This method is called from within the constructor to * initialize the form.//from w ww . jav a 2s. 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() { 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.med.structure.PnlMed.java
/** * This method is called from within the constructor to * initialize the form.//from w w w .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() { jScrollPane1 = new JScrollPane(); treeMed = new JTree(); panel1 = new JPanel(); label1 = new JLabel(); //======== this ======== setLayout(new CardLayout()); //======== jScrollPane1 ======== { //---- treeMed ---- treeMed.setFont(new Font("Arial", Font.PLAIN, 14)); treeMed.addMouseListener(new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { treeMedMousePressed(e); } }); jScrollPane1.setViewportView(treeMed); } add(jScrollPane1, "card1"); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS)); //---- label1 ---- label1.setText("text"); label1.setIcon(null); panel1.add(label1); } add(panel1, "card2"); }
From source file:op.care.nursingprocess.DlgNursingProcess.java
/** * This method is called from within the constructor to * initialize the form./* ww w . 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() { 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.nursingprocess.PnlEval.java
/** * This method is called from within the constructor to * initialize the form./*from w ww.ja v a 2 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="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { pnlReason = new JPanel(); jScrollPane1 = new JScrollPane(); txtBemerkung = new JTextArea(); panel2 = new JPanel(); lblNextEval = new JLabel(); jdcNextEval = new JDateChooser(); panel1 = new JPanel(); btnOK = new JButton(); //======== this ======== setLayout(new FormLayout("default, default:grow, $lcgap, default", "default, $lgap, fill:default:grow, 3*($lgap, default)")); //======== pnlReason ======== { pnlReason.setBorder(new TitledBorder(null, "text", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new Font("Arial", Font.PLAIN, 14))); pnlReason.setFont(new Font("Arial", Font.PLAIN, 14)); pnlReason.setLayout(new BoxLayout(pnlReason, BoxLayout.X_AXIS)); //======== jScrollPane1 ======== { //---- txtBemerkung ---- txtBemerkung.setColumns(20); txtBemerkung.setRows(5); txtBemerkung.setFont(new Font("Arial", Font.PLAIN, 14)); jScrollPane1.setViewportView(txtBemerkung); } pnlReason.add(jScrollPane1); } add(pnlReason, CC.xy(2, 3, CC.FILL, CC.FILL)); //======== panel2 ======== { panel2.setLayout(new BoxLayout(panel2, BoxLayout.X_AXIS)); //---- lblNextEval ---- lblNextEval.setText("text "); lblNextEval.setFont(new Font("Arial", Font.PLAIN, 14)); panel2.add(lblNextEval); //---- jdcNextEval ---- jdcNextEval.setFont(new Font("Arial", Font.PLAIN, 14)); panel2.add(jdcNextEval); } add(panel2, CC.xy(2, 5, CC.FILL, CC.DEFAULT)); //======== panel1 ======== { panel1.setLayout(new BoxLayout(panel1, BoxLayout.X_AXIS)); //---- 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); } add(panel1, CC.xy(2, 7, CC.RIGHT, CC.DEFAULT)); }