/** * Retrieves the state of the line antialiasing flag. * @return true if line antialiasing is enabled, * false if line antialiasing is disabled * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public boolean getLineAntialiasingEnable() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_ANTIALIASING_READ)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes7")); return ((LineAttributesRetained)this.retained).getLineAntialiasingEnable(); }
/** * Gets the line width for this LineAttributes component object. * @return the width, in pixels, of line primitives * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public float getLineWidth() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_WIDTH_READ)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes2")); return ((LineAttributesRetained)this.retained).getLineWidth(); }
/** * Gets the line pattern for this LineAttributes component object. * @return the line pattern * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public int getLinePattern() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_PATTERN_READ)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes5")); return ((LineAttributesRetained)this.retained).getLinePattern(); }
/** * Retrieves the line pattern scale factor. * @return the line pattern scale factor * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @since Java 3D 1.2 */ public int getPatternScaleFactor() { if (isLiveOrCompiled() && !this.getCapability(ALLOW_PATTERN_READ)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes11")); return ((LineAttributesRetained)this.retained).getPatternScaleFactor(); }
/** * Retrieves the line pattern mask. * @return the line pattern mask * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * * @since Java 3D 1.2 */ public int getPatternMask() { if (isLiveOrCompiled() && !this.getCapability(ALLOW_PATTERN_READ)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes9")); return ((LineAttributesRetained)this.retained).getPatternMask(); }
/** * Sets the line pattern for this LineAttributes component object. * @param linePattern the line pattern to be used, one of: * PATTERN_SOLID, PATTERN_DASH, PATTERN_DOT, PATTERN_DASH_DOT, or * PATTERN_USER_DEFINED. * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setLinePattern(int linePattern) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_PATTERN_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes3")); if (linePattern < PATTERN_SOLID || linePattern > PATTERN_USER_DEFINED) throw new IllegalArgumentException(J3dI18N.getString("LineAttributes4")); if (isLive()) ((LineAttributesRetained)this.retained).setLinePattern(linePattern); else ((LineAttributesRetained)this.retained).initLinePattern(linePattern); }
/** * Sets the line width for this LineAttributes component object. * @param lineWidth the width, in pixels, of line primitives * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph */ public void setLineWidth(float lineWidth) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_WIDTH_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes1")); if (isLive()) ((LineAttributesRetained)this.retained).setLineWidth(lineWidth); else ((LineAttributesRetained)this.retained).initLineWidth(lineWidth); }
/** * Sets the line pattern scale factor to the specified value. * This is used in conjunction with the patternMask when the * linePattern attribute is set to PATTERN_USER_DEFINED. The * pattern is multiplied by the scale factor such that each bit in * the pattern mask corresponds to that many consecutive pixels. * For example, a scale factor of 3 applied to a pattern mask of * 0x001f would produce a repeating pattern of 15 pixels on * followed by 33 pixels off. The valid range for this attribute * is [1,15]. Values outside this range are clamped. * @param scaleFactor the new line pattern scale factor * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * @see #setPatternMask * * @since Java 3D 1.2 */ public void setPatternScaleFactor(int scaleFactor) { if (isLiveOrCompiled() && !this.getCapability(ALLOW_PATTERN_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes10")); if (isLive()) ((LineAttributesRetained)this.retained).setPatternScaleFactor(scaleFactor); else ((LineAttributesRetained)this.retained).initPatternScaleFactor(scaleFactor); }
/** * Enables or disables line antialiasing * for this LineAttributes component object. * <p> * If antialiasing is enabled, the lines are considered transparent * for rendering purposes. They are rendered with all the other * transparent objects and adhere to the other transparency settings * such as the View transparency sorting policy and the View depth buffer * freeze transparent enable. * </p> * @param state true or false to enable or disable line antialiasing * @exception CapabilityNotSetException if appropriate capability is * not set and this object is part of live or compiled scene graph * @see View */ public void setLineAntialiasingEnable(boolean state) { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_ANTIALIASING_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes6")); if (isLive()) ((LineAttributesRetained)this.retained).setLineAntialiasingEnable(state); else ((LineAttributesRetained)this.retained).initLineAntialiasingEnable(state); }
!this.getCapability(ALLOW_PATTERN_WRITE)) throw new CapabilityNotSetException(J3dI18N.getString("LineAttributes8"));