ViewManagerImpl (jEdit API Documentation)

Package org.gjt.sp.jedit.manager

## Class ViewManagerImpl

- java.lang.Object
- - org.gjt.sp.jedit.manager.ViewManagerImpl

- All Implemented Interfaces:
    `ViewManager`

      public class ViewManagerImpl
      extends java.lang.Object
      implements ViewManager

  This class contains view management code, those methods are not public and must only be used by jEdit. The public interface is `ViewManager`
  Since:
    5.6pre1

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static View[]` | `EMPTY_VIEW_ARRAY` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ViewManagerImpl()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addViewToList​(View view)` |
    `void` | `forEach​(java.util.function.Consumer<? super View> action)` | Performs the given action for each view.
    `View` | `getActiveView()` | Returns the currently focused view.
    `View` | `getActiveViewInternal()` | Returns the internal active view, which might be null.
    `View` | `getFirst()` |
    `View` | `getLast()` |
    `java.util.List<View>` | `getViews()` | Returns an array of all open views.
    `void` | `remove​(View view)` |
    `void` | `setActiveView​(View view)` |
    `int` | `size()` | Returns the number of open views.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### EMPTY_VIEW_ARRAY

          public static final View[] EMPTY_VIEW_ARRAY

  - ### Constructor Detail

    - #### ViewManagerImpl

          public ViewManagerImpl()

  - ### Method Detail

    - #### getViews

          public java.util.List<View> getViews()

      Returns an array of all open views.
      Specified by:
        `getViews` in interface `ViewManager`

    - #### forEach

          public void forEach​(java.util.function.Consumer<? super View> action)

      Performs the given action for each view.
      Specified by:
        `forEach` in interface `ViewManager`
      Parameters:
        `action` - The action to be performed for each element
      Throws:
        `java.lang.NullPointerException` - if the specified action is null

    - #### size

          public int size()

      Returns the number of open views.
      Specified by:
        `size` in interface `ViewManager`

    - #### getFirst

          public View getFirst()

      Specified by:
        `getFirst` in interface `ViewManager`

    - #### getLast

          public View getLast()

      Specified by:
        `getLast` in interface `ViewManager`

    - #### getActiveView

          public View getActiveView()

      Returns the currently focused view.
      Specified by:
        `getActiveView` in interface `ViewManager`

    - #### setActiveView

          public void setActiveView​(View view)

      Specified by:
        `setActiveView` in interface `ViewManager`

    - #### getActiveViewInternal

          @Nullable
          public View getActiveViewInternal()

      Returns the internal active view, which might be null.
      Specified by:
        `getActiveViewInternal` in interface `ViewManager`

    - #### addViewToList

          public void addViewToList​(View view)

    - #### remove

          public void remove​(View view)