Package org.eclipse.swt.graphics
Class LineAttributes
- java.lang.Object
-
- org.eclipse.swt.graphics.LineAttributes
-
public class LineAttributes extends java.lang.ObjectLineAttributesdefines 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:
GC.getLineAttributes(),GC.setLineAttributes(LineAttributes), Sample code and further information
-
-
Field Summary
Fields Modifier and Type Field Description intcapThe line cap style.float[]dashThe line dash style for SWT.LINE_CUSTOM.floatdashOffsetThe line dash style offset for SWT.LINE_CUSTOM.intjoinThe line join style.floatmiterLimitThe line miter limit.intstyleThe line style.floatwidthThe 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.inthashCode()Returns an integer hash code for the receiver.
-
-
-
Field Detail
-
width
public float width
The line width.
-
cap
public int cap
The line cap style.- See Also:
SWT.CAP_FLAT,SWT.CAP_ROUND,SWT.CAP_SQUARE
-
join
public int join
The line join style.- See Also:
SWT.JOIN_BEVEL,SWT.JOIN_MITER,SWT.JOIN_ROUND
-
style
public int style
The line style.- Since:
- 3.19
- See Also:
SWT.LINE_CUSTOM,SWT.LINE_DASH,SWT.LINE_DASHDOT,SWT.LINE_DASHDOTDOT,SWT.LINE_DOT,SWT.LINE_SOLID
-
dash
public float[] dash
The line dash style for SWT.LINE_CUSTOM.- Since:
- 3.19
-
dashOffset
public float dashOffset
The line dash style offset for SWT.LINE_CUSTOM.- Since:
- 3.19
-
miterLimit
public float miterLimit
The line miter limit.- Since:
- 3.19
-
-
Constructor Detail
-
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 widthcap- the line cap stylejoin- 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 widthcap- the line cap stylejoin- the line join stylestyle- the line styledash- the line dash styledashOffset- the line dash style offsetmiterLimit- the line miter limit- Since:
- 3.19
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object object)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.- Overrides:
equalsin classjava.lang.Object- Parameters:
object- the object to compare with this object- Returns:
trueif the object is the same as this object andfalseotherwise- Since:
- 1.4
- See Also:
hashCode()
-
hashCode
public int hashCode()
Returns an integer hash code for the receiver. Any two objects that returntruewhen passed toequalsmust return the same value for this method.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the receiver's hash
- Since:
- 1.4
- See Also:
equals(Object)
-
-