Index: ChartLegendPanelBars.java
===================================================================
--- ChartLegendPanelBars.java	(revision 570)
+++ ChartLegendPanelBars.java	(revision 571)
@@ -70,7 +70,7 @@
     private JPanel centerPanel = null; // @jve:decl-index=0:visual-constraint="10,10"
     private JScrollPane jScrollPane = null;
     private JList jFieldList = null;
-    private Random rand = new Random(System.currentTimeMillis());
+    private final Random rand = new Random(System.currentTimeMillis());
     private JPanel buttons = null;
     private JButton addButton = null;
     private JButton removeButton = null;
@@ -300,12 +300,9 @@
             bSize.setText(PluginServices.getText(this, "size"));
             bSize.setPreferredSize(new Dimension(100, 30));
             bSize.setMaximumSize(new Dimension(100, 30));
-            bSize.addActionListener(new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    PluginServices.getMDIManager().addCentredWindow(
-                            new SizePanel(layer, (IChartLegend) getLegend()));
-                }
-
+            bSize.addActionListener((ActionEvent e) -> {
+                PluginServices.getMDIManager().addCentredWindow(
+                        new SizePanel(layer, (IChartLegend) getLegend()));
             });
         }
         return bSize;
@@ -346,23 +343,15 @@
             addButton = new JButton();
             addButton.setText(">");
             addButton.setPreferredSize(new Dimension(50, 40));
-            addButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(java.awt.event.ActionEvent e) {
-                    Object[] fields = getJFieldList().getSelectedValues();
-                    Color[] colorScheme = colorCombo.getSelectedColors();
-
-                    Color[] colors = new Color[colorScheme.length];
-                    for (int i = 0; i < colorScheme.length; i++) {
-                        colors[i] = colorScheme[i];
-                    }
-                    for (int i = 0; i < fields.length; i++) {
-                        getFieldsTable().addTableRecord(
-                                colorScheme[rand.nextInt(colorScheme.length)],
-                                (String) fields[i], (String) fields[i]);
-                        ((DefaultListModel) getJFieldList().getModel())
-                                .removeElement(fields[i]);
-                    }
-                    actualizePreviewSymbol();
+            addButton.addActionListener((java.awt.event.ActionEvent e) -> {
+                Object[] fields = getJFieldList().getSelectedValues();
+                Color[] colorScheme = colorCombo.getSelectedColors();
+                
+                Color[] colors = new Color[colorScheme.length];
+                System.arraycopy(colorScheme, 0, colors, 0, colorScheme.length);
+                for (Object field : fields) {
+                    getFieldsTable().addTableRecord(colorScheme[rand.nextInt(colorScheme.length)], (String) field, (String) field);
+                    ((DefaultListModel) getJFieldList().getModel()).removeElement(field);
                 }
             });
         }
@@ -403,21 +392,17 @@
             removeButton = new JButton();
             removeButton.setPreferredSize(new Dimension(50, 40));
             removeButton.setText("<");
-            removeButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(java.awt.event.ActionEvent e) {
-                    int[] index = getFieldsTable().getSelectedRows();
-                    String[] fields = new String[index.length];
-                    for (int i = 0; i < index.length; i++) {
-                        fields[i] = (String) getFieldsTable().getFieldValue(
-                                index[i], 1);
-                    }
-                    for (int i = 0; i < fields.length; i++) {
-                        ((DefaultListModel) getJFieldList().getModel())
-                                .addElement(fields[i]);
-                    }
-                    getFieldsTable().removeSelectedRows();
-                    actualizePreviewSymbol();
+            removeButton.addActionListener((java.awt.event.ActionEvent e) -> {
+                int[] index = getFieldsTable().getSelectedRows();
+                String[] fields = new String[index.length];
+                for (int i = 0; i < index.length; i++) {
+                    fields[i] = (String) getFieldsTable().getFieldValue(
+                            index[i], 1);
                 }
+                for (String field : fields) {
+                    ((DefaultListModel) getJFieldList().getModel()).addElement(field);
+                }
+                getFieldsTable().removeSelectedRows();
             });
         }
         return removeButton;
@@ -433,49 +418,23 @@
             addAllButton = new JButton();
             addAllButton.setPreferredSize(new Dimension(50, 40));
             addAllButton.setText(">>");
-            addAllButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(java.awt.event.ActionEvent e) {
-                    Object[] fields = ((DefaultListModel) getJFieldList()
-                            .getModel()).toArray();
-
-                    Color[] colorScheme = colorCombo.getSelectedColors();
-
-                    Color[] colors = new Color[colorScheme.length];
-                    for (int i = 0; i < colorScheme.length; i++) {
-                        colors[i] = colorScheme[i];
-                    }
-                    for (int i = 0; i < fields.length; i++) {
-                        getFieldsTable().addTableRecord(
-                                colorScheme[rand.nextInt(colorScheme.length)],
-                                (String) fields[i], (String) fields[i]);
-                        ((DefaultListModel) getJFieldList().getModel())
-                                .removeElement(fields[i]);
-                    }
-                    actualizePreviewSymbol();
+            addAllButton.addActionListener((java.awt.event.ActionEvent e) -> {
+                Object[] fields = ((DefaultListModel) getJFieldList()
+                        .getModel()).toArray();
+                
+                Color[] colorScheme = colorCombo.getSelectedColors();
+                
+                Color[] colors = new Color[colorScheme.length];
+                System.arraycopy(colorScheme, 0, colors, 0, colorScheme.length);
+                for (Object field : fields) {
+                    getFieldsTable().addTableRecord(colorScheme[rand.nextInt(colorScheme.length)], (String) field, (String) field);
+                    ((DefaultListModel) getJFieldList().getModel()).removeElement(field);
                 }
             });
         }
         return addAllButton;
     }
 
-    private void actualizePreviewSymbol() {
-        int count = getFieldsTable().getRowCount();
-        String[] fieldsTable = new String[count];
-        for (int i = 0; i < count; i++) {
-            fieldsTable[i] = (String) getFieldsTable().getFieldValue(i, 1);
-        }
-        String[] labelsTable = new String[count];
-        for (int i = 0; i < count; i++) {
-            labelsTable[i] = (String) getFieldsTable().getFieldValue(i, 2);
-        }
-        Color[] colorsTable = new Color[count];
-        for (int i = 0; i < count; i++) {
-            colorsTable[i] = ((JPanel) getFieldsTable().getFieldValue(i, 0))
-                    .getBackground();
-        }
-
-    }
-
     /**
      * This method initializes removeAllButton
      *
@@ -754,7 +713,16 @@
                     props.setHasPlotOutline(auxLegend.isOutlineShow());
                     props.setIsLegendVisible(false);
                     props.setPlotBackgroundColor(auxLegend.getOutlineColor());
-                    props.setPlotBackgroundAlpha(colorButton.getAlpha() / 100);
+                    if (getJCheckBox().isSelected()) {
+                        float alpha = colorButton.getAlpha() / 100;
+                        if (alpha > 1) {
+                            props.setPlotBackgroundAlpha(1.0f);
+                        } else {
+                            props.setPlotBackgroundAlpha(alpha);
+                        }
+                    } else {
+                        props.setPlotBackgroundAlpha(0.0f);
+                    }
                     props.setIsMandatoryChart(jShowAxis.isSelected());
                     props.setIsXYPlotChart(false);
                     props.setChartDimension(auxLegend.is3D());
