Interface Moveable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int moveDown()
      Move this object down by one in the list of objects in its container.
      int moveToFirst()
      Move this object to the first position in the list of objects in its container.
      int moveToIndex​(int index)
      Move this object to the specified position in the list of objects in its container, where 0 is the first position.
      int moveToLast()
      Move this object to the last position in the list of objects in its container.
      int moveUp()
      Move this object up by one in the list of objects in its container.
    • Method Detail

      • moveDown

        int moveDown()
              throws IllegalActionException
        Move this object down by one in the list of objects in its container. If the object is already last on the list, then it is not moved.
        Returns:
        The index of this object prior to moving it, or -1 if it is not moved.
        Throws:
        IllegalActionException - If this object has no container.
      • moveToFirst

        int moveToFirst()
                 throws IllegalActionException
        Move this object to the first position in the list of objects in its container. If the object is already first on the list, then it is not moved.
        Returns:
        The index of this object prior to moving it, or -1 if it is not moved.
        Throws:
        IllegalActionException - If this object has no container.
      • moveToIndex

        int moveToIndex​(int index)
                 throws IllegalActionException
        Move this object to the specified position in the list of objects in its container, where 0 is the first position. If the object is already at the specified position, then it is not moved.
        Parameters:
        index - The position to which to move the object.
        Returns:
        The index of this object prior to moving it, or -1 if it is not moved.
        Throws:
        IllegalActionException - If this object has no container or if the index is out of range.
      • moveToLast

        int moveToLast()
                throws IllegalActionException
        Move this object to the last position in the list of objects in its container. If the object is already last on the list, then it is not moved.
        Returns:
        The index of this object prior to moving it, or -1 if it was not moved.
        Throws:
        IllegalActionException - If this object has no container.
      • moveUp

        int moveUp()
            throws IllegalActionException
        Move this object up by one in the list of objects in its container. If the object is already first on the list, then it is not moved.
        Returns:
        The index of this object prior to moving it, or -1 if it was not moved.
        Throws:
        IllegalActionException - If this object has no container.