/** * This function is called from WindowsFlags.initFlags() and initializes * the native side of our runtime flags. There are a couple of important * things that happen at the native level after we set the Java flags: * - set native variables based on the java flag settings (such as useDD * based on whether ddraw was enabled by a runtime flag) * - override java level settings if there user has set an environment * variable but not a runtime flag. For example, if the user runs * with sun.java2d.d3d=true but also uses the J2D_D3D=false environment * variable, then we use the java-level true value. But if they do * not use the runtime flag, then the env variable will force d3d to * be disabled. Any native env variable overriding must up-call to * Java to change the java level flag settings. * - A later error in initialization may result in disabling some * native property that must be propagated to the Java level. For * example, d3d is enabled by default, but we may find later that * we must disable it do to some runtime configuration problem (such as * a bad video card). This will happen through mechanisms in this native * file to change the value of the known Java flags (in this d3d example, * we would up-call to set the value of d3dEnabled to Boolean.FALSE). */ JNIEXPORT void JNICALL Java_sun_java2d_windows_WindowsFlags_initNativeFlags(JNIEnv *env, jclass wFlagsClass) { SetIDs(env, wFlagsClass); GetFlagValues(env, wFlagsClass); }
bool DataCaptureSpec::SetupOK(SC_SetupErr& errData) { SetIDs(); SC_SetupErr dcapErr; if ((captureType == ctPressure) && (pressureCapType == pctSuperposition)) { if (control.Is2DRadial()) dcapErr.SetConstantError("Cannot do 2D superposition"); superData.Cleanup(); if (superData.IsEmpty()) dcapErr.SetConstantError("No superposition data found"); for (int i = 0; i < superData.Size(); i++) if (!(superData[i]->SetupOK(dcapErr))) break; return errData.SetupOK(dataDesig, dcapErr); } if ((captureType == ctPressure) && (pressureCapType == pctRadius)) { //TODO - check for radius within limits if (control.IsHorizontalAnisotropic()) { GetObsAngle(); // calculates radius if (radiusData.GetMetricVal() < 1.0) { dcapErr.SetConstantError("obs well radius < 1 m, anisotropy ???"); return errData.SetupOK(dataDesig, dcapErr); } } } if (control.IsLayered() && IsTestZoneBased()) { if (!wellBoreZones.GetIndex(wellboreZoneID, wellboreZoneIndex)) { dcapErr.SetConstantError("no well bore zone corresponding to ID"); return errData.SetupOK(dataDesig, dcapErr); } if (wellBoreZones[wellboreZoneIndex].zoneIsPacker) { dcapErr.SetConstantError("well bore zone corresponding to ID is packer"); return errData.SetupOK(dataDesig, dcapErr); } } return true; }