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

public Class Bullet

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

Instances of this class represent bullets in the StyledText.

The hashCode() method in this class uses the values of the public fields to compute the hash value. When storing instances of the class in hashed collections, do not modify these fields after the object has been inserted.

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.2
See Also
StyledText#setLineBullet(int, int, Bullet), Sample code and further information

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int[]
public StyleRange
style

The bullet style.

public String
text

The bullet text.

public int
type

The bullet type.

Constructor Summary

AccessConstructor and Description
public
Bullet(StyleRange
the style
style
)

Create a new bullet with the specified style, and type ST.BULLET_DOT.

public
Bullet(int
the bullet type
type
,
StyleRange
the style
style
)

Create a new bullet the specified style and type.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addIndices(int startLine, int lineCount)

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
pack-priv int
indexOf(int lineIndex)

pack-priv int[]
removeIndices(int startLine, int replaceLineCount, int newLineCount, boolean update)

pack-priv int
size()

Inherited from java.lang.Object:
cloneequalsfinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
pack-priv int count
linesIndicesback to summary
pack-priv int[] linesIndices
styleback to summary
public StyleRange style

The bullet style.

textback to summary
public String text

The bullet text.

typeback to summary
public int type

The bullet type. Possible values are:

  • ST.BULLET_DOT
  • ST.BULLET_NUMBER
  • ST.BULLET_LETTER_LOWER
  • ST.BULLET_LETTER_UPPER
  • ST.BULLET_TEXT
  • ST.BULLET_CUSTOM

Constructor Detail

Bulletback to summary
public Bullet(StyleRange style)

Create a new bullet with the specified style, and type ST.BULLET_DOT. The style must have a glyph metrics set.

Parameters
style:StyleRange

the style

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT when the style or the glyph metrics are null
Bulletback to summary
public Bullet(int type, StyleRange style)

Create a new bullet the specified style and type. The style must have a glyph metrics set.

Parameters
type:int

the bullet type

style:StyleRange

the style

Exceptions
IllegalArgumentException:
  • ERROR_NULL_ARGUMENT when the style or the glyph metrics are null

Method Detail

addIndicesback to summary
pack-priv void addIndices(int startLine, int lineCount)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
indexOfback to summary
pack-priv int indexOf(int lineIndex)
removeIndicesback to summary
pack-priv int[] removeIndices(int startLine, int replaceLineCount, int newLineCount, boolean update)
sizeback to summary
pack-priv int size()