Commit 49eba77b authored by Piotr Wendykier's avatar Piotr Wendykier

Merge develop into feature/InstallBuilder2

Conflicts:
	nbproject/project.properties
parents b0ab9f32 20a33685
This diff is collapsed.
......@@ -105,11 +105,10 @@
<Component class="javax.swing.JComboBox" name="shadingTypeBox">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringArray count="3">
<StringItem index="0" value="no shading"/>
<StringItem index="1" value="transparency"/>
<StringItem index="2" value="component"/>
<StringItem index="3" value=""/>
</StringArray>
</Property>
<Property name="toolTipText" type="java.lang.String" value=""/>
......
......@@ -157,7 +157,7 @@ public class VolumeShadingGUI extends javax.swing.JPanel
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
add(shadingComponentSelector, gridBagConstraints);
shadingTypeBox.setModel(new DefaultComboBoxModel(new String[] { "no shading", "transparency", "component", "" }));
shadingTypeBox.setModel(new DefaultComboBoxModel(new String[] { "no shading", "transparency", "component" }));
shadingTypeBox.setToolTipText("");
shadingTypeBox.setMinimumSize(new Dimension(60, 23));
shadingTypeBox.setOpaque(false);
......
......@@ -65,7 +65,7 @@ public class CircleGlyph extends Glyph
super(params);
setName("circle glyph");
type = CIRCLE;
radiusSliderTitle = "circle radius (in % of field radius)";
params.setRadiusSliderTitle("circle radius (in % of field radius)");
visibleWidgets = W_ROT_VIS | U_TRANS_VIS | V_TRANS_VIS | SCALE_VIS | RADIUS_VIS;
params.setVisibleWidgets(visibleWidgets);
glyphVerts = new float[3 * NVERTS];
......
......@@ -79,19 +79,10 @@ abstract public class Glyph extends OpenBranchGroup
protected float[][] currentColors = InteractiveGlyphParams.LIGHT_COLORS;
protected float[] lineColors = {0, .6f, .6f, .6f, .6f, 0, .6f, 0, .6f};
protected int visibleWidgets = W_ROT_VIS;
protected String radiusSliderTitle = "sphere radius";
protected boolean useRadius = false;
abstract public void update();
public void updateColors()
{
currentColors = params.getCurrentColors();
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
lineColors[3 * i + j] = currentColors[i][j];
// lineColors[3 * i + j] = currentColors[(i + 1) % 3][j];
}
public Glyph(InteractiveGlyphParams params)
{
super();
......@@ -113,6 +104,20 @@ abstract public class Glyph extends OpenBranchGroup
addChild(glyphGroup);
}
public Glyph(InteractiveGlyphParams params, boolean useRadius)
{
this(params);
this.useRadius = useRadius;
}
public void updateColors()
{
currentColors = params.getCurrentColors();
for (int i = 0; i < 3; i++)
for (int j = 0; j < 3; j++)
lineColors[3 * i + j] = currentColors[i][j];
}
public InteractiveGlyphParams getParams()
{
return params;
......@@ -128,9 +133,5 @@ abstract public class Glyph extends OpenBranchGroup
this.params = params;
}
public String getRadiusSliderTitle()
{
return radiusSliderTitle;
}
}
......@@ -114,6 +114,38 @@ public class InteractiveGlyph extends OpenBranchGroup
intermediate.addChild(glyph);
}
public InteractiveGlyph(GlyphType type, boolean forceUseRadius)
{
switch (type) {
case PLANE:
glyph = new PlaneGlyph(params, forceUseRadius);
break;
case SPHERE:
glyph = new SphereGlyph(params);
break;
case LINE:
glyph = new LineGlyph(params, forceUseRadius);
break;
case RECTANGLE:
glyph = new RectangleGlyph(params);
break;
case CIRCLE:
glyph = new CircleGlyph(params);
break;
case POINT:
glyph = new PointGlyph(params);
break;
case PLANAR_LINE:
glyph = new PlanarLineGlyph(params, forceUseRadius);
break;
default:
glyph = new BoxGlyph(params);
break;
}
computeUI.setParams(params);
intermediate.addChild(glyph);
}
public void setType(GlyphType type)
{
if (type == glyph.getType())
......@@ -149,8 +181,6 @@ public class InteractiveGlyph extends OpenBranchGroup
glyph.update();
intermediate.addChild(glyph);
computeUI.updateWidgetVisibility();
if (computeUI != null)
computeUI.updateRadiusSliderTitle(glyph.getRadiusSliderTitle());
}
public void addGeometry(Node geometry)
......
......@@ -202,7 +202,7 @@
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
<GridBagConstraints gridX="0" gridY="3" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="5" insetsBottom="0" insetsRight="5" anchor="10" weightX="1.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
......@@ -219,19 +219,6 @@
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="hideGlyphBox">
<Properties>
<Property name="text" type="java.lang.String" value="hide glyph"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="hideGlyphBoxActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JPanel" name="rangePanel">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
......@@ -424,5 +411,18 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
</Container>
<Component class="javax.swing.JButton" name="hideGlyphButton">
<Properties>
<Property name="text" type="java.lang.String" value="hide glyph"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="hideGlyphButtonActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="4" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="7" insetsBottom="0" insetsRight="7" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Form>
......@@ -77,6 +77,7 @@ public class InteractiveGlyphParams
protected InteractiveGlyphGUI gui;
protected int visibleWidgets = 0;
protected String scaleSliderTitle = "glyph scale";
protected String radiusSliderTitle = "glyph radius";
protected FloatLargeArray coords;
public static final float[][] LIGHT_COLORS = {{0, 1, 1}, {1, 0, 1}, {1, 1, 0}};
......@@ -460,6 +461,26 @@ public class InteractiveGlyphParams
this.visibleWidgets = visibleWidgets;
}
public String getScaleSliderTitle()
{
return scaleSliderTitle;
}
public void setScaleSliderTitle(String scaleSliderTitle)
{
this.scaleSliderTitle = scaleSliderTitle;
}
public String getRadiusSliderTitle()
{
return radiusSliderTitle;
}
public void setRadiusSliderTitle(String radiusSliderTitle)
{
this.radiusSliderTitle = radiusSliderTitle;
}
public void updateReper(int adjusting)
{
float[][] reper = {u, v, w};
......
......@@ -40,8 +40,6 @@
package pl.edu.icm.visnow.geometries.interactiveGlyphs;
import javax.media.j3d.GeometryArray;
import javax.media.j3d.IndexedLineArray;
import static pl.edu.icm.visnow.geometries.interactiveGlyphs.InteractiveGlyph.GlyphType.LINE;
import static pl.edu.icm.visnow.geometries.interactiveGlyphs.InteractiveGlyphParams.*;
......@@ -67,6 +65,22 @@ public class LineGlyph extends Glyph
addChild(reper);
}
public LineGlyph(InteractiveGlyphParams params, boolean useRadius)
{
super(params, useRadius);
type = LINE;
setName("line glyph");
visibleWidgets = useRadius ? U_ROT_VIS | V_ROT_VIS | W_ROT_VIS |
U_TRANS_VIS | V_TRANS_VIS | W_TRANS_VIS |
SCALE_VIS | AXES_VIS | RADIUS_VIS
: U_ROT_VIS | V_ROT_VIS | W_ROT_VIS |
U_TRANS_VIS | V_TRANS_VIS | W_TRANS_VIS |
SCALE_VIS | AXES_VIS;
params.setVisibleWidgets(visibleWidgets);
reper = new Reper(params);
addChild(reper);
}
@Override
public void updateColors()
{
......
......@@ -84,6 +84,35 @@ public class PlanarLineGlyph extends Glyph
glyphGroup.addChild(lineShape);
}
public PlanarLineGlyph(InteractiveGlyphParams params, boolean useRadius)
{
super(params, useRadius);
type = PLANAR_LINE;
setName("plaar line glyph");
visibleWidgets = useRadius ? W_ROT_VIS | U_TRANS_VIS | V_TRANS_VIS |
SCALE_VIS | X_AXIS_VIS | Y_AXIS_VIS | RADIUS_VIS
: W_ROT_VIS | U_TRANS_VIS | V_TRANS_VIS |
SCALE_VIS | X_AXIS_VIS | Y_AXIS_VIS;
params.setVisibleWidgets(visibleWidgets);
glyphVerts = new float[] {-1.f, 0, 0,
1.f, 0, 0,
0, -.3f, 0,
0, .3f, 0};
glyphLines = new IndexedLineArray(6, GeometryArray.COORDINATES | GeometryArray.COLOR_3, 6);
glyphLines.setCoordinateIndices(0, new int[] {0, 1, 2, 3});
glyphLines.setColorIndices(0, new int[] {0, 0, 1, 1});
glyphLines.setCapability(GeometryArray.ALLOW_COORDINATE_READ);
glyphLines.setCapability(GeometryArray.ALLOW_COORDINATE_WRITE);
glyphLines.setCapability(GeometryArray.ALLOW_COLOR_READ);
glyphLines.setCapability(GeometryArray.ALLOW_COLOR_WRITE);
glyphLines.setCoordinates(0, glyphVerts);
glyphLines.setColors(0, lineColors);
lineShape.setAppearance(lineApp);
lineShape.addGeometry(glyphLines);
params.setAxis(0);
glyphGroup.addChild(lineShape);
}
@Override
public void update()
{
......
......@@ -41,7 +41,6 @@
package pl.edu.icm.visnow.geometries.interactiveGlyphs;
import javax.media.j3d.GeometryArray;
import javax.media.j3d.IndexedLineArray;
import javax.media.j3d.IndexedQuadArray;
import static pl.edu.icm.visnow.geometries.interactiveGlyphs.InteractiveGlyph.GlyphType.PLANE;
import static pl.edu.icm.visnow.geometries.interactiveGlyphs.InteractiveGlyphParams.*;
......@@ -65,6 +64,7 @@ public class PlaneGlyph extends Glyph
reper = new Reper(params);
type = PLANE;
setName("plane glyph");
params.setRadiusSliderTitle("planar area dimension (in % of field size)");
visibleWidgets = U_ROT_VIS | V_ROT_VIS | W_ROT_VIS |
U_TRANS_VIS | V_TRANS_VIS | W_TRANS_VIS |
SCALE_VIS | AXES_VIS;
......@@ -87,6 +87,37 @@ public class PlaneGlyph extends Glyph
addChild(reper);
}
public PlaneGlyph(InteractiveGlyphParams params, boolean useRadius)
{
super(params, useRadius);
reper = new Reper(params);
type = PLANE;
setName("plane glyph");
visibleWidgets = useRadius ? U_ROT_VIS | V_ROT_VIS | W_ROT_VIS |
U_TRANS_VIS | V_TRANS_VIS | W_TRANS_VIS |
SCALE_VIS | AXES_VIS | RADIUS_VIS
: U_ROT_VIS | V_ROT_VIS | W_ROT_VIS |
U_TRANS_VIS | V_TRANS_VIS | W_TRANS_VIS |
SCALE_VIS | AXES_VIS;
params.setVisibleWidgets(visibleWidgets);
glyphVerts = new float[] {-1, -1, 0,
1, -1, 0,
1, 1, 0,
-1, 1, 0,
0, 0, 0,
0, 0, 1.5f};
glyphRects = new IndexedQuadArray(4, GeometryArray.COORDINATES, 4);
glyphRects.setCoordinateIndices(0, new int[] {0, 1, 2, 3});
glyphRects.setCapability(GeometryArray.ALLOW_COORDINATE_READ);
glyphRects.setCapability(GeometryArray.ALLOW_COORDINATE_WRITE);
glyphRects.setCoordinates(0, planeVerts);
surfShape.setAppearance(surfApp);
surfShape.addGeometry(glyphRects);
glyphGroup.addChild(surfShape);
currentColors = params.getCurrentColors();
addChild(reper);
}
@Override
public void updateColors()
{
......@@ -100,7 +131,10 @@ public class PlaneGlyph extends Glyph
float c = params.center[i];
float u = params.scale * params.u[i];
float v = params.scale * params.v[i];
if (useRadius) {
u = params.radius * params.u[i];
v = params.radius * params.v[i];
}
planeVerts[i] = c - u - v;
planeVerts[3 + i] = c + u - v;
planeVerts[6 + i] = c + u + v;
......
......@@ -74,7 +74,7 @@ public class SphereGlyph extends Glyph
visibleWidgets = U_ROT_VIS | V_ROT_VIS | W_ROT_VIS | RADIUS_VIS |
U_TRANS_VIS | V_TRANS_VIS | W_TRANS_VIS | SCALE_VIS;
params.setVisibleWidgets(visibleWidgets);
radiusSliderTitle = "sphere radius (in % of field radius)";
params.setScaleSliderTitle("sphere radius (in % of field radius)");
if (!templateCreated) {
int i, j, k, k0, l;
float t0, t1, t2, r;
......
......@@ -173,7 +173,7 @@ public class IrregularFieldGeometry extends FieldGeometry
this.coords = coords;
if (field != null)
for (int i = 0; i < field.getNCellSets(); i++)
cellSetGeometries.get(i).updateCoords(coords);
cellSetGeometries.get(i).updateCoords(coords.getData());
if (detach)
geometry.postattach();
}
......
......@@ -38,11 +38,13 @@
//</editor-fold>
package pl.edu.icm.visnow.geometries.objects;
import java.util.Enumeration;
import javax.media.j3d.BranchGroup;
import javax.media.j3d.GeometryArray;
import javax.media.j3d.IndexedLineStripArray;
import javax.media.j3d.IndexedTriangleStripArray;
import javax.media.j3d.LineStripArray;
import javax.media.j3d.Node;
import javax.media.j3d.PointArray;
import javax.media.j3d.PolygonAttributes;
import javax.media.j3d.Transform3D;
......@@ -905,9 +907,13 @@ public class RegularField3DGeometry extends RegularFieldGeometry
? PolygonAttributes.CULL_FRONT
: PolygonAttributes.CULL_NONE);
for (int i = geometries.numChildren() - 1; i >= 0; i--)
if (geometries.getChild(i) instanceof BranchGroup)
geometries.removeChild(i);
Enumeration children = geometries.getAllChildren();
while(children.hasMoreElements()) {
Node child = (Node)children.nextElement();
if (child instanceof BranchGroup) {
geometries.removeChild(child);
}
}
if (content3DParams.isOutline())
makeOutlineBox();
else
......
......@@ -53,6 +53,7 @@ import pl.edu.icm.visnow.engine.core.ParameterName;
import pl.edu.icm.visnow.geometries.gui.PresentationGUI;
import pl.edu.icm.visnow.lib.utils.SwingInstancer;
import pl.edu.icm.visnow.lib.utils.StringUtils;
import pl.edu.icm.visnow.lib.utils.VisNowCallTrace;
/**
*
......@@ -96,7 +97,7 @@ public class PresentationParams
protected boolean renderingInherited = false;
protected boolean transformInherited = false;
protected ArrayList<PresentationParams> childrenParams = new ArrayList<PresentationParams>();
protected ArrayList<PresentationParams> childrenParams = new ArrayList<>();
protected PresentationGUI ui = null;
public PresentationParams()
......@@ -303,18 +304,9 @@ public class PresentationParams
}
childrenParams = tmpChildrenParams;
if (ui != null) {
// final PresentationParams thisParams = this;
// SwingInstancer.swingRunAndWait(new Runnable()
// {
// @Override
// public void run()
// {
ui.getRenderingGUI().setFieldType(false, 3);
ui.setPresentationParams(this);
// ui.setPresentationParams(thisParams);
ui.updateParams();
// }
// });
ui.getRenderingGUI().setFieldType(false, 3);
ui.setPresentationParams(this);
ui.updateParams();
}
active = oldActive;
renderingParams.setActive(active);
......@@ -663,7 +655,6 @@ public class PresentationParams
String[] currentBlock = StringUtils.findBlock(saved, i);
content3DParams.restoreValuesFrom(currentBlock);
i += currentBlock.length + 1;
continue;
}
}
active = true;
......
......@@ -358,8 +358,10 @@ public class TransparencyParams implements Cloneable
public void setContainer(DataContainer container)
{
if (ui != null)
if (ui != null) {
ui.setParams(this);
ui.setDataContainer(container);
}
setContainerSchema(container.getSchema());
}
......
......@@ -104,6 +104,10 @@ public class ComboBox extends CustomSizePanel
}
});
}
public void updatePopupWidth()
{
}
/**
* Returns number of items in this combo box list.
......@@ -117,12 +121,14 @@ public class ComboBox extends CustomSizePanel
{
listValues = values;
innerComboBox.setModel(new DefaultComboBoxModel(values));
updatePopupWidth();
}
public void setListData(Object[] values, String[] labels)
{
listValues = values;
innerComboBox.setModel(new DefaultComboBoxModel(labels));
updatePopupWidth();
}
......@@ -134,6 +140,7 @@ public class ComboBox extends CustomSizePanel
fromSetter = true;
((DefaultComboBoxModel) innerComboBox.getModel()).removeAllElements();
fromSetter = false;
updatePopupWidth();
}
/**
......
......@@ -45,6 +45,7 @@ import java.awt.FontMetrics;
import java.awt.Rectangle;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import javax.swing.ComboBoxModel;
import javax.swing.JList;
import javax.swing.plaf.basic.BasicComboPopup;
import javax.swing.plaf.basic.ComboPopup;
......@@ -54,8 +55,15 @@ import pl.edu.icm.visnow.lib.utils.SwingInstancer;
public class WidePopupComboBox extends ComboBox
{
final private WidePopupComboBoxUI steppedComboBoxNewUI;
@Override
public void updatePopupWidth()
{
steppedComboBoxNewUI.updatePopupWidth();
}
public WidePopupComboBox()
{
steppedComboBoxNewUI = new WidePopupComboBoxUI();
......@@ -73,13 +81,15 @@ public class WidePopupComboBox extends ComboBox
public void componentResized(ComponentEvent e)
{
steppedComboBoxNewUI.updatePopupWidth();
steppedComboBoxNewUI.updatePopupWidth();
}
}
class WidePopupComboBoxUI extends MetalComboBoxUI
{
private int popupWidth;
protected void updatePopupWidth()
{
......@@ -87,43 +97,37 @@ class WidePopupComboBoxUI extends MetalComboBoxUI
{
@Override
public void run()
{
{
popupWidth = 50;
ComboBoxModel model = comboBox.getModel();
if (model == null)
return;
if (comboBox.getRenderer() != null &&
comboBox.getModel() != null &&
(comboBox.getUI() instanceof WidePopupComboBoxUI)) {
comboBox.getUI() instanceof WidePopupComboBoxUI) {
JList list = ((WidePopupComboBoxUI) comboBox.getUI()).createPopup().getList();
popupWidth = 10;
for (int i = 0; i < comboBox.getModel().getSize(); i++) {
int w = comboBox.getRenderer().getListCellRendererComponent(
list, comboBox.getModel().getElementAt(i),
i, true, true).getPreferredSize().width;
if (w > popupWidth) popupWidth = w;
}
popupWidth += 25;
} else {
if (comboBox.getFont() != null) {
FontMetrics fm = comboBox.getFontMetrics(comboBox.getFont());
if (fm == null) {
return;
}
popupWidth = 10;
for (int i = 0; i < comboBox.getModel().getSize(); i++)
if (comboBox.getModel() != null && comboBox.getModel().getElementAt(i) != null) {
int w = fm.stringWidth(comboBox.getModel().getElementAt(i).toString());
if (w > popupWidth) popupWidth = w;
}
popupWidth += 80;
}
for (int i = 0; i < model.getSize(); i++)
popupWidth =
Math.max(popupWidth,
comboBox.getRenderer().
getListCellRendererComponent(list, model.getElementAt(i), i, true, true).
getPreferredSize().width);
popupWidth += 15;
}
else if (comboBox.getFont() != null) {
FontMetrics fm = comboBox.getFontMetrics(comboBox.getFont());
if (fm == null)
return;
popupWidth = 10;
for (int i = 0; i < model.getSize(); i++)
if (model.getElementAt(i) != null)
popupWidth = Math.max(popupWidth, fm.stringWidth(model.getElementAt(i).toString()));
popupWidth += 15;
}
popupWidth = Math.max(popupWidth, comboBox.getWidth());
}
});
}
public Dimension getPopupSize()
......@@ -134,7 +138,7 @@ class WidePopupComboBoxUI extends MetalComboBoxUI
}
return new Dimension(popupWidth, size.height);
}
@Override
protected ComboPopup createPopup()
{
......@@ -144,9 +148,9 @@ class WidePopupComboBoxUI extends MetalComboBoxUI
{
Dimension popupSize = getPopupSize();
popupSize.setSize(popupSize.width,
getPopupHeightForRowCount(comboBox.getMaximumRowCount()));
getPopupHeightForRowCount(comboBox.getMaximumRowCount()));
Rectangle popupBounds = computePopupBounds(0,
comboBox.getBounds().height, popupSize.width, popupSize.height);
comboBox.getBounds().height, popupSize.width, popupSize.height);
scroller.setMaximumSize(popupBounds.getSize());
scroller.setPreferredSize(popupBounds.getSize());
scroller.setMinimumSize(popupBounds.getSize());
......
......@@ -128,8 +128,7 @@ public class MulticomponentHistogram extends OutFieldVisualizationModule
new Parameter<>(BIN_OPERATIONS, new BinOperationState[][]{emptyRow}),
new Parameter<>(RUNNING_MESSAGE, NO_RUN),
new Parameter<>(META_SCALAR_COMPONENT_NAMES, new String[]{"------"}),
new Parameter<>(META_ALL_COMPONENT_NAMES, new String[]{"------"}),
new Parameter<>(META_NUMBER_OF_DIMENSIONS, 3)
new Parameter<>(META_ALL_COMPONENT_NAMES, new String[]{"------"})
};
}
......@@ -144,15 +143,14 @@ public class MulticomponentHistogram extends OutFieldVisualizationModule
List<String> currentAllComponentNames = Arrays.asList(inField.getComponentNames());
parameters.set(META_SCALAR_COMPONENT_NAMES, inField.getScalarComponentNames());
parameters.set(META_ALL_COMPONENT_NAMES, inField.getComponentNames());
parameters.set(META_NUMBER_OF_DIMENSIONS, inField instanceof IrregularField ? 3 : ((RegularField) inField).getDimNum());
//validate binning sources
int[] sources = parameters.get(BINNING_SOURCES);
boolean namesCorrect = true; //flag for binning
//validate spacial binning
if (sources[0] < 0) //clip to [-dimNum ... -1]
if (sources[0] < 0) //clip to [-3 ... -1]
for (int i = 0; i < sources.length; i++)
sources[i] = Math.max(-parameters.get(META_NUMBER_OF_DIMENSIONS), sources[i]);
sources[i] = Math.max(-3, sources[i]);
else { //validate (+smart) component data based binning
List<String> currentComponentNames = Arrays.asList(parameters.get(META_SCALAR_COMPONENT_NAMES));
for (int j = 0; j < sources.length; j++) {
......