Top Description Fields Constructors Methods
org.eclipse.swt.graphics

public Class LineAttributes

extends Object
Class Inheritance
Imports
org.eclipse.swt.*

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
3.3
See Also
GC#getLineAttributes(), GC#setLineAttributes(LineAttributes), Sample code and further information

Field Summary

Modifier and TypeField and Description
public int
cap

The line cap style.

public float[]
dash

The line dash style for SWT.LINE_CUSTOM.

public float
dashOffset

The line dash style offset for SWT.LINE_CUSTOM.

public int
join

The line join style.

public float
miterLimit

The line miter limit.

public int
style

The line style.

public float
width

The line width.

Constructor Summary

AccessConstructor and Description
public
LineAttributes(float
the line width
width
)

Create a new line attributes with the specified line width.

public
LineAttributes(float
the line width
width
,
int
the line cap style
cap
,
int
the line join style
join
)

Create a new line attributes with the specified line cap, join and width.

public
LineAttributes(float
the line width
width
,
int
the line cap style
cap
,
int
the line join style
join
,
int
the line style
style
,
float[]
the line dash style
dash
,
float
the line dash style offset
dashOffset
,
float
the line miter limit
miterLimit
)

Create a new line attributes with the specified arguments.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the object is the same as this object and false otherwise
equals
(Object
the object to compare with this object
object
)

Overrides java.lang.Object.equals.

Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
public int

Returns:

the receiver's hash
hashCode
()

Overrides java.lang.Object.hashCode.

Returns an integer hash code for the receiver.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

capback to summary
public int cap

The line cap style.

See Also
org.eclipse.swt.SWT#CAP_FLAT, org.eclipse.swt.SWT#CAP_ROUND, org.eclipse.swt.SWT#CAP_SQUARE
dashback to summary
public float[] dash

The line dash style for SWT.LINE_CUSTOM.

dashOffsetback to summary
public float dashOffset

The line dash style offset for SWT.LINE_CUSTOM.

joinback to summary
public int join

The line join style.

See Also
org.eclipse.swt.SWT#JOIN_BEVEL, org.eclipse.swt.SWT#JOIN_MITER, org.eclipse.swt.SWT#JOIN_ROUND
miterLimitback to summary
public float miterLimit

The line miter limit.

styleback to summary
public int style

The line style.

See Also
org.eclipse.swt.SWT#LINE_CUSTOM, org.eclipse.swt.SWT#LINE_DASH, org.eclipse.swt.SWT#LINE_DASHDOT, org.eclipse.swt.SWT#LINE_DASHDOTDOT, org.eclipse.swt.SWT#LINE_DOT, org.eclipse.swt.SWT#LINE_SOLID
widthback to summary
public float width

The line width.

Constructor Detail

LineAttributesback to summary
public LineAttributes(float width)

Create a new line attributes with the specified line width.

Parameters
width:float

the line width

LineAttributesback to summary
public LineAttributes(float width, int cap, int join)

Create a new line attributes with the specified line cap, join and width.

Parameters
width:float

the line width

cap:int

the line cap style

join:int

the line join style

LineAttributesback to summary
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:float

the line width

cap:int

the line cap style

join:int

the line join style

style:int

the line style

dash:float[]

the line dash style

dashOffset:float

the line dash style offset

miterLimit:float

the line miter limit

Method Detail

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.

Parameters
object:Object

the object to compare with this object

Returns:boolean

true if the object is the same as this object and false otherwise

Annotations
@Override
See Also
hashCode()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.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.

Returns:int

the receiver's hash

Annotations
@Override
See Also
equals(Object)