public class Layer extends java.lang.Object implements OverlayListener, java.lang.Comparable<Layer>
Overlay
in a canvas toModifier and Type | Class and Description |
---|---|
static interface |
Layer.LayerListener |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_NAME |
static java.lang.String |
PROPERTY_ALPHA
Deprecated.
Use
PROPERTY_OPACITY instead |
static java.lang.String |
PROPERTY_CANBEREMOVED |
static java.lang.String |
PROPERTY_NAME |
static java.lang.String |
PROPERTY_OPACITY |
static java.lang.String |
PROPERTY_PRIORITY |
static java.lang.String |
PROPERTY_READONLY |
static java.lang.String |
PROPERTY_RECEIVEKEYEVENTONHIDDEN |
static java.lang.String |
PROPERTY_RECEIVEMOUSEEVENTONHIDDEN |
static java.lang.String |
PROPERTY_VISIBLE |
Constructor and Description |
---|
Layer(Overlay overlay) |
Layer(Painter painter)
Deprecated.
Use
Layer(Overlay) instead. |
Layer(Painter painter,
java.lang.String name)
Deprecated.
Use
Layer(Overlay) instead. |
Modifier and Type | Method and Description |
---|---|
void |
addListener(Layer.LayerListener listener)
Add a listener
|
int |
compareTo(Layer layer) |
float |
getAlpha()
Deprecated.
Use
getOpacity() instead |
ROI |
getAttachedROI() |
boolean |
getCanBeRemoved()
Returns
true if the layer can be freely removed from the Canvas where it
appears and false otherwise. |
java.lang.String |
getName()
Returns layer name (internally use the overlay name).
|
float |
getOpacity() |
Overlay |
getOverlay()
Returns the attached
Overlay . |
Painter |
getPainter()
Deprecated.
Use
getOverlay() instead. |
Overlay.OverlayPriority |
getPriority()
Returns layer priority (internally use the overlay priority).
|
boolean |
getReceiveKeyEventOnHidden() |
boolean |
getReceiveMouseEventOnHidden() |
boolean |
isFixed()
Deprecated.
Use
getCanBeRemoved() instead. |
static boolean |
isPaintProperty(java.lang.String propertyName)
Returns true if the Layer need to be repainted when the specified property has changed.
|
boolean |
isReadOnly()
Returns the read only property name (internally use the overlay read only property).
|
boolean |
isVisible() |
void |
overlayChanged(OverlayEvent event) |
void |
removeListener(Layer.LayerListener listener)
Remove a listener
|
void |
setAlpha(float value)
Deprecated.
Use
setOpacity(float) instead. |
void |
setCanBeRemoved(boolean value)
Set the
canBeRemoved property. |
void |
setFixed(boolean value)
Deprecated.
Use
setCanBeRemoved(boolean) instead. |
void |
setName(java.lang.String name)
Set the layer name (internally set the overlay name)
|
void |
setOpacity(float value)
Set the layer opacity
|
void |
setPriority(Overlay.OverlayPriority priority)
Set the layer priority (internally set the overlay priority).
|
void |
setReadOnly(boolean readOnly)
Set read only property (internally set the overlay read only property).
|
void |
setReceiveKeyEventOnHidden(boolean value) |
void |
setReceiveMouseEventOnHidden(boolean value) |
void |
setVisible(boolean visible) |
public static final java.lang.String PROPERTY_NAME
public static final java.lang.String PROPERTY_PRIORITY
public static final java.lang.String PROPERTY_READONLY
public static final java.lang.String PROPERTY_CANBEREMOVED
public static final java.lang.String PROPERTY_RECEIVEKEYEVENTONHIDDEN
public static final java.lang.String PROPERTY_RECEIVEMOUSEEVENTONHIDDEN
@Deprecated public static final java.lang.String PROPERTY_ALPHA
PROPERTY_OPACITY
insteadpublic static final java.lang.String PROPERTY_OPACITY
public static final java.lang.String PROPERTY_VISIBLE
public static final java.lang.String DEFAULT_NAME
@Deprecated public Layer(Painter painter, java.lang.String name)
Layer(Overlay)
instead.@Deprecated public Layer(Painter painter)
Layer(Overlay)
instead.public static boolean isPaintProperty(java.lang.String propertyName)
public Overlay getOverlay()
Overlay
.@Deprecated public Painter getPainter()
getOverlay()
instead.public Overlay.OverlayPriority getPriority()
Overlay.getPriority()
public void setPriority(Overlay.OverlayPriority priority)
Overlay.setPriority(OverlayPriority)
public java.lang.String getName()
Overlay.getName()
public void setName(java.lang.String name)
Overlay.setName(String)
public boolean isReadOnly()
Overlay.isReadOnly()
public void setReadOnly(boolean readOnly)
Overlay.setReadOnly(boolean)
@Deprecated public boolean isFixed()
getCanBeRemoved()
instead.@Deprecated public void setFixed(boolean value)
setCanBeRemoved(boolean)
instead.public boolean getCanBeRemoved()
true
if the layer can be freely removed from the Canvas where it
appears and false
otherwise.Overlay.getCanBeRemoved()
public void setCanBeRemoved(boolean value)
canBeRemoved
property.Overlay.setCanBeRemoved(boolean)
public boolean getReceiveKeyEventOnHidden()
Overlay.getReceiveKeyEventOnHidden()
public void setReceiveKeyEventOnHidden(boolean value)
public boolean getReceiveMouseEventOnHidden()
public void setReceiveMouseEventOnHidden(boolean value)
public ROI getAttachedROI()
public boolean isVisible()
public void setVisible(boolean visible)
visible
- the visible to setpublic float getOpacity()
public void setOpacity(float value)
@Deprecated public float getAlpha()
getOpacity()
instead@Deprecated public void setAlpha(float value)
setOpacity(float)
instead.public void addListener(Layer.LayerListener listener)
listener
- public void removeListener(Layer.LayerListener listener)
listener
- public void overlayChanged(OverlayEvent event)
overlayChanged
in interface OverlayListener