public class BasicSAXHandler extends ResolverSAXHandler
ResolverSAXHandler.ExceptionResult, ResolverSAXHandler.InformationResult, ResolverSAXHandler.SourceWrapper
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_COLUMNS |
static String |
DEFAULT_ERROR_COLOR |
static String |
DEFAULT_INFO_COLOR |
static int |
DEFAULT_ROWS |
static int |
DEFAULT_SIZE |
static String |
DEFAULT_WARNING_COLOR |
CACHE_DEFAULT, dtd, ERRORS, FATAL, INFO, locator, NO_ERRORS, publicDTD, resolver, results, status, WARNINGS
CACHING_DEFAULT, CACHING_SOURCES, NOT_CACHING_SOURCES
Constructor and Description |
---|
BasicSAXHandler() |
BasicSAXHandler(List<ResolverSAXHandler.ExceptionResult> results)
Create a new BasicSAXHandler with an existing list of results.
|
Modifier and Type | Method and Description |
---|---|
protected JTextArea |
constructExceptionArea() |
protected JTextPane |
constructExceptionPane() |
void |
filterInfos(boolean filterInfos)
Set if the information messages have to be filtered.
|
JTextPane |
getErrorsAsTextPane()
Return the result messages as a text pane.
|
JScrollPane |
getLogTextArea()
Deprecated.
replaced by
getScrollPane() |
JScrollPane |
getScrollPane()
Returns a JScrollPane containing the list of errors encountered during parsing.
|
JScrollPane |
getStyledScrollPane()
Returns a JScrollPane containing the list of errors encountered during parsing.
|
String |
getText()
Return the error messages as a String.
|
JTextArea |
getTextArea()
Return the result messages as a textArea.
|
void |
reset()
Reset this handler.
|
void |
setDimension(int rows,
int columns)
Set the dimension of the Exception dialog.
|
void |
setErrorColor(String errorHTMLColor)
Set the html color for errors.
|
void |
setInformationColor(String infoHTMLColor)
Set the html color for information messages.
|
void |
setWarningColor(String warningHTMLColor)
Set the html color for warnings.
|
endDocument, endDTD, error, error, errorImpl, fatalError, fatalError, fatalErrorImpl, getDocumentBaseURL, getDocumentLocator, getDTD, getEntityResolver, getExceptionResults, getExceptions, getExceptionsResultsByLine, getExternalSubset, getFirstException, getInputSourceCaching, getStatus, hasErrors, hasParserExceptions, hasStartedElements, info, info, isDocumentStarted, isElementStarted, resolveEntity, resolveEntity, resolveResource, restart, setDocumentLocator, setDTD, setEntityResolver, setInputSourceCaching, setStatus, startDocument, startElement, warning, warning, warningImpl
attributeDecl, comment, elementDecl, endCDATA, endEntity, externalEntityDecl, internalEntityDecl, startCDATA, startDTD, startEntity
characters, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, skippedEntity, startPrefixMapping, unparsedEntityDecl
public static final int DEFAULT_ROWS
public static final int DEFAULT_COLUMNS
public static final int DEFAULT_SIZE
public static final String DEFAULT_INFO_COLOR
public static final String DEFAULT_WARNING_COLOR
public static final String DEFAULT_ERROR_COLOR
public BasicSAXHandler(List<ResolverSAXHandler.ExceptionResult> results)
results
- the existing list of resultspublic BasicSAXHandler()
public void setInformationColor(String infoHTMLColor)
infoHTMLColor
- the html color for information messagespublic void setWarningColor(String warningHTMLColor)
warningHTMLColor
- the html color for warningspublic void setErrorColor(String errorHTMLColor)
errorHTMLColor
- the html color for errorspublic void filterInfos(boolean filterInfos)
filterInfos
- true f the information messages have to be filteredpublic void setDimension(int rows, int columns)
rows
- the number of rowscolumns
- the number of columnspublic void reset()
reset
in class ResolverSAXHandler
public JScrollPane getLogTextArea()
getScrollPane()
public JScrollPane getScrollPane()
public JScrollPane getStyledScrollPane()
public JTextPane getErrorsAsTextPane()
filterInfos(boolean)
).
If you want not to have any resulting panel if there are only informations, you will be able to do it by doing before getting the panel:
if (handler.getStatus() >= BasicSAXHandler.WARNING) { JTextPane pane = handler.getErrorsAsTextPane()(); }
public JTextArea getTextArea()
filterInfos(boolean)
).
If you want not to have any resulting panel if there are only informations, you will be able to do it by doing before getting the panel:
if (handler.getStatus() >= BasicSAXHandler.WARNING) { JTextArea pane = handler.getTextArea()(); }
public String getText()
protected JTextArea constructExceptionArea()
protected JTextPane constructExceptionPane()