com.corticon.eclipse.core.util

## Class TreeviewSelection

- java.lang.Object
- - com.corticon.eclipse.core.util.Selection
  - - com.corticon.eclipse.core.util.TreeviewSelection

- All Implemented Interfaces:
    java.lang.Cloneable
  Direct Known Subclasses:
    DiagramSelection

      public class TreeviewSelection
      extends Selection

  This class is a container used to encapsulate the selection state of a given tree viewer. The class allows selection changes to be conveyed to the model in a platform-neutral manner as an atomic unit. A tree selection is rather simple in that it consists solely of a collection of view model objects.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TreeviewSelection()` Constructs a TreeviewSelection instance with no selection state.
    `TreeviewSelection(int aiTreeviewID, java.util.List aListObjectsSelected)` Constructs a TreeviewSelection instance using a List of selected objects.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Creates a clone of this TreeviewSelection object.
    `boolean` | `equals(java.lang.Object aObjectSelection)` Determines whether the given TreeviewSelection instance is logically equivalent to this one.
    `java.lang.Object` | `getFirstSelectedObject()` Returns the first select object in the list.
    `java.lang.Object` | `getLastSelectedObject()` Returns the last select object in the list.
    `java.util.ArrayList` | `getSelectedObjects()` Returns the selected objects list.
    `int` | `getTreeviewID()` Returns the tree view identifier.
    `boolean` | `isValid()` Is selection valid?
    `java.lang.String` | `toString()` Renders the selection state as a string.

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TreeviewSelection

          public TreeviewSelection()

      Constructs a TreeviewSelection instance with no selection state.

    - #### TreeviewSelection

          public TreeviewSelection(int aiTreeviewID,
                           java.util.List aListObjectsSelected)

      Constructs a TreeviewSelection instance using a List of selected objects.
      Parameters:
        `aiTreeviewID` - Tree ID selected.
        `aListObjectsSelected` - List of selected objects.

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Renders the selection state as a string.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Selection state as string

    - #### equals

          public boolean equals(java.lang.Object aObjectSelection)

      Determines whether the given TreeviewSelection instance is logically equivalent to this one.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `aObjectSelection` - Selection instance.
      Returns:
        `true` if the specified TreeviewSelection matches the receiver.

    - #### clone

          public java.lang.Object clone()

      Creates a clone of this TreeviewSelection object.
      Overrides:
        `clone` in class `Selection`
      Returns:
        Clone of TreeviewSelection object.

    - #### getTreeviewID

          public int getTreeviewID()

      Returns the tree view identifier.
      Returns:
        tree view identifier.

    - #### getSelectedObjects

          public java.util.ArrayList getSelectedObjects()

      Returns the selected objects list.
      Returns:
        List of selected objects;

    - #### getFirstSelectedObject

          public java.lang.Object getFirstSelectedObject()

      Returns the first select object in the list.
      Returns:
        First selected object in the list or `null`.

    - #### getLastSelectedObject

          public java.lang.Object getLastSelectedObject()

      Returns the last select object in the list.
      Returns:
        Last selected object in the list or `null`.

    - #### isValid

          public boolean isValid()

      Is selection valid?
      Overrides:
        `isValid` in class `Selection`

Copyright © 2005-2013 Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.