org.netbeans.modules.editor.lib/1 1.44.0 9

org.netbeans.editor
Class AnnotationType.Severity

java.lang.Object
  extended by org.netbeans.editor.AnnotationType.Severity
All Implemented Interfaces:
Comparable
Enclosing class:
AnnotationType

public static final class AnnotationType.Severity
extends Object
implements Comparable


Field Summary
static AnnotationType.Severity STATUS_ERROR
          Status error.
static AnnotationType.Severity STATUS_NONE
          Status OK.
static AnnotationType.Severity STATUS_OK
          Status OK.
static AnnotationType.Severity STATUS_WARNING
          Status warning.
 
Method Summary
 int compareTo(Object o)
          
 boolean equals(Object o)
          
static AnnotationType.Severity getCompoundStatus(AnnotationType.Severity first, AnnotationType.Severity second)
          Return the more important status out of the two given statuses.
static Color getDefaultColor(AnnotationType.Severity s)
          Returns default Color for a given Status.
 String getName()
           
 int hashCode()
          
 String toString()
          Returns a String representation of the Status.
static AnnotationType.Severity valueOf(String severity)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_NONE

public static final AnnotationType.Severity STATUS_NONE
Status OK.


STATUS_OK

public static final AnnotationType.Severity STATUS_OK
Status OK.


STATUS_WARNING

public static final AnnotationType.Severity STATUS_WARNING
Status warning.


STATUS_ERROR

public static final AnnotationType.Severity STATUS_ERROR
Status error.

Method Detail

compareTo

public int compareTo(Object o)

Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()
Returns a String representation of the Status. The format of the String is not specified. This method should only be used for debugging purposes.

Overrides:
toString in class Object
Returns:
String representation of this object

getCompoundStatus

public static AnnotationType.Severity getCompoundStatus(AnnotationType.Severity first,
                                                        AnnotationType.Severity second)
                                                 throws IllegalArgumentException
Return the more important status out of the two given statuses. The statuses are ordered as follows: STATUS_ERROR>STATUS_WARNING>STATUS_OK.

Parameters:
first - one provided status
second - another provided status
Returns:
the more important status out of the two provided statuses
Throws:
IllegalArgumentException - if one of the provided statuses is something else then STATUS_ERROR, STATUS_WARNING and STATUS_OK

getDefaultColor

public static Color getDefaultColor(AnnotationType.Severity s)
Returns default Color for a given Status.

Parameters:
s - Status for which default color should be found
Returns:
default Color for a given Status

valueOf

public static AnnotationType.Severity valueOf(String severity)

getName

public String getName()

org.netbeans.modules.editor.lib/1 1.44.0 9

Built on November 22 2009.  |  Portions Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.