Class Layer
This concrete class represents a layer. Access to the layer’s data is via instances of this class. Changes made to instances of a class are propagated to the layer in the design, or the operation fails with RSDException thrown.
public class Layer
extends java.lang.Object
Hierarchical Diagram
Direct Known Subclasses
None
Fields
None
Constructor
Constructs a new layer object.
public Layer (java.lang.String name)
Where:
name—the name of the layer
Methods
• equals
public boolean equals (java.lang.Object obj)
Overrides:
equals in class java.lang.Object
• hashCode
public int hashCode ()
Overrides:
hashcode in class java.lang.Object
• toString
public java.lang.String toString ()
Overrides:
toString in class java.lang.Object
• getName
Returns the name of the layer.
public java.lang.String getName ()
• isHidden
Returns true if the layer is not visible to the user, false otherwise.
public boolean isHidden ()
Throws: rsdesigner.javagateway.BasicException if the layers can not be accessed.
• existsInCurrentDesign
Verifies that this object represents an existing design layer. If it returns ture, it is safe to call other methods for this object. Otherwise, it returns false the layer represented by this object is not in the design.
public boolean existsInCurrentDesign ()
Throws: rsdesigner.javagateway.BasicException if the designs layers are not accessible.
• create
Creates a new layer with the given attributes in the current design.
public create()
The name must be a unique, valid name.
Throws: RSDException
• isValidLayerName
Returns true when the layer name is valid and unique.
public static boolean isValidLayerName (String LayerName)
Where:
LayerName—The name of the layer.
• delete
Removes the selected layer. This operation may take some time and you cannot delete a layer that is used in central catalog items.
public void delete (Layer defaultlayer)
Where:
defaultlayer—The name of the default layer. All objects on the removed layer are moved to this layer. This layer must exist in the design and it cannot be a protected layer.
Throws: RSDException
• hide
Hides the named layer. The layer must exist in the design.
public hide()
Throws: RSDException
• show
Shows the named layer. The layer must exist in the design.
public show()
Throws: RSDException
• setColor
Sets the layer’s color index.
public setColor (int colorIndex)
Where:
colorIndex—A valid color index.
Throws: RSDException
• rename
Renames the layer.
public rename (String newName)
Where:
newName—The new name for the layer. The name must be a valid layer name containing only alphanumeric characters and underscores.
Throws: RSDException
Methods Inherited
The methods inherited from other classes are:
Class | Methods Inherited |
java.lang.Object | getClass, notify, notifyAll, wait, wait, wait |