org.vishia.commander

## Class FcmdFavorPathSelector

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

-     class FcmdFavorPathSelector
      extends java.lang.Object

  This class implements the selection functionality of tabs and paths for the whole Java commander. It contains all actions which are instantiated one time but affects a special (the current) file panel.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `(package private) static class` | `FcmdFavorPathSelector.FavorFolder`
    `(package private) static class` | `FcmdFavorPathSelector.FavorPath` Entry in the favorite list.
    `(package private) static class` | `FcmdFavorPathSelector.WindowConfirmAddFavorite`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) FcmdFavorPathSelector.FavorPath` | `actFavorPathInfo` The last selected SelectInfo.
    `(package private) GralUserAction` | `actionAddFavorite`
    `(package private) GralUserAction` | `actionCleanFileRemote`
    `(package private) GralUserAction` | `actionCreateFavor`
    `(package private) GralUserAction` | `actionDelTab`
    `(package private) GralUserAction` | `actionDeselectDirtree`
    `(package private) GralUserAction` | `actionReadFavoritePathes`
    `(package private) GralUserAction` | `actionRefreshFileTable` Sets the origin dir of the last focused file table.
    `(package private) GralUserAction` | `actionSaveFavoritePathes`
    `(package private) GralUserAction` | `actionSearchFiles`
    `(package private) GralUserAction` | `actionSetDirOrigin` Sets the origin dir of the last focused file table.
    `(package private) GralUserAction` | `actionSortFilePerExtensionCase`
    `(package private) GralUserAction` | `actionSortFilePerExtensionNonCase`
    `(package private) GralUserAction` | `actionSortFilePerLenghLargestFirst`
    `(package private) GralUserAction` | `actionSortFilePerLenghSmallestFirst`
    `(package private) GralUserAction` | `actionSortFilePerNameCase` Sort action.
    `(package private) GralUserAction` | `actionSortFilePerNameNonCase`
    `(package private) GralUserAction` | `actionSortFilePerTimestamp`
    `(package private) GralUserAction` | `actionSortFilePerTimestampOldestFirst`
    `(package private) GralUserAction` | `actionSyncMidRight`
    `(package private) boolean` | `bSyncMidRight`
    `(package private) MainCmd_ifc` | `console` For output messages.
    `(package private) java.io.File` | `fileCfg`
    `(package private) java.util.List<FcmdFavorPathSelector.FavorFolder>` | `listAllFavorPathFolders` All entries for the select list for all favorite path folders in the order of the configuration file.
    `(package private) java.util.List<FcmdFavorPathSelector.FavorPath>` | `listAllFavorPaths` All entries which are shown in all three select lists.
    `(package private) Fcmd` | `main`
    `private GralMng` | `mng`
    `(package private) FcmdLeftMidRightPanel` | `panelLeft` The three tabbed panels.
    `(package private) FcmdLeftMidRightPanel` | `panelMid` The three tabbed panels.
    `(package private) FcmdLeftMidRightPanel` | `panelRight` The three tabbed panels.
    `static int` | `version` Version, history and license: 2012-03-09 Hartmut new menu entry menuBarFolderSync 2012-02-04 Hartmut new menu entries for refresh and origin dir Copyright/Copyleft: For this source the LGPL Lesser General Public License, published by the Free Software Foundation is valid.
    `(package private) FcmdFavorPathSelector.WindowConfirmAddFavorite` | `windAddFavorite`
    `(package private) GralFileSelector.WindowConfirmSearch` | `windSearchFiles`
    `(package private) FileWriter` | `writerCfg` Instance to write the cfgFile.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FcmdFavorPathSelector(MainCmd_ifc console, Fcmd main)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) void` | `buildTabFromSelection(FcmdFavorPathSelector.FavorPath info, GralTabbedPanel tabPanel)` Builds a tab for file or command view from a selected line of selection.
    `(package private) void` | `buildWindowAddFavorite()` Builds the content of the add-favorite window.
    `(package private) void` | `confirmCreateNewFavor()`
    `(package private) void` | `initActDir(java.util.Map<java.lang.String,java.io.File> index, java.lang.String key, java.lang.String path)`
    `(package private) java.lang.String` | `readCfg(java.io.File cfgFile)` Read the configuration file.
    `protected void` | `setSortOrderFiles(char order)`
    `(package private) void` | `stop()`
    `(package private) void` | `writeCfg(java.io.File cfgFile)` Writes the configuration file.
    `private void` | `XXXwriteCfgLine(FcmdFavorPathSelector.FavorPath favorPathInfo)`

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

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

- - ### Field Detail

    - #### version

          public static final int version

      Version, history and license:
      - 2012-03-09 Hartmut new menu entry menuBarFolderSync
      - 2012-02-04 Hartmut new menu entries for refresh and origin dir
      Copyright/Copyleft: For this source the LGPL Lesser General Public License, published by the Free Software Foundation is valid. It means:
      1. You can use this source without any restriction for any desired purpose.
      2. You can redistribute copies of this source to everybody.
      3. Every user of this source, also the user of redistribute copies with or without payment, must accept this license for further using.
      4. But the LPGL ist not appropriate for a whole software product, if this source is only a part of them. It means, the user must publish this part of source, but don't need to publish the whole source of the own product.
      5. You can study and modify (improve) this source for own using or for redistribution, but you have to license the modified sources likewise under this LGPL Lesser General Public License. You mustn't delete this Copyright/Copyleft inscription in this source file.
      If you are intent to use this sources without publishing its usage, you can get a second license subscribing a special contract with the author.
      See Also:
        Constant Field Values

    - #### listAllFavorPathFolders

          java.util.List<FcmdFavorPathSelector.FavorFolder> listAllFavorPathFolders

      All entries for the select list for all favorite path folders in the order of the configuration file. The elements of this list can be activated to present in cards with tabs. The cards contain the favor paths which are contained in `FcmdFavorPathSelector.FavorFolder.listfavorPaths`. But not all elements should be activated similar in all panels, it may be too much tabs per panel.

    - #### fileCfg

          java.io.File fileCfg

    - #### writerCfg

          FileWriter writerCfg

      Instance to write the cfgFile.

    - #### panelLeft

          final FcmdLeftMidRightPanel panelLeft

      The three tabbed panels.

    - #### panelMid

          final FcmdLeftMidRightPanel panelMid

      The three tabbed panels.

    - #### panelRight

          final FcmdLeftMidRightPanel panelRight

      The three tabbed panels.

    - #### windSearchFiles

          GralFileSelector.WindowConfirmSearch windSearchFiles

    - #### mng

          private final GralMng mng

    - #### main

          final Fcmd main

    - #### listAllFavorPaths

          java.util.List<FcmdFavorPathSelector.FavorPath> listAllFavorPaths

      All entries which are shown in all three select lists.

    - #### console

          final MainCmd_ifc console

      For output messages.

    - #### actFavorPathInfo

          FcmdFavorPathSelector.FavorPath actFavorPathInfo

      The last selected SelectInfo.

    - #### bSyncMidRight

          boolean bSyncMidRight

    - #### windAddFavorite

          FcmdFavorPathSelector.WindowConfirmAddFavorite windAddFavorite

    - #### actionSearchFiles

          GralUserAction actionSearchFiles

    - #### actionSyncMidRight

          GralUserAction actionSyncMidRight

    - #### actionCreateFavor

          GralUserAction actionCreateFavor

    - #### actionDelTab

          GralUserAction actionDelTab

    - #### actionSetDirOrigin

          GralUserAction actionSetDirOrigin

      Sets the origin dir of the last focused file table.
      Implementation note: The last focused file tab is searched using `Fcmd.getLastSelectedFileCards()`.

    - #### actionRefreshFileTable

          GralUserAction actionRefreshFileTable

      Sets the origin dir of the last focused file table.
      Implementation note: The last focused file tab is searched using `Fcmd.getLastSelectedFileCards()`.

    - #### actionAddFavorite

          GralUserAction actionAddFavorite

    - #### actionSaveFavoritePathes

          GralUserAction actionSaveFavoritePathes

    - #### actionReadFavoritePathes

          GralUserAction actionReadFavoritePathes

    - #### actionSortFilePerNameCase

          GralUserAction actionSortFilePerNameCase

      Sort action. Note that the sort action is contained in the `GralFileSelector` already. But this sort action is available from menu of the Fcmd too. It is some different.

    - #### actionSortFilePerNameNonCase

          GralUserAction actionSortFilePerNameNonCase

    - #### actionSortFilePerExtensionCase

          GralUserAction actionSortFilePerExtensionCase

    - #### actionSortFilePerExtensionNonCase

          GralUserAction actionSortFilePerExtensionNonCase

    - #### actionSortFilePerTimestamp

          GralUserAction actionSortFilePerTimestamp

    - #### actionSortFilePerTimestampOldestFirst

          GralUserAction actionSortFilePerTimestampOldestFirst

    - #### actionSortFilePerLenghLargestFirst

          GralUserAction actionSortFilePerLenghLargestFirst

    - #### actionSortFilePerLenghSmallestFirst

          GralUserAction actionSortFilePerLenghSmallestFirst

    - #### actionDeselectDirtree

          GralUserAction actionDeselectDirtree

    - #### actionCleanFileRemote

          GralUserAction actionCleanFileRemote

  - ### Constructor Detail

    - #### FcmdFavorPathSelector

          FcmdFavorPathSelector(MainCmd_ifc console,
                                Fcmd main)

  - ### Method Detail

    - #### buildWindowAddFavorite

          void buildWindowAddFavorite()

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

    - #### readCfg

          java.lang.String readCfg(java.io.File cfgFile)

      Read the configuration file. It is called on startup of the Java commander.
      Parameters:
        `cfgFile` -
      Returns:
        an error message to output or null

    - #### writeCfg

          void writeCfg(java.io.File cfgFile)

      Writes the configuration file. It is called if the configuration should be stored after user invocation.
      Parameters:
        `cfgFile` -

    - #### XXXwriteCfgLine

          private void XXXwriteCfgLine(FcmdFavorPathSelector.FavorPath favorPathInfo)
                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### initActDir

          void initActDir(java.util.Map<java.lang.String,java.io.File> index,
                          java.lang.String key,
                          java.lang.String path)

    - #### buildTabFromSelection

          void buildTabFromSelection(FcmdFavorPathSelector.FavorPath info,
                                     GralTabbedPanel tabPanel)

      Builds a tab for file or command view from a selected line of selection.
      Parameters:
        `info` - The selection info

    - #### setSortOrderFiles

          protected void setSortOrderFiles(char order)

    - #### stop

          void stop()

    - #### confirmCreateNewFavor

          void confirmCreateNewFavor()