mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 19:05:34 +01:00
59 lines
1.1 KiB
Java
Executable File
59 lines
1.1 KiB
Java
Executable File
package processing.mode.experimental;
|
|
/**
|
|
* Error markers displayed on the Error Bar.
|
|
*
|
|
* @author Manindra Moharana <me@mkmoharana.com>
|
|
*
|
|
*/
|
|
public class ErrorMarker {
|
|
/**
|
|
* y co-ordinate of the marker
|
|
*/
|
|
private int y;
|
|
/**
|
|
* Type of marker: Error or Warning?
|
|
*/
|
|
private int type = -1;
|
|
/**
|
|
* Error Type constant
|
|
*/
|
|
public static final int Error = 1;
|
|
/**
|
|
* Warning Type constant
|
|
*/
|
|
public static final int Warning = 2;
|
|
/**
|
|
* Problem that the error marker represents
|
|
* @see Problem
|
|
*/
|
|
private Problem problem;
|
|
|
|
public ErrorMarker(Problem problem, int y, int type) {
|
|
this.problem = problem;
|
|
this.y = y;
|
|
this.type = type;
|
|
}
|
|
|
|
/**
|
|
* y co-ordinate of the marker
|
|
*/
|
|
public int getY() {
|
|
return y;
|
|
}
|
|
|
|
/**
|
|
* Type of marker: ErrorMarker.Error or ErrorMarker.Warning?
|
|
*/
|
|
public int getType() {
|
|
return type;
|
|
}
|
|
|
|
/**
|
|
* Problem that the error marker represents
|
|
* @see Problem
|
|
*/
|
|
public Problem getProblem() {
|
|
return problem;
|
|
}
|
|
|
|
} |