|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cfar.lamp.viper.util.AbstractViperSelection
edu.umd.cfar.lamp.viper.util.AbstractViperSubTree
edu.umd.cfar.lamp.viper.util.AbstractSingleViperSubTree
edu.umd.cfar.lamp.viper.util.DefaultSingleViperSubTree
The default single subtree is a simple chain selection, where
the nodes that are descendents of the chain are all
marked as selected. To test to see if an element is in the chain
or just a descendant of it, use the isFilteredBy(Class)
method.
Field Summary |
Fields inherited from class edu.umd.cfar.lamp.viper.util.AbstractViperSelection |
notifyingListeners |
Constructor Summary | |
DefaultSingleViperSubTree()
Creates an empty subtree with no root, so nothing is selected. |
|
DefaultSingleViperSubTree(ViperData root)
Creates an empty subtree with the specified root, so everything is selected and nothing is filtered by. |
Method Summary | |
protected void |
finalize()
|
AttrConfig |
getFirstAttrConfig()
Get all the first attribute schema node in the selection. |
Attribute |
getFirstAttribute()
Get all the first attribute node in the selection. |
Config |
getFirstConfig()
Get all the first descriptor schema node in the selection. |
Descriptor |
getFirstDescriptor()
Get all the first descriptor node in the selection. |
Sourcefile |
getFirstSourcefile()
Get all the first sourcefile node in the selection. |
ViperData |
getRoot()
Gets the root these elements are selected from. |
boolean |
isFilteredBy(java.lang.Class type)
Only nodes beneath some subset of the nodes of the specified type are selected. |
void |
selectPathTo(Node n)
Select the path to the given node. |
void |
setAttrConfig(AttrConfig config)
Sets the attribute config to select on. |
void |
setAttribute(Attribute attribute)
Sets the attribute to select on. |
void |
setConfig(Config config)
Sets the descriptor config to select on. |
void |
setDescriptor(Descriptor descriptor)
Sets the descriptor to select on. |
void |
setRoot(ViperData root)
Sets the root of the selection. |
void |
setSourcefile(Sourcefile sourcefile)
Sets the sourcefile to select on. |
Methods inherited from class edu.umd.cfar.lamp.viper.util.AbstractSingleViperSubTree |
getAttrConfigs, getAttributes, getConfigs, getDescriptors, getSourcefiles, isMultipleSelectionAllowedOn, isSelected |
Methods inherited from class edu.umd.cfar.lamp.viper.util.AbstractViperSubTree |
fireChangeEvent, fireSelectionChanged, getSelectedBy, isEmpty, toString |
Methods inherited from class edu.umd.cfar.lamp.viper.util.AbstractViperSelection |
addChangeListener, getChangeListeners, removeChangeListener, writeLock, writeUnlock |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.umd.cfar.lamp.viper.util.ViperSelection |
addChangeListener, getChangeListeners, removeChangeListener |
Constructor Detail |
public DefaultSingleViperSubTree()
public DefaultSingleViperSubTree(ViperData root)
root
- the root of the tree to select fromMethod Detail |
public void setRoot(ViperData root)
root
- the root of the tree that this selects fromprotected void finalize() throws java.lang.Throwable
java.lang.Throwable
public ViperData getRoot()
ViperSubTree
ViperSubTree.getRoot()
public boolean isFilteredBy(java.lang.Class type)
ViperSubTree
isFilteredBy
in interface ViperSubTree
isFilteredBy
in class AbstractViperSubTree
AbstractViperSubTree.isFilteredBy(java.lang.Class)
public Sourcefile getFirstSourcefile()
ViperSubTree
ViperSubTree.getFirstSourcefile()
public Config getFirstConfig()
ViperSubTree
ViperSubTree.getFirstConfig()
public AttrConfig getFirstAttrConfig()
ViperSubTree
ViperSubTree.getFirstAttrConfig()
public Descriptor getFirstDescriptor()
ViperSubTree
ViperSubTree.getFirstDescriptor()
public Attribute getFirstAttribute()
ViperSubTree
ViperSubTree.getFirstAttribute()
public void setAttrConfig(AttrConfig config)
null
removes the current
attribute schema node selection.
config
- the attribute config to filter on,
or null
if none is to be filtered onpublic void selectPathTo(Node n)
setNodeType
method, so it won't remove part of the chain that
is beneath it in the tree.
n
- the node to select topublic void setAttribute(Attribute attribute)
null
removes the current
attribute selection.
attribute
- the attribute to filter on,
or null
if none is to be filtered onpublic void setConfig(Config config)
null
removes the current
config selection.
config
- the descriptor config to filter on,
or null
if none is to be filtered onpublic void setDescriptor(Descriptor descriptor)
null
removes the current
descriptor selection.
descriptor
- the descriptor to filter on,
or null
if none is to be filtered onpublic void setSourcefile(Sourcefile sourcefile)
null
removes the current
sourcefile selection.
sourcefile
- the sourcefile to filter on,
or null
if none is to be filtered on
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |