//
// ShadowTupleType.java
//

/*
VisAD system for interactive analysis and visualization of numerical
data.  Copyright (C) 1996 - 2017 Bill Hibbard, Curtis Rueden, Tom
Rink, Dave Glowacki, Steve Emmerson, Tom Whittaker, Don Murray, and
Tommy Jasmin.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
*/

package visad;

import java.text.*;
import java.util.*;
import java.rmi.*;

/**
   The ShadowTupleType class shadows the TupleType class,
   within a DataDisplayLink.

*/ public class ShadowTupleType extends ShadowType { ShadowType[] tupleComponents; private ShadowRealType[] RealComponents; /** value_indices from parent */ private int[] inherited_values; /** true if no component with mapped Scalar components is a ShadowSetType, ShadowFunctionType or ShadowTupleType; not the same as TupleType.Flat */ private boolean Flat; public ShadowTupleType(MathType t, DataDisplayLink link, ShadowType parent, ShadowType[] tcs) throws VisADException, RemoteException { super(t, link, parent); tupleComponents = tcs; int n = tupleComponents.length; Flat = true; ShadowType[] components = new ShadowType[n]; MultipleSpatialDisplayScalar = false; MultipleDisplayScalar = false; // compute Flat, DisplayIndices and ValueIndices for (int i=0; i 0) { throw new BadMappingException("Animation and SelectValue may not " + "occur in range: " + "ShadowTupleType.checkIndices"); } LevelOfDifficulty = testIndices(local_indices, local_display_indices, levelOfDifficulty); if (LevelOfDifficulty == NESTED) { if (checkR2D2(DisplayIndices)) { LevelOfDifficulty = SIMPLE_TUPLE; } else { LevelOfDifficulty = LEGAL; } } } else { // !Flat if (levelOfDifficulty == NESTED) { if (!checkNested(DisplayIndices)) { levelOfDifficulty = LEGAL; } } int minLevelOfDifficulty = ShadowType.NOTHING_MAPPED; for (int j=0; j 0) { display_values[i] = new float[1]; display_values[i][0] = value_array[i]; } } TupleIface tuple = (TupleIface) data; RealType[] realComponents = ((TupleType) data.getType()).getRealComponents(); int length = realComponents.length; if (length > 0) { double[][] value = new double[length][1]; Unit[] value_units = new Unit[length]; int j = 0; for (int i=0; i 0) // get any text String and TextControl inherited from parent String text_value = getParentText(); TextControl text_control = getParentTextControl(); boolean anyText = getAnyText(); if (anyText && text_value == null) { for (int i=0; i

Ads help maintain this website.