ilog.tgo.composite
Class IltcLayer

java.lang.Object
  extended by ilog.tgo.composite.IltcLayer
All Implemented Interfaces:
IlpLayer

public class IltcLayer
extends Object
implements IlpLayer

This class is the counterpart of IlvManagerLayer for IltcCompositeGraphic objects.

Since:
JTGO 1.0
See Also:
IltcCompositeManager.addLayerOnTop(ilog.tgo.composite.IltcLayer), IltcCompositeManager.addLayerBelow(ilog.tgo.composite.IltcLayer), IltcCompositeManager.addIlvManagerLayerOnTop(ilog.tgo.composite.IltcLayer), IltcCompositeManager.addIlvManagerLayerBelow(ilog.tgo.composite.IltcLayer)

Constructor Summary
IltcLayer(IlvManager manager, int index, IltcCompositeManager owner)
           
 
Method Summary
 void addVisibilityFilter(IlvLayerVisibilityFilter filter)
          Adds a visibility filter.
 IlvRect computeBBox(IlvTransformer t)
          Returns the bbox of the 2 layers underneath.
protected  void destroy(IlvManager manager)
          Deletes the layer and frees the associated range of IlvManagerLayers.
 int getCardinal()
          Returns the number of objects in this layer.
 IlvGraphicEnumeration getElements()
          Returns an enumeration of the objects in this layer.
 int getEndIndex()
          Returns the current index of the last manager layer in use by this macro-layer, plus one.
 IlvManagerLayer getLayerFor(IlvManager manager, IlpGraphic graphic)
          Returns the right manager layer for a given object.
 String getName()
          Returns the layer's name, or null if is has not yet been set.
 ilog.tgo.composite.internal.IltcCompositePartLayer getProxyLayer()
           
 int getStartIndex()
          Returns the current index of the first manager layer in use by this macro-layer.
 Enumeration getVisibilityFilters()
          Returns an enumeration of all installed visibility filters.
 boolean isVisible(IlvManager manager)
          Returns the visibility of this macro-layer in the manager.
 boolean isVisible(IlvManagerView view)
          Returns the visibility of this macro-layer in a view.
 void map(IlvApplyObject f, Object arg)
          Applies a function to all the objects in the set.
 void mapInside(IlvRect rect, IlvRect trect, IlvApplyObject f, Object arg, IlvTransformer t)
          Applies a function to all objects located in a specified rectangle.
 void mapIntersects(IlvRect rect, IlvRect trect, IlvApplyObject f, Object arg, IlvTransformer t)
          Applies a function to all objects with a bounding box that intersects a specified rectangle.
 void removeVisibilityFilter(IlvLayerVisibilityFilter filter)
          Removes an installed visibility filter.
 void setName(String name)
          Sets the layer's name.
 void setVisible(IlvManager manager, boolean visible)
          Changes the visibility of this macro-layer in the manager.
 void setVisible(IlvManager manager, IlvManagerView view, boolean visible)
          Changes the visibility of this macro-layer in a view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltcLayer

public IltcLayer(IlvManager manager,
                 int index,
                 IltcCompositeManager owner)
Internal method or field: do not use!
Method Detail

computeBBox

public IlvRect computeBBox(IlvTransformer t)
Returns the bbox of the 2 layers underneath.

Internal method or field: do not use!

getStartIndex

public int getStartIndex()
Returns the current index of the first manager layer in use by this macro-layer.

Specified by:
getStartIndex in interface IlpLayer
Internal method or field: do not use!

getEndIndex

public int getEndIndex()
Returns the current index of the last manager layer in use by this macro-layer, plus one.

Specified by:
getEndIndex in interface IlpLayer
Internal method or field: do not use!

getName

public String getName()
Returns the layer's name, or null if is has not yet been set.


setName

public void setName(String name)
Sets the layer's name.

Note: Layer names should be unique within a given IltcCompositeManager.


map

public void map(IlvApplyObject f,
                Object arg)
Applies a function to all the objects in the set. Note that the function should not add or remove objects.

Parameters:
f - The function to be applied.
arg - The argument of the function.
Internal method or field: do not use!

mapInside

public void mapInside(IlvRect rect,
                      IlvRect trect,
                      IlvApplyObject f,
                      Object arg,
                      IlvTransformer t)
Applies a function to all objects located in a specified rectangle. This method applies the method f to all graphic objects inside the rectangle rect.

Note that the applied function should not add, remove, or change the bounding box of a graphic object.

Parameters:
rect - The rectangle.
trect - The transformed rectangle.
f - The method to be applied.
arg - The argument passed to the method.
t - The transformer used to display the set.
Internal method or field: do not use!

mapIntersects

public void mapIntersects(IlvRect rect,
                          IlvRect trect,
                          IlvApplyObject f,
                          Object arg,
                          IlvTransformer t)
Applies a function to all objects with a bounding box that intersects a specified rectangle.

Note that the applied function should not add, remove, or change the bounding box of a graphic object.

Parameters:
rect - The rectangle.
trect - The transformed rectangle.
f - The method to be applied.
arg - The argument passed to the method.
t - The transformer used to display the set.
Internal method or field: do not use!

addVisibilityFilter

public void addVisibilityFilter(IlvLayerVisibilityFilter filter)
Adds a visibility filter. When such a filter is installed, the visibility of the layer is controlled by the filter.

Note: To make sure the changes are reflected graphically, you will need to call IlvManager.reDrawViews afterwards.

Note: Visibility filters don't work in subgraphers.


removeVisibilityFilter

public void removeVisibilityFilter(IlvLayerVisibilityFilter filter)
Removes an installed visibility filter.

Note: To make sure the changes are reflected graphically, you will need to call IlvManager.reDrawViews afterwards.

Note: Visibility filters don't work in subgraphers.


getVisibilityFilters

public Enumeration getVisibilityFilters()
Returns an enumeration of all installed visibility filters.

Returns:
an enumeration of IlvLayerVisibilityFilter

isVisible

public boolean isVisible(IlvManager manager)
Returns the visibility of this macro-layer in the manager.

Specified by:
isVisible in interface IlpLayer
Internal method or field: do not use!

isVisible

public boolean isVisible(IlvManagerView view)
Returns the visibility of this macro-layer in a view.

Note: This function works only for layers in a top-level grapher, not for layers in a subgrapher.

Specified by:
isVisible in interface IlpLayer
Internal method or field: do not use!

setVisible

public void setVisible(IlvManager manager,
                       boolean visible)
Changes the visibility of this macro-layer in the manager.

Specified by:
setVisible in interface IlpLayer
Internal method or field: do not use!

setVisible

public void setVisible(IlvManager manager,
                       IlvManagerView view,
                       boolean visible)
Changes the visibility of this macro-layer in a view.

Specified by:
setVisible in interface IlpLayer
Internal method or field: do not use!

getProxyLayer

public final ilog.tgo.composite.internal.IltcCompositePartLayer getProxyLayer()
Since:
JViews 8.0
Internal method or field: do not use!

destroy

protected void destroy(IlvManager manager)
Deletes the layer and frees the associated range of IlvManagerLayers.

Internal method or field: do not use!

getLayerFor

public IlvManagerLayer getLayerFor(IlvManager manager,
                                   IlpGraphic graphic)
Returns the right manager layer for a given object.

Specified by:
getLayerFor in interface IlpLayer
Internal method or field: do not use!

getElements

public IlvGraphicEnumeration getElements()
Returns an enumeration of the objects in this layer.

Internal method or field: do not use!

getCardinal

public int getCardinal()
Returns the number of objects in this layer.

Internal method or field: do not use!


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.