Browse Source

Added dialog to display fatal error information

git-svn-id: http://svn.dmdirc.com/trunk@195 00569f92-eb28-0410-84fd-f71c24880f
tags/0.1
Chris Smith 17 years ago
parent
commit
2867da135e

+ 93
- 0
src/uk/org/ownage/dmdirc/ui/FatalErrorDialog.form View File

@@ -0,0 +1,93 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+
3
+<Form version="1.3" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
4
+  <Properties>
5
+    <Property name="defaultCloseOperation" type="int" value="2"/>
6
+  </Properties>
7
+  <SyntheticProperties>
8
+    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
9
+  </SyntheticProperties>
10
+  <AuxValues>
11
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
12
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
13
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
14
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
15
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
16
+  </AuxValues>
17
+
18
+  <Layout>
19
+    <DimensionLayout dim="0">
20
+      <Group type="103" groupAlignment="0" attributes="0">
21
+          <Group type="102" attributes="0">
22
+              <EmptySpace max="-2" attributes="0"/>
23
+              <Group type="103" groupAlignment="0" attributes="0">
24
+                  <Component id="jScrollPane1" alignment="0" pref="443" max="32767" attributes="0"/>
25
+                  <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
26
+                  <Component id="jButton1" alignment="1" min="-2" pref="100" max="-2" attributes="0"/>
27
+                  <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
28
+                  <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
29
+              </Group>
30
+              <EmptySpace max="-2" attributes="0"/>
31
+          </Group>
32
+      </Group>
33
+    </DimensionLayout>
34
+    <DimensionLayout dim="1">
35
+      <Group type="103" groupAlignment="0" attributes="0">
36
+          <Group type="102" alignment="0" attributes="0">
37
+              <EmptySpace max="-2" attributes="0"/>
38
+              <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
39
+              <EmptySpace min="-2" pref="23" max="-2" attributes="0"/>
40
+              <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
41
+              <EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
42
+              <Component id="jLabel3" min="-2" max="-2" attributes="0"/>
43
+              <EmptySpace max="-2" attributes="0"/>
44
+              <Component id="jScrollPane1" min="-2" pref="246" max="-2" attributes="0"/>
45
+              <EmptySpace pref="9" max="32767" attributes="0"/>
46
+              <Component id="jButton1" min="-2" max="-2" attributes="0"/>
47
+              <EmptySpace max="-2" attributes="0"/>
48
+          </Group>
49
+      </Group>
50
+    </DimensionLayout>
51
+  </Layout>
52
+  <SubComponents>
53
+    <Component class="javax.swing.JLabel" name="jLabel1">
54
+      <Properties>
55
+        <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
56
+          <Font name="Dialog" size="18" style="1"/>
57
+        </Property>
58
+        <Property name="text" type="java.lang.String" value="We&apos;re sorry..."/>
59
+      </Properties>
60
+    </Component>
61
+    <Component class="javax.swing.JLabel" name="jLabel2">
62
+      <Properties>
63
+        <Property name="text" type="java.lang.String" value="DMDirc has encountered a fatal error and cannot continue."/>
64
+      </Properties>
65
+    </Component>
66
+    <Component class="javax.swing.JLabel" name="jLabel3">
67
+      <Properties>
68
+        <Property name="text" type="java.lang.String" value="Error details:"/>
69
+      </Properties>
70
+    </Component>
71
+    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
72
+      <AuxValues>
73
+        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
74
+      </AuxValues>
75
+
76
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
77
+      <SubComponents>
78
+        <Component class="javax.swing.JTextArea" name="jTextArea1">
79
+          <Properties>
80
+            <Property name="columns" type="int" value="20"/>
81
+            <Property name="editable" type="boolean" value="false"/>
82
+            <Property name="rows" type="int" value="5"/>
83
+          </Properties>
84
+        </Component>
85
+      </SubComponents>
86
+    </Container>
87
+    <Component class="javax.swing.JButton" name="jButton1">
88
+      <Properties>
89
+        <Property name="text" type="java.lang.String" value="OK"/>
90
+      </Properties>
91
+    </Component>
92
+  </SubComponents>
93
+</Form>

+ 91
- 0
src/uk/org/ownage/dmdirc/ui/FatalErrorDialog.java View File

@@ -0,0 +1,91 @@
1
+/*
2
+ * FatalErrorDialog.java
3
+ *
4
+ * Created on 01 March 2007, 03:50
5
+ */
6
+
7
+package uk.org.ownage.dmdirc.ui;
8
+
9
+/**
10
+ *
11
+ * @author  chris
12
+ */
13
+public class FatalErrorDialog extends javax.swing.JDialog {
14
+    
15
+    /** Creates new form FatalErrorDialog */
16
+    public FatalErrorDialog(java.awt.Frame parent, boolean modal) {
17
+        super(parent, modal);
18
+        initComponents();
19
+    }
20
+    
21
+    /** This method is called from within the constructor to
22
+     * initialize the form.
23
+     * WARNING: Do NOT modify this code. The content of this method is
24
+     * always regenerated by the Form Editor.
25
+     */
26
+    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
27
+    private void initComponents() {
28
+        jLabel1 = new javax.swing.JLabel();
29
+        jLabel2 = new javax.swing.JLabel();
30
+        jLabel3 = new javax.swing.JLabel();
31
+        jScrollPane1 = new javax.swing.JScrollPane();
32
+        jTextArea1 = new javax.swing.JTextArea();
33
+        jButton1 = new javax.swing.JButton();
34
+
35
+        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
36
+        jLabel1.setFont(new java.awt.Font("Dialog", 1, 18));
37
+        jLabel1.setText("We're sorry...");
38
+
39
+        jLabel2.setText("DMDirc has encountered a fatal error and cannot continue.");
40
+
41
+        jLabel3.setText("Error details:");
42
+
43
+        jTextArea1.setColumns(20);
44
+        jTextArea1.setEditable(false);
45
+        jTextArea1.setRows(5);
46
+        jScrollPane1.setViewportView(jTextArea1);
47
+
48
+        jButton1.setText("OK");
49
+
50
+        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
51
+        getContentPane().setLayout(layout);
52
+        layout.setHorizontalGroup(
53
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
54
+            .add(layout.createSequentialGroup()
55
+                .addContainerGap()
56
+                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
57
+                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 443, Short.MAX_VALUE)
58
+                    .add(jLabel1)
59
+                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 100, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
60
+                    .add(jLabel3)
61
+                    .add(jLabel2))
62
+                .addContainerGap())
63
+        );
64
+        layout.setVerticalGroup(
65
+            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
66
+            .add(layout.createSequentialGroup()
67
+                .addContainerGap()
68
+                .add(jLabel1)
69
+                .add(23, 23, 23)
70
+                .add(jLabel2)
71
+                .add(21, 21, 21)
72
+                .add(jLabel3)
73
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
74
+                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 246, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
75
+                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 9, Short.MAX_VALUE)
76
+                .add(jButton1)
77
+                .addContainerGap())
78
+        );
79
+        pack();
80
+    }// </editor-fold>//GEN-END:initComponents
81
+        
82
+    // Variables declaration - do not modify//GEN-BEGIN:variables
83
+    private javax.swing.JButton jButton1;
84
+    private javax.swing.JLabel jLabel1;
85
+    private javax.swing.JLabel jLabel2;
86
+    private javax.swing.JLabel jLabel3;
87
+    private javax.swing.JScrollPane jScrollPane1;
88
+    private javax.swing.JTextArea jTextArea1;
89
+    // End of variables declaration//GEN-END:variables
90
+    
91
+}

Loading…
Cancel
Save