Package com.inet.problemfinder
Interface ProblemFinderWarning
-
- All Superinterfaces:
java.lang.Comparable<ProblemFinderWarning>
public interface ProblemFinderWarning extends java.lang.Comparable<ProblemFinderWarning>
Represents a Warning/Error/Info detected byProblemFinder.
EveryProblemFinderWarninghas a source object, which causes the Warning. Possible sources can beElement/Section/Fieldor a specificProblemFinderWarning.Sourcesobject.
The MethodgetTriggeringRule()returns theProblemFinderRulethat causes this Warning.
canAutoFix()returnstrueif it is possible that this Warning can be 'auto-fixed'. That means you can get viagetAutoFixActions()a list of one or more Actions, that manipulates theEngineto correct the problem by performing the Action.
For example :
AnEnginethat has aText-Element with a height less than 30 Twips causes aProblemFinderWarningwith TypeProblemFinderWarning.Type.WARNING.
getTriggeringRule()returns theRuleElementToSmallandgetSource()returns theText-Element itself.
WithgetAutoFixActions()you get a list with twoActions. The first Action resizes the Element to a minimum of 300 Twips and the second Action sets the Element-PropertyElement.setCanGrow(boolean)totrue.Attention: The
ProblemFinderWarningAutoFix-Actions manipulate theEngine, use it carefully or back up your reports if you plan on replacing your report files.- Since:
- 11.0
- See Also:
ProblemFinder
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classProblemFinderWarning.SourcesThe source object exceptions that can be returned bygetSource().static classProblemFinderWarning.TypeTheProblemFinderWarningtypes
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanAutoFix()Whether this warning can be auto-fixedintcompareTo(ProblemFinderWarning warning)Compares this ProblemFinderWarning with the specified ProblemFinderWarning for order.java.util.List<javax.swing.AbstractAction>getAutoFixActions()Returns the Actions which autofix this problem.
Each Action has a description about what it does.java.lang.StringgetMessage()Returns the message which describes this problem.java.lang.ObjectgetSource()java.lang.StringgetSourceMessage()Returns the message which describes the problem source.ProblemFinderRulegetTriggeringRule()Returns theProblemFinderRulethat causes the Warning.ProblemFinderWarning.TypegetWarningType()Returns the type of this problem, that can be error, warning or info.
-
-
-
Method Detail
-
canAutoFix
boolean canAutoFix()
Whether this warning can be auto-fixed- Returns:
trueif can be auto-fixed, otherwisefalse.- Since:
- 11.0
-
getAutoFixActions
java.util.List<javax.swing.AbstractAction> getAutoFixActions()
Returns the Actions which autofix this problem.
Each Action has a description about what it does. You can get it viaAction.getValue(Action.NAME)- Returns:
- the proposed actions to fix this problem.
- Since:
- 11.0
-
getWarningType
ProblemFinderWarning.Type getWarningType()
Returns the type of this problem, that can be error, warning or info.- Returns:
- the type of this problem
- Since:
- 11.0
- See Also:
ProblemFinderWarning.Type
-
getMessage
java.lang.String getMessage()
Returns the message which describes this problem.- Returns:
- the message describing the problem
- Since:
- 11.0
-
getTriggeringRule
ProblemFinderRule getTriggeringRule()
Returns theProblemFinderRulethat causes the Warning.- Returns:
- the
ProblemFinderRulethat initiate the Check that causes the Warning. - Since:
- 11.0
-
getSource
java.lang.Object getSource()
- Returns:
- the source Object that was found by the ProblemFinderRule
- Since:
- 11.0
-
getSourceMessage
java.lang.String getSourceMessage()
Returns the message which describes the problem source.- Returns:
- the message describing the problem source object.
- Since:
- 11.0
-
compareTo
int compareTo(ProblemFinderWarning warning)
Compares this ProblemFinderWarning with the specified ProblemFinderWarning for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
The Sort carried out in three steps:- If the
getWarningType()are not equal, it compares the enumProblemFinderWarning.Type. - If the
getTriggeringRule()are not equal, it compares the class name of theProblemFinderRule - Else it compares the
getMessage()lexicographically.
- Specified by:
compareToin interfacejava.lang.Comparable<ProblemFinderWarning>- Parameters:
warning- the ProblemFinderWarning to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Since:
- 11.0
- If the
-
-