org.vishia.commander

## Class FcmdEdit

- java.lang.Object
- - org.vishia.commander.FcmdEdit

-     public class FcmdEdit
      extends java.lang.Object

  All functionality of view (F3-Key) and quick view.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) GralUserAction` | `actionConvertUTF8unix`
    `(package private) GralUserAction` | `actionOpenEdit` Action for Key F3 for view command.
    `private static java.nio.charset.Charset` | `ascii7`
    `private byte[]` | `buffer` The gotten bytes from bytebuffer.
    `private java.nio.ByteBuffer` | `byteBuffer` A buffer to get bytes from the file using the java.nio.Channel mechanism.
    `private char` | `format` The current choiced view format.
    `private StringFormatter` | `formatterHex` Instance to prepare the text especially for hex view.
    `protected Fcmd` | `main`
    `private int` | `nrofBytes` Number of read bytes.
    `private static java.nio.charset.Charset` | `utf8`
    `private GralTextBox` | `widgContent` The widget to show content.
    `private GralWindow_ifc` | `windView` The window of this functionallity.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FcmdEdit(Fcmd main)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | `buildWindow()` Builds the content of the confirm-delete window.
    `(package private) void` | `openEdit(FileRemote src)` Opens the view window and fills its content.
    `(package private) void` | `presentContent()`
    `(package private) void` | `presentContentHex()`
    `(package private) void` | `presentContentText()`

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

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

- - ### Field Detail

    - #### main

          protected final Fcmd main

    - #### windView

          private GralWindow_ifc windView

      The window of this functionallity.

    - #### widgContent

          private GralTextBox widgContent

      The widget to show content.

    - #### byteBuffer

          private final java.nio.ByteBuffer byteBuffer

      A buffer to get bytes from the file using the java.nio.Channel mechanism. The channel mechanism is proper to work with remote file access especially. Note: The ByteBuffer may be a part of the channel mechanism itself, because it is placed JVM-internally, for example for socket communication. TODO check and change it.

    - #### nrofBytes

          private int nrofBytes

      Number of read bytes.

    - #### buffer

          private byte[] buffer

      The gotten bytes from bytebuffer.

    - #### format

          private final char format

      The current choiced view format.
      - a: us-ascii-text
      - w: iso (Windows)-text
      - u: UTF16-text
      - 1: Hexa byte wise
      - 2: Hexa 16-bit-words
      - 4: Hexa 32-bit-words
      - F: contains, float values, shows it
      See Also:
        Constant Field Values

    - #### ascii7

          private static java.nio.charset.Charset ascii7

    - #### utf8

          private static java.nio.charset.Charset utf8

    - #### formatterHex

          private final StringFormatter formatterHex

      Instance to prepare the text especially for hex view.

    - #### actionOpenEdit

          GralUserAction actionOpenEdit

      Action for Key F3 for view command. Its like Norton Commander.

    - #### actionConvertUTF8unix

          GralUserAction actionConvertUTF8unix

  - ### Constructor Detail

    - #### FcmdEdit

          public FcmdEdit(Fcmd main)

  - ### Method Detail

    - #### buildWindow

          void buildWindow()

      Builds the content of the confirm-delete window. The window is created static. It is shown whenever it is used.

    - #### openEdit

          void openEdit(FileRemote src)

      Opens the view window and fills its content.
      Parameters:
        `src` - The path which is selected as source. It may be a directory or a file.

    - #### presentContent

          void presentContent()
                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### presentContentHex

          void presentContentHex()
                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### presentContentText

          void presentContentText()
                           throws java.io.IOException

      Throws:
        `java.io.IOException`