├── .github
└── FUNDING.yml
├── .gitignore
├── LICENSE
├── README.md
├── Versioning.md
├── pom.xml
├── src
└── main
│ ├── kotlin
│ ├── GBEE.kt
│ ├── app
│ │ ├── Application.kt
│ │ ├── ApplicationImpl.kt
│ │ ├── components
│ │ │ ├── menuBar
│ │ │ │ ├── View
│ │ │ │ │ ├── MenuView.kt
│ │ │ │ │ └── subItem
│ │ │ │ │ │ ├── grid
│ │ │ │ │ │ └── MenuBarViewGrid.kt
│ │ │ │ │ │ └── list
│ │ │ │ │ │ └── MenuBarViewList.kt
│ │ │ │ └── options
│ │ │ │ │ ├── MenuOptions.kt
│ │ │ │ │ └── subItem
│ │ │ │ │ └── options
│ │ │ │ │ └── MenuBarOptions.kt
│ │ │ └── panel
│ │ │ │ ├── ContentPaneParentImpl.kt
│ │ │ │ └── grid
│ │ │ │ ├── CacheGrid.kt
│ │ │ │ ├── CacheState.kt
│ │ │ │ ├── TableGridImpl.kt
│ │ │ │ └── TableGridScrollPaneImpl.kt
│ │ └── configuration
│ │ │ ├── Configuration.kt
│ │ │ ├── ConfigurationImpl.kt
│ │ │ └── properties
│ │ │ ├── PropertiesEnum.kt
│ │ │ ├── PropertiesImpl.kt
│ │ │ └── Propierties.kt
│ ├── assets
│ │ ├── Component.kt
│ │ ├── Renderable.kt
│ │ ├── button
│ │ │ ├── ButtonAbstractExt.kt
│ │ │ └── group
│ │ │ │ └── ButtonGroupExt.kt
│ │ ├── chooser
│ │ │ ├── color
│ │ │ │ ├── ColorChooser.kt
│ │ │ │ └── ColorChooserImpl.kt
│ │ │ └── file
│ │ │ │ ├── FileChooser.kt
│ │ │ │ └── FileChooserImpl.kt
│ │ ├── dialog
│ │ │ ├── EnumDialog.kt
│ │ │ ├── confirm
│ │ │ │ ├── Confirm.kt
│ │ │ │ └── ConfirmImpl.kt
│ │ │ ├── input
│ │ │ │ ├── Input.kt
│ │ │ │ └── InputImpl.kt
│ │ │ └── message
│ │ │ │ ├── Message.kt
│ │ │ │ └── MessageImpl.kt
│ │ ├── display
│ │ │ ├── Display.kt
│ │ │ └── DisplayImpl.kt
│ │ ├── frame
│ │ │ ├── Frame.kt
│ │ │ └── component
│ │ │ │ └── ComponentListenerScreen.kt
│ │ ├── menu
│ │ │ └── MenuImplExt.kt
│ │ ├── menuBarExt
│ │ │ └── JMenuBarImpl.kt
│ │ ├── panel
│ │ │ ├── Panel.kt
│ │ │ ├── PanelImpl.kt
│ │ │ ├── grid
│ │ │ │ └── PanelGridLayoutImpl.kt
│ │ │ ├── multipleImages
│ │ │ │ ├── PanelCartridge.kt
│ │ │ │ ├── PanelCover.kt
│ │ │ │ ├── PanelSnapshot.kt
│ │ │ │ └── base
│ │ │ │ │ └── PanelMultipleImages.kt
│ │ │ ├── split
│ │ │ │ ├── Split.kt
│ │ │ │ └── SplitImpl.kt
│ │ │ └── tab
│ │ │ │ ├── TabPane.kt
│ │ │ │ └── TabPaneListener.kt
│ │ ├── progressBar
│ │ │ ├── ProgressBar.kt
│ │ │ └── ProgressBarImpl.kt
│ │ ├── scroll
│ │ │ └── ScrollPane.kt
│ │ ├── slider
│ │ │ ├── Slider.kt
│ │ │ └── SliderImpl.kt
│ │ ├── statusBar
│ │ │ ├── StatusBar.kt
│ │ │ └── StatusBarImpl.kt
│ │ ├── table
│ │ │ ├── TableImpl.kt
│ │ │ ├── comparator
│ │ │ │ └── TableHeaderComparator.kt
│ │ │ ├── daemon
│ │ │ │ └── TableDaemon.kt
│ │ │ ├── listener
│ │ │ │ ├── BaseInputTableList.kt
│ │ │ │ ├── adapter
│ │ │ │ │ ├── TableColumnHeaderAdapter.kt
│ │ │ │ │ └── TableRowAdapter.kt
│ │ │ │ ├── renderer
│ │ │ │ │ └── TableCellRendererComponent.kt
│ │ │ │ └── rowKey
│ │ │ │ │ └── TableRowKeyListener.kt
│ │ │ └── model
│ │ │ │ └── TableModelImpl.kt
│ │ └── textArea
│ │ │ ├── TextArea.kt
│ │ │ └── TextAreaImpl.kt
│ └── utils
│ │ ├── completable
│ │ └── CompletableCancelable.kt
│ │ ├── event
│ │ └── ActionEventRunBlockingLaunchSwing.kt
│ │ ├── fps
│ │ └── Fps.kt
│ │ ├── image
│ │ ├── BufferedImageMemoryFromComponent.kt
│ │ └── ImageIconExt.kt
│ │ ├── listGames
│ │ └── ListGames.kt
│ │ ├── map
│ │ └── MergeMaps.kt
│ │ ├── monitor
│ │ └── PerformanceMonitor.kt
│ │ ├── swing
│ │ ├── Swing.kt
│ │ └── SwingDelay.kt
│ │ ├── system
│ │ └── System.kt
│ │ ├── thread
│ │ ├── CustomExecutor.kt
│ │ ├── DynamicSemaphore.kt
│ │ └── ThreadMain.kt
│ │ ├── tween
│ │ └── Tween.kt
│ │ └── zip
│ │ └── Zipable.kt
│ └── resources
│ ├── app
│ └── readme.md
│ ├── cartridge
│ └── readme.md
│ ├── cover
│ └── readme.md
│ ├── gameList
│ ├── list
│ └── listGame.json
│ ├── rom
│ └── readme.md
│ ├── snapshot
│ └── readme.md
│ └── version
│ ├── GBEE_v.0.0.1.gif
│ ├── GBEE_v.0.0.2.gif
│ ├── GBEE_v.0.1.0.gif
│ ├── GBEE_v.0.1.1.gif
│ ├── GBEE_v.0.2.0.gif
│ ├── GBEE_v.0.2.1-1.gif
│ ├── GBEE_v.0.2.1-2.gif
│ ├── GBEE_v.0.2.1.gif
│ ├── GBEE_v.0.2.2-1.gif
│ ├── GBEE_v.0.2.2-2.png
│ ├── GBEE_v.0.2.2-3.png
│ ├── GBEE_v.0.2.2-4.png
│ ├── GBEE_v.0.2.2-5.png
│ ├── GBEE_v.0.2.2-6.png
│ ├── GBEE_v.0.2.2.gif
│ ├── GBEE_v.0.2.3-1.png
│ ├── GBEE_v.0.2.3-2.png
│ ├── GBEE_v.0.2.3-3.png
│ └── GBEE_v.0.2.3.gif
└── start-async-checkbutton-application.iml
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: vicboma1
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | /src/main/resources/cartridge
3 | /lib
4 | /.idea
5 | /src/main/resources/snapshot
6 | /src/main/resources/rom
7 | /src/main/resources/list/
8 | /src/main/resources/cover
9 | /src/main/resources/cartridge/
10 | /src/main/resources/app
11 | src/main/resources/font/
12 | target/
13 | /src/main/resources/list/listGame.json
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [GameBoy Emulator](https://github.com/vicboma1/emulators/tree/master/gameboyclassic) Environment - GBEE [v.0.2.3](https://github.com/vicboma1/GameBoyEmulatorEnvironment/blob/master/Versioning.md#version-023----wip)
2 |
3 | Front-End developed with **Kotlin Experimental** for my [GameBoy Emulator](https://github.com/vicboma1/emulators/tree/master/gameboyclassic)
4 |
5 | #### Now, with coroutines Average Timing with 2546 covers
6 | #### Async + CompletableFuture-Deferred - [ 50 - 79 ] ms
7 |
8 | ###
9 |
10 | 
11 |
12 | #### version 0.2.3 - news
13 | ```
14 | MenuBar Options
15 | MenuItemView { Delay load Async - Permits } / Dynamic configuration with sliderBar
16 | Custom Sempahore
17 | Add MenuItemsView Grid by Rom Name
18 | Processing with Coroutine + async
19 | ```
20 |
21 | # Grid Async
22 |
23 | ## Rom Name
24 |
25 | 
26 |
27 | ## x4 Cover
28 |
29 | 
30 |
31 | ## x3 Cover
32 |
33 | 
34 |
35 | 
36 |
37 | ## x2 Cover
38 |
39 | 
40 | 
41 | 
42 |
43 | ## x1 Cover
44 |
45 | 
46 |
47 |
48 | # Resources
49 |
50 | Folders
51 | ```
52 | app
53 | |______ main.png
54 |
55 | cartridge
56 | |______ _bg.png
57 | |______ addamsf.png
58 | |______ {romName}.png
59 |
60 | cover
61 | |______ _bg.png
62 | |______ _gbNotFound.png
63 | |______ addamsf.png
64 | |______ {romName}.png
65 |
66 | font
67 | |______ _fontGrid.png
68 |
69 | list
70 | |______ listGame.json
71 |
72 | rom
73 | |______ ace_stri.gb
74 | |______ addamsf.gb
75 | |______ addamsf2.gb
76 | |______ *.gb
77 |
78 | snapshot
79 | |______ _bg.png
80 | |______ addamsf.png
81 | |______ {romName}.png
82 | ```
83 |
84 | where :
85 |
86 | ```
87 | "main.png" is the icon
88 | "{romName}.png" is the Game image
89 | "_bg.png" is the pattern that contains the others images inside it.
90 | "_gbNotFound.png" is the pattern that represents the image not found.
91 | "*.gb" is the specific name that contains the game inside the rom
92 | "listGame.json" is a Array> than contains the column and rows
93 | "_fontGrid.png " is the font that represent the game cover
94 | ```
95 |
96 | ## Tooling
97 |
98 | [Download Asynk Resource](https://github.com/kotlin-es/kotlin-asynk-resources)
99 |
100 | 
101 |
102 | ###
103 | # Game List
104 | ###
105 |
106 | This is a list of 1049 games released for the Game Boy handheld video game system, excluding any cancelled and unlicensed games campatible with GameBoy Emulator Environment - GBEE
107 |
108 | ```kotlin
109 | " --- CADA --- " "BURAI FIGHTER DE" "ELITE SOCCER " "HATRIS "
110 | "ACE STRIKER " "BURAI FIGHTER DX" "EMPIRE STRIKES " "HEAD ON "
111 | "ADDAMS FAMILY " "BURGER TIME " "ESPARKS " "HEIANKYO ALIEN "
112 | "ADDAMS FAMILY 2 " "BURNING PAPER " "F-1 HEROGB " "HEIANKYO ALIEN "
113 | "ADVENTURE ISLAND" "BZONE SBREAKOUT " "F-1HERO GB92 " "HERCULES EIKOU "
114 | "ADVENTUREISLAND2" "CADILLAC2 " "F1 BOY " "HIGH STAKES "
115 | "AEROSTAR " "CAESARS PALACE " "F1 SPIRIT " "HIRYU GAIDEN "
116 | "AFTER BURST " "CAESARS PALACE " "F1 SUPER DRIVING" "HOME ALONE "
117 | "ALADDIN " "CAPCOM QUIZ " "F15 STRIKE EAGLE" "HOME ALONE2 "
118 | "ALFRED CHICKEN " "CAPTAIN TUBASA J" "F1RACE " "HONG KONG "
119 | "ALIEN " "CARD GAME " "FACEBALL 2000 " "HOOK "
120 | "ALIEN OLYMPICS " "CASINO FUNPAK " "FAMILYJOCKEY " "HOOK "
121 | "ALIEN V PREDATOR" "CASTELIAN " "FASTEST LAP " "HOSHINOKA-BI "
122 | "ALLEY WAY " "CASTLEVANIA ADVE" "FELIX THE CAT " "HUDSON HAWK "
123 | "ALLSTARCHALLENGE" "CASTLEVANIA ADVE" "FERRARI " "HUDSON HAWK "
124 | "ALSTARCHALLENGE2" "CASTLEVANIA2 BEL" "FIFA SOCCER " "HUGO "
125 | "ALSTARCHALLENGE2" "CAVE NOIRE " "FIFA SOCCER 96 " "HYPER BLACKBASS "
126 | "ALTERED SPACE " "CENTIPEDE " "FIGHBIRD GB " "HYPER DUNK "
127 | "ALTERED SPACE " "CHACHAMARUPANIC " "FIGHTING SOCCER " "HYPERLODERUNNER "
128 | "AMAZING-TATER " "CHASE HQ " "FINAL REVERSE " "IKARI NO YOUSAI "
129 | "AMIDA " "CHASE HQ " "FIRE FIGHTER " "IN YOUR FACE "
130 | "ANIMANIACS " "CHIBIMARUKO " "FISH DUDE " "INDIANA JONES "
131 | "ANOTHER BIBLE " "CHIKI RACE GB " "FLAPPY SPECIAL " "INDIANA JONES 3 "
132 | "ARETHA " "CHOPLIFTER 2 " "FLINTSTONES " "IREM FIGHTER "
133 | "ARETHA3 " "CHOPLIFTER 2 " "FLIPULL " "ISHIDO JPN VER. "
134 | "ASMIK2 " "CHOPLIFTER III " "FLYING WARRIORS " "ISHIDO USA VER. "
135 | "ASTERIX " "CLEMENS BASEBALL" "FOOTBALL INT'L " "ITCHY & SCRATCHY"
136 | "ASTEROIDS " "CLIFFHANGER " "FOREMAN FOR REAL" "J CONNOR TENNIS "
137 | "ASTEROIDS/MISCMD" "CONTRA " "FORTIFIED ZONE " "J.CUP SOCCER "
138 | "ASTRO RABBY " "CONTRA SPIRITS " "FORTIFIED ZONE2 " "JAMES POND "
139 | "ATOMIC PUNK " "COOL SPOT " "FRANK THOMAS BB " "JANKENMAN "
140 | "AVENGING SPIRIT " "COOL WORLD " "FUNNY FIELD " "JANSHIRO "
141 | "AYAKASI NO SIRO " "COSMO TANK " "FUNPAK 4IN1 " "JANTAKUBOY "
142 | "B.C.KID2 " "CRASH DUMMIES " "FUNPAK 4IN1 - V2" "JEEP JAMBOREE "
143 | "BALLOON KID " "CRYSTAL QUEST " "FUSHIGINA BULOBI" "JELLY BOY "
144 | "BANISHING RACER " "CUTTHROAT ISLAND" "G&W GALLERY " "JEOPARDY "
145 | "BARBIE GAME GIRL" "CYBER FORMULA " "GALAGA&GALAXIAN " "JINSEI "
146 | "BASE BALL KIDS " "CYRAID " "GAME&WATCH " "JOE AND MAC "
147 | "BASEBALL " "DAEDALIAN OPUS " "GAMERA DAIKAIJUU" "JOE AND MAC "
148 | "BASES LOADED GB " "DAFFY DUCK " "GANBARE GOEMON " "JOE AND MAC "
149 | "BATMAN " "DAFFY DUCK " "GARFIELD " "JORDAN ONEONONE "
150 | "BATMAN ANIMATED " "DAISENRYAKU HIRO" "GARGOYLE'S " "JORDAN VS BIRD "
151 | "BATMAN FOREVER " "DARK WING DUCK " "GAUNTLET II " "JUDGE DREDD "
152 | "BATMAN ROJ " "DARKMAN " "GB 3TAMA " "JUNGLE BOOK "
153 | "BATTLE BULL " "DARUMAN BUSTERS " "GB BASKETBALL " "JUNGLE STRIKE "
154 | "BATTLE CRUSHER " "DAYS OF THUNDER " "GB BEACHVOLLEY " "JUNGLE WARS "
155 | "BATTLE OFKINGDOM" "DEADHEATSCRAMBLE" "GB DBZ GOKOU " "JURASSIC PARK "
156 | "BATTLE PINGPONG " "DEADHEATSCRAMBLE" "GB DRUAGA 1 " "JURASSIC PARK II"
157 | "BATTLE SHIP " "DEFENDER/JOUST " "GB GARMS 1 " "KAERUNOTAMENI "
158 | "BATTLE SHIP " "DENNIS " "GB GENJIN " "KAGUYAHIME "
159 | "BATTLE SHIP " "DESERT STRIKE " "GB GENJIN LAND " "KATTOBI ROAD "
160 | "BATTLE SHIP " "DEXTERITY " "GB GODZILLA " "KESAMARU "
161 | "BATTLECITY " "DICK TRACY " "GB IRON LEAGUER1" "KID ICARUS "
162 | "BATTLETOADS " "DIG DUG " "GB JIDAIGEKI " "KID NIKI "
163 | "BATTLEUNIT ZEOTH" "DLAIR LEGEND UK0" "GB KINNIKUMAN DM" "KILLER TOMATOES "
164 | "BEACH,VOLLEYBALL" "DLAIR THE LEGEND" "GB KUREYON SHIN " "KILLERINSTINCT95"
165 | "BEACH_VOLLEY " "DMG FOOTBALL " "GB KUREYON SHIN4" "KINGDOM CRUSADE "
166 | "BEETHOVEN " "DMG-ASE " "GB LACROANHERO 1" "KINGOFTHEZOO "
167 | "BEETLEJUICE " "DMG-ASJ " "GB MASKRIDER SD " "KINTARO ACG "
168 | "BEST OF THE BEST" "DMG-KMJ " "GB MUSASHIROAD 1" "KIRBY BLOCKBALL "
169 | "BIKKURI NEKKETU " "DMG-SJJ " "GB MUSASHIROAD 1" "KIRBY DREAM LAND"
170 | "BILL AND TED " "DMG-UQJ " "GB NEW SD GUNDAM" "KIRBY'S PINBALL "
171 | "BIONIC BATTLER " "DODGE BALL " "GB OTOKOJYUKU 1 " "KIRBY'S PINBALL "
172 | "BIONIC-COMMANDO " "DODGE BOY " "GB OTOKOJYUKU 1 " "KIRBY2 "
173 | "BIONIC-COMMANDO " "DODGEDANPEI " "GB OTOKOJYUKU 1 " "KITCHIN PANIC "
174 | "BISHOJYOSENSI SE" "DONKEY KONG " "GB POWER MOVIE " "KITERETU ZYURAKI"
175 | "BLADES OF STEEL " "DONKEYKONGLAND 2" "GB SAILORMOON R " "KLAX "
176 | "BLASTER MASTER B" "DONKEYKONGLAND 3" "GB SAILORMOON R " "KNIGHT QUEST "
177 | "BLODIA " "DONKEYKONGLAND95" "GB SLAM DUNK " "KOI WA KAKEHIKI "
178 | "BLUES BROTHERS " "DORAEMON " "GB SLAM DUNK 2 " "KONAMI GOLF "
179 | "BO JACKSON " "DORAEMON " "GB SUPERBIKKURI1" "KONAMIC SPORTS "
180 | "BOKU DRACURA KUN" "DORAEMON2 " "GB TAACHIYAN " "KORODICE "
181 | "BOMB JACK " "DORAKYURADENSETU" "GB TAMAGOTCH 1 " "KRUSTY "
182 | "BOMBER BOY " "DORASUREGAIDEN " "GB TAMAGOTCHI " "KUNIO "
183 | "BOMBER KING S2 " "DOUBLE DRAGON " "GB TARURU-TO 1 " "KWIRK "
184 | "BOMBER MAN GB " "DOUBLE DRAGON 2 " "GB TARURU-TO 2 " "KYORCHANLANDHIRO"
185 | "BOMBERMAN GB " "DOUBLE DRAGON 3 " "GB TEKKAMANBLADE" "LAMBORGHINI "
186 | "BONK'S ADVENTURE" "DOUBLE DRIBBLE " "GB ULTRAMANCLUB1" "LANG TRNSLTR FRN"
187 | "BOOBY BOYS " "DOUBLEYAKUMAN2 " "GB UNDOUKAI " "LANG TRNSLTR SPN"
188 | "BOUKENJIMA2 " "DR FRANKEN " "GBGENJIN2 " "LAST ACTION HERO"
189 | "BOULDER DASH " "DR FRANKEN " "GBWARS " "LAST BIBLE "
190 | "BOULDER DASH " "DR FRANKEN 2 " "GEMGEM " "LAST BIBLE2 "
191 | "BOXING " "DR.MARIO " "GENERATIONS " "LAWNMOWER MAN "
192 | "BOXXLE " "DRACULA " "GENSAN " "LAZLOS LEAP "
193 | "BOXXLE2 " "DRACURA2 " "GENSAN " "LEGEND "
194 | "BOY AND BLOB GB1" "DRAGON SLAYER 1 " "GENSAN2 " "LEGEND OF ZERD "
195 | "BOY AND BLOB GB2" "DRAGONHEART " "GEORGE F. BOXING" "LEMMINGS "
196 | "BOY AND BLOB GB2" "DRAGONHEART " "GHOSTBUSTERS 2 " "LEMMINGS 2 "
197 | "BRAINBENDER " "DRAGONS LAIR " "GHOSTBUSTERS II " "LETHAL WEAPON "
198 | "BREAKTHRU! " "DRAGONTAILBIT2 " "GINGA " "LITTLE MASTER "
199 | "BT2RAGNAROKWORLD" "DROPZONE " "GO GO TANK " "LITTLE MASTER 2 "
200 | "BUBBLE BOBBLE " "DUCK TALES " "GOAL! " "LITTLE MERMAID "
201 | "BUBBLE BOBBLE " "DUCK TALES " "GOD MEDICINE " "LOCK'N CHASE "
202 | "BUBBLE GHOST " "DUCK TALES 2 " "GODZILLA " "LOLO "
203 | "BUBBLE GHOST " "DUCK TALES 2 " "GOLF " "LOONEY TUNES "
204 | "BUBBLEBOBBLE2 " "DUNGEONLAND " "GOLF CLASSIC " "LOOPZ "
205 | "BUBBLEBOBBLEJR " "DYNABLASTER " "GOURMET PARADISE" "LUCKY MONKEY "
206 | "BUBSY II " "EARTHWORM JIM " "GRADIUS " "LUCLE "
207 | "BUGS BUNNY " "ELEVATOR ACTION " "GREMLINS 2 " "LUNA LANDER "
208 | "BUGSCRAZYCASTLE2" "ELEVATOR ACTION " "HARIMANADA " "MADDEN 95 "
209 |
210 |
211 |
212 | "MADDEN 96 " "OLYMPUS " "ROAD RASH " "SQ DSV DMG "
213 | "MAGNETIC SOCCER " "ON THE TILES " "ROBIN HOOD " "SQUARE DEAL "
214 | "MAHOUJINGURUGURU" "ONI " "ROBOCOP " "SRJ DMG "
215 | "MAKAIMURAGAIDEN " "ONI 5 " "ROBOCOP " "STAR SAVER "
216 | "MANSELL " "ONI-PACHINKOTEN " "ROBOCOP2 " "STAR STACKER "
217 | "MARBLE MADNESS " "OPERATION C " "ROCK'N! MONSTER!" "STAR TREK "
218 | "MARIO & YOSHI " "OTHELLO " "ROCKMAN WORLD " "STAR TREK "
219 | "MARIO'S PICROSS " "OUT BURST " "ROCKMAN WORLD2 " "STAR WARS "
220 | "MARIOLAND2 " "OUT OF GAS " "ROCKMANWORLD3 " "STARGATE "
221 | "MARU'S MISSION " "PAC-IN-TIME " "ROCKMANWORLD4 " "STREET FIGHTER 2"
222 | "MASTER KARATEKA " "PAC-MAN " "ROCKMANWORLD5 " "SUMO FIGHTER "
223 | "MCDONALDLAND " "PAC-MAN " "ROCKY BULLWINKLE" "SUMOU FIGHTER "
224 | "MEGA MAN 2 " "PAC-MAN " "RODLAND " "SUPER B DAMAN "
225 | "MEGA MAN 2 " "PAC-PANIC " "RODLAND " "SUPER BLUES "
226 | "MEGA MAN 2 " "PACHINKO TIME " "ROGER RABBIT " "SUPER BOMBLISS "
227 | "MEGALIT " "PAINTERMOMOPIE " "ROLAN'S CURSE 2 " "SUPER CHINESE 2 "
228 | "MEGAMAN " "PALAMEDES " "ROLANS CURSE " "SUPER HUNCHBACK "
229 | "MEGAMAN3 " "PANG " "RTYPE " "SUPER HUNCHBACK "
230 | "MEGAMAN3 " "PAPERBOY " "RTYPE " "SUPER KICK OFF "
231 | "MEGAMAN3 " "PAPUWAKUNN " "RTYPE 2 " "SUPER MARIOLAND "
232 | "MEGAMAN4 " "PARASOL STARS " "RTYPE 2 " "SUPER MARIOLAND "
233 | "MERCENARY FORCE " "PARASORU HEMBEI " "RUBBLE SAVER 2 " "SUPER MARIOLAND "
234 | "METALJACK " "PARODIUS " "RUBBLESA " "SUPER MARIOLAND "
235 | "METROID2 " "PARODIUS DA! " "RUNES OF VIRTUE " "SUPER OFF ROAD "
236 | "MICKEY 4 " "PEETAN " "RUNES OF VIRTUE2" "SUPER RC PRO-AM "
237 | "MICKEY 5 " "PENGUIN BOY " "RVT " "SUPER ROBOT WAR "
238 | "MICKEY MOUSE " "PENGUIN LAND " "S S BASKET BALL2" "SUPERCHINESELAND"
239 | "MICKEY MOUSE " "PENGUIN WARS " "SAGA " "SUPERMARIOLAND3 "
240 | "MICKEY MOUSE " "PENGUINKUNWARSVS" "SAGA " "SUPERROBOTWAR 2G"
241 | "MICKEY MOUSE 2 " "PENTADRAGON " "SAGA2 " "SUPERWWF "
242 | "MICKEYS CHASE " "PERSONAL ORGANIZ" "SAGA2 " "SUPERWWF "
243 | "MICRO MACHINES " "PGA EURO TOUR " "SAGA3 " "SWAMP THING "
244 | "MICRO MACHINES 2" "PGA TOUR 96 " "SAGA3 " "TAIKYOKU RENJU "
245 | "MIGRAIN ACCLAIM " "PHANTASM " "SAGAIA " "TAIL GATOR "
246 | "MIKENEKO HOLMES " "PINBALL " "SAMURAI SHODOWN " "TALE SPIN "
247 | "MILLI/CENTI/PEDE" "PINBALL " "SANGOKUSHI " "TARZAN "
248 | "MILON CASTLE " "PINBALL " "SANRIO CARNIVAL " "TASMANIA STORY "
249 | "MINER 2049ER " "PINBALL " "Saved game " "TASMANIA STORY "
250 | "MINESWEEPER " "PINBALL DELUXE " "SCOTLANDYARD " "TAZ-MANIA "
251 | "MINI PUTT " "PINBALL DREAMS " "SD HIRYUNOKEN " "TECMO BOWL "
252 | "MISSILE COMMAND " "PINBALL FANTASIE" "SD LUPIN THE 3RD" "TEKKYUFIGHT! "
253 | "MM ULT CHALLENGE" "PINBALL MANIA " "SD SEINTPARADA01" "TENCHIWOKURAU "
254 | "MOGURA DE PON! " "PINBALL PARTY " "SDGUNDAMKUNITORI" "TENJIN KAISEN 2 "
255 | "MOGURANYA " "PIPE DREAM " "SDSENGOKUDEN2 " "TENJINKAISEN "
256 | "MOMOTARO DENGEKI" "PIT FIGHTER " "SDSENGOKUDEN3 " "TENNIS "
257 | "MOMOTARODENGEKI2" "PITMAN " "SEASIDE VOLLEY " "TENSAIBAKABON "
258 | "MOMOTETU " "POCAHONTAS " "SEIKEN DENSETSU " "TERMINATOR 2 "
259 | "MONOPOLY " "POCKET BATTLE " "SEIKEN DENSETSU " "TERMINATOR 2 TAG"
260 | "MONOPOLY " "POCKET STADIUM " "SELECTION " "TESSERAE "
261 | "MONSTER MAKER J " "POKONYAN! " "SENGOKUNINJAKUN " "TETRIS "
262 | "MONSTER MAKER J2" "POP UP " "SENSIBLE SOCCER " "TETRIS ATTACK "
263 | "MONSTER MAX " "POPEYE " "SERPENT " "TETRIS BLAST "
264 | "MONSTERTRUCK " "POPEYE 2 " "SHADOW WARRIORS " "TETRIS FLASH "
265 | "MORTAL KOMBAT " "POPEYE 2 " "SHANGHAI " "TETRIS PLUS "
266 | "MORTAL KOMBAT 3 " "POPULOUS " "SHANGHAI " "TETRIS2 "
267 | "MORTAL KOMBAT II" "POWER MISSION " "SHIKINJYO " "THE CHESSMASTER "
268 | "MOTOCROSSMANIACS" "POWER MISSION " "SHIPPO DE BUN " "THE FIDGETTS "
269 | "MOUSE TRAP HOTEL" "POWER RACER " "SHISENSYO " "THE FIDGETTS "
270 | "MR NUTZ " "POWER RANGERS " "SHOOT " "THE FLASH "
271 | "MR.DO! " "PREHISTORIK MAN " "SHOOT " "THE FLINTSTONES "
272 | "MS.PAC-MAN " "PRIMAL RAGE " "SHOUGI " "THE GETAWAY "
273 | "MUHAMMAD ALI " "PRINCE OF PERSIA" "SI KIDS " "THE GETAWAY "
274 | "MYSTERIUM " "PRINCE OF PERSIA" "SIDE POCKET " "THE HUMANS "
275 | "MYSTIC QUEST " "PRIPRI " "SIMPSON ESCAPE " "THE JETSONS "
276 | "MYSTIC QUEST " "PRO SOCCER " "SIMPSONS 2 " "THE LION KING "
277 | "MYSTIC QUEST " "PROBOTECTOR " "SIMPSONS3 " "THE PAGEMASTER "
278 | "NAIL N SCALE " "PROBOTECTOR 2 " "SKATE OR DIE BAD" "THE PUNISHER "
279 | "NAMCOCLASSIC " "PROWRES " "SMURFS " "THE SWORD OFHOPE"
280 | "NASCARFASTTRACKS" "PROWRES " "SNEAKY SNAKES " "THE SWORD OFHOPE"
281 | "NAVY BLUE " "PURO STADIUM '91" "SNOOPY " "THEGAMEOFHARMONY"
282 | "NAVY BLUE 90 " "PUYOPUYO " "SNOOPY " "THUNDERBIRDS "
283 | "NAVY SEALS " "PUZZLE BOY " "SNOW BROS.JR " "TINTIN AU TIBET "
284 | "NBA JAM " "PUZZLE BOY2 " "SOCCER " "TINY TOON 2 "
285 | "NBA JAM TE " "PUZZLE ROAD " "SOCCER BOY " "TINY TOON 3 "
286 | "NEKOJARA " "PUZZNIC " "SOCCER MANIA " "TINY TOON ADVENT"
287 | "NEMESIS " "PYRAMIDS OF RA " "SOLARSTRIKER " "TINY TOON ADVENT"
288 | "NEMESIS 2 " "Q*BERT II " "SOLDAM GB " "TINY TOON WACKY "
289 | "NETTOU KOF 95 " "Q*BERT II " "SOLITAIRE FUNPAK" "TITUS THE FOX "
290 | "NETTOU SAMURAI " "QBILLION " "SOLOMON'S CLUB " "TMHT BACK FROM S"
291 | "NETTOU TOSHINDEN" "QIX " "SOLOMON'S CLUB " "TMNT "
292 | "NETTOU WH2JET " "QUARTH " "SOUKOBAN " "TMNT 2 "
293 | "NETTOU WH2JET " "QUARTH " "SOUKOBAN2 " "TMNT BACK FROM S"
294 | "NETTOUGAROU2 " "RACE DAYS " "SPACE INVADERS " "TMNT FOOT CLAN "
295 | "NEW CHESSMASTER " "RACE DRIVIN' " "SPACE INVADERS " "TMNT3 "
296 | "NFL FOOTBALL " "RACING DAMASHII " "SPANKY'S QUEST " "TMNT3 "
297 | "NFL QB CLUB 96 " "RADARMISSION " "SPARTAN X " "TOM AND JERRY "
298 | "NHL HOCKEY 95 " "RADARMISSION " "SPARTAN X " "TOM AND JERRY "
299 | "NINJA BOY " "RAGING FIGHTER " "SPEED BALL 2 " "TOM AND JERRY "
300 | "NINJA BOY 2 " "RAIJINOU " "SPEEDY GONZALES " "TOPGUN 2 "
301 | "NINJA GAIDEN " "RAMPART_GB " "SPEEDY GONZALES " "TOPRANKTENNIS "
302 | "NINJA GAIDEN " "RANMA 1/2 " "SPELL CHECKER " "TORPEDO RANGE "
303 | "NINJA RYUKENDEN " "RANMA1/2 PART2 " "SPIDER-MAN " "TOTAL CARNAGE "
304 | "NINJA SPIRIT " "RANMA1/2KAKUGEKI" "SPIDER-MAN 2 " "TOTSUGEKI TANK "
305 | "NINJATARO " "RAY THUNDER " "SPIDER-MAN 3 DMG" "TOUR DE THRASH "
306 | "NOBUNAGA " "REAL GHOSTBUSTER" "SPIDERMAN XMEN " "TOXIC CRUSADERS "
307 | "NOBUNAGA " "RED ARREMER " "SPIROU " "TOY STORY "
308 | "NORTH STAR " "RED OCTOBER " "SPOT " "TRACK MEET "
309 | "OBELIX " "RED OCTOBER " "SPOT " "TRACK MEET "
310 | "OIRA JAJAMARU " "RIDDICK BOWE " "SPOT COOL ADV " "TRACK MEET HIRO "
311 | "OLYMPIC GAMES " "RING RAGE " "SPUDS ADVENTURE " "TRACK&FIELD "
312 |
313 |
314 |
315 | "TRAPPERS TENGOKU" "VEGAS STAKES " "WORLD BOWLING " "YUUYUU-2 "
316 | "TRAX " "VEGAS STAKES " "WORLD BOWLING " "YUUYUU-3 "
317 | "TRIP WORLD " "VELIOUS 2 " "WORLD CUP " "YUUYUU-4 "
318 | "TRSI RULEZ " "VERSUS HERO " "WORLD CUP " "ZELDA "
319 | "TRUE LIES " "VIRTUAL WARS " "WORLD CUP USA 94" "ZELDA "
320 | "TSUMEGO 01 " "VITAMINA KINGDOM" "WORLD CUP USA 94" "ZELDA "
321 | "TUBASA VS " "VOLLEY FIRE " "WORLD ICE HOKKEY" "ZELDA "
322 | "TUMBLE POP " "VS BATTLER " "WORMS " "ZEN "
323 | "TUMBLE POP " "W CIRCUIT SERIES" "WWF RAW " "ZEOTH "
324 | "TURN AND BURN " "WARIO BLAST " "WWF SUPERSTARS " "ZOIDS J1 "
325 | "TURRICAN " "WARRIOR " "WWF SUPERSTARS " "ZOOL "
326 | "TWIN " "WATER WORLD " "WWFKOR " "ZOOP "
327 | "TWIN-BEE DA!! " "WAVERACE " "WWFKOR "
328 | "ULTRA GOLF " "WAYNE'S WORLD " "XXZZ "
329 | "ULTRAMAN " "WEREBACK BC " "XENON 2 "
330 | "ULTRAMAN BALL " "WH2JET " "XENON 2 "
331 | "ULTRAMAN GEKIDEN" "WHEEL OF FORTUNE" "XERD!! "
332 | "UNDER COVER COPS" "WILDSNAKE " "YAIBA "
333 | "UNIVERSALSOLDIER" "WINNING GOAL " "YAKUMAN "
334 | "UNO2SMALL WORLD " "WINTER GOLD " "YAMATO "
335 | "UOOZU " "WINTER OLYMPICS " "YOGIS GOLDRUSH "
336 | "URUSEIYATSURA " "WIZARDRY SOQ " "YOSHI'S COOKIE "
337 | "VALATIONS " "WIZARDS WARRIORS" "YOSSY NO TAMAGO "
338 | "VATTLE GIUCE " "WORDTRIS " "YOSSY NO TAMAGO "
339 | "VEEDIOTS " "WORDZAP " "YUUYUU-1 "
340 | ```
341 | ###
342 | # Add new games ??
343 | ###
344 |
345 | Now, you can put new games with the possibility of creating a Json with the list of games that you want.
346 |
347 | You only need to generate a list of items list.
348 | The index 0 corresponds to the columns and the rest of the elements to the rows.
349 |
350 | Automaticly will be generated the columns and rows of game list
351 |
352 |
353 | ```kotlin
354 | [
355 | ["Load", "ROM Game", "Game Name", "ROM Type", "Size (in bytes)"],
356 | [false, "YYYY.GB "," --- YYYY --- ", "XXX+ZZZZ ", 65.536],
357 | [ true, "XXXX.GB "," --- XXXX --- ", "YYY+ZZZZ ", 65.536],
358 | [ ...., ".....GB "," --- .... --- ", " ...... ", ......]
359 | ]
360 | ```
361 |
362 |
363 | --->>> [Repo: Getting Started Kotlin](https://github.com/vicboma1/GettingStartedKotlin) <<<---
364 |
365 | --->>> [Repo: Kotlin Koans](https://github.com/vicboma1/Kotlin-Koans) <<<---
366 |
367 | --->>> [Repo: Kotlin Problems](https://github.com/vicboma1/Kotlin-Examples-Problems) <<<---
368 |
369 | --->>> [Repo: Kotlin Mobile](https://github.com/vicboma1/KotlinMobilePoC_MasterUV2018) <<<---
370 |
371 | --->>> [Repo: Kotlin JavaScript](https://github.com/vicboma1/kotlinJavaScript) <<<
372 |
373 | --->>> [Repo: Kotlin Native - iOS ](https://github.com/vicboma1/Kotlin-Native-iOS) <<<---
374 |
375 | --->>> [Repo: Ktor Examples](https://github.com/vicboma1/ktor-API-examples) <<<---
376 |
377 |
378 | @Author : Victor Bolinches Marin
379 |
380 | @Author : [vicboma1](https://twitter.com/vicboma1)
381 |
382 | # Note:
383 | # This homebrew project does not contain ROMs & Images
384 |
--------------------------------------------------------------------------------
/Versioning.md:
--------------------------------------------------------------------------------
1 | Semantic Versioning
2 | =========
3 |
4 | ```
5 | Given a version number MAJOR.MINOR.PATCH, increment the:
6 |
7 | MAJOR version when you make incompatible API changes,
8 | MINOR version when you add functionality in a backwards-compatible manner, and
9 | PATCH version when you make backwards-compatible bug fixes.
10 | Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
11 | ```
12 |
13 | #### version 0.2.3 - WIP
14 | ```
15 | MenuBar Options
16 | MenuItemView { Delay load Async - Permits } / Dynamic configuration with sliderBar
17 | Custom Sempahore
18 | Add MenuItemsView Grid by Rom Name
19 | Processing with Coroutine + async
20 | Selection cell in row (Grid)
21 | ```
22 | ## Averaging Time to load 2546 covers - 12 executions [ version 0.2.3 ]
23 |
24 | | | Coroutine | Coroutine | Coroutine | Coroutine |
25 | |:------------------: |:-----------: |:-----------: |:-----------------: |:-----------------: |
26 | | RunBlocking | True | True | True | True |
27 | | | launch | launch | async | async |
28 | | Context | CommonPool | CommonPool | CommonPool | CommonPool |
29 | | Mutex Optimization | False | True | False | True |
30 | | Time [ms] | 70 - 90 | 70 - 80 | 65 - 90 | 50 - 60 |
31 | | Job | join | join | | |
32 | | Time [ms] | 70 - 110 | 70 - 95 | | |
33 | | Deffered | | | CompletableFuture | CompletableFuture |
34 | | Time [ms] | | | 65-80 | 50-79 |
35 |
36 |
37 | #### version 0.2.2
38 | ```
39 | Add MenuItemsView Grid by scale { 1x, 2x, 3x, 4x}
40 | Create Images in memory
41 | Asynchronous GridView
42 | ```
43 |
44 | #### version 0.2.1
45 | ```
46 | Add MenutItemView { Grid - List }
47 | Grid {View - Model - Scroll} based in Table with multiple rows cached
48 | Model { Image - NameRom }
49 | ```
50 | ## Averaging Time to load 2546 - 12 executions [ version 0.2.1 ]
51 |
52 | | | ThreadPool | ThreadPool | ThreadPool | ThreadPoolExecutor | Thread | Thread |
53 | |:----------------------: |:------------: |:-----------: |:-----------: |:-------------------: |:-----------------: |:-----------------: |
54 | | Executor | Cached | Fixed(1) | Fixed(4) | Fixed(4) | ForkJoinPool(4) | ForkJoinPool(1) |
55 | | Concurrent EDA | LinkedDeque | LinkedDeque | LinkedDeque | LinkedBlockingDeque | LinkedQueue | LinkedQueue |
56 | | Parallelism | False | False | False | True | True | True |
57 | | wait-free Optimization | False | False | False | True | False | False |
58 | | Time [ms] | 1970 - 2250 | 2100 - 2450 | 1700 - 1900 | 1200 - 1300 | 1200 - 1340 | 1900 - 2100 |
59 | | CompletableFuture | Supplier | Supplier | Supplier | Supplier | Supplier | Supplier |
60 | | Time [ms] | 1500 - 1950 | 1500 - 2000 | 1420 - 1700 | 1100 - 1350 | 700 - 1240 | 1500 - 1700 |
61 |
62 |
63 | #### version 0.2.0
64 | ```
65 | External dependencies of the list of games with json protocol (DDD)
66 | MessageDialog to show the absolutePath of the rom when press enter key
67 | Asynchronous window minimization
68 | Optimize tab selection
69 | ```
70 |
71 | #### version 0.1.1
72 | ```
73 | Fixed row boolean table sort
74 | Optimization
75 | Repaint table with daemon
76 | Circular navigation tab
77 |
78 | ```
79 |
80 | #### version 0.1.0
81 | ```
82 | Table List
83 | Listerner InputKey - [ Left - Right ]
84 | Initialize sort column by game
85 |
86 | Circular navigation for tab pane child
87 |
88 | ```
89 |
90 | #### version 0.0.2
91 | ```
92 | Fixed navigation table list Up - Down limits
93 | Fixed status bar with static text
94 | Fixed selected row
95 |
96 | Table List
97 | Enable row
98 | Listerner InputKey - [ Up - Down - Enter ]
99 |
100 | Tab Pane
101 | Cartridge, snapshot Component
102 | Main image
103 | Background image
104 |
105 | Rom, cartridge, snapshot folders
106 | ```
107 |
108 | #### version 0.0.1
109 | ```
110 | Status Bar
111 | * Animation text
112 |
113 | Split Pane
114 | * Table List
115 | ColumnHeader - [ load - rom - game - type - size ]
116 | RowHeader
117 | Game list
118 | Disable row
119 | AutoScroll - [ H - V ]
120 | Listerner - [ ColumnHeader - RowHeader ]
121 | Transparent delimiter row
122 |
123 | * Tab Pane
124 | Cover Component
125 | Image
126 |
127 | Cover folder
128 | ```
129 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | com.kotlin.jframe.standalone.start.checkbutton.application.async
8 | start-async-checkbutton-application
9 | 1.0-SNAPSHOT
10 |
11 | jar
12 |
13 | Example of start async application with checkbutton
14 |
15 |
16 |
17 |
18 | central
19 | http://jcenter.bintray.com
20 |
21 |
22 |
23 |
24 |
25 |
26 | 1.1.2
27 | 4.12
28 | kotlin.main
29 | UTF-8
30 | UTF-8
31 | 1.8
32 | 4.0.0
33 | yyyy-MM-dd'T'HH:mm:ss'Z'
34 | ${maven.build.timestamp}
35 | UTF-8
36 |
37 |
38 |
39 |
40 | org.jetbrains.kotlin
41 | kotlin-stdlib
42 | ${kotlin.version}
43 |
44 |
45 |
46 | junit
47 | junit
48 | ${junit.version}
49 | test
50 |
51 |
52 | org.jetbrains.kotlinx
53 | kotlinx-coroutines-core
54 | 0.15
55 |
56 |
57 | org.jetbrains.kotlin
58 | kotlin-test-junit
59 | ${kotlin.version}
60 | test
61 |
62 |
63 | com.github.salomonbrys.kotson
64 | kotson
65 | 2.3.0
66 |
67 |
68 | commons-io
69 | commons-io
70 | 2.5
71 |
72 |
73 | commons-codec
74 | commons-codec
75 | 1.10
76 |
77 |
78 | com.google.code.gson
79 | gson
80 | 2.8.0
81 |
82 |
83 |
84 |
85 |
86 |
87 | kotlin-maven-plugin
88 | org.jetbrains.kotlin
89 | 1.0.0-beta-1038
90 |
91 |
92 | compile
93 | compile
94 |
95 |
96 | ${project.basedir}/src/main/kotlin
97 |
98 |
99 |
100 |
101 | test-compile
102 | test-compile
103 |
104 |
105 | ${project.basedir}/src/test/kotlin
106 |
107 |
108 |
109 |
110 |
111 |
112 | org.apache.maven.plugins
113 | maven-compiler-plugin
114 | 3.1
115 |
116 |
117 |
118 | default-compile
119 | none
120 |
121 |
122 |
123 | default-testCompile
124 | none
125 |
126 |
127 | java-compile
128 | compile
129 | compile
130 |
131 |
132 | java-test-compile
133 | test-compile
134 | testCompile
135 |
136 |
137 |
138 |
139 | org.apache.maven.plugins
140 | maven-jar-plugin
141 | 2.5
142 |
143 |
144 |
145 | true
146 | ${main.class}
147 |
148 |
149 |
150 |
151 |
152 | org.apache.maven.plugins
153 | maven-assembly-plugin
154 | 2.2
155 |
156 |
157 | make-assembly
158 | package
159 | single
160 |
161 |
162 |
163 | ${main.class}
164 |
165 |
166 |
167 | jar-with-dependencies
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
--------------------------------------------------------------------------------
/src/main/kotlin/GBEE.kt:
--------------------------------------------------------------------------------
1 | package src
2 |
3 |
4 | import assets.frame.Frame
5 | import kotlinx.coroutines.experimental.launch
6 | import src.app.ApplicationImpl
7 | import src.configuration.ConfigurationImpl
8 | import utils.swing.Swing
9 | import java.util.concurrent.ExecutionException
10 |
11 | /**
12 | * Created by vicboma on 02/12/16.
13 | */
14 | object GBEE {
15 |
16 | val version = "v.0.2.3"
17 |
18 | @JvmStatic fun main(args: Array) {
19 | launch(Swing) {
20 |
21 | if (System.getProperty("os.name").toLowerCase().indexOf("mac") >= 0)
22 | // Setter JmenuBar in MenuBar for iOS
23 | System.setProperty("apple.laf.useScreenMenuBar", "true")
24 |
25 |
26 | try {
27 | //loader
28 | val classLoader = Thread.currentThread().getContextClassLoader()
29 | //Frame
30 | val mainFrame = Frame.create()
31 | //configuration
32 | val configure = ConfigurationImpl.create(classLoader, mainFrame)
33 | //Application
34 | val app = ApplicationImpl
35 | .create(mainFrame)
36 | .startAsync(configure)
37 |
38 | } catch (e: InterruptedException) {
39 | e.printStackTrace()
40 | } catch (e: ExecutionException) {
41 | e.printStackTrace()
42 | } finally {
43 |
44 |
45 | }
46 |
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/Application.kt:
--------------------------------------------------------------------------------
1 | package src.app
2 |
3 | import src.configuration.ConfigurationImpl
4 |
5 | /**
6 | * Created by vicboma on 02/12/16.
7 | */
8 | interface Application {
9 | fun startAsync(configuration : ConfigurationImpl)
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/ApplicationImpl.kt:
--------------------------------------------------------------------------------
1 | package src.app
2 |
3 | import src.configuration.ConfigurationImpl
4 | import java.awt.BorderLayout
5 | import java.util.concurrent.CompletableFuture
6 | import javax.swing.JFrame
7 | import javax.swing.JPanel
8 |
9 | /**
10 | * Created by vicboma on 02/12/16.
11 | */
12 | class ApplicationImpl internal constructor(private val frame: JFrame) : Application {
13 |
14 | private var configuration : ConfigurationImpl? = null
15 |
16 | companion object {
17 | fun create(frame: JFrame): Application {
18 | return ApplicationImpl(frame)
19 | }
20 | }
21 |
22 | override fun startAsync(configuration : ConfigurationImpl) {
23 | this.configuration = configuration
24 | var future = CompletableFuture()
25 | runAsync(future).get()
26 | }
27 |
28 | private fun runAsync(result: CompletableFuture) : CompletableFuture {
29 | CompletableFuture.runAsync {
30 | this.let {
31 | setLayout()
32 | setTitle()
33 | setCloseOp()
34 | setMenuBar()
35 | setStatusBar()
36 | frame.pack()
37 | setSize()
38 | setVisible()
39 | result.complete(this)
40 | }
41 | }
42 |
43 | return result
44 | }
45 |
46 | private fun setCloseOp() {
47 | frame.defaultCloseOperation = configuration?.display?.closeOp!!
48 | }
49 |
50 | private fun setTitle() {
51 | frame.setTitle(configuration?.display?.title!!)
52 | }
53 |
54 | private fun setLayout() {
55 | frame.setLayout(configuration?.display?.layout)
56 | }
57 |
58 | private fun setSize() {
59 | frame.setSize(configuration?.display?.widht!!, configuration?.display?.heigth!!)
60 | frame.isResizable = false
61 | }
62 |
63 | private fun setLocation() {
64 | frame.setLocationRelativeTo(configuration?.display?.location)
65 | }
66 |
67 | private fun setVisible() {
68 | frame.isVisible = configuration?.display?.visible!!
69 | }
70 |
71 | private fun setMenuBar() {
72 | frame.jMenuBar = configuration?.jmenuBar
73 | }
74 |
75 | private fun setStatusBar() {
76 | frame.contentPane.add(configuration?.statusBar as JPanel, BorderLayout.SOUTH);
77 | }
78 | }
79 |
80 |
81 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/menuBar/View/MenuView.kt:
--------------------------------------------------------------------------------
1 | package app.components.menuBar.view
2 |
3 | import app.components.panel.ContentPaneParentImpl
4 | import assets.frame.Frame
5 | import assets.menuBarExt.child.dialog.MenuBarViewGrid
6 | import assets.menuBarExt.child.dialog.MenuBarViewList
7 | import assets.progressBar.StatusBar
8 | import assets.progressBar.addMenuItem
9 | import javax.swing.JMenu
10 |
11 | /**
12 | * Created by vicboma on 02/01/17.
13 | */
14 | fun JMenu.MenuView(frame : Frame, statusBar : StatusBar, contentPaneParentImpl : ContentPaneParentImpl) =
15 | JMenu("View")
16 | .apply{
17 | addMenuItem(MenuBarViewGrid(frame,statusBar,contentPaneParentImpl))
18 | addMenuItem(MenuBarViewList(frame,statusBar,contentPaneParentImpl))
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/menuBar/View/subItem/grid/MenuBarViewGrid.kt:
--------------------------------------------------------------------------------
1 | package assets.menuBarExt.child.dialog
2 |
3 | import app.components.panel.ContentPaneParentImpl
4 | import assets.button.addActionListenerAsync
5 | import assets.frame.Frame
6 | import assets.progressBar.StatusBar
7 | import assets.progressBar.add
8 | import assets.progressBar.addMenuItem
9 | import assets.table.GRID_COVER
10 | import javax.swing.ButtonGroup
11 | import javax.swing.JMenu
12 | import javax.swing.JRadioButtonMenuItem
13 |
14 | /**
15 | * Created by vicboma on 12/12/16.
16 | */
17 | fun JMenu.MenuBarViewGrid(frame: Frame, statusBar : StatusBar, contentPaneParentImpl : ContentPaneParentImpl) : JMenu {
18 |
19 | fun actionVisibility(frame: Frame, row: Int, cover: GRID_COVER) {
20 | frame.jMenuBar.isEnabled = false
21 | contentPaneParentImpl
22 | .coverScreen({
23 | contentPaneParentImpl.visiblePanelListView(false)
24 | contentPaneParentImpl.visiblePanelGridView(false)
25 | }, true, row, cover)
26 | .thenRunAsync {
27 | println("****** FIN COMPLETABLE FUTURES *******")
28 | frame.jMenuBar.isEnabled = true
29 | }
30 |
31 | }
32 |
33 | val radioButtonList = listOf(
34 | JRadioButtonMenuItem("1x cover", false).apply {
35 | addActionListenerAsync {
36 | actionVisibility(frame, 1, GRID_COVER.ONE)
37 | }
38 | },
39 | JRadioButtonMenuItem("2x cover", false).apply {
40 | addActionListener {
41 | actionVisibility(frame, 2, GRID_COVER.TWO)
42 | }
43 | },
44 | JRadioButtonMenuItem("3x cover", false).apply {
45 | addActionListener {
46 | actionVisibility(frame, 3, GRID_COVER.THREE)
47 | }
48 | },
49 | JRadioButtonMenuItem("4x cover", false).apply {
50 | addActionListener {
51 | actionVisibility(frame, 4, GRID_COVER.FOUR)
52 | }
53 | },
54 | JRadioButtonMenuItem("Rom Name", false).apply {
55 | addActionListener {
56 | actionVisibility(frame, 13, GRID_COVER.FOUR)
57 | }
58 | }
59 | )
60 |
61 | val radioGroup = ButtonGroup().add(radioButtonList)
62 |
63 | return JMenu("Grid")
64 | .apply {
65 | addMenuItem(radioButtonList)
66 | }
67 | }
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/menuBar/View/subItem/list/MenuBarViewList.kt:
--------------------------------------------------------------------------------
1 | package assets.menuBarExt.child.dialog
2 |
3 | import app.components.panel.ContentPaneParentImpl
4 | import assets.button.addActionListenerAsync
5 | import assets.frame.Frame
6 | import assets.progressBar.StatusBar
7 | import javax.swing.JMenu
8 | import javax.swing.JMenuItem
9 |
10 | /**
11 | * Created by vicboma on 12/12/16.
12 | */
13 | fun JMenu.MenuBarViewList(frame: Frame, statusBar : StatusBar, contentPaneParentImpl: ContentPaneParentImpl) =
14 | JMenuItem("List").apply{
15 | addActionListenerAsync {
16 | frame.jMenuBar.isEnabled = false
17 | contentPaneParentImpl.visiblePanelListView(true)
18 | contentPaneParentImpl.visiblePanelGridView(false)
19 | frame.jMenuBar.isEnabled = true
20 | }
21 |
22 | }
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/menuBar/options/MenuOptions.kt:
--------------------------------------------------------------------------------
1 | package app.components.menuBar.view
2 |
3 | import app.components.menuBar.options.subItem.options.MenuBarOptions
4 | import app.configuration.properties.Properties
5 | import assets.frame.Frame
6 | import assets.progressBar.StatusBar
7 | import assets.progressBar.addMenuItem
8 | import javax.swing.JMenu
9 |
10 | /**
11 | * Created by vicboma on 02/01/17.
12 | */
13 | fun JMenu.MenuOptions(frame : Frame, statusBar : StatusBar, properties: Properties) =
14 | JMenu("Options").apply {
15 | addMenuItem(MenuBarOptions(frame,statusBar,properties))
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/menuBar/options/subItem/options/MenuBarOptions.kt:
--------------------------------------------------------------------------------
1 | package app.components.menuBar.options.subItem.options
2 |
3 | import app.configuration.properties.Properties
4 | import app.configuration.properties.PropertiesEnum
5 | import assets.frame.Frame
6 | import assets.progressBar.StatusBar
7 | import assets.progressBar.addMenuItem
8 | import javax.swing.JMenu
9 | import javax.swing.JMenuItem
10 | import javax.swing.JSlider
11 |
12 | /**
13 | * Created by vicboma on 01/05/17.
14 | */
15 | fun JMenu.MenuBarOptions(frame: Frame, statusBar : StatusBar, properties : Properties) : JMenu {
16 |
17 | var labelAsync = "Async load time :"
18 | var textAsync = "$labelAsync 5000 ms"
19 |
20 | var labelAPermits = "Set of permits :"
21 | var textPermits = "$labelAPermits 5 units"
22 |
23 | var labelIncremeteGrid = "Increment scrollGrid :"
24 | var textIncrementGrid = "$labelIncremeteGrid 16 units"
25 |
26 |
27 | val asyncLoadTimeLabel = JMenuItem(textAsync)
28 | val setOfPermits = JMenuItem(textPermits)
29 | val incrementGridLabel = JMenuItem(textIncrementGrid)
30 |
31 |
32 | val sliderAsync = JSlider(JSlider.HORIZONTAL,0,10000, properties.get(PropertiesEnum.SLIDER_ASYNC_TIME_LOAD)).apply{
33 | setLabelTable(this@apply.createStandardLabels(5000))
34 | setMinorTickSpacing(1000)
35 | setMajorTickSpacing(2000)
36 | setPaintTicks(true)
37 | setPaintLabels(true)
38 | addChangeListener {
39 | val source = it.source as JSlider
40 | properties.put( PropertiesEnum.SLIDER_ASYNC_TIME_LOAD ,source.value)
41 | asyncLoadTimeLabel.text = "$labelAsync ${source.value} ms "
42 | }
43 | }
44 |
45 | val sliderPermits = JSlider(JSlider.HORIZONTAL,1,11,properties.get(PropertiesEnum.SLIDER_PERMITS)).apply{
46 | setLabelTable(this@apply.createStandardLabels(5))
47 | setMinorTickSpacing(1)
48 | setMajorTickSpacing(2)
49 | setPaintTicks(true)
50 | setPaintLabels(true)
51 | addChangeListener {
52 | val source = it.source as JSlider
53 | properties.put(PropertiesEnum.SLIDER_PERMITS, source.value)
54 | setOfPermits.text = "$labelAPermits ${source.value} units "
55 | }
56 | isEnabled = false
57 | }
58 |
59 | val sliderIncrementScrollGrid = JSlider(JSlider.HORIZONTAL,0,100,properties.get(PropertiesEnum.SLIDER_INCREMENT_SCROLL_GRID)).apply{
60 | setLabelTable(this@apply.createStandardLabels(50))
61 | setMinorTickSpacing(10)
62 | setMajorTickSpacing(20)
63 | setPaintTicks(true)
64 | setPaintLabels(true)
65 | addChangeListener {
66 | val source = it.source as JSlider
67 | properties.put(PropertiesEnum.SLIDER_INCREMENT_SCROLL_GRID, source.value)
68 | incrementGridLabel.text = "$labelIncremeteGrid ${source.value} units "
69 | }
70 | }
71 |
72 | return JMenu("View")
73 | .apply {
74 | addMenuItem(asyncLoadTimeLabel)
75 | addMenuItem(sliderAsync)
76 | addSeparator()
77 | addMenuItem(setOfPermits)
78 | addMenuItem(sliderPermits)
79 | addSeparator()
80 | addMenuItem(incrementGridLabel)
81 | addMenuItem(sliderIncrementScrollGrid)
82 | }
83 |
84 | }
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/panel/ContentPaneParentImpl.kt:
--------------------------------------------------------------------------------
1 | package app.components.panel
2 |
3 | import TableColumnHeaderAdapter
4 | import TableRowAdapter
5 | import app.components.panel.grid.CacheGrid
6 | import app.components.panel.grid.TableGridScrollPaneImpl
7 | import app.configuration.properties.Properties
8 | import assets.frame.Frame
9 | import assets.panel.multipleImages.PanelCartridge
10 | import assets.panel.multipleImages.PanelCover
11 | import assets.panel.multipleImages.PanelSnapshot
12 | import assets.panel.tab.TabPane
13 | import assets.panel.tab.TabPaneListener
14 | import assets.progressBar.Split
15 | import assets.progressBar.SplitImpl
16 | import assets.progressBar.StatusBarImpl
17 | import assets.table.GRID_COVER
18 | import assets.table.TableGridImpl
19 | import assets.table.TableImpl
20 | import assets.table.comparator.TableHeaderComparator
21 | import assets.table.listener.rowKey.TableRowKeyListener
22 | import assets.table.model.TableModelImpl
23 | import main.kotlin.utils.image.createBufferedImage
24 | import main.kotlin.utils.listGames.ListGames
25 | import src.configuration.Display
26 | import java.awt.BorderLayout
27 | import java.awt.Component
28 | import java.awt.Container
29 | import java.awt.Dimension
30 | import java.awt.image.BufferedImage
31 | import java.util.concurrent.CompletableFuture
32 | import javax.swing.ImageIcon
33 | import javax.swing.JPanel
34 | import javax.swing.JScrollPane
35 | import javax.swing.UIManager
36 |
37 | /**
38 | * Created by vicboma on 12/02/17.
39 | */
40 | class ContentPaneParentImpl internal constructor(val classLoader : ClassLoader, val frame : Frame, val statusBar: StatusBarImpl, val properties : Properties) {
41 |
42 | private val listGames: ListGames
43 | private val dimension : Dimension
44 | private val tableModelImpl : TableModelImpl
45 | private val table: TableImpl
46 | private val tabbedPane: TabPane
47 | private val panelListView: SplitImpl
48 |
49 | private var scrollGrid = JScrollPane()
50 |
51 | companion object {
52 | fun create (classLoader: ClassLoader, frame: Frame, statusBar: StatusBarImpl, properties : Properties) = ContentPaneParentImpl(classLoader, frame, statusBar,properties)
53 | }
54 |
55 | init {
56 |
57 | listGames = ListGames.create(classLoader, "list/listGame.json")
58 | dimension = Dimension(Display.WIDHT, Display.HEIGTH)
59 | tableModelImpl = TableModelImpl.create(listGames.columnNames, listGames.rowNames)
60 | table = TableImpl.create( classLoader, tableModelImpl, dimension)
61 | tabbedPane =
62 | TabPane(TabPaneListener.create(table))
63 | .apply{
64 | add("Cover", ImageIcon(), PanelCover(classLoader,"cover/_bg.png", "cover/addamsf.png"), 0)
65 | add("Snapshot", ImageIcon(), PanelSnapshot(classLoader,"snapshot/_bg.png", "snapshot/addamsf.png"), 1)
66 | add("Cartridge", ImageIcon(), PanelCartridge(classLoader,"cartridge/_bg.png", "cartridge/addamsf.png"), 2)
67 | }
68 |
69 | panelListView =
70 | SplitImpl.create(
71 | Split.HORIZONTAL,
72 | Frame.create(table.scrollPane(), BorderLayout.CENTER).contentPane,
73 | Frame.create(tabbedPane.scrollPane(), BorderLayout.CENTER).contentPane,
74 | UIManager.getBoolean("SplitPane.continuousLayout"),
75 | Display.WIDHT/2)
76 |
77 |
78 | table.apply {
79 | addMouseListenerColumn(TableColumnHeaderAdapter.create(classLoader, this, TableHeaderComparator.create()))
80 | addMouseListenerRow(TableRowAdapter.create(this, statusBar, tabbedPane))
81 | addKeyListenerInput(TableRowKeyListener.create(frame, this, statusBar, tabbedPane))
82 | }
83 |
84 | //visiblePanelListView(true)
85 |
86 | /* coverScreen({ visiblePanelListView(false) }, true, 13, GRID_COVER.FOUR)
87 | .thenRunAsync {
88 | println("****** FIN COMPLETABLE FUTURES *******")
89 | }
90 | */
91 | }
92 |
93 | fun visiblePanelGridView(state : Boolean) = visiblePanelView(state,scrollGrid)
94 |
95 | fun visiblePanelListView(state : Boolean) = visiblePanelView(state,panelListView)
96 |
97 | fun visiblePanelView(state : Boolean, component: Component){
98 | if(state)
99 | frame.contentPane.add(component)
100 | else
101 | frame.contentPane.remove(component)
102 |
103 | (frame.contentPane as JPanel).revalidate()
104 | frame.repaint()
105 | }
106 |
107 | fun coverScreen(componentVisible:() -> Unit, listGridVisible:Boolean , row : Int, coverIndex: GRID_COVER) : CompletableFuture {
108 | fun recalculeSize(column: Int): Int {
109 | var size = listGames.rowNames!!.size / column
110 | val resto = listGames.rowNames!!.size % column == 0
111 | if (!resto)
112 | size++
113 |
114 | return size
115 | }
116 |
117 | val column = row
118 | componentVisible.invoke()
119 |
120 | val tableModel = TableModelImpl.create(column, recalculeSize(column), row)
121 | val jtable = TableGridImpl(classLoader, tableModel, coverIndex)
122 | scrollGrid = TableGridScrollPaneImpl(jtable, properties)
123 |
124 | visiblePanelGridView(listGridVisible)
125 |
126 | val sizeImage = CacheGrid.mapSizeImageCover.get(coverIndex)
127 | val bufferedImageDefault = ImageIcon().createBufferedImage(sizeImage!!.first,sizeImage!!.second, BufferedImage.TYPE_INT_ARGB)
128 |
129 | return CacheGrid.createRefImage(statusBar,listGames, classLoader, bufferedImageDefault, jtable,coverIndex,properties)
130 | }
131 | }
132 |
133 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/panel/grid/CacheGrid.kt:
--------------------------------------------------------------------------------
1 | package app.components.panel.grid
2 |
3 | import app.configuration.properties.Properties
4 | import app.configuration.properties.PropertiesEnum
5 | import assets.progressBar.StatusBar
6 | import assets.table.GRID_COVER
7 | import kotlinx.coroutines.experimental.CommonPool
8 | import kotlinx.coroutines.experimental.Deferred
9 | import kotlinx.coroutines.experimental.async
10 | import kotlinx.coroutines.experimental.runBlocking
11 | import kotlinx.coroutines.experimental.sync.Mutex
12 | import main.kotlin.utils.image.BufferedImageMemoryFromComponent
13 | import main.kotlin.utils.image.createBufferedImage
14 | import main.kotlin.utils.image.scale
15 | import main.kotlin.utils.listGames.ListGames
16 | import utils.thread.DynamicSemaphore
17 | import java.awt.Color
18 | import java.awt.Component
19 | import java.awt.Container
20 | import java.awt.Dimension
21 | import java.awt.image.BufferedImage
22 | import java.lang.Exception
23 | import java.security.SecureRandom
24 | import java.util.*
25 | import java.util.concurrent.CompletableFuture
26 | import javax.swing.*
27 |
28 |
29 | /**
30 | * Created by vicboma on 13/04/17.
31 | */
32 | object CacheGrid {
33 |
34 | val mapNameRom = mutableMapOf()
35 | val mapSizeImageCover = mapOf(Pair(GRID_COVER.FOUR,Pair(240,200)),Pair(GRID_COVER.THREE,Pair(320,300)),Pair(GRID_COVER.TWO,Pair(550,500)),Pair(GRID_COVER.ONE,Pair(680,650)))
36 | val random = SecureRandom()
37 | var state = CacheState.STOP
38 | val mutex = Mutex()
39 |
40 | fun createRefImage(statusBar : StatusBar,listGames: ListGames, classLoader: ClassLoader, bufferedDefault : BufferedImage, jTable:JTable, coverSize : GRID_COVER , properties : Properties) : CompletableFuture {
41 | var job : CompletableFuture
42 |
43 | return runBlocking> {
44 |
45 | println("****** INIT LOAD ASYNC *******")
46 |
47 | mapNameRom.clear()
48 |
49 | val semaphore = DynamicSemaphore(0, true)
50 | val futures = ArrayList>>()
51 |
52 | state = CacheState.LOADING
53 |
54 | val imageDefault = ImageIcon().scale(bufferedDefault, classLoader.getResource("cover/_gbNotFound.png").file.toString())
55 |
56 | val timeInit = System.currentTimeMillis()
57 |
58 | try {
59 |
60 | val rows = listGames.rowNames?.size
61 | var cols = jTable.model.columnCount
62 | for (row in 0..rows!!) {
63 | for (col in 0..cols - 1) {
64 |
65 | val index = (row * cols) + col
66 | if (index > rows || state == CacheState.STOP)
67 | break
68 |
69 | futures.add(CompletableFuture.supplyAsync {
70 |
71 | async(CommonPool) {
72 | val permits = properties.get(PropertiesEnum.SLIDER_PERMITS)
73 | val delay = properties.get(PropertiesEnum.SLIDER_ASYNC_TIME_LOAD)
74 |
75 | mutex.lock(this@async)
76 | /* semaphore.apply {
77 | setMaxPermits(permits)
78 | acquire()
79 | }
80 | */
81 | try {
82 |
83 | val pairSize = mapSizeImageCover.get(coverSize)
84 | val bufferImage = ImageIcon().createBufferedImage(pairSize!!.first, pairSize!!.second, BufferedImage.TYPE_INT_ARGB)
85 | val nameRom = listGames.rowNames!![(row * cols) + col][1].toString()
86 | val nameImage = nameRom.toLowerCase().split(".")[0].toString().plus(".png")
87 | val resource = classLoader.getResource("cover/$nameImage")
88 | val image = when (resource) {
89 | null -> imageDefault
90 | else -> ImageIcon().scale(bufferImage, resource.file.toString())
91 | }
92 |
93 | // println(StringBuffer("($row * $cols) + $col = ${(row * cols) + col}").append(" $nameRom - $nameImage ").toString())
94 |
95 | val imageIcon = ImageIcon(
96 | BufferedImageMemoryFromComponent.invoke(
97 | JPanel().apply {
98 | size = Dimension(bufferImage.width, bufferImage.height)
99 | isOpaque = false
100 | setBackground(Color(0, 0, 0))
101 |
102 | layout = boxLayout(this).apply {
103 | setBackground(Color(0, 0, 0))
104 | isOpaque = false
105 | }
106 |
107 | add(jLabelFactory(" "))
108 | add(jLabelFactory(ImageIcon(image)))
109 | add(jLabelFactory(" "))
110 | add(jLabelFactory(nameRom))
111 | }
112 | )
113 | )
114 |
115 | // println(delayLoadAsync)
116 | // Thread.sleep((random.nextInt(delay + 1)).toLong())
117 | kotlinx.coroutines.experimental.delay((random.nextInt(delay + 1)).toLong())
118 | //yield()
119 | if (state != CacheState.STOP)
120 | jTable.setValueAt(imageIcon, row, col)
121 |
122 | mapNameRom.put(index,nameRom)
123 |
124 | true
125 | } catch(e: Exception) {
126 | false
127 | } finally {
128 | mutex.unlock(this@async)
129 | // semaphore.release()
130 | }
131 | }
132 |
133 | })
134 |
135 | }
136 |
137 | }
138 |
139 | } catch(e: Exception) {
140 | println(e.message)
141 | e.stackTrace
142 | } finally {
143 | state = CacheState.FINISH
144 | job = CompletableFuture.allOf(*futures.toTypedArray())
145 | job.thenRunAsync {
146 | println("****** ${System.currentTimeMillis() - timeInit} ms ******")
147 | statusBar.text("Time to load process : ${System.currentTimeMillis() - timeInit} ms ******")
148 | }
149 | }
150 |
151 | job
152 | }
153 |
154 | }
155 |
156 | private fun boxLayout(container : Container) = BoxLayout(container, BoxLayout.Y_AXIS)
157 |
158 | private fun jLabelFactory(name : String ) = JLabel(name).apply {
159 | setBackground(Color(0, 0, 0))
160 | isOpaque = false
161 | setAlignmentX(Component.CENTER_ALIGNMENT)
162 | }
163 |
164 | private fun jLabelFactory(imageIcon : ImageIcon ) = JLabel(imageIcon).apply {
165 | setBackground(Color(0, 0, 0))
166 | isOpaque = false
167 | setAlignmentX(Component.CENTER_ALIGNMENT)
168 | }
169 |
170 | }
171 |
172 |
173 |
174 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/panel/grid/CacheState.kt:
--------------------------------------------------------------------------------
1 | package app.components.panel.grid
2 |
3 | /**
4 | * Created by vicboma on 05/05/17.
5 | */
6 | enum class CacheState {
7 | STOP, LOADING, FINISH
8 | }
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/panel/grid/TableGridImpl.kt:
--------------------------------------------------------------------------------
1 | package assets.table
2 |
3 | import assets.table.model.TableModelImpl
4 | import javax.swing.JTable
5 | import javax.swing.event.ListSelectionEvent
6 | import javax.swing.event.ListSelectionListener
7 |
8 |
9 |
10 | /**
11 | * Created by vbolinch on 02/01/2017.
12 | */
13 | class TableGridImpl internal constructor(val classLoader: ClassLoader, dm: TableModelImpl?, coverIndex: GRID_COVER) : JTable(dm) {
14 |
15 | private val mapCover by lazy { mapOf(Pair(GRID_COVER.ONE,700),Pair(GRID_COVER.TWO,570),Pair(GRID_COVER.THREE,350),Pair(GRID_COVER.FOUR,250)) }
16 |
17 | companion object{
18 | fun create(classLoader: ClassLoader, dm : TableModelImpl?,coverIndex: GRID_COVER) = TableGridImpl(classLoader,dm,coverIndex)
19 | }
20 |
21 | init {
22 |
23 | this.apply {
24 | showVerticalLines = false
25 | showHorizontalLines = false
26 | autoResizeMode = JTable.AUTO_RESIZE_ALL_COLUMNS
27 | val rowH = getRowHeigthToCover(coverIndex)!!
28 | setRowHeight(rowH)
29 | rowSelectionAllowed = false
30 | columnSelectionAllowed = false
31 | cellSelectionEnabled = true
32 |
33 | selectionModel.addListSelectionListener(object: ListSelectionListener {
34 | override fun valueChanged(event: ListSelectionEvent) {
35 | if(!selectionModel.isSelectionEmpty){
36 | val rowIndex = selectedRow
37 | val colIndex = selectedColumn
38 | val image = model.getValueAt(rowIndex,colIndex)
39 | javax.swing.JOptionPane.showMessageDialog(null,image)
40 | }
41 |
42 | selectionModel.clearSelection()
43 | }
44 | })
45 |
46 | setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION)
47 | }
48 | }
49 |
50 | private fun getRowHeigthToCover(coverIndex: GRID_COVER) = mapCover.get(coverIndex)
51 |
52 | }
53 |
54 |
55 | enum class GRID_COVER { ONE, TWO, THREE, FOUR, NAME_ROM }
--------------------------------------------------------------------------------
/src/main/kotlin/app/components/panel/grid/TableGridScrollPaneImpl.kt:
--------------------------------------------------------------------------------
1 | package app.components.panel.grid
2 |
3 | import app.configuration.properties.Properties
4 | import app.configuration.properties.PropertiesEnum
5 | import javax.swing.JScrollPane
6 | import javax.swing.JTable
7 |
8 | /**
9 | * Created by vicboma on 14/04/17.
10 | */
11 | class TableGridScrollPaneImpl internal constructor(table : JTable, properties: Properties) : JScrollPane(table) {
12 |
13 | init {
14 | val slideIncrement = properties.get(PropertiesEnum.SLIDER_INCREMENT_SCROLL_GRID)
15 | verticalScrollBar.setUnitIncrement(slideIncrement)
16 | }
17 | }
--------------------------------------------------------------------------------
/src/main/kotlin/app/configuration/Configuration.kt:
--------------------------------------------------------------------------------
1 | package src.configuration
2 |
3 | /**
4 | * Created by vicboma on 02/12/16.
5 | */
6 | interface Configuration {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/configuration/ConfigurationImpl.kt:
--------------------------------------------------------------------------------
1 | package src.configuration
2 |
3 |
4 | import app.components.menuBar.view.MenuOptions
5 | import app.components.menuBar.view.MenuView
6 | import app.components.panel.ContentPaneParentImpl
7 | import app.configuration.properties.Properties
8 | import assets.frame.Frame
9 | import assets.progressBar.StatusBar
10 | import assets.progressBar.StatusBarImpl
11 | import assets.progressBar.addMenu
12 | import src.configuration.properties.PropertiesImpl
13 | import java.awt.BorderLayout
14 | import javax.swing.JMenu
15 | import javax.swing.JMenuBar
16 |
17 | /**
18 | * Created by vicboma on 02/12/16.
19 | */
20 | class ConfigurationImpl internal constructor(classLoader: ClassLoader, frame: Frame) {
21 |
22 | val properties: Properties
23 | val statusBar: StatusBar
24 | val contentPaneParent: ContentPaneParentImpl
25 | val jmenuBar: JMenuBar
26 | val display: Display
27 |
28 | companion object {
29 | fun create(classLoader: ClassLoader, frame: Frame) = ConfigurationImpl(classLoader, frame)
30 | }
31 |
32 | init {
33 |
34 | properties = PropertiesImpl.create()
35 |
36 | display = DisplayImpl.create(Display.KFRAME_JAVA, Display.WIDHT, Display.HEIGTH, Display.VISIBLE, BorderLayout())
37 |
38 | statusBar = StatusBarImpl.create(Display.WIDHT)
39 |
40 | contentPaneParent = ContentPaneParentImpl(
41 | classLoader,
42 | frame,
43 | statusBar,
44 | properties
45 | )
46 |
47 | jmenuBar = JMenuBar().apply {
48 | addMenu(
49 | listOf(
50 | JMenu().MenuView(frame, statusBar, contentPaneParent),
51 | JMenu().MenuOptions(frame, statusBar, properties)
52 | )
53 | )
54 | }
55 |
56 | }
57 |
58 | }
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/configuration/properties/PropertiesEnum.kt:
--------------------------------------------------------------------------------
1 | package app.configuration.properties
2 |
3 | /**
4 | * Created by vicboma on 07/05/17.
5 | */
6 | enum class PropertiesEnum {
7 | SLIDER_ASYNC_TIME_LOAD,
8 | SLIDER_PERMITS,
9 | SLIDER_INCREMENT_SCROLL_GRID
10 | }
--------------------------------------------------------------------------------
/src/main/kotlin/app/configuration/properties/PropertiesImpl.kt:
--------------------------------------------------------------------------------
1 | package src.configuration.properties
2 |
3 | /**
4 | * Created by vicboma on 02/12/16.
5 | */
6 | import app.configuration.properties.Properties
7 | import app.configuration.properties.PropertiesEnum
8 | import java.util.concurrent.ConcurrentHashMap
9 |
10 | class PropertiesImpl () : Properties {
11 |
12 | override fun put(key: PropertiesEnum, value: T) = map.put(key, value)
13 |
14 | override fun get(str: PropertiesEnum) = map[str] as (T)
15 |
16 | private val map: ConcurrentHashMap
17 |
18 | companion object {
19 | fun create() = PropertiesImpl()
20 | }
21 |
22 | init {
23 | map = ConcurrentHashMap(
24 | mapOf(
25 | Pair(PropertiesEnum.SLIDER_ASYNC_TIME_LOAD, 1),
26 | Pair(PropertiesEnum.SLIDER_PERMITS, 11),
27 | Pair(PropertiesEnum.SLIDER_INCREMENT_SCROLL_GRID,16)
28 | )
29 | )
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/kotlin/app/configuration/properties/Propierties.kt:
--------------------------------------------------------------------------------
1 | package app.configuration.properties
2 |
3 | /**
4 | * Created by vicboma on 07/05/17.
5 | */
6 | interface Properties {
7 | fun get(key: PropertiesEnum): T
8 | fun put(key: PropertiesEnum, value: T) : Any?
9 | }
--------------------------------------------------------------------------------
/src/main/kotlin/assets/Component.kt:
--------------------------------------------------------------------------------
1 | package assets
2 |
3 | /**
4 | * Created by vicboma on 05/12/16.
5 | */
6 | interface Component {
7 | fun component() : T
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/src/main/kotlin/assets/Renderable.kt:
--------------------------------------------------------------------------------
1 | package assets
2 |
3 | /**
4 | * Created by vicboma on 05/12/16.
5 | */
6 | interface Renderable {
7 | fun asyncUI()
8 | }
--------------------------------------------------------------------------------
/src/main/kotlin/assets/button/ButtonAbstractExt.kt:
--------------------------------------------------------------------------------
1 | package assets.button
2 |
3 | import kotlinx.coroutines.experimental.CommonPool
4 | import kotlinx.coroutines.experimental.CoroutineScope
5 | import utils.swing.Swing
6 | import javax.swing.AbstractButton
7 |
8 | /**
9 | * Created by vicboma on 14/05/17.
10 | */
11 | fun AbstractButton.addActionListenerAsync(block: suspend CoroutineScope.() -> Unit){
12 | addActionListener {
13 | kotlinx.coroutines.experimental.runBlocking {
14 | kotlinx.coroutines.experimental.async(CommonPool) {
15 | block.invoke(this@async)
16 | }
17 | }
18 | }
19 | }
20 |
21 | fun AbstractButton.addActionListernerSwing(block: suspend CoroutineScope.() -> Unit) {
22 | addActionListener {
23 | kotlinx.coroutines.experimental.runBlocking {
24 | kotlinx.coroutines.experimental.launch(Swing) {
25 | block.invoke(this@launch)
26 | }
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/main/kotlin/assets/button/group/ButtonGroupExt.kt:
--------------------------------------------------------------------------------
1 | package assets.progressBar
2 |
3 | import javax.swing.AbstractButton
4 | import javax.swing.ButtonGroup
5 |
6 | /**
7 | * Created by vicboma on 05/12/16.
8 | */
9 |
10 | fun ButtonGroup.add(list: List) {
11 | for( it in list){
12 | this.add(it as AbstractButton )
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/kotlin/assets/chooser/color/ColorChooser.kt:
--------------------------------------------------------------------------------
1 | package assets.progressBar
2 |
3 | import java.awt.Color
4 |
5 | /**
6 | * Created by vicboma on 15/12/16.
7 | */
8 | interface ColorChooser{
9 | fun showDialog(callback: (color: Color) -> Unit)
10 | }
--------------------------------------------------------------------------------
/src/main/kotlin/assets/chooser/color/ColorChooserImpl.kt:
--------------------------------------------------------------------------------
1 | package assets.progressBar
2 |
3 | import java.awt.Color
4 | import javax.swing.JColorChooser
5 |
6 |
7 |
8 | /**
9 | * Created by vicboma on 05/12/16.
10 | */
11 | class ColorChooserImpl internal constructor(private val title: String, private val _color : Color) : JColorChooser(), ColorChooser {
12 |
13 | companion object {
14 | fun create(title : String, _color : Color) = ColorChooserImpl(title, _color)
15 | }
16 |
17 | init {
18 |
19 | }
20 |
21 | override fun showDialog(callback: (color: Color) -> Unit) {
22 | val color = JColorChooser.showDialog(null, title, color)
23 | if(null != color)
24 | callback.invoke( color)
25 | }
26 |
27 | }
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/main/kotlin/assets/chooser/file/FileChooser.kt:
--------------------------------------------------------------------------------
1 | package assets.progressBar
2 |
3 | /**
4 | * Created by vicboma on 15/12/16.
5 | */
6 | interface FileChooser {
7 | fun showDialog(callback: (str: String) -> Unit)
8 | }
--------------------------------------------------------------------------------
/src/main/kotlin/assets/chooser/file/FileChooserImpl.kt:
--------------------------------------------------------------------------------
1 | package assets.progressBar
2 |
3 | import javax.swing.JFileChooser
4 | import javax.swing.JFrame
5 |
6 |
7 | /**
8 | * Created by vicboma on 05/12/16.
9 | */
10 | class FileChooserImpl internal constructor(private val frame : JFrame) : javax.swing.JFileChooser(), FileChooser {
11 |
12 | companion object {
13 | fun create(frame : JFrame) = FileChooserImpl(frame)
14 | }
15 |
16 | init {
17 |
18 | }
19 |
20 | override fun showDialog(callback: (str: String) -> Unit) {
21 | val file = javax.swing.JFileChooser();
22 | file.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
23 |
24 | val res = file.showOpenDialog(frame)
25 |
26 | when (res) {
27 | JFileChooser.APPROVE_OPTION -> callback.invoke(file.selectedFile.toString())
28 | JFileChooser.CANCEL_OPTION -> callback.invoke("CANCEL_OPTION")
29 | else -> callback.invoke("ERROR_OPTION")
30 | }
31 | }
32 |
33 | }
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/main/kotlin/assets/dialog/EnumDialog.kt:
--------------------------------------------------------------------------------
1 | package assets.dialog.message
2 |
3 | /**
4 | * Created by vicboma on 10/12/16.
5 | */
6 | enum class EnumDialog constructor(val value : Int){
7 | //
8 | // Message types. Used by the UI to determine what icon to display,
9 | // and possibly what behavior to give based on the type.
10 | //
11 | /** Used for error messages. */
12 | ERROR_MESSAGE(0),
13 | /** Used for information messages. */
14 | INFORMATION_MESSAGE(1),
15 | /** Used for warning messages. */
16 | WARNING_MESSAGE(2),
17 | /** Used for questions. */
18 | QUESTION_MESSAGE(3),
19 | /** No icon is used. */
20 | PLAIN_MESSAGE(-1)
21 | }
--------------------------------------------------------------------------------
/src/main/kotlin/assets/dialog/confirm/Confirm.kt:
--------------------------------------------------------------------------------
1 | package assets.dialog.confirm
2 |
3 | /**
4 | * Created by vicboma on 10/12/16.
5 | */
6 | interface Confirm {
7 | fun showDialog(yes : () -> Unit)
8 | fun showDialog(yes : () -> Unit,no : () -> Unit)
9 | fun showDialog(yes : () -> Unit, no : () -> Unit, cancel : () -> Unit)
10 | }
--------------------------------------------------------------------------------
/src/main/kotlin/assets/dialog/confirm/ConfirmImpl.kt:
--------------------------------------------------------------------------------
1 | package assets.dialog.confirm
2 |
3 | import java.awt.Frame
4 | import javax.swing.JOptionPane
5 |
6 | /**
7 | * Created by vicboma on 10/12/16.
8 | */
9 | class ConfirmImpl internal constructor(private val frame : Frame, private val pair : Pair, private val option : Int) : Confirm {
10 |
11 | companion object {
12 | fun create(frame: Frame, pair: Pair, option: Int ) = ConfirmImpl(frame, pair, option)
13 | }
14 |
15 | init {
16 |
17 | }
18 |
19 | override fun showDialog(yes : () -> Unit) = showDialog(yes,{},{});
20 |
21 | override fun showDialog(yes : () -> Unit,no : () -> Unit) = showDialog(yes,no,{});
22 |
23 | override fun showDialog(yes : () -> Unit, no : () -> Unit, cancel : () -> Unit) {
24 | val res = JOptionPane.showConfirmDialog(frame, pair.second, pair.first, option)
25 | when (res){
26 | JOptionPane.YES_OPTION -> yes.invoke()
27 | JOptionPane.NO_OPTION -> no.invoke()
28 | JOptionPane.CANCEL_OPTION -> cancel.invoke()
29 | JOptionPane.CLOSED_OPTION -> System.out.println("Clode Dialog")
30 | else -> {
31 | throw RuntimeException("Error JOptionPane input buttons !!!!")
32 | }
33 | }
34 | }
35 |
36 | }
--------------------------------------------------------------------------------
/src/main/kotlin/assets/dialog/input/Input.kt:
--------------------------------------------------------------------------------
1 | package assets.dialog.confirm
2 |
3 | /**
4 | * Created by vicboma on 10/12/16.
5 | */
6 | interface Input {
7 | fun showDialog(callback: (str : String) -> Unit)
8 | }
--------------------------------------------------------------------------------
/src/main/kotlin/assets/dialog/input/InputImpl.kt:
--------------------------------------------------------------------------------
1 | package assets.dialog.confirm
2 |
3 | import assets.dialog.message.EnumDialog
4 | import java.awt.Frame
5 | import java.util.*
6 | import javax.swing.Icon
7 | import javax.swing.JOptionPane
8 |
9 | /**
10 | * Created by vicboma on 10/12/16.
11 | */
12 | class InputImpl internal constructor(private val frame : Frame, private val pair : Pair, private val option : EnumDialog, private val icon : Icon?, private val selectionValues: ArrayList