Revision 41264 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.selectiontools.app/org.gvsig.selectiontools.app.mainplugin/src/main/java/org/gvsig/selectiontools/app/extension/tools/buffer/gui/BufferConfigurationPanel.java

View differences:

BufferConfigurationPanel.java
51 51
import java.awt.event.ActionListener;
52 52
import java.awt.event.ComponentAdapter;
53 53
import java.awt.event.ComponentEvent;
54
import java.text.DecimalFormat;
55 54
import java.util.ArrayList;
56 55
import java.util.Arrays;
57 56
import java.util.Iterator;
57
import java.util.List;
58 58

  
59 59
import javax.swing.BorderFactory;
60 60
import javax.swing.JCheckBox;
......
62 62
import javax.swing.JOptionPane;
63 63
import javax.swing.JPanel;
64 64
import javax.swing.JTextField;
65
import javax.swing.text.NumberFormatter;
66 65

  
67 66
import org.gvsig.andami.PluginServices;
68 67
import org.gvsig.andami.messages.NotificationManager;
......
111 110
    private JPanel sidePanel = null;
112 111
    private JPanel optionsPanel = null;
113 112
    private AdaptedAcceptCancelPanel acceptCancelPanel = null;
114
    private FLyrVect[] layers;
113
    private List<FLyrVect> layers;
115 114
    private MapControl mapControl;
116 115
    private IView view;
117 116
    private JCheckBox multiLayerSelectionCBox;
118 117
    private SideInfo outside, inside, out_in_side;
119 118

  
120 119
    /**
121
     * <p>
122 120
     * Creates a new form where user can define the option of the buffer.
123
     * </p>
124 121
     */
125
    public BufferConfigurationPanel(FLyrVect[] array, IView view) {
122
    public BufferConfigurationPanel(List<FLyrVect> layers, IView view) {
126 123
        super();
127 124

  
128
        layers = array;
125
        this.layers = layers;
129 126
        this.view = view;
130
        mapControl = view.getMapControl();
127
        this.mapControl = view.getMapControl();
131 128

  
132 129
        initialize();
133 130
    }
134 131

  
132
    public BufferConfigurationPanel(FLyrVect[] array, IView view) {
133
        this(Arrays.asList(array),view);
134
    }
135
    
135 136
    /**
136
     * <p>
137 137
     * Initializes this component.
138
     * </p>
139 138
     */
140 139
    private void initialize() {
141 140
        outside =
......
537 536

  
538 537
                    /* 3- Creates the process */
539 538
                    // checks layers to proccess if multilayer is not selected
540
                    ArrayList<FLyrVect> tmpLayersToProccess =
541
                        new ArrayList<FLyrVect>(layers.length);
542
                    tmpLayersToProccess.addAll(Arrays.asList(layers));
539
                    List<FLyrVect> tmpLayersToProccess = new ArrayList<FLyrVect>();
540
                    tmpLayersToProccess.addAll(layers);
543 541
                    if (!multiLayerSelectionCBox.isSelected()) {
544 542
                        Iterator<FLyrVect> iter =
545 543
                            tmpLayersToProccess.iterator();

Also available in: Unified diff