KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > editor > errorstripe > privatespi > Mark


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.editor.errorstripe.privatespi;
21
22 import java.awt.Color JavaDoc;
23
24 /**Provides description of a mark that should be displayed in the Error Stripe.
25  *
26  * @author Jan Lahoda
27  */

28 public interface Mark {
29
30     /**Mark that is error-like. The mark will be shown as
31      * a thin horizontal line.
32      */

33     public static final int TYPE_ERROR_LIKE = 1;
34
35     public static final int TYPE_CARET = 2;
36
37     /**Default priority.
38      */

39     public static final int PRIORITY_DEFAULT = 1000;
40
41     /**Return of what type is this mark. Currently only one type
42      * exists: {@link #TYPE_ERROR_LIKE}. Other types may be
43      * introduced later.
44      *
45      * @return {@link #TYPE_ERROR_LIKE}
46      */

47     public int getType();
48     
49     /**Returns status that represents this mark.
50      *
51      *@return status representing this mark
52      */

53     public Status getStatus();
54     
55     /**Returns priority of this mark. The priority prioritizes the marks in the same
56      * status. The smaller number, the greater priority.
57      *
58      * @return priority of this mark
59      * @see #PRIORITY_DEFAULT
60      */

61     public int getPriority();
62     
63     /**Returns enhanced (non-standard) color of this mark. If null, default color
64      * for given status will be used.
65      *
66      * @return Color or null if default should be used.
67      */

68     public Color JavaDoc getEnhancedColor();
69     
70     /**Returns line span which represents this mark.
71      *
72      * @return an array of size two, the first item represents starting line of the span,
73      * the second item ending line of the span. Both lines are inclusive.
74      */

75     public int[] getAssignedLines();
76     
77     /**Return some human readable short description to be shown for
78      * example in tooltips.
79      *
80      * @return a short description.
81      */

82     public String JavaDoc getShortDescription();
83     
84 }
85
Popular Tags