com.swfm.mica.core
Class MiIteratorFilter

java.lang.Object
  extended bycom.swfm.mica.core.MiIteratorFilter
All Implemented Interfaces:
MiiIteratorFilter

public class MiIteratorFilter
extends java.lang.Object
implements MiiIteratorFilter

Version:
%I% %G%
Author:
Michael L. Davis

Constructor Summary
MiIteratorFilter()
           
 
Method Summary
 boolean accept(MiPart part)
           
 boolean getIterateIntoAttachmentsOfParts()
          Gets whether iterators should go into the attachments of the parts.
 boolean getIterateIntoPartsOfParts()
          Gets whether iterators should go into the parts of the MiParts in this editor.
 boolean getIterateThroughAllBottomMostItems()
          Gets whether all bottommost (parts of editor's current layer) items are to be returned, in addition to all other contraints specified here.
 boolean getIterateThroughAllLayers()
          Gets whether the iterator will iterate through all layers or just the editor's current layer.
 java.lang.String getIterateThroughTaggedItemsOnly()
          Gets whether only items with given tag are to be returned.
 void setIterateIntoAttachmentsOfParts(boolean flag)
          Sets whether iterators should go into the attachments of the MiParts in this editor.
 void setIterateIntoPartsOfParts(boolean flag)
          Sets whether iterators should go into the parts of the MiParts in this editor.
 void setIterateThroughAllBottomMostItems(boolean flag)
          Specifies if all bottommost (parts of editor's current layer) items are to be returned, in addition to all other contraints specified here.
 void setIterateThroughAllLayers(boolean flag)
          Sets whether the iterator will iterate through all layers or just the editor's current layer.
 void setIterateThroughTaggedItemsOnly(java.lang.String tag)
          Specifies if items with given tag are to be returned or, if null, that only the major items (bottommost, the objects right on top of the editor's current layer) are to be returned (if selectable).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiIteratorFilter

public MiIteratorFilter()
Method Detail

setIterateThroughAllBottomMostItems

public void setIterateThroughAllBottomMostItems(boolean flag)
Specifies if all bottommost (parts of editor's current layer) items are to be returned, in addition to all other contraints specified here. This is usefull when one wants everything to be candidates for the moveable, selectable, etc. event handlers, and wants to add just a few more (tagged) items as well.

Parameters:
flag - true if return all bottommost items
See Also:
getIterateThroughAllBottomMostItems()

getIterateThroughAllBottomMostItems

public boolean getIterateThroughAllBottomMostItems()
Gets whether all bottommost (parts of editor's current layer) items are to be returned, in addition to all other contraints specified here.

Returns:
true if so
See Also:
setIterateThroughAllBottomMostItems(boolean)

setIterateThroughTaggedItemsOnly

public void setIterateThroughTaggedItemsOnly(java.lang.String tag)
Specifies if items with given tag are to be returned or, if null, that only the major items (bottommost, the objects right on top of the editor's current layer) are to be returned (if selectable). MiParts are assigned a tag, as of this release, by assigning the part a resource with the name of the tag (part.setResource(tag, tag));

Parameters:
tag - the tag
See Also:
getIterateThroughTaggedItemsOnly()

getIterateThroughTaggedItemsOnly

public java.lang.String getIterateThroughTaggedItemsOnly()
Gets whether only items with given tag are to be returned.

Returns:
the tag
See Also:
setIterateThroughTaggedItemsOnly(java.lang.String)

setIterateThroughAllLayers

public void setIterateThroughAllLayers(boolean flag)
Sets whether the iterator will iterate through all layers or just the editor's current layer.

Parameters:
flag - true if iterate through all layers

getIterateThroughAllLayers

public boolean getIterateThroughAllLayers()
Gets whether the iterator will iterate through all layers or just the editor's current layer.

Specified by:
getIterateThroughAllLayers in interface MiiIteratorFilter
Returns:
true if iterate through all layers

setIterateIntoPartsOfParts

public void setIterateIntoPartsOfParts(boolean flag)
Sets whether iterators should go into the parts of the MiParts in this editor. This is used mostly by MiEditorIterator which is mostly used by selection manager and other shape editing event handlers. Useful for when selected parts are inside containers that are graph layouts (i.e. if this MiEditor has MiStarGraphs wome of which have selected nodes).

Parameters:
flag - true if iterators are to go into parts
See Also:
getIterateIntoPartsOfParts(), getIterateIntoAttachmentsOfParts()

getIterateIntoPartsOfParts

public boolean getIterateIntoPartsOfParts()
Gets whether iterators should go into the parts of the MiParts in this editor.

Specified by:
getIterateIntoPartsOfParts in interface MiiIteratorFilter
Returns:
true if iterators are to go into parts
See Also:
setIterateIntoPartsOfParts(boolean), setIterateIntoAttachmentsOfParts(boolean)

setIterateIntoAttachmentsOfParts

public void setIterateIntoAttachmentsOfParts(boolean flag)
Sets whether iterators should go into the attachments of the MiParts in this editor. This is used mostly by MiEditorIterator which is mostly used by selection manager and other shape editing event handlers. Useful for when selected parts are attachments or inside attachments.

Parameters:
flag - true if iterators are to go into attachments
See Also:
getIterateIntoAttachmentsOfParts(), getIterateIntoPartsOfParts()

getIterateIntoAttachmentsOfParts

public boolean getIterateIntoAttachmentsOfParts()
Gets whether iterators should go into the attachments of the parts.

Specified by:
getIterateIntoAttachmentsOfParts in interface MiiIteratorFilter
Returns:
true if iterators are to go into attachments
See Also:
setIterateIntoAttachmentsOfParts(boolean), setIterateIntoPartsOfParts(boolean)

accept

public boolean accept(MiPart part)
Specified by:
accept in interface MiiIteratorFilter