Browse Source

Fixes issue 3285: s/License/Licences

Change-Id: I288d2816fd176fdc439b2f699d2fe19e53fb0c15
Reviewed-on: http://gerrit.dmdirc.com/573
Automatic-Compile: Gregory Holmes <greboid@dmdirc.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.3
Gregory Holmes 14 years ago
parent
commit
270fed559f

+ 1
- 1
src/com/dmdirc/addons/ui_swing/dialogs/about/AboutDialog.java View File

@@ -112,7 +112,7 @@ public final class AboutDialog extends StandardDialog implements
112 112
 
113 113
         tabbedPane.add("About", new AboutPanel());
114 114
         tabbedPane.add("Credits", cp);
115
-        tabbedPane.add("License", new LicensePanel());
115
+        tabbedPane.add("Licences", new LicencesPanel());
116 116
         tabbedPane.add("Information", new InfoPanel());
117 117
         tabbedPane.addChangeListener(this);
118 118
 

src/com/dmdirc/addons/ui_swing/dialogs/about/License.java → src/com/dmdirc/addons/ui_swing/dialogs/about/Licence.java View File

@@ -24,22 +24,22 @@
24 24
 package com.dmdirc.addons.ui_swing.dialogs.about;
25 25
 
26 26
 /**
27
- * Simple class to describe a license.
27
+ * Simple class to describe a licence.
28 28
  */
29
-public class License {
29
+public class Licence {
30 30
 
31 31
     private String name;
32 32
     private String component;
33 33
     private String body;
34 34
 
35 35
     /**
36
-     * Instantiates a new license with the specified attributes.
36
+     * Instantiates a new licence with the specified attributes.
37 37
      *
38
-     * @param name Name of the license
39
-     * @param component Component the license applies to
40
-     * @param body Body of the license
38
+     * @param name Name of the licence
39
+     * @param component Component the licence applies to
40
+     * @param body Body of the licence
41 41
      */
42
-    public License(final String name, final String component, final String body) {
42
+    public Licence(final String name, final String component, final String body) {
43 43
         this.name = name;
44 44
         this.component = component;
45 45
         this.body = body;

src/com/dmdirc/addons/ui_swing/dialogs/about/LicenseLoader.java → src/com/dmdirc/addons/ui_swing/dialogs/about/LicenceLoader.java View File

@@ -40,19 +40,19 @@ import java.util.Map.Entry;
40 40
 import java.util.TreeMap;
41 41
 
42 42
 /**
43
- * Background loader of licenses into a list.
43
+ * Background loader of licences into a list.
44 44
  */
45
-public class LicenseLoader extends LoggingSwingWorker<Void, Void> {
45
+public class LicenceLoader extends LoggingSwingWorker<Void, Void> {
46 46
 
47
-    /** Model to load licenses into. */
48
-    private GenericListModel<License> model;
47
+    /** Model to load licences into. */
48
+    private GenericListModel<Licence> model;
49 49
 
50 50
     /**
51
-     * Instantiates a new license loader.
51
+     * Instantiates a new licence loader.
52 52
      *
53
-     * @param model Model to load licenses into
53
+     * @param model Model to load licences into
54 54
      */
55
-    public LicenseLoader(final GenericListModel<License> model) {
55
+    public LicenceLoader(final GenericListModel<Licence> model) {
56 56
         this.model = model;
57 57
     }
58 58
 
@@ -65,29 +65,29 @@ public class LicenseLoader extends LoggingSwingWorker<Void, Void> {
65 65
     protected Void doInBackground() throws Exception {
66 66
         final ResourceManager rm = ResourceManager.getResourceManager();
67 67
         if (rm == null) {
68
-            Logger.userError(ErrorLevel.LOW, "Unable to load licenses, " +
68
+            Logger.userError(ErrorLevel.LOW, "Unable to load licences, " +
69 69
                     "no resource manager");
70 70
         } else {
71
-            final Map<String, InputStream> licenses =
71
+            final Map<String, InputStream> licences =
72 72
                     new TreeMap<String, InputStream>(String.CASE_INSENSITIVE_ORDER);
73
-            licenses.putAll(rm.getResourcesStartingWithAsInputStreams(
74
-                    "com/dmdirc/licenses/"));
73
+            licences.putAll(rm.getResourcesStartingWithAsInputStreams(
74
+                    "com/dmdirc/licences/"));
75 75
             for (PluginInfo pi : PluginManager.getPluginManager().getPluginInfos()) {
76
-                licenses.putAll(pi.getLicenseStreams());
76
+                licences.putAll(pi.getLicenceStreams());
77 77
             }
78
-            for (Entry<String, InputStream> entry : licenses.entrySet()) {
79
-                final String licenseString = entry.getKey().substring(entry.
78
+            for (Entry<String, InputStream> entry : licences.entrySet()) {
79
+                final String licenceString = entry.getKey().substring(entry.
80 80
                         getKey().
81 81
                         lastIndexOf('/') + 1);
82
-                if (licenseString.length() > 1) {
83
-                    final String licenseStringParts[] = licenseString.split(
82
+                if (licenceString.length() > 1) {
83
+                    final String licenceStringParts[] = licenceString.split(
84 84
                             " - ");
85
-                    final License license = new License(licenseStringParts[1],
86
-                            licenseStringParts[0], "<html><h1>" +
87
-                            licenseStringParts[1] + "</h1><p>" + readInputStream(
85
+                    final Licence licence = new Licence(licenceStringParts[1],
86
+                            licenceStringParts[0], "<html><h1>" +
87
+                            licenceStringParts[1] + "</h1><p>" + readInputStream(
88 88
                             entry.getValue()).replaceAll("\n", "<br>") +
89 89
                             "</p></html>");
90
-                    model.add(license);
90
+                    model.add(licence);
91 91
                 }
92 92
             }
93 93
         }

src/com/dmdirc/addons/ui_swing/dialogs/about/LicensePanel.java → src/com/dmdirc/addons/ui_swing/dialogs/about/LicencesPanel.java View File

@@ -33,7 +33,6 @@ import javax.swing.JList;
33 33
 import javax.swing.JPanel;
34 34
 import javax.swing.JScrollPane;
35 35
 import javax.swing.ListSelectionModel;
36
-import javax.swing.SwingUtilities;
37 36
 import javax.swing.UIManager;
38 37
 import javax.swing.event.ListSelectionEvent;
39 38
 import javax.swing.event.ListSelectionListener;
@@ -43,9 +42,9 @@ import javax.swing.text.html.HTMLEditorKit;
43 42
 import net.miginfocom.swing.MigLayout;
44 43
 
45 44
 /**
46
- * License panel.
45
+ * Licences panel.
47 46
  */
48
-public final class LicensePanel extends JPanel implements ListSelectionListener {
47
+public final class LicencesPanel extends JPanel implements ListSelectionListener {
49 48
 
50 49
     /**
51 50
      * A version number for this class. It should be changed whenever the class
@@ -53,19 +52,19 @@ public final class LicensePanel extends JPanel implements ListSelectionListener
53 52
      * objects being unserialized with the new class).
54 53
      */
55 54
     private static final long serialVersionUID = 3;
56
-    /** License scroll pane. */
55
+    /** Licence scroll pane. */
57 56
     private JScrollPane scrollPane;
58
-    /** License list model */
59
-    private GenericListModel<License> listModel;
60
-    /** License textpane. */
61
-    private JEditorPane license;
62
-    /** License list. */
57
+    /** Licence list model */
58
+    private GenericListModel<Licence> listModel;
59
+    /** Licence textpane. */
60
+    private JEditorPane licence;
61
+    /** Licence list. */
63 62
     private JList list;
64 63
     /** Selected index. */
65 64
     private int selectedIndex;
66 65
 
67
-    /** Creates a new instance of LicensePanel. */
68
-    public LicensePanel() {
66
+    /** Creates a new instance of LicencesPanel. */
67
+    public LicencesPanel() {
69 68
         super();
70 69
 
71 70
         initComponents();
@@ -94,19 +93,19 @@ public final class LicensePanel extends JPanel implements ListSelectionListener
94 93
     /** Initialises the components. */
95 94
     private void initComponents() {
96 95
         setOpaque(UIUtilities.getTabbedPaneOpaque());
97
-        listModel = new GenericListModel<License>();
96
+        listModel = new GenericListModel<Licence>();
98 97
         list = new JList(listModel);
99 98
         list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
100 99
         new ListScroller(list);
101
-        new LicenseLoader(listModel).execute();
102
-        license = new JEditorPane();
103
-        license.setEditorKit(new HTMLEditorKit());
100
+        new LicenceLoader(listModel).execute();
101
+        licence = new JEditorPane();
102
+        licence.setEditorKit(new HTMLEditorKit());
104 103
         final Font font = UIManager.getFont("Label.font");
105
-        ((HTMLDocument) license.getDocument()).getStyleSheet().addRule("body " +
104
+        ((HTMLDocument) licence.getDocument()).getStyleSheet().addRule("body " +
106 105
                 "{ font-family: " + font.getFamily() + "; " + "font-size: " +
107 106
                 font.getSize() + "pt; }");
108
-        license.setEditable(false);
109
-        scrollPane = new JScrollPane(license);
107
+        licence.setEditable(false);
108
+        scrollPane = new JScrollPane(licence);
110 109
     }
111 110
 
112 111
     /** {@inheritDoc} */
@@ -116,7 +115,7 @@ public final class LicensePanel extends JPanel implements ListSelectionListener
116 115
             if (list.getSelectedIndex() == -1) {
117 116
                 list.setSelectedIndex(selectedIndex);
118 117
             } else {
119
-                license.setText(listModel.get(list.getSelectedIndex()).getBody());
118
+                licence.setText(listModel.get(list.getSelectedIndex()).getBody());
120 119
                 UIUtilities.resetScrollPane(scrollPane);
121 120
             }
122 121
             selectedIndex = list.getSelectedIndex();

Loading…
Cancel
Save