@author amilcar.pereira
| 13 | * @author amilcar.pereira |
| 14 | */ |
| 15 | public class MessageDialog extends javax.swing.JDialog { |
| 16 | String value=null; |
| 17 | /** |
| 18 | * Creates new form InputDialog |
| 19 | */ |
| 20 | public MessageDialog(java.awt.Frame parent) { |
| 21 | super(parent, true); |
| 22 | initComponents(); |
| 23 | |
| 24 | setLocationRelativeTo(parent); |
| 25 | |
| 26 | |
| 27 | //SET SHORTCUTS ON MAC |
| 28 | boolean isMacOs = (System.getProperty("os.name").toLowerCase().contains("mac")); |
| 29 | if (isMacOs) { |
| 30 | DialogHelper.setUpMacShortcuts(txtText.getInputMap()); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | public void setText(String text) { |
| 35 | txtText.setText(text); |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * This method is called from within the constructor to initialize the form. |
| 40 | * WARNING: Do NOT modify this code. The content of this method is always |
| 41 | * regenerated by the Form Editor. |
| 42 | */ |
| 43 | @SuppressWarnings("unchecked") |
| 44 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents |
| 45 | private void initComponents() { |
| 46 | |
| 47 | jPanel1 = new javax.swing.JPanel(); |
| 48 | jLabel1 = new javax.swing.JLabel(); |
| 49 | jScrollPane1 = new javax.swing.JScrollPane(); |
| 50 | txtText = new javax.swing.JTextArea(); |
| 51 | btnOK = new javax.swing.JButton(); |
| 52 | |
| 53 | setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); |
| 54 | setTitle("Information"); |
| 55 | setBackground(new java.awt.Color(255, 255, 255)); |
| 56 | setResizable(false); |
| 57 | |
| 58 | jPanel1.setBackground(new java.awt.Color(255, 255, 255)); |
| 59 | |
| 60 | jLabel1.setFont(new java.awt.Font("Arial Black", 1, 48)); // NOI18N |
| 61 | jLabel1.setForeground(new java.awt.Color(0, 50, 63)); |
| 62 | jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); |
| 63 | jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/info.jpg"))); // NOI18N |
| 64 | |
| 65 | txtText.setEditable(false); |
| 66 | txtText.setColumns(20); |
| 67 | txtText.setLineWrap(true); |
| 68 | txtText.setRows(5); |
| 69 | txtText.setWrapStyleWord(true); |
| 70 | txtText.setBorder(null); |
| 71 | jScrollPane1.setViewportView(txtText); |
| 72 |
nothing calls this directly
no outgoing calls
no test coverage detected