Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.ps.dsc.events
Interface DSCEvent

All Superinterfaces:
  DSCParserConstants

All Known Subinterfaces:
  DSCComment

All Known Implementing Classes:
  AbstractDSCComment, AbstractEvent, AbstractResourceDSCComment, AbstractResourcesDSCComment, DSCAtend, DSCCommentBeginDocument, DSCCommentBeginResource, DSCCommentBoundingBox, DSCCommentDocumentNeededResources, DSCCommentDocumentSuppliedResources, DSCCommentEndComments, DSCCommentEndOfFile, DSCCommentHiResBoundingBox, DSCCommentIncludeResource, DSCCommentLanguageLevel, DSCCommentPage, DSCCommentPageBoundingBox, DSCCommentPageHiResBoundingBox, DSCCommentPageResources, DSCCommentPages, DSCCommentTitle, DSCHeaderComment, PostScriptComment, PostScriptLine, UnparsedDSCComment

    public interface DSCEvent

extends DSCParserConstants

Interface representing a DSC event. A DSC event can be a DSC comment, a PostScript comment or a line of PostScript code.

Field Summary

Fields inherited from interface org.apache.xmlgraphics.ps.dsc.DSCParserConstants
`COMMENT, DSC_COMMENT, EOF, HEADER_COMMENT, LINE`

Method Summary
`DSCComment` | `asDSCComment()` Casts this instance to a DSCComment if possible.
`PostScriptLine` | `asLine()` Casts this instance to a PostScriptLine if possible.
`void` | `generate(PSGenerator gen)` Writes the event to the given PSGenerator.
`int` | `getEventType()` Returns the event type.
`boolean` | `isComment()` Indicates whether the instance is a PostScript comment.
`boolean` | `isDSCComment()` Indicates whether the instance is a DSC comment.
`boolean` | `isHeaderComment()` Indicates whether the instance is a header comment.
`boolean` | `isLine()` Indicates whether the instance is a PostScript line.

Method Detail

### getEventType

    int getEventType()

  Returns the event type.

  Returns:
    the event type (see `DSCParserConstants`)

### asDSCComment

    DSCComment asDSCComment()

  Casts this instance to a DSCComment if possible.

  Returns:
    this event as a DSCComment
  Throws:
    `java.lang.ClassCastException` - if the event is no DSCComment

### asLine

    PostScriptLine asLine()

  Casts this instance to a PostScriptLine if possible.

  Returns:
    this event as a PostScriptLine
  Throws:
    `java.lang.ClassCastException` - if the event is no PostScriptLine

### isDSCComment

    boolean isDSCComment()

  Indicates whether the instance is a DSC comment.

  Returns:
    true if the instance is a DSC comment

### isComment

    boolean isComment()

  Indicates whether the instance is a PostScript comment.

  Returns:
    true if the instance is a PostScript comment

### isHeaderComment

    boolean isHeaderComment()

  Indicates whether the instance is a header comment.

  Returns:
    true if the instance is a header comment

### isLine

    boolean isLine()

  Indicates whether the instance is a PostScript line.

  Returns:
    true if the instance is a PostScript line

### generate

    void generate(PSGenerator gen)
                  throws java.io.IOException

  Writes the event to the given PSGenerator.

  Parameters:
    `gen` - the PSGenerator to write to
  Throws:
    `java.io.IOException` - In case of an I/O error

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2018 The Apache Software Foundation. All Rights Reserved.