Top Description Inners Fields Constructors Methods
de.undercouch.citeproc.csl.internal.token

public Class DisplayGroupToken

extends Token
Class Inheritance
Imports
de.undercouch.citeproc.csl.internal.behavior.FormattingAttributes

A token that controls how text blocks should be displayed
Author
Michel Kraemer

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
DisplayGroupToken.Type

The token's type

Field Summary

Modifier and TypeField and Description
private final boolean
private final DisplayGroupToken.Type

Constructor Summary

AccessConstructor and Description
public
DisplayGroupToken(boolean
true if the token opens a new display group, false if it closes it
open
,
DisplayGroupToken.Type
the token's type
type
)

Construct a new token

public
DisplayGroupToken(boolean
true if the token opens a new display group, false if it closes it
open
,
DisplayGroupToken.Type
the token's type
type
,
int
the token's formatting attributes
formattingAttributes
)

Construct a new token

public
DisplayGroupToken(boolean
true if the token opens a new display group, false if it closes it
open
,
DisplayGroupToken.Type
the token's type
type
,
int
the token's formatting attributes
formattingAttributes
,
boolean
true if the token is part of the first
firstField
)

Construct a new token

Method Summary

Modifier and TypeMethod and Description
public DisplayGroupToken
copyWithFirstField(boolean firstField)

Implements abstract de.undercouch.citeproc.csl.internal.token.Token.copyWithFirstField.

Create a copy of this token but replaces its first-field flag

public DisplayGroupToken.Type

Returns:

the type
getType
()

Get the token's type

public boolean

Returns:

the true if the token opens a new display group, false if it closes it
isOpen
()

Get whether the token opens a display group (true) or if it closes it (false)

public Token
wrapFormattingAttributes(int otherFormattingAttributes)

Implements abstract de.undercouch.citeproc.csl.internal.token.Token.wrapFormattingAttributes.

Wrap other formatting attributes around the formatting attributes of this token and return a new token.

Inherited from de.undercouch.citeproc.csl.internal.token.Token:
getFormattingAttributesisFirstField

Field Detail

openback to summary
private final boolean open
typeback to summary
private final DisplayGroupToken.Type type

Constructor Detail

DisplayGroupTokenback to summary
public DisplayGroupToken(boolean open, DisplayGroupToken.Type type)

Construct a new token

Parameters
open:boolean

true if the token opens a new display group, false if it closes it

type:DisplayGroupToken.Type

the token's type

DisplayGroupTokenback to summary
public DisplayGroupToken(boolean open, DisplayGroupToken.Type type, int formattingAttributes)

Construct a new token

Parameters
open:boolean

true if the token opens a new display group, false if it closes it

type:DisplayGroupToken.Type

the token's type

formattingAttributes:int

the token's formatting attributes

DisplayGroupTokenback to summary
public DisplayGroupToken(boolean open, DisplayGroupToken.Type type, int formattingAttributes, boolean firstField)

Construct a new token

Parameters
open:boolean

true if the token opens a new display group, false if it closes it

type:DisplayGroupToken.Type

the token's type

formattingAttributes:int

the token's formatting attributes

firstField:boolean

true if the token is part of the first

Method Detail

copyWithFirstFieldback to summary
public DisplayGroupToken copyWithFirstField(boolean firstField)

Implements abstract de.undercouch.citeproc.csl.internal.token.Token.copyWithFirstField.

Doc from de.undercouch.citeproc.csl.internal.token.Token.copyWithFirstField.

Create a copy of this token but replaces its first-field flag

Annotations
@Override
getTypeback to summary
public DisplayGroupToken.Type getType()

Get the token's type

Returns:DisplayGroupToken.Type

the type

isOpenback to summary
public boolean isOpen()

Get whether the token opens a display group (true) or if it closes it (false)

Returns:boolean

the true if the token opens a new display group, false if it closes it

wrapFormattingAttributesback to summary
public Token wrapFormattingAttributes(int otherFormattingAttributes)

Implements abstract de.undercouch.citeproc.csl.internal.token.Token.wrapFormattingAttributes.

Doc from de.undercouch.citeproc.csl.internal.token.Token.wrapFormattingAttributes.

Wrap other formatting attributes around the formatting attributes of this token and return a new token. The formatting attributes of this token will be merged into the other attributes, so that attributes that are set in this token overwrite the other attributes.

Annotations
@Override
de.undercouch.citeproc.csl.internal.token back to summary

public final Enum DisplayGroupToken.Type

extends Enum<DisplayGroupToken.Type>
Class Inheritance

The token's type

Field Summary

Modifier and TypeField and Description
public static final DisplayGroupToken.Type
BLOCK

The group should be displayed as a text block

public static final DisplayGroupToken.Type
INDENT

The group is a text block indented to the right

public static final DisplayGroupToken.Type
LEFT_MARGIN

The group is a text block that should start at the left margin

public static final DisplayGroupToken.Type
RIGHT_INLINE

The group represents a text block starting to the right of a preceding left-margin block

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static DisplayGroupToken.Type
public static DisplayGroupToken.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BLOCKback to summary
public static final DisplayGroupToken.Type BLOCK

The group should be displayed as a text block

INDENTback to summary
public static final DisplayGroupToken.Type INDENT

The group is a text block indented to the right

LEFT_MARGINback to summary
public static final DisplayGroupToken.Type LEFT_MARGIN

The group is a text block that should start at the left margin

RIGHT_INLINEback to summary
public static final DisplayGroupToken.Type RIGHT_INLINE

The group represents a text block starting to the right of a preceding left-margin block

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static DisplayGroupToken.Type valueOf(String name)
valuesback to summary
public static DisplayGroupToken.Type[] values()