: Class LineAttributes

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.media.j3d
Class LineAttributes

    java.lang.Object
      |
      +--javax.media.j3d.SceneGraphObject
            |
            +--javax.media.j3d.NodeComponent
                  |
                  +--javax.media.j3d.LineAttributes

public class LineAttributes
extends NodeComponent

The LineAttributes object defines all rendering state that can be set as a component object of a Shape3D node.

Field Summary
`static int` | `ALLOW_ANTIALIASING_READ` Specifies that this LineAttributes object allows reading its line antialiasing flag.
`static int` | `ALLOW_ANTIALIASING_WRITE` Specifies that this LineAttributes object allows writing its line antialiasing flag.
`static int` | `ALLOW_PATTERN_READ` Specifies that this LineAttributes object allows reading its line pattern information.
`static int` | `ALLOW_PATTERN_WRITE` Specifies that this LineAttributes object allows writing its line pattern information.
`static int` | `ALLOW_WIDTH_READ` Specifies that this LineAttributes object allows reading its line width information.
`static int` | `ALLOW_WIDTH_WRITE` Specifies that this LineAttributes object allows writing its line width information.
`static int` | `PATTERN_DASH` Draw a dashed line.
`static int` | `PATTERN_DASH_DOT` Draw a dashed-dotted line.
`static int` | `PATTERN_DOT` Draw a dotted line.
`static int` | `PATTERN_SOLID` Draw a solid line with no pattern.

Constructor Summary
`LineAttributes()` Constructs a LineAttributes object with default parameters.
`LineAttributes(float lineWidth, int linePattern, boolean lineAntialiasing)` Constructs a LineAttributes object with specified values.

Method Summary
`NodeComponent` | `cloneNodeComponent()` Creates a new LineAttributes object.
`void` | `duplicateNodeComponent(NodeComponent originalNodeComponent)` Copies the information found in `originalNodeComponent` to the current node.
`boolean` | `getLineAntialiasingEnable()` Retrieves the state of the line antialiasing flag.
`int` | `getLinePattern()` Gets the line pattern for this lineAttributes component object.
`float` | `getLineWidth()` Gets the line width for this lineAttributes component object.
`void` | `setLineAntialiasingEnable(boolean state)` Enables or disables line antialiasing for this lineAttributes component object.
`void` | `setLinePattern(int linePattern)` Sets the line pattern for this lineAttributes component object.
`void` | `setLineWidth(float lineWidth)` Sets the line width for this lineAttributes component object.

Methods inherited from class javax.media.j3d.NodeComponent
`getDuplicateOnCloneTree, setDuplicateOnCloneTree`

Methods inherited from class javax.media.j3d.SceneGraphObject
`clearCapability, duplicateSceneGraphObject, getCapability, getUserData, isCompiled, isLive, setCapability, setUserData`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ALLOW_WIDTH_READ

    public static final int ALLOW_WIDTH_READ

  Specifies that this LineAttributes object allows reading its line width information.

### ALLOW_WIDTH_WRITE

    public static final int ALLOW_WIDTH_WRITE

  Specifies that this LineAttributes object allows writing its line width information.

### ALLOW_PATTERN_READ

    public static final int ALLOW_PATTERN_READ

  Specifies that this LineAttributes object allows reading its line pattern information.

### ALLOW_PATTERN_WRITE

    public static final int ALLOW_PATTERN_WRITE

  Specifies that this LineAttributes object allows writing its line pattern information.

### ALLOW_ANTIALIASING_READ

    public static final int ALLOW_ANTIALIASING_READ

  Specifies that this LineAttributes object allows reading its line antialiasing flag.

### ALLOW_ANTIALIASING_WRITE

    public static final int ALLOW_ANTIALIASING_WRITE

  Specifies that this LineAttributes object allows writing its line antialiasing flag.

### PATTERN_SOLID

    public static final int PATTERN_SOLID

  Draw a solid line with no pattern.

### PATTERN_DASH

    public static final int PATTERN_DASH

  Draw a dashed line. Ideally, this will be drawn with a repeating pattern of 8 pixels on and 8 pixels off.

### PATTERN_DOT

    public static final int PATTERN_DOT

  Draw a dotted line. Ideally, this will be drawn with a repeating pattern of 1 pixel on and 7 pixels off.

### PATTERN_DASH_DOT

    public static final int PATTERN_DASH_DOT

  Draw a dashed-dotted line. Ideally, this will be drawn with a repeating pattern of 7 pixels on, 4 pixels off, 1 pixel on, and 4 pixels off.

Constructor Detail

### LineAttributes

    public LineAttributes()

  Constructs a LineAttributes object with default parameters. The default values are as follows:
  line width : 1
  line pattern : PATTERN_SOLID
  line antialiasing : false

### LineAttributes

    public LineAttributes(float lineWidth,
                          int linePattern,
                          boolean lineAntialiasing)

  Constructs a LineAttributes object with specified values.
  Parameters:
    `lineWidth` - the width of lines.
    `linePattern` - the line pattern, one of PATTERN_SOLID, PATTERN_DASH, PATTERN_DOT, or PATTERN_DASH_DOT
    `lineAntialiasing` - flag to set line antialising ON or OFF

Method Detail

### setLineWidth

    public final void setLineWidth(float lineWidth)

  Sets the line width for this lineAttributes component object.
  Parameters:
    `lineWidth` - the width, in pixels, of line primitives
  Throws:
    CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

### getLineWidth

    public final float getLineWidth()

  Gets the line width for this lineAttributes component object.
  Returns:
    the width, in pixels, of line primitives
  Throws:
    CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

### setLinePattern

    public final void setLinePattern(int linePattern)

  Sets the line pattern for this lineAttributes component object.
  Parameters:
    `linePattern` - the line pattern to be used, one of: PATTERN_SOLID, PATTERN_DASH, PATTERN_DOT, or PATTERN_DASH_DOT
  Throws:
    CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

### getLinePattern

    public final int getLinePattern()

  Gets the line pattern for this lineAttributes component object.
  Returns:
    the line pattern
  Throws:
    CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

### setLineAntialiasingEnable

    public final void setLineAntialiasingEnable(boolean state)

  Enables or disables line antialiasing for this lineAttributes component object.
  Parameters:
    `state` - true or false to enable or disable line antialiasing
  Throws:
    CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

### getLineAntialiasingEnable

    public final boolean getLineAntialiasingEnable()

  Retrieves the state of the line antialiasing flag.
  Returns:
    true if line antialiasing is enabled, false if line antialiasing is disabled
  Throws:
    CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

### cloneNodeComponent

    public NodeComponent cloneNodeComponent()

  Creates a new LineAttributes object. Called from a Leaf node's `duplicateNode` method.
  Overrides:
    cloneNodeComponent in class NodeComponent
  Returns:
    a duplicate of the LineAttributes object.
  See Also:
    `Node.duplicateNode(javax.media.j3d.Node, boolean)`, `Node.cloneTree()`, `NodeComponent.setDuplicateOnCloneTree(boolean)`

### duplicateNodeComponent

    public void duplicateNodeComponent(NodeComponent originalNodeComponent)

  Copies the information found in `originalNodeComponent` to the current node. This routine is called as part of the `cloneTree` operation.
  Overrides:
    duplicateNodeComponent in class NodeComponent
  Parameters:
    `originalNodeComponent` - the node to duplicate.
  See Also:
    `Node.cloneTree()`, `Node.cloneNode(boolean)`, `Node.duplicateNode(javax.media.j3d.Node, boolean)`, `NodeComponent.setDuplicateOnCloneTree(boolean)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD