minor utility code cleanup
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 10 May 2016 12:36:37 +0000 (15:36 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 10 May 2016 12:36:58 +0000 (15:36 +0300)
platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java

index b1f029909a740bc7e92837224364060e175ca299..7eff39958f33f4339fd613963a15cccaafd15f83 100644 (file)
@@ -113,11 +113,6 @@ public class SwingHelper {
     return newGenericBoxPanel(false, childAlignmentY, children);
   }
 
-  @NotNull
-  public static JPanel newHorizontalPanel(float childAlignmentY, @NotNull Collection<Component> children) {
-    return newHorizontalPanel(childAlignmentY, children.toArray(new Component[children.size()]));
-  }
-
   private static JPanel newGenericBoxPanel(boolean verticalOrientation,
                                            float childAlignment,
                                            Component... children) {
@@ -525,7 +520,7 @@ public class SwingHelper {
   }
 
   private static void getAllElements(Element root, List<Element> list, List<String> toCheck) {
-    if (toCheck.contains(root.getName().toLowerCase())) {
+    if (toCheck.contains(root.getName().toLowerCase(Locale.US))) {
       list.add(root);
     }
     for (int i = 0; i < root.getElementCount(); i++) {
@@ -622,12 +617,12 @@ public class SwingHelper {
   }
 
   @NotNull
-  public static JEditorPane createHtmlViewer(boolean carryTextOver,
+  public static JEditorPane createHtmlViewer(boolean lineWrap,
                                              @Nullable Font font,
                                              @Nullable Color background,
                                              @Nullable Color foreground) {
     final JEditorPane textPane;
-    if (carryTextOver) {
+    if (lineWrap) {
       textPane = new JEditorPane() {
         @Override
         public Dimension getPreferredSize() {