edu.umd.cfar.lamp.viper.util
Class AttributeSelection

java.lang.Object
  extended byedu.umd.cfar.lamp.viper.util.AbstractViperSelection
      extended byedu.umd.cfar.lamp.viper.util.AbstractViperSubTree
          extended byedu.umd.cfar.lamp.viper.util.AbstractSingleViperSubTree
              extended byedu.umd.cfar.lamp.viper.util.AttributeSelection
All Implemented Interfaces:
ViperSelection, ViperSubTree

public class AttributeSelection
extends AbstractSingleViperSubTree

A selection model for a single attribute.


Field Summary
 
Fields inherited from class edu.umd.cfar.lamp.viper.util.AbstractViperSelection
notifyingListeners
 
Constructor Summary
AttributeSelection()
           
 
Method Summary
 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 isEmpty()
          Tests to see if something is selected.
 void setAttribute(Attribute attribute)
          Sets the selected attribute.
 
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, isFilteredBy, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.umd.cfar.lamp.viper.util.ViperSelection
addChangeListener, getChangeListeners, removeChangeListener
 

Constructor Detail

AttributeSelection

public AttributeSelection()
Method Detail

setAttribute

public void setAttribute(Attribute attribute)
Sets the selected attribute. This also selects the path to the root from that attribute.

Parameters:
attribute - the attribute to select

getRoot

public ViperData getRoot()
Description copied from interface: ViperSubTree
Gets the root these elements are selected from.

Returns:
the root node
See Also:
ViperSubTree.getRoot()

getFirstSourcefile

public Sourcefile getFirstSourcefile()
Description copied from interface: ViperSubTree
Get all the first sourcefile node in the selection.

Returns:
the first selected sourcefile node
See Also:
ViperSubTree.getFirstSourcefile()

getFirstConfig

public Config getFirstConfig()
Description copied from interface: ViperSubTree
Get all the first descriptor schema node in the selection.

Returns:
the first selected descriptor schema node
See Also:
ViperSubTree.getFirstConfig()

getFirstAttrConfig

public AttrConfig getFirstAttrConfig()
Description copied from interface: ViperSubTree
Get all the first attribute schema node in the selection.

Returns:
the first selected attribute schema node
See Also:
ViperSubTree.getFirstAttrConfig()

getFirstDescriptor

public Descriptor getFirstDescriptor()
Description copied from interface: ViperSubTree
Get all the first descriptor node in the selection.

Returns:
the first selected descriptor node
See Also:
ViperSubTree.getFirstDescriptor()

getFirstAttribute

public Attribute getFirstAttribute()
Description copied from interface: ViperSubTree
Get all the first attribute node in the selection.

Returns:
the first selected attribute node
See Also:
ViperSubTree.getFirstAttribute()

isEmpty

public boolean isEmpty()
Description copied from interface: ViperSelection
Tests to see if something is selected.

Specified by:
isEmpty in interface ViperSelection
Overrides:
isEmpty in class AbstractViperSubTree