Class PostScriptLine
java.lang.Object
org.apache.xmlgraphics.ps.dsc.events.AbstractEvent
org.apache.xmlgraphics.ps.dsc.events.PostScriptLine
- All Implemented Interfaces:
DSCParserConstants
,DSCEvent
Represents a line of PostScript code.
-
Field Summary
Fields inherited from interface org.apache.xmlgraphics.ps.dsc.DSCParserConstants
COMMENT, DSC_COMMENT, EOF, HEADER_COMMENT, LINE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasLine()
Casts this instance to a PostScriptLine if possible.void
generate
(PSGenerator gen) Writes the event to the given PSGenerator.int
Returns the event type.getLine()
Returns the code line.boolean
isLine()
Indicates whether the instance is a PostScript line.Methods inherited from class org.apache.xmlgraphics.ps.dsc.events.AbstractEvent
asDSCComment, isComment, isDSCComment, isHeaderComment
-
Constructor Details
-
PostScriptLine
Creates a new instance.- Parameters:
line
- the code line
-
-
Method Details
-
getLine
Returns the code line.- Returns:
- the code line
-
generate
Description copied from interface:DSCEvent
Writes the event to the given PSGenerator.- Parameters:
gen
- the PSGenerator to write to- Throws:
IOException
- In case of an I/O error- See Also:
-
getEventType
public int getEventType()Description copied from interface:DSCEvent
Returns the event type.- Returns:
- the event type (see
DSCParserConstants
) - See Also:
-
asLine
Description copied from interface:DSCEvent
Casts this instance to a PostScriptLine if possible.- Specified by:
asLine
in interfaceDSCEvent
- Overrides:
asLine
in classAbstractEvent
- Returns:
- this event as a PostScriptLine
- See Also:
-
isLine
public boolean isLine()Description copied from interface:DSCEvent
Indicates whether the instance is a PostScript line.- Specified by:
isLine
in interfaceDSCEvent
- Overrides:
isLine
in classAbstractEvent
- Returns:
- true if the instance is a PostScript line
- See Also:
-