Package uk.ac.starlink.ttools.plot2
Class LayerOpt
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.LayerOpt
-
@Equality public class LayerOpt extends java.lang.Object
Defines characteristics of a plot layer that may enable plotting optimisations.- Since:
- 12 Feb 2013
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description static LayerOpt
NO_SPECIAL
Indicates layer with no known optimisation assumptions.static LayerOpt
OPAQUE
Indicates opaque multicoloured layer.
-
Constructor Summary
Constructors Constructor Description LayerOpt(java.awt.Color singleColor, boolean opaque)
Constructs a LayerOpt with explicit options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.awt.Color
getSingleColor()
Returns a colour if the only painting done by this layer is in a single colour.int
hashCode()
boolean
isOpaque()
Indicates whether it's safe to assume that all drawing is opaque.java.lang.String
toString()
-
-
-
Method Detail
-
getSingleColor
public java.awt.Color getSingleColor()
Returns a colour if the only painting done by this layer is in a single colour. Different alphas are permitted, but not different RGB values.- Returns:
- single colour, or null
-
isOpaque
public boolean isOpaque()
Indicates whether it's safe to assume that all drawing is opaque.- Returns:
- true if no transparency is used
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-