Class LineAttributes

java.lang.Object
org.eclipse.swt.graphics.LineAttributes

public class LineAttributes extends Object
LineAttributes defines a set of line attributes that can be modified in a GC.

Application code does not need to explicitly release the resources managed by each instance when those instances are no longer required, and thus no dispose() method is provided.

Since:
1.3
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    The line cap style.
    float[]
    The line dash style for SWT.LINE_CUSTOM.
    float
    The line dash style offset for SWT.LINE_CUSTOM.
    int
    The line join style.
    float
    The line miter limit.
    int
    The line style.
    float
    The line width.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LineAttributes(float width)
    Create a new line attributes with the specified line width.
    LineAttributes(float width, int cap, int join)
    Create a new line attributes with the specified line cap, join and width.
    LineAttributes(float width, int cap, int join, int style, float[] dash, float dashOffset, float miterLimit)
    Create a new line attributes with the specified arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object object)
    Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
    int
    Returns an integer hash code for the receiver.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LineAttributes

      public LineAttributes(float width)
      Create a new line attributes with the specified line width.
      Parameters:
      width - the line width
    • LineAttributes

      public LineAttributes(float width, int cap, int join)
      Create a new line attributes with the specified line cap, join and width.
      Parameters:
      width - the line width
      cap - the line cap style
      join - the line join style
    • LineAttributes

      public LineAttributes(float width, int cap, int join, int style, float[] dash, float dashOffset, float miterLimit)
      Create a new line attributes with the specified arguments.
      Parameters:
      width - the line width
      cap - the line cap style
      join - the line join style
      style - the line style
      dash - the line dash style
      dashOffset - the line dash style offset
      miterLimit - the line miter limit
      Since:
      3.19
  • Method Details

    • equals

      public boolean equals(Object object)
      Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
      Overrides:
      equals in class Object
      Parameters:
      object - the object to compare with this object
      Returns:
      true if the object is the same as this object and false otherwise
      Since:
      1.4
      See Also:
    • hashCode

      public int hashCode()
      Returns an integer hash code for the receiver. Any two objects that return true when passed to equals must return the same value for this method.
      Overrides:
      hashCode in class Object
      Returns:
      the receiver's hash
      Since:
      1.4
      See Also: