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.
GC.getLineAttributes(),
GC.setLineAttributes(LineAttributes),
Sample code and further information| Modifier and Type | Field and Description |
|---|---|
int |
cap
The line cap style.
|
float[] |
dash
The line dash style for SWT.LINE_CUSTOM.
|
float |
dashOffset
The line dash style offset for SWT.LINE_CUSTOM.
|
int |
join
The line join style.
|
float |
miterLimit
The line miter limit.
|
int |
style
The line style.
|
float |
width
The line width.
|
| Constructor and 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.
|
public float width
public int style
public int cap
SWT.CAP_FLAT,
SWT.CAP_ROUND,
SWT.CAP_SQUAREpublic int join
SWT.JOIN_BEVEL,
SWT.JOIN_MITER,
SWT.JOIN_ROUNDpublic float[] dash
public float dashOffset
public float miterLimit
public LineAttributes(float width)
width - the line widthpublic LineAttributes(float width,
int cap,
int join)
width - the line widthcap - the line cap stylejoin - the line join stylepublic LineAttributes(float width,
int cap,
int join,
int style,
float[] dash,
float dashOffset,
float miterLimit)
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 limitpublic boolean equals(Object object)
equals in class Objectobject - the object to compare with this objecttrue if the object is the same as this object and false otherwisehashCode()public int hashCode()
true when passed to
equals must return the same value for this
method.hashCode in class Objectequals(Object)
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.