Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

24
LINES

< > BotCompany Repo | #1020596 // FileBrowser (dev.)

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (15718L/111K).

!7

sclass FileBrowser > DynObjectTable<File> {
  File dir;
  transient JTree tree;
  
  start {
    itemToMap = itemToMap_File();
    if (dir == null) setDir(userDir());
  }

  visualize {
    ret jhsplit(
      tree = jtree_openRootNode(jDirectoryTree(dir)),
      super.visualize(),
      0.3);
  }
  
  // API
  void setDir(File dir) {
    setField(+dir);
    setData(sortFilesAlphaNumIC(listFilesOnly(dir)));
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020596
Snippet name: FileBrowser (dev.)
Eternal ID of this version: #1020596/6
Text MD5: 8756ea7071079f6a792a33f8ea3cb77f
Transpilation MD5: decb5d0c9098b2e099a46cc3f24bb624
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-28 00:25:58
Source code size: 442 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 239 / 3353
Version history: 5 change(s)
Referenced in: [show references]