/** * Get the Locale to which the node is attached */ Locale getLocale() { if (inSharedGroup) { throw new IllegalSharingException(J3dI18N.getString("NodeRetained0")); } return locale; }
void validateImageIllegalSharing(ImageComponent image) { // Do illegal sharing check if(image != null) { ImageComponentRetained imageRetained = (ImageComponentRetained) image.retained; NodeComponentRetained ncRetained = (NodeComponentRetained)this.retained; if(imageRetained.getUsedByOffScreen()) { if(isLive()) { throw new IllegalSharingException(J3dI18N.getString("NodeComponent2")); } if(ncRetained.getInImmCtx()) { throw new IllegalSharingException(J3dI18N.getString("NodeComponent3")); } } } }
@Override void setLive(boolean inBackgroundGroup, int refCount) { // Do illegalSharing check. if(getUsedByOffScreen()) { throw new IllegalSharingException(J3dI18N.getString("ImageComponent3")); } super.setLive(inBackgroundGroup, refCount); }
/** * Get the localToVworld transform for a node. */ void getLocalToVworld(Transform3D t) { if (inSharedGroup) { throw new IllegalSharingException(J3dI18N.getString("NodeRetained0")); } // Lock the object while writing into t. if (localToVworld == null) { t.setIdentity(); } else { computeLocalToVworld(this, this, null, t); } }
/** * Inserts the specified light at the specified index location. * @param light the new light * @param index at which location to insert * @exception IllegalSharingException if the Light node * is part of or is subsequently made part of a live scene graph. * @exception NullPointerException if the Light object is null. */ public void insertLight(Light light, int index) { if (light == null) { throw new NullPointerException(J3dI18N.getString("GraphicsContext3D13")); } if (light.isLive()) { throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D14")); } uLights.add(index, light); if ((canvas3d.view == null) || (canvas3d.view.universe == null) || (!canvas3d.view.active) || (Thread.currentThread() == canvas3d.screen.renderer)) { doInsertLight(light, index); } else if (Thread.currentThread() == canvas3d.view.universe.behaviorScheduler) { sendRenderMessage(false, GraphicsContext3D.INSERT_LIGHT, light, new Integer(index)); } else { sendRenderMessage(true, GraphicsContext3D.INSERT_LIGHT, light, new Integer(index)); } }
/** * Get the localToVworld transform for a node. */ void getLocalToVworld(SceneGraphPath path, Transform3D t) { HashKey key = new HashKey(""); if (inSharedGroup == false) { throw new IllegalSharingException(J3dI18N.getString("NodeRetained1")); } path.validate(key); computeLocalToVworld(this, this, key, t); }
throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D23"));
throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D14"));
throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D23"));
throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D14"));
throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D23"));
throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D12"));
throw new IllegalSharingException(J3dI18N.getString("View10")); canvases.addElement(canvas3D); addToCanvasList(canvas3D);
throw new IllegalSharingException(J3dI18N.getString("View10")); this.canvases.insertElementAt(canvas3D, index); addToCanvasList(canvas3D);
throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D32"));
IllegalSharingException(J3dI18N.getString("BehaviorRetained1"));
throw new IllegalSharingException(J3dI18N.getString("View10")); cv = canvases.elementAt(index); canvases.setElementAt(canvas3D, index);
/** * Draw the specified Shape3D leaf node object. This is * a convenience method that is identical to calling the * setAppearance(Appearance) and draw(Geometry) methods * passing the appearance and geometry component objects of * the specified shape node as arguments. * * @param shape the Shape3D node containing the Appearance component * object to set and Geometry component object to draw * * @exception IllegalSharingException if the Shape3D node * is part of or is subsequently made part of a live scene graph. * * @exception IllegalSharingException if the Shape3D node's Appearance * refers to an ImageComponent2D that is being used by a * Canvas3D as an off-screen buffer. */ public void draw(Shape3D shape) { if (shape.isLive()) { throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D26")); } ((Shape3DRetained)shape.retained).setInImmCtx(true); setAppearance(shape.getAppearance()); draw(shape.getGeometry()); }
IllegalSharingException(J3dI18N.getString("BoundingLeafRetained1"));
if(imageRetained.getUsedByOffScreen()) { if(isLive()) { throw new IllegalSharingException(J3dI18N.getString("Raster12"));