├── .classpath ├── .cproject ├── .gitignore ├── .project ├── .settings ├── language.settings.xml ├── org.eclipse.cdt.core.prefs ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs ├── org.eclipse.jdt.ui.prefs └── org.eclipse.m2e.core.prefs ├── LICENSE.txt ├── README.md ├── _config.yml ├── doc ├── allclasses-index.html ├── allpackages-index.html ├── com │ └── dhk │ │ ├── controllers │ │ ├── ConnectedDisplaysController.html │ │ ├── Controller.html │ │ ├── DhkController.html │ │ ├── DisplayModeController.html │ │ ├── DpiScaleController.html │ │ ├── FrameDragController.html │ │ ├── HotKeysController.html │ │ ├── MenuController.html │ │ ├── NumberOfSlotsController.html │ │ ├── OrientationController.html │ │ ├── ScalingModeController.html │ │ ├── SelectedDisplayController.html │ │ ├── WindowController.html │ │ ├── buttons │ │ │ ├── ApplyDisplayModeButtonController.html │ │ │ ├── ClearAllButtonController.html │ │ │ ├── ClearHotKeyButtonController.html │ │ │ ├── ExitButtonController.html │ │ │ ├── MinimizeButtonController.html │ │ │ ├── PaypalDonateButtonController.html │ │ │ ├── RefreshAppButtonController.html │ │ │ ├── RunOnStartupButtonController.html │ │ │ ├── ThemeButtonController.html │ │ │ ├── class-use │ │ │ │ ├── ApplyDisplayModeButtonController.html │ │ │ │ ├── ClearAllButtonController.html │ │ │ │ ├── ClearHotKeyButtonController.html │ │ │ │ ├── ExitButtonController.html │ │ │ │ ├── MinimizeButtonController.html │ │ │ │ ├── PaypalDonateButtonController.html │ │ │ │ ├── RefreshAppButtonController.html │ │ │ │ ├── RunOnStartupButtonController.html │ │ │ │ └── ThemeButtonController.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ │ ├── class-use │ │ │ ├── ConnectedDisplaysController.html │ │ │ ├── Controller.html │ │ │ ├── DhkController.html │ │ │ ├── DisplayModeController.html │ │ │ ├── DpiScaleController.html │ │ │ ├── FrameDragController.html │ │ │ ├── HotKeysController.html │ │ │ ├── MenuController.html │ │ │ ├── NumberOfSlotsController.html │ │ │ ├── OrientationController.html │ │ │ ├── ScalingModeController.html │ │ │ ├── SelectedDisplayController.html │ │ │ └── WindowController.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── package-use.html │ │ ├── io │ │ ├── ConnectedDisplaysPoller.html │ │ ├── DisplayConfig.html │ │ ├── DisplayConfigUpdater.html │ │ ├── EnumDisplayIds.html │ │ ├── EnumDisplayModes.html │ │ ├── KeyText.html │ │ ├── RunOnStartupManager.html │ │ ├── SetDisplay.html │ │ ├── SettingsManager.html │ │ ├── SettingsValidator.html │ │ ├── class-use │ │ │ ├── ConnectedDisplaysPoller.html │ │ │ ├── DisplayConfig.html │ │ │ ├── DisplayConfigUpdater.html │ │ │ ├── EnumDisplayIds.html │ │ │ ├── EnumDisplayModes.html │ │ │ ├── KeyText.html │ │ │ ├── RunOnStartupManager.html │ │ │ ├── SetDisplay.html │ │ │ ├── SettingsManager.html │ │ │ └── SettingsValidator.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── package-use.html │ │ ├── main │ │ ├── AppRefresher.html │ │ ├── DhkDriver.html │ │ ├── class-use │ │ │ ├── AppRefresher.html │ │ │ └── DhkDriver.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── package-use.html │ │ ├── models │ │ ├── DhkModel.html │ │ ├── Display.html │ │ ├── HotKey.html │ │ ├── Key.html │ │ ├── Slot.html │ │ ├── class-use │ │ │ ├── DhkModel.html │ │ │ ├── Display.html │ │ │ ├── HotKey.html │ │ │ ├── Key.html │ │ │ └── Slot.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── package-use.html │ │ ├── ui │ │ ├── ButtonThemesUpdater.html │ │ ├── DhkView.html │ │ ├── Slot.html │ │ ├── ThemeUpdater.html │ │ ├── buttons │ │ │ ├── ApplyDisplayModeButton.html │ │ │ ├── ClearAllButton.html │ │ │ ├── ClearHotKeyButton.html │ │ │ ├── ExitButton.html │ │ │ ├── MinimizeButton.html │ │ │ ├── PaypalDonateButton.html │ │ │ ├── RefreshAppButton.html │ │ │ ├── RunOnStartupButton.html │ │ │ ├── ThemeButton.html │ │ │ ├── class-use │ │ │ │ ├── ApplyDisplayModeButton.html │ │ │ │ ├── ClearAllButton.html │ │ │ │ ├── ClearHotKeyButton.html │ │ │ │ ├── ExitButton.html │ │ │ │ ├── MinimizeButton.html │ │ │ │ ├── PaypalDonateButton.html │ │ │ │ ├── RefreshAppButton.html │ │ │ │ ├── RunOnStartupButton.html │ │ │ │ └── ThemeButton.html │ │ │ ├── package-summary.html │ │ │ ├── package-tree.html │ │ │ └── package-use.html │ │ ├── class-use │ │ │ ├── ButtonThemesUpdater.html │ │ │ ├── DhkView.html │ │ │ ├── Slot.html │ │ │ └── ThemeUpdater.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── package-use.html │ │ ├── utility │ │ ├── DisplayModeInverter.html │ │ ├── class-use │ │ │ └── DisplayModeInverter.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── package-use.html │ │ └── window │ │ ├── FrameUpdater.html │ │ ├── MinimizeToTray.html │ │ ├── ViewRefresher.html │ │ ├── class-use │ │ ├── FrameUpdater.html │ │ ├── MinimizeToTray.html │ │ └── ViewRefresher.html │ │ ├── package-summary.html │ │ ├── package-tree.html │ │ └── package-use.html ├── copy.svg ├── element-list ├── help-doc.html ├── index-files │ ├── index-1.html │ ├── index-10.html │ ├── index-11.html │ ├── index-12.html │ ├── index-13.html │ ├── index-14.html │ ├── index-15.html │ ├── index-16.html │ ├── index-17.html │ ├── index-18.html │ ├── index-19.html │ ├── index-2.html │ ├── index-20.html │ ├── index-3.html │ ├── index-4.html │ ├── index-5.html │ ├── index-6.html │ ├── index-7.html │ ├── index-8.html │ └── index-9.html ├── index.html ├── legal │ ├── COPYRIGHT │ ├── LICENSE │ ├── jquery.md │ └── jqueryUI.md ├── link.svg ├── member-search-index.js ├── module-search-index.js ├── overview-summary.html ├── overview-tree.html ├── package-search-index.js ├── resources │ ├── glass.png │ └── x.png ├── script-dir │ ├── jquery-3.6.1.min.js │ ├── jquery-3.7.1.min.js │ ├── jquery-ui.min.css │ └── jquery-ui.min.js ├── script.js ├── search-page.js ├── search.html ├── search.js ├── serialized-form.html ├── stylesheet.css ├── tag-search-index.js └── type-search-index.js ├── jni ├── DisplayConfig.cpp ├── DisplayConfig.h ├── com_dhk_io_EnumDisplayIds.cpp ├── com_dhk_io_EnumDisplayIds.h ├── com_dhk_io_EnumDisplayModes.cpp ├── com_dhk_io_EnumDisplayModes.h ├── com_dhk_io_SetDisplay.cpp └── com_dhk_io_SetDisplay.h ├── makefile ├── pom.xml ├── product-screenshot.png └── src ├── apply_hover.svg ├── apply_idle.svg ├── clear_all_hover.svg ├── clear_all_idle.svg ├── clear_hot_key_hover.svg ├── clear_hot_key_idle.svg ├── com └── dhk │ ├── controllers │ ├── ConnectedDisplaysController.java │ ├── Controller.java │ ├── DhkController.java │ ├── DisplayModeController.java │ ├── DpiScaleController.java │ ├── FrameDragController.java │ ├── HotKeysController.java │ ├── MenuController.java │ ├── NumberOfSlotsController.java │ ├── OrientationController.java │ ├── ScalingModeController.java │ ├── SelectedDisplayController.java │ ├── WindowController.java │ └── buttons │ │ ├── ApplyDisplayModeButtonController.java │ │ ├── ClearAllButtonController.java │ │ ├── ClearHotKeyButtonController.java │ │ ├── ExitButtonController.java │ │ ├── MinimizeButtonController.java │ │ ├── PaypalDonateButtonController.java │ │ ├── RefreshAppButtonController.java │ │ ├── RunOnStartupButtonController.java │ │ └── ThemeButtonController.java │ ├── io │ ├── ConnectedDisplaysPoller.java │ ├── DisplayConfig.java │ ├── DisplayConfigUpdater.java │ ├── EnumDisplayIds.java │ ├── EnumDisplayModes.java │ ├── KeyText.java │ ├── RunOnStartupManager.java │ ├── SetDisplay.java │ ├── SettingsManager.java │ └── SettingsValidator.java │ ├── main │ ├── AppRefresher.java │ └── DhkDriver.java │ ├── models │ ├── DhkModel.java │ ├── Display.java │ ├── HotKey.java │ ├── Key.java │ └── Slot.java │ ├── ui │ ├── ButtonThemesUpdater.java │ ├── DhkView.java │ ├── FlatDarculaLaf.properties │ ├── FlatIntelliJLaf.properties │ ├── Slot.java │ ├── ThemeUpdater.java │ └── buttons │ │ ├── ApplyDisplayModeButton.java │ │ ├── ClearAllButton.java │ │ ├── ClearHotKeyButton.java │ │ ├── ExitButton.java │ │ ├── MinimizeButton.java │ │ ├── PaypalDonateButton.java │ │ ├── RefreshAppButton.java │ │ ├── RunOnStartupButton.java │ │ └── ThemeButton.java │ ├── utility │ └── DisplayModeInverter.java │ └── window │ ├── FrameUpdater.java │ ├── MinimizeToTray.java │ └── ViewRefresher.java ├── dark_mode_hover.svg ├── dark_mode_idle.svg ├── exit_hover.svg ├── exit_idle.svg ├── light_mode_hover.svg ├── light_mode_idle.svg ├── minimize_hover.svg ├── minimize_idle.svg ├── paypal_donate_dark_hover.svg ├── paypal_donate_dark_idle.svg ├── paypal_donate_light_hover.svg ├── paypal_donate_light_idle.svg ├── refresh_app_hover.svg ├── refresh_app_idle.svg ├── run_on_startup_disabled_dark_hover.svg ├── run_on_startup_disabled_idle.svg ├── run_on_startup_disabled_light_hover.svg ├── run_on_startup_enabled_dark_hover.svg ├── run_on_startup_enabled_idle.svg ├── run_on_startup_enabled_light_hover.svg └── tray_icon.png /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Eclipse ### 2 | bin/ 3 | tmp/ 4 | 5 | ### Maven ### 6 | target/ 7 | 8 | # JNI DLLs 9 | EnumDisplayIds.dll 10 | EnumDisplayModes.dll 11 | SetDisplay.dll 12 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | DisplayHotKeys 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder 10 | clean,full,incremental, 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javabuilder 16 | 17 | 18 | 19 | 20 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder 21 | full,incremental, 22 | 23 | 24 | 25 | 26 | org.eclipse.m2e.core.maven2Builder 27 | 28 | 29 | 30 | 31 | 32 | org.eclipse.m2e.core.maven2Nature 33 | org.eclipse.jdt.core.javanature 34 | org.eclipse.cdt.core.cnature 35 | org.eclipse.cdt.core.ccnature 36 | org.eclipse.cdt.managedbuilder.core.managedBuildNature 37 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature 38 | 39 | 40 | -------------------------------------------------------------------------------- /.settings/language.settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.settings/org.eclipse.cdt.core.prefs: -------------------------------------------------------------------------------- 1 | doxygen/doxygen_new_line_after_brief=true 2 | doxygen/doxygen_use_brief_tag=false 3 | doxygen/doxygen_use_javadoc_tags=true 4 | doxygen/doxygen_use_pre_tag=false 5 | doxygen/doxygen_use_structural_commands=false 6 | eclipse.preferences.version=1 7 | environment/project/cdt.managedbuild.toolchain.gnu.mingw.base.1409733201/append=true 8 | environment/project/cdt.managedbuild.toolchain.gnu.mingw.base.1409733201/appendContributed=true 9 | org.eclipse.cdt.core.code_formatter=org.eclipse.cdt.core.defaultCodeFormatter 10 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | encoding/src=UTF-8 4 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | formatter_profile=_Display_Hot_Keys 3 | formatter_settings_version=23 4 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Jonathan Miller 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | remote_theme: pages-themes/cayman@v0.2.0 2 | plugins: 3 | - jekyll-remote-theme 4 | 5 | title: Display Hot Keys 6 | description: Instantly apply display resolution, bit depth, refresh rate, scaling mode, and DPI scale percentage with user-defined hot keys. 7 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/class-use/ApplyDisplayModeButtonController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.buttons.ApplyDisplayModeButtonController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.buttons.ApplyDisplayModeButtonController

53 |
54 | No usage of com.dhk.controllers.buttons.ApplyDisplayModeButtonController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/class-use/ClearAllButtonController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.buttons.ClearAllButtonController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.buttons.ClearAllButtonController

53 |
54 | No usage of com.dhk.controllers.buttons.ClearAllButtonController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/class-use/ClearHotKeyButtonController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.buttons.ClearHotKeyButtonController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.buttons.ClearHotKeyButtonController

53 |
54 | No usage of com.dhk.controllers.buttons.ClearHotKeyButtonController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/class-use/ExitButtonController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.buttons.ExitButtonController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.buttons.ExitButtonController

53 |
54 | No usage of com.dhk.controllers.buttons.ExitButtonController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/class-use/MinimizeButtonController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.buttons.MinimizeButtonController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.buttons.MinimizeButtonController

53 |
54 | No usage of com.dhk.controllers.buttons.MinimizeButtonController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/class-use/PaypalDonateButtonController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.buttons.PaypalDonateButtonController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.buttons.PaypalDonateButtonController

53 |
54 | No usage of com.dhk.controllers.buttons.PaypalDonateButtonController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/class-use/RefreshAppButtonController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.buttons.RefreshAppButtonController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.buttons.RefreshAppButtonController

53 |
54 | No usage of com.dhk.controllers.buttons.RefreshAppButtonController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/class-use/RunOnStartupButtonController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.buttons.RunOnStartupButtonController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.buttons.RunOnStartupButtonController

53 |
54 | No usage of com.dhk.controllers.buttons.RunOnStartupButtonController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/class-use/ThemeButtonController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.buttons.ThemeButtonController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.buttons.ThemeButtonController

53 |
54 | No usage of com.dhk.controllers.buttons.ThemeButtonController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/buttons/package-use.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Package com.dhk.controllers.buttons 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Package
com.dhk.controllers.buttons

53 |
54 | No usage of com.dhk.controllers.buttons
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/ConnectedDisplaysController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.ConnectedDisplaysController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.ConnectedDisplaysController

53 |
54 | No usage of com.dhk.controllers.ConnectedDisplaysController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/DisplayModeController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.DisplayModeController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.DisplayModeController

53 |
54 | No usage of com.dhk.controllers.DisplayModeController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/DpiScaleController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.DpiScaleController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.DpiScaleController

53 |
54 | No usage of com.dhk.controllers.DpiScaleController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/FrameDragController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.FrameDragController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.FrameDragController

53 |
54 | No usage of com.dhk.controllers.FrameDragController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/HotKeysController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.HotKeysController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.HotKeysController

53 |
54 | No usage of com.dhk.controllers.HotKeysController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/MenuController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.MenuController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.MenuController

53 |
54 | No usage of com.dhk.controllers.MenuController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/NumberOfSlotsController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.NumberOfSlotsController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.NumberOfSlotsController

53 |
54 | No usage of com.dhk.controllers.NumberOfSlotsController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/OrientationController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.OrientationController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.OrientationController

53 |
54 | No usage of com.dhk.controllers.OrientationController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/ScalingModeController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.ScalingModeController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.ScalingModeController

53 |
54 | No usage of com.dhk.controllers.ScalingModeController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/SelectedDisplayController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.SelectedDisplayController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.SelectedDisplayController

53 |
54 | No usage of com.dhk.controllers.SelectedDisplayController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/controllers/class-use/WindowController.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.controllers.WindowController 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.controllers.WindowController

53 |
54 | No usage of com.dhk.controllers.WindowController
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/io/class-use/ConnectedDisplaysPoller.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.io.ConnectedDisplaysPoller 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.io.ConnectedDisplaysPoller

53 |
54 | No usage of com.dhk.io.ConnectedDisplaysPoller
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/io/class-use/DisplayConfigUpdater.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.io.DisplayConfigUpdater 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.io.DisplayConfigUpdater

53 |
54 | No usage of com.dhk.io.DisplayConfigUpdater
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/io/class-use/EnumDisplayIds.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.io.EnumDisplayIds 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.io.EnumDisplayIds

53 |
54 | No usage of com.dhk.io.EnumDisplayIds
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/io/class-use/EnumDisplayModes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.io.EnumDisplayModes 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.io.EnumDisplayModes

53 |
54 | No usage of com.dhk.io.EnumDisplayModes
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/io/class-use/KeyText.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.io.KeyText 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.io.KeyText

53 |
54 | No usage of com.dhk.io.KeyText
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/io/class-use/RunOnStartupManager.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.io.RunOnStartupManager 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.io.RunOnStartupManager

53 |
54 | No usage of com.dhk.io.RunOnStartupManager
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/io/class-use/SetDisplay.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.io.SetDisplay 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.io.SetDisplay

53 |
54 | No usage of com.dhk.io.SetDisplay
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/io/class-use/SettingsValidator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.io.SettingsValidator 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.io.SettingsValidator

53 |
54 | No usage of com.dhk.io.SettingsValidator
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/main/class-use/AppRefresher.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.main.AppRefresher 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.main.AppRefresher

53 |
54 | No usage of com.dhk.main.AppRefresher
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/main/class-use/DhkDriver.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.main.DhkDriver 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.main.DhkDriver

53 |
54 | No usage of com.dhk.main.DhkDriver
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/main/package-use.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Package com.dhk.main 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Package
com.dhk.main

53 |
54 | No usage of com.dhk.main
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/models/class-use/Display.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.models.Display 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.models.Display

53 |
54 | No usage of com.dhk.models.Display
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/ui/class-use/ButtonThemesUpdater.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.ui.ButtonThemesUpdater 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.ui.ButtonThemesUpdater

53 |
54 | No usage of com.dhk.ui.ButtonThemesUpdater
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/ui/class-use/ThemeUpdater.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.ui.ThemeUpdater 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.ui.ThemeUpdater

53 |
54 | No usage of com.dhk.ui.ThemeUpdater
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/utility/class-use/DisplayModeInverter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.utility.DisplayModeInverter 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.utility.DisplayModeInverter

53 |
54 | No usage of com.dhk.utility.DisplayModeInverter
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/utility/package-use.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Package com.dhk.utility 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Package
com.dhk.utility

53 |
54 | No usage of com.dhk.utility
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/window/class-use/FrameUpdater.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.window.FrameUpdater 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.window.FrameUpdater

53 |
54 | No usage of com.dhk.window.FrameUpdater
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/com/dhk/window/class-use/MinimizeToTray.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Uses of Class com.dhk.window.MinimizeToTray 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 49 |
50 |
51 |
52 |

Uses of Class
com.dhk.window.MinimizeToTray

53 |
54 | No usage of com.dhk.window.MinimizeToTray
55 |
56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /doc/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 27 | 28 | 29 | 31 | 33 | 34 | -------------------------------------------------------------------------------- /doc/element-list: -------------------------------------------------------------------------------- 1 | com.dhk.controllers 2 | com.dhk.controllers.buttons 3 | com.dhk.io 4 | com.dhk.main 5 | com.dhk.models 6 | com.dhk.ui 7 | com.dhk.ui.buttons 8 | com.dhk.utility 9 | com.dhk.window 10 | -------------------------------------------------------------------------------- /doc/legal/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Please see ..\java.base\COPYRIGHT 2 | -------------------------------------------------------------------------------- /doc/legal/LICENSE: -------------------------------------------------------------------------------- 1 | Please see ..\java.base\LICENSE 2 | -------------------------------------------------------------------------------- /doc/legal/jquery.md: -------------------------------------------------------------------------------- 1 | ## jQuery v3.6.1 2 | 3 | ### jQuery License 4 | ``` 5 | jQuery v 3.6.1 6 | Copyright OpenJS Foundation and other contributors, https://openjsf.org/ 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | "Software"), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | ****************************************** 28 | 29 | The jQuery JavaScript Library v3.6.1 also includes Sizzle.js 30 | 31 | Sizzle.js includes the following license: 32 | 33 | Copyright JS Foundation and other contributors, https://js.foundation/ 34 | 35 | This software consists of voluntary contributions made by many 36 | individuals. For exact contribution history, see the revision history 37 | available at https://github.com/jquery/sizzle 38 | 39 | The following license applies to all parts of this software except as 40 | documented below: 41 | 42 | ==== 43 | 44 | Permission is hereby granted, free of charge, to any person obtaining 45 | a copy of this software and associated documentation files (the 46 | "Software"), to deal in the Software without restriction, including 47 | without limitation the rights to use, copy, modify, merge, publish, 48 | distribute, sublicense, and/or sell copies of the Software, and to 49 | permit persons to whom the Software is furnished to do so, subject to 50 | the following conditions: 51 | 52 | The above copyright notice and this permission notice shall be 53 | included in all copies or substantial portions of the Software. 54 | 55 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 56 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 57 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 58 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 59 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 60 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 61 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 62 | 63 | ==== 64 | 65 | All files located in the node_modules and external directories are 66 | externally maintained libraries used by this software which have their 67 | own licenses; we recommend you read them, as their terms may differ from 68 | the terms above. 69 | 70 | ********************* 71 | 72 | ``` 73 | -------------------------------------------------------------------------------- /doc/legal/jqueryUI.md: -------------------------------------------------------------------------------- 1 | ## jQuery UI v1.13.2 2 | 3 | ### jQuery UI License 4 | ``` 5 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 6 | 7 | This software consists of voluntary contributions made by many 8 | individuals. For exact contribution history, see the revision history 9 | available at https://github.com/jquery/jquery-ui 10 | 11 | The following license applies to all parts of this software except as 12 | documented below: 13 | 14 | ==== 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining 17 | a copy of this software and associated documentation files (the 18 | "Software"), to deal in the Software without restriction, including 19 | without limitation the rights to use, copy, modify, merge, publish, 20 | distribute, sublicense, and/or sell copies of the Software, and to 21 | permit persons to whom the Software is furnished to do so, subject to 22 | the following conditions: 23 | 24 | The above copyright notice and this permission notice shall be 25 | included in all copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 28 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 29 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 30 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 31 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 32 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 33 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | 35 | ==== 36 | 37 | Copyright and related rights for sample code are waived via CC0. Sample 38 | code is defined as all source code contained within the demos directory. 39 | 40 | CC0: http://creativecommons.org/publicdomain/zero/1.0/ 41 | 42 | ==== 43 | 44 | All files located in the node_modules and external directories are 45 | externally maintained libraries used by this software which have their 46 | own licenses; we recommend you read them, as their terms may differ from 47 | the terms above. 48 | 49 | ``` 50 | -------------------------------------------------------------------------------- /doc/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /doc/module-search-index.js: -------------------------------------------------------------------------------- 1 | moduleSearchIndex = [];updateSearchResults(); -------------------------------------------------------------------------------- /doc/overview-summary.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Generated Documentation (Untitled) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 |
20 | 23 |

index.html

24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /doc/package-search-index.js: -------------------------------------------------------------------------------- 1 | packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"com.dhk.controllers"},{"l":"com.dhk.controllers.buttons"},{"l":"com.dhk.io"},{"l":"com.dhk.main"},{"l":"com.dhk.models"},{"l":"com.dhk.ui"},{"l":"com.dhk.ui.buttons"},{"l":"com.dhk.utility"},{"l":"com.dhk.window"}];updateSearchResults(); -------------------------------------------------------------------------------- /doc/resources/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jon-mil-92/DisplayHotKeys/e18608c731bd4c88fd8b9fc5f9e5349a8c4d244d/doc/resources/glass.png -------------------------------------------------------------------------------- /doc/resources/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jon-mil-92/DisplayHotKeys/e18608c731bd4c88fd8b9fc5f9e5349a8c4d244d/doc/resources/x.png -------------------------------------------------------------------------------- /doc/script-dir/jquery-ui.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.13.2 - 2023-02-27 2 | * http://jqueryui.com 3 | * Includes: core.css, autocomplete.css, menu.css 4 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 5 | 6 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;-ms-filter:"alpha(opacity=0)"}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} -------------------------------------------------------------------------------- /doc/tag-search-index.js: -------------------------------------------------------------------------------- 1 | tagSearchIndex = [{"l":"Serialized Form","h":"","u":"serialized-form.html"}];updateSearchResults(); -------------------------------------------------------------------------------- /doc/type-search-index.js: -------------------------------------------------------------------------------- 1 | typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"com.dhk.ui.buttons","l":"ApplyDisplayModeButton"},{"p":"com.dhk.controllers.buttons","l":"ApplyDisplayModeButtonController"},{"p":"com.dhk.main","l":"AppRefresher"},{"p":"com.dhk.ui","l":"ButtonThemesUpdater"},{"p":"com.dhk.ui.buttons","l":"ClearAllButton"},{"p":"com.dhk.controllers.buttons","l":"ClearAllButtonController"},{"p":"com.dhk.ui.buttons","l":"ClearHotKeyButton"},{"p":"com.dhk.controllers.buttons","l":"ClearHotKeyButtonController"},{"p":"com.dhk.controllers","l":"ConnectedDisplaysController"},{"p":"com.dhk.io","l":"ConnectedDisplaysPoller"},{"p":"com.dhk.controllers","l":"Controller"},{"p":"com.dhk.controllers","l":"DhkController"},{"p":"com.dhk.main","l":"DhkDriver"},{"p":"com.dhk.models","l":"DhkModel"},{"p":"com.dhk.ui","l":"DhkView"},{"p":"com.dhk.models","l":"Display"},{"p":"com.dhk.io","l":"DisplayConfig"},{"p":"com.dhk.io","l":"DisplayConfigUpdater"},{"p":"com.dhk.controllers","l":"DisplayModeController"},{"p":"com.dhk.utility","l":"DisplayModeInverter"},{"p":"com.dhk.controllers","l":"DpiScaleController"},{"p":"com.dhk.io","l":"EnumDisplayIds"},{"p":"com.dhk.io","l":"EnumDisplayModes"},{"p":"com.dhk.ui.buttons","l":"ExitButton"},{"p":"com.dhk.controllers.buttons","l":"ExitButtonController"},{"p":"com.dhk.controllers","l":"FrameDragController"},{"p":"com.dhk.window","l":"FrameUpdater"},{"p":"com.dhk.models","l":"HotKey"},{"p":"com.dhk.controllers","l":"HotKeysController"},{"p":"com.dhk.models","l":"Key"},{"p":"com.dhk.io","l":"KeyText"},{"p":"com.dhk.controllers","l":"MenuController"},{"p":"com.dhk.ui.buttons","l":"MinimizeButton"},{"p":"com.dhk.controllers.buttons","l":"MinimizeButtonController"},{"p":"com.dhk.window","l":"MinimizeToTray"},{"p":"com.dhk.controllers","l":"NumberOfSlotsController"},{"p":"com.dhk.controllers","l":"OrientationController"},{"p":"com.dhk.ui.buttons","l":"PaypalDonateButton"},{"p":"com.dhk.controllers.buttons","l":"PaypalDonateButtonController"},{"p":"com.dhk.ui.buttons","l":"RefreshAppButton"},{"p":"com.dhk.controllers.buttons","l":"RefreshAppButtonController"},{"p":"com.dhk.ui.buttons","l":"RunOnStartupButton"},{"p":"com.dhk.controllers.buttons","l":"RunOnStartupButtonController"},{"p":"com.dhk.io","l":"RunOnStartupManager"},{"p":"com.dhk.controllers","l":"ScalingModeController"},{"p":"com.dhk.controllers","l":"SelectedDisplayController"},{"p":"com.dhk.io","l":"SetDisplay"},{"p":"com.dhk.io","l":"SettingsManager"},{"p":"com.dhk.io","l":"SettingsValidator"},{"p":"com.dhk.models","l":"Slot"},{"p":"com.dhk.ui","l":"Slot"},{"p":"com.dhk.ui.buttons","l":"ThemeButton"},{"p":"com.dhk.controllers.buttons","l":"ThemeButtonController"},{"p":"com.dhk.ui","l":"ThemeUpdater"},{"p":"com.dhk.window","l":"ViewRefresher"},{"p":"com.dhk.controllers","l":"WindowController"}];updateSearchResults(); -------------------------------------------------------------------------------- /jni/com_dhk_io_EnumDisplayIds.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class com_dhk_io_EnumDisplayIds */ 4 | 5 | #ifndef _Included_com_dhk_io_EnumDisplayIds 6 | #define _Included_com_dhk_io_EnumDisplayIds 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: com_dhk_io_EnumDisplayIds 12 | * Method: queryNumOfConnectedDisplays 13 | * Signature: ()I 14 | */ 15 | JNIEXPORT jint JNICALL Java_com_dhk_io_EnumDisplayIds_queryNumOfConnectedDisplays 16 | (JNIEnv *, jobject); 17 | 18 | /* 19 | * Class: com_dhk_io_EnumDisplayIds 20 | * Method: enumDisplayIds 21 | * Signature: ()[Ljava/lang/String; 22 | */ 23 | JNIEXPORT jobjectArray JNICALL Java_com_dhk_io_EnumDisplayIds_enumDisplayIds 24 | (JNIEnv *, jobject); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /jni/com_dhk_io_EnumDisplayModes.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class com_dhk_io_EnumDisplayModes */ 4 | 5 | #ifndef _Included_com_dhk_io_EnumDisplayModes 6 | #define _Included_com_dhk_io_EnumDisplayModes 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: com_dhk_io_EnumDisplayModes 12 | * Method: enumDisplayModes 13 | * Signature: (Ljava/lang/String;)[Ljava/awt/DisplayMode; 14 | */ 15 | JNIEXPORT jobjectArray JNICALL Java_com_dhk_io_EnumDisplayModes_enumDisplayModes 16 | (JNIEnv *, jobject, jstring); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /jni/com_dhk_io_SetDisplay.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class com_dhk_io_SetDisplay */ 4 | 5 | #ifndef _Included_com_dhk_io_SetDisplay 6 | #define _Included_com_dhk_io_SetDisplay 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: com_dhk_io_SetDisplay 12 | * Method: setDisplay 13 | * Signature: (Ljava/lang/String;IIIIII)V 14 | */ 15 | JNIEXPORT void JNICALL Java_com_dhk_io_SetDisplay_setDisplay 16 | (JNIEnv *, jobject, jstring, jint, jint, jint, jint, jint, jint); 17 | 18 | /* 19 | * Class: com_dhk_io_SetDisplay 20 | * Method: setOrientation 21 | * Signature: (Ljava/lang/String;I)V 22 | */ 23 | JNIEXPORT void JNICALL Java_com_dhk_io_SetDisplay_setOrientation 24 | (JNIEnv *, jobject, jstring, jint); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | header: 2 | mkdir -p jni 3 | 4 | javac -h jni src/com/dhk/io/EnumDisplayModes.java 5 | rm -f src/com/dhk/io/EnumDisplayModes.class 6 | 7 | javac -h jni src/com/dhk/io/EnumDisplayIds.java 8 | rm -f src/com/dhk/io/EnumDisplayIds.class 9 | 10 | javac -h jni src/com/dhk/io/SetDisplay.java 11 | rm -f src/com/dhk/io/SetDisplay.class 12 | 13 | dll: 14 | # The JNI libraries will only build if JDK 21 is installed in the default path. 15 | g++ --std=c++20 jni/com_dhk_io_EnumDisplayModes.cpp jni/DisplayConfig.cpp -I"C:\Program Files\Java\jdk-21\include" -I"C:\Program Files\Java\jdk-21\include\win32" -shared -o EnumDisplayModes.dll -static 16 | g++ --std=c++20 jni/com_dhk_io_EnumDisplayIds.cpp jni/DisplayConfig.cpp -I"C:\Program Files\Java\jdk-21\include" -I"C:\Program Files\Java\jdk-21\include\win32" -shared -o EnumDisplayIds.dll -static 17 | g++ --std=c++20 jni/com_dhk_io_SetDisplay.cpp jni/DisplayConfig.cpp -I"C:\Program Files\Java\jdk-21\include" -I"C:\Program Files\Java\jdk-21\include\win32" -shared -o SetDisplay.dll -static 18 | 19 | clean: 20 | rm -f jni/com_dhk_io_EnumDisplayIds.h 21 | rm -f jni/com_dhk_io_EnumDisplayModes.h 22 | rm -f jni/com_dhk_io_SetDisplay.h 23 | rm -f *.dll 24 | 25 | all: clean header dll 26 | -------------------------------------------------------------------------------- /product-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jon-mil-92/DisplayHotKeys/e18608c731bd4c88fd8b9fc5f9e5349a8c4d244d/product-screenshot.png -------------------------------------------------------------------------------- /src/apply_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /src/apply_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /src/clear_all_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /src/clear_all_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /src/clear_hot_key_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /src/clear_hot_key_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 11 | 13 | 17 | 18 | -------------------------------------------------------------------------------- /src/com/dhk/controllers/ConnectedDisplaysController.java: -------------------------------------------------------------------------------- 1 | package com.dhk.controllers; 2 | 3 | import com.dhk.io.ConnectedDisplaysPoller; 4 | import com.dhk.io.SettingsManager; 5 | import com.dhk.models.DhkModel; 6 | import com.dhk.ui.DhkView; 7 | 8 | /** 9 | * This class controls the active display configuration. A connected displays poller is started to check for changes in 10 | * the number of connected displays. 11 | * 12 | * @author Jonathan Miller 13 | * @version 1.4.0 14 | * 15 | * @license The MIT License 16 | * @copyright Jonathan Miller 2024 17 | */ 18 | public class ConnectedDisplaysController implements Controller { 19 | private DhkModel model; 20 | private DhkView view; 21 | private DhkController controller; 22 | private SettingsManager settingsMgr; 23 | private ConnectedDisplaysPoller connectedDisplaysPoller; 24 | 25 | // Poll for the number of connected displays every 1000 ms. 26 | private final int POLL_INTERVAL = 1000; 27 | 28 | /** 29 | * Constructor for the ConnectedDisplaysController class. 30 | * 31 | * @param model - The model for the application. 32 | * @param view - The view for the application. 33 | * @param controller - The controller for the application. 34 | * @param settingsMgr - The settings manager for the application. 35 | */ 36 | public ConnectedDisplaysController(DhkModel model, DhkView view, DhkController controller, 37 | SettingsManager settingsMgr) { 38 | // Get the application's model, view, controller, and settings manager. 39 | this.model = model; 40 | this.view = view; 41 | this.controller = controller; 42 | this.settingsMgr = settingsMgr; 43 | } 44 | 45 | /** 46 | * This method creates and starts a new connected display poller to check for display configuration changes. 47 | */ 48 | @Override 49 | public void initController() { 50 | // Initialize and start the object that will poll for number of connected displays. 51 | connectedDisplaysPoller = new ConnectedDisplaysPoller(model, view, controller, settingsMgr, POLL_INTERVAL); 52 | connectedDisplaysPoller.start(); 53 | } 54 | 55 | @Override 56 | public void initListeners() { 57 | } 58 | 59 | /** 60 | * Stop polling for the number of connected displays. 61 | */ 62 | @Override 63 | public void cleanUp() { 64 | connectedDisplaysPoller.stop(); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/com/dhk/controllers/Controller.java: -------------------------------------------------------------------------------- 1 | package com.dhk.controllers; 2 | 3 | /** 4 | * This interface defines a controller. Controllers must have an initController method, an initListeners method, and a 5 | * cleanUp method. 6 | * 7 | * @author Jonathan Miller 8 | * @version 1.4.0 9 | * 10 | * @license The MIT License 11 | * @copyright Jonathan Miller 2024 12 | */ 13 | public interface Controller { 14 | /** 15 | * Initialize the controller. 16 | */ 17 | public void initController(); 18 | 19 | /** 20 | * Initialize the listeners of the controller. 21 | */ 22 | public void initListeners(); 23 | 24 | /** 25 | * General cleanup before re-initialization. 26 | */ 27 | public void cleanUp(); 28 | } 29 | -------------------------------------------------------------------------------- /src/com/dhk/io/DisplayConfigUpdater.java: -------------------------------------------------------------------------------- 1 | package com.dhk.io; 2 | 3 | import com.dhk.controllers.DhkController; 4 | import com.dhk.main.AppRefresher; 5 | import com.dhk.models.DhkModel; 6 | import com.dhk.ui.DhkView; 7 | 8 | /** 9 | * This class provides methods to detect if there was a display configuration change, and if there was, then the 10 | * settings manager, model, view, and controllers will be re-initialized to reflect the new display configuration. 11 | * 12 | * @author Jonathan Miller 13 | * @version 1.4.0 14 | * 15 | * @license The MIT License 16 | * @copyright Jonathan Miller 2024 17 | */ 18 | public class DisplayConfigUpdater { 19 | private DhkModel model; 20 | private DisplayConfig displayConfig; 21 | private AppRefresher appRefresher; 22 | 23 | /** 24 | * Constructor for the DisplayConfigRefresher class. 25 | * 26 | * @param model - The model for the application. 27 | * @param view - The view for the application. 28 | * @param controller - The controller for the application. 29 | * @param settingsMgr - The settings manager for the application. 30 | */ 31 | public DisplayConfigUpdater(DhkModel model, DhkView view, DhkController controller, SettingsManager settingsMgr) { 32 | // Get the application's model. 33 | this.model = model; 34 | 35 | // Initialize the object that will get the current display configuration. 36 | displayConfig = new DisplayConfig(); 37 | displayConfig.updateDisplayConfig(); 38 | 39 | // Initialize the object that will re-initialize the application. 40 | appRefresher = new AppRefresher(model, view, controller, settingsMgr); 41 | } 42 | 43 | /** 44 | * This method detects if there was a change in the number of connected displays, and if there was, then the 45 | * settings manager, model, view, and controllers will be re-initialized to reflect the new display configuration. 46 | */ 47 | public void checkNumOfConnectedDisplays() { 48 | // Get the current number of connected displays. 49 | displayConfig.checkNumOfConnectedDisplays(); 50 | 51 | // If the number of connected displays has changed... 52 | if (displayConfig.getNumOfConnectedDisplays() != model.getNumOfConnectedDisplays()) { 53 | // Re-initialize the app to reflect the new display configuration. 54 | appRefresher.reInitApp(); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/com/dhk/io/EnumDisplayIds.java: -------------------------------------------------------------------------------- 1 | package com.dhk.io; 2 | 3 | /** 4 | * This class utilizes the EnumDisplayIds JNI library to retreive the current array of display IDs. 5 | * 6 | * @author Jonathan Miller 7 | * @version 1.4.0 8 | * 9 | * @license The MIT License 10 | * @copyright Jonathan Miller 2024 11 | */ 12 | public class EnumDisplayIds { 13 | 14 | /** 15 | * Default constructor for the EnumDisplayIds class. 16 | */ 17 | public EnumDisplayIds() { 18 | } 19 | 20 | // Load the EnumDisplayIds.dll file. 21 | static { 22 | try { 23 | System.loadLibrary("EnumDisplayIds"); 24 | } catch (UnsatisfiedLinkError e) { 25 | e.printStackTrace(); 26 | } 27 | } 28 | 29 | // Define a JNI function to get the current number of connected displays. 30 | private native int queryNumOfConnectedDisplays(); 31 | 32 | // Define a JNI function to enumerate the display IDs for the connected displays. 33 | private native String[] enumDisplayIds(); 34 | 35 | /** 36 | * This method gets the current number connected displays. 37 | * 38 | * @return The current number of connected displays. 39 | */ 40 | public int getNumOfConnectedDisplays() { 41 | return queryNumOfConnectedDisplays(); 42 | } 43 | 44 | /** 45 | * This method gets the display IDs for the connected displays. 46 | * 47 | * @return The array of display IDs for the connected displays. 48 | */ 49 | public String[] getDisplayIds() { 50 | return enumDisplayIds(); 51 | } 52 | } -------------------------------------------------------------------------------- /src/com/dhk/io/EnumDisplayModes.java: -------------------------------------------------------------------------------- 1 | package com.dhk.io; 2 | 3 | import java.awt.DisplayMode; 4 | import java.util.Arrays; 5 | 6 | /** 7 | * This class utilizes the EnumDisplayModes JNI library to retreive the current array of supported display modes for a 8 | * given display. 9 | * 10 | * @author Jonathan Miller 11 | * @version 1.4.0 12 | * 13 | * @license The MIT License 14 | * @copyright Jonathan Miller 2024 15 | */ 16 | public class EnumDisplayModes { 17 | 18 | /** 19 | * Default constructor for the EnumDisplayModes class. 20 | */ 21 | public EnumDisplayModes() { 22 | } 23 | 24 | // Load the EnumDisplayModes.dll file. 25 | static { 26 | try { 27 | System.loadLibrary("EnumDisplayModes"); 28 | } catch (UnsatisfiedLinkError e) { 29 | e.printStackTrace(); 30 | } 31 | } 32 | 33 | // Define a JNI function to enumerate the supported display modes for the given display. 34 | private native DisplayMode[] enumDisplayModes(String displayID); 35 | 36 | /** 37 | * This method gets the current supported display modes for the given display. 38 | * 39 | * @param displayId - The ID of the display to get the array of supported display modes for. 40 | * @return The current array of supported display modes for the given display. 41 | */ 42 | public DisplayMode[] getDisplayModes(String displayId) { 43 | // Only return unique supported display modes, as the EnumDisplaySettings function from Windows.h may not. 44 | return Arrays.stream(enumDisplayModes(displayId)).distinct().toArray(DisplayMode[]::new); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/dhk/io/KeyText.java: -------------------------------------------------------------------------------- 1 | package com.dhk.io; 2 | 3 | import java.awt.event.KeyEvent; 4 | 5 | /** 6 | * This class gets the text representation for a given key code. 7 | * 8 | * @author Jonathan Miller 9 | * @version 1.4.0 10 | * 11 | * @license The MIT License 12 | * @copyright Jonathan Miller 2024 13 | */ 14 | public class KeyText { 15 | 16 | /** 17 | * Default constructor for the KeyText class. 18 | */ 19 | public KeyText() { 20 | } 21 | 22 | /** 23 | * This method gets the proper key text from the specified key code. 24 | * 25 | * @param keyCode - The key code for the key to get the text for. 26 | * @return The text representation for the key. 27 | */ 28 | public String getKeyCodeText(int keyCode) { 29 | String keyCodeText = ""; 30 | 31 | // Fix text representation for the following keys due to a mismatch in key codes between System Hook and AWT. 32 | switch (keyCode) { 33 | case 222: 34 | keyCodeText = "Apostrophe"; 35 | break; 36 | case 221: 37 | keyCodeText = "Close Bracket"; 38 | break; 39 | case 220: 40 | keyCodeText = "Back Slash"; 41 | break; 42 | case 219: 43 | keyCodeText = "Open Bracket"; 44 | break; 45 | case 191: 46 | keyCodeText = "Forward Slash"; 47 | break; 48 | case 190: 49 | keyCodeText = "Period"; 50 | break; 51 | case 189: 52 | keyCodeText = "Minus"; 53 | break; 54 | case 188: 55 | keyCodeText = "Comma"; 56 | break; 57 | case 187: 58 | keyCodeText = "Equal"; 59 | break; 60 | case 186: 61 | keyCodeText = "Semicolon"; 62 | break; 63 | case 93: 64 | keyCodeText = "Menu"; 65 | break; 66 | case 91: 67 | keyCodeText = "Windows"; 68 | break; 69 | case 46: 70 | keyCodeText = "Delete"; 71 | break; 72 | case 45: 73 | keyCodeText = "Insert"; 74 | break; 75 | case 44: 76 | keyCodeText = "Print Screen"; 77 | break; 78 | case 13: 79 | keyCodeText = "Enter"; 80 | break; 81 | default: 82 | keyCodeText = KeyEvent.getKeyText(keyCode); 83 | break; 84 | } 85 | 86 | return keyCodeText; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/com/dhk/io/RunOnStartupManager.java: -------------------------------------------------------------------------------- 1 | package com.dhk.io; 2 | 3 | import java.io.File; 4 | import java.io.FileNotFoundException; 5 | import java.io.IOException; 6 | import java.io.PrintWriter; 7 | import java.net.URISyntaxException; 8 | import java.nio.file.Files; 9 | 10 | /** 11 | * This class gets the application's path and uses it to create or destroy a batch file that will run the application on 12 | * Windows login. 13 | * 14 | * @author Jonathan Miller 15 | * @version 1.4.0 16 | * 17 | * @license The MIT License 18 | * @copyright Jonathan Miller 2024 19 | */ 20 | public class RunOnStartupManager { 21 | private String startupPath; 22 | private String runOnStartupFileName; 23 | private String runOnStartupFilePath; 24 | private File runOnStartupFile; 25 | private String jarFilePath; 26 | 27 | /** 28 | * Constructor for the RunOnStartupManager class. 29 | */ 30 | public RunOnStartupManager() { 31 | // Initialize the path to the Windows startup folder for the current user. 32 | startupPath = System.getProperty("user.home") 33 | + "\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\"; 34 | 35 | // Initialize the name for the run on startup file. 36 | runOnStartupFileName = "StartDisplayHotKeys.bat"; 37 | 38 | // Set the full path to the run on startup file. 39 | runOnStartupFilePath = startupPath + runOnStartupFileName; 40 | 41 | // Create a file object for the run on startup file. 42 | runOnStartupFile = new File(runOnStartupFilePath); 43 | 44 | // Create a file with the path of this app. 45 | File jarFile = null; 46 | try { 47 | jarFile = new File( 48 | RunOnStartupManager.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()); 49 | } catch (URISyntaxException e) { 50 | e.printStackTrace(); 51 | } 52 | 53 | // Get the path for this runnable jar file. 54 | jarFilePath = jarFile.getPath(); 55 | 56 | // Change the .jar extension to .exe because this runnable jar will be wrapped in a Windows executable file. 57 | jarFilePath = jarFilePath.replaceAll(".jar", ".exe"); 58 | } 59 | 60 | /** 61 | * This method adds a batch file to the user's startup folder that will execute this application upon login. 62 | */ 63 | public void addToStartup() { 64 | try { 65 | // Initialize the writer for the run on startup file. 66 | PrintWriter startupFileWriter = new PrintWriter(runOnStartupFile); 67 | 68 | // Write the command that will execute upon user login to the run on startup file. 69 | startupFileWriter.print("start " + "\"\" \"" + jarFilePath + "\""); 70 | 71 | // Close the file writer. 72 | startupFileWriter.close(); 73 | } catch (FileNotFoundException e) { 74 | e.printStackTrace(); 75 | } 76 | } 77 | 78 | /** 79 | * This method will remove the run on startup file from the user's startup folder. 80 | */ 81 | public void removeFromStartup() { 82 | // Delete the run on startup file if it exists. 83 | try { 84 | Files.deleteIfExists(runOnStartupFile.toPath()); 85 | } catch (IOException e) { 86 | e.printStackTrace(); 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/com/dhk/io/SetDisplay.java: -------------------------------------------------------------------------------- 1 | package com.dhk.io; 2 | 3 | /** 4 | * This class utilizes the SetDisplay JNI library to immediately apply the given display mode, scaling mode, and DPI 5 | * scale percentage for the given display. 6 | * 7 | * @author Jonathan Miller 8 | * @version 1.4.0 9 | * 10 | * @license The MIT License 11 | * @copyright Jonathan Miller 2024 12 | */ 13 | public class SetDisplay { 14 | 15 | /** 16 | * Default constructor for the SetDisplay class. 17 | */ 18 | public SetDisplay() { 19 | } 20 | 21 | // Load the SetDisplay.dll file. 22 | static { 23 | try { 24 | System.loadLibrary("SetDisplay"); 25 | } catch (UnsatisfiedLinkError e) { 26 | e.printStackTrace(); 27 | } 28 | } 29 | 30 | // Define a JNI function to immediately apply the given display settings for the given display. 31 | private native void setDisplay(String displayId, int resWidth, int resHeight, int bitDepth, int refreshRate, 32 | int scalingMode, int dpiScalePercentageScale); 33 | 34 | // Define a JNI function to immediately apply the given orientation for the given display. 35 | private native void setOrientation(String dispalayId, int orientationMode); 36 | 37 | /** 38 | * This method immediately applies the given display settings for the given display. 39 | * 40 | * @param displayId - The ID of the display to apply the display settings for. 41 | * @param resWidth - The new horizontal resolution for the given display. 42 | * @param resHeight - The new vertical resolution for the given display. 43 | * @param bitDepth - The new bit depth for the given display. 44 | * @param refreshRate - The new refresh rate for the given display. 45 | * @param scalingMode - The new scaling mode for the given display. 46 | * @param dpiScalePercentage - The new DPI scale percentage for the given display. 47 | */ 48 | public void applyDisplaySettings(String displayId, int resWidth, int resHeight, int bitDepth, int refreshRate, 49 | int scalingMode, int dpiScalePercentage) { 50 | // Call the JNI function to immediately apply the given display settings for the given display. 51 | setDisplay(displayId, resWidth, resHeight, bitDepth, refreshRate, scalingMode, dpiScalePercentage); 52 | } 53 | 54 | /** 55 | * This method immediately applies the given orientation for the given display. 56 | * 57 | * @param displayId - The ID of the display to apply the orientation for. 58 | * @param orientationMode - The new orientation for the given display. 0 for landscape, 1 for portrait, 2 for 59 | * inverted landscape, and 3 for for inverted portrait. 60 | */ 61 | public void applyDisplayOrientation(String displayId, int orientationMode) { 62 | // Call the JNI function to immediately apply the given orientation for the given display. 63 | setOrientation(displayId, orientationMode); 64 | } 65 | } -------------------------------------------------------------------------------- /src/com/dhk/main/AppRefresher.java: -------------------------------------------------------------------------------- 1 | package com.dhk.main; 2 | 3 | import com.dhk.controllers.DhkController; 4 | import com.dhk.io.SettingsManager; 5 | import com.dhk.models.DhkModel; 6 | import com.dhk.ui.DhkView; 7 | 8 | /** 9 | * This class is an app refresher that gets the application's model, view, controller, and settings manager, and then it 10 | * re-initializes them. 11 | * 12 | * @author Jonathan Miller 13 | * @version 1.4.0 14 | * 15 | * @license The MIT License 16 | * @copyright Jonathan Miller 2024 17 | */ 18 | public class AppRefresher { 19 | private DhkModel model; 20 | private DhkView view; 21 | private DhkController controller; 22 | private SettingsManager settingsMgr; 23 | 24 | /** 25 | * Constructor for the AppRefresher class. 26 | * 27 | * @param model - The model for the application. 28 | * @param view - The view for the application. 29 | * @param controller - The controller for the application. 30 | * @param settingsMgr - The settings manager for the application. 31 | */ 32 | public AppRefresher(DhkModel model, DhkView view, DhkController controller, SettingsManager settingsMgr) { 33 | // Get the application's model, view, controller, and settings manager. 34 | this.model = model; 35 | this.view = view; 36 | this.controller = controller; 37 | this.settingsMgr = settingsMgr; 38 | } 39 | 40 | /** 41 | * This method re-initializes the settings manager, model, view, and controllers for the application. 42 | */ 43 | public void reInitApp() { 44 | // Get the state of the frame so it can be used for re-initialization. 45 | int previousFrameState = view.getFrame().getExtendedState(); 46 | 47 | // Re-initialize the settings manager. 48 | settingsMgr.initSettingsManager(); 49 | 50 | // Re-initialize the model. 51 | model.initModel(settingsMgr); 52 | 53 | // Re-initialize the view. 54 | view.reInitView(); 55 | 56 | // Re-initialize the controllers. 57 | controller.reInitController(previousFrameState); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/com/dhk/main/DhkDriver.java: -------------------------------------------------------------------------------- 1 | package com.dhk.main; 2 | 3 | import javax.swing.SwingUtilities; 4 | import com.dhk.controllers.DhkController; 5 | import com.dhk.io.RunOnStartupManager; 6 | import com.dhk.io.SettingsManager; 7 | import com.dhk.models.DhkModel; 8 | import com.dhk.ui.DhkView; 9 | import com.dhk.ui.ThemeUpdater; 10 | 11 | /** 12 | * This class is the main driver for Display Hot Keys that starts the model, view, and controller on the AWT event 13 | * dispatch thread. 14 | * 15 | * @author Jonathan Miller 16 | * @version 1.4.0 17 | * 18 | * @license The MIT License 19 | * @copyright Jonathan Miller 2024 20 | */ 21 | public class DhkDriver { 22 | 23 | /** 24 | * Default constructor for the DhkDriver class. 25 | */ 26 | public DhkDriver() { 27 | } 28 | 29 | /** 30 | * The main method for the application driver. 31 | * 32 | * @param args - Command line arguments. 33 | */ 34 | public static void main(final String[] args) { 35 | // Initialize a settings manager object. 36 | SettingsManager settingsMgr = new SettingsManager(); 37 | settingsMgr.initSettingsManager(); 38 | 39 | // Initialize a run on startup manager object. 40 | RunOnStartupManager runOnStartupManager = new RunOnStartupManager(); 41 | 42 | // Set up the "look and feel" for the GUI. 43 | ThemeUpdater themeUpdater = new ThemeUpdater(); 44 | 45 | // Start the application in the UI mode defined in the settings file. 46 | themeUpdater.useDarkMode(settingsMgr.getIniDarkMode()); 47 | 48 | // Create or delete the "run on startup" batch file depending on the value in the settings file. 49 | if (settingsMgr.getIniRunOnStartup()) { 50 | runOnStartupManager.addToStartup(); 51 | } else { 52 | runOnStartupManager.removeFromStartup(); 53 | } 54 | 55 | // Start Display Hot Keys on the AWT event dispatch thread. 56 | SwingUtilities.invokeLater(new Runnable() { 57 | @Override 58 | public void run() { 59 | initDhk(settingsMgr); 60 | } 61 | }); 62 | } 63 | 64 | /** 65 | * This method initializes the model, view, and controller for this application. 66 | * 67 | * @param settingsMgr - The settings file manager that retrieves the saved configuration for this application. 68 | */ 69 | private static void initDhk(SettingsManager settingsMgr) { 70 | // Initialize the Display Hot Keys MVC modules. 71 | DhkModel model = new DhkModel(); 72 | DhkView view = new DhkView(model); 73 | DhkController controller = new DhkController(model, view, settingsMgr); 74 | 75 | // Initialize the main controller and all sub-controllers. 76 | controller.initController(); 77 | controller.initListeners(); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/com/dhk/models/Display.java: -------------------------------------------------------------------------------- 1 | package com.dhk.models; 2 | 3 | import java.util.ArrayList; 4 | 5 | /** 6 | * This class defines the model for a Display. The id, active number of hot key slots, orientation mode, and array list 7 | * of hot key slots are initialized here. 8 | * 9 | * @author Jonathan Miller 10 | * @version 1.4.0 11 | * 12 | * @license The MIT License 13 | * @copyright Jonathan Miller 2024 14 | */ 15 | public class Display { 16 | private String id; 17 | private int numOfActiveSlots; 18 | private int orientationMode; 19 | private ArrayList slots; 20 | 21 | /** 22 | * Constructor for the Display class. 23 | * 24 | * @param id - The ID of the display. 25 | * @param numOfActiveSlots - The number of active hot key slots for the display. 26 | * @param orientationMode - The orientation mode for the display. 27 | * @param slots - The array of active hot key slots for the display. 28 | */ 29 | public Display(String id, int numOfActiveSlots, int orientationMode, ArrayList slots) { 30 | // Initialize fields. 31 | this.id = id; 32 | this.numOfActiveSlots = numOfActiveSlots; 33 | this.orientationMode = orientationMode; 34 | this.slots = slots; 35 | } 36 | 37 | /** 38 | * Getter for the ID of the display. 39 | * 40 | * @return The ID of the display. 41 | */ 42 | public String getId() { 43 | return id; 44 | } 45 | 46 | /** 47 | * Getter for the number of active hot key slots for the display. 48 | * 49 | * @return The number of active hot key slots for the display. 50 | */ 51 | public int getNumOfActiveSlots() { 52 | return numOfActiveSlots; 53 | } 54 | 55 | /** 56 | * Setter for the number of active hot key slots for the display. 57 | * 58 | * @param numOfActiveSlots - The number of active hot key slots for the display. 59 | */ 60 | public void setNumOfActiveSlots(int numOfActiveSlots) { 61 | this.numOfActiveSlots = numOfActiveSlots; 62 | } 63 | 64 | /** 65 | * Getter for the orientation mode for the display. 66 | * 67 | * @return The orientation mode for the display. 68 | */ 69 | public int getOrientationMode() { 70 | return orientationMode; 71 | } 72 | 73 | /** 74 | * Setter for the orientation mode for the display. 75 | * 76 | * @param orientationMode - The orientation mode for the display. 77 | */ 78 | public void setOrientationMode(int orientationMode) { 79 | this.orientationMode = orientationMode; 80 | } 81 | 82 | /** 83 | * Getter for a requested active hot key slot for the display. 84 | * 85 | * @param slotIndex - The index of the active hot key slot to get. 86 | * @return The requested active hot key slot for the display. 87 | */ 88 | public Slot getSlot(int slotIndex) { 89 | return slots.get(slotIndex); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /src/com/dhk/models/Key.java: -------------------------------------------------------------------------------- 1 | package com.dhk.models; 2 | 3 | /** 4 | * This class represents the model for a Key. The key code, name, and pressed state of the Key is defined here. 5 | * 6 | * @author Jonathan Miller 7 | * @version 1.4.0 8 | * 9 | * @license The MIT License 10 | * @copyright Jonathan Miller 2024 11 | */ 12 | public class Key { 13 | private int key; 14 | private String name; 15 | private boolean keyPressed; 16 | 17 | /** 18 | * Constructor for the Key class. 19 | * 20 | * @param key - The native key even key code for the key. 21 | * @param name - The name for the key. 22 | * @param keyPressed - Whether or not the key is pressed down or not. 23 | */ 24 | public Key(int key, String name, boolean keyPressed) { 25 | // Initialize fields. 26 | this.key = key; 27 | this.name = name; 28 | this.keyPressed = false; 29 | } 30 | 31 | @Override 32 | public boolean equals(Object object) { 33 | // If the object is compared with itself, return true. 34 | if (object == this) { 35 | return true; 36 | } 37 | 38 | // If the object is not an instance of Key, return false. 39 | if (!(object instanceof Key)) { 40 | return false; 41 | } 42 | 43 | // Typecast the object to Key so that the data members can be compared. 44 | Key keyToCompare = (Key) object; 45 | 46 | // Compare the data members and return accordingly 47 | return key == keyToCompare.getKey(); 48 | } 49 | 50 | @Override 51 | public int hashCode() { 52 | return hash(this.key); 53 | } 54 | 55 | /** 56 | * This function hashes on the key's key code and returns the result. 57 | * 58 | * @param key - The key code for the key. 59 | * @return The hashed result. 60 | */ 61 | private int hash(int key) { 62 | key = ((key >>> 16) ^ key) * 0x45d9f3b; 63 | key = ((key >>> 16) ^ key) * 0x45d9f3b; 64 | key = (key >>> 16) ^ key; 65 | return key; 66 | } 67 | 68 | // ----------------------------------------------------------------------------------------------------------------- 69 | // Getters and Setters 70 | // ----------------------------------------------------------------------------------------------------------------- 71 | 72 | /** 73 | * Getter for the key's key code. 74 | * 75 | * @return The key code for the key. 76 | */ 77 | public int getKey() { 78 | return key; 79 | } 80 | 81 | /** 82 | * Getter for the key's name. 83 | * 84 | * @return The name for the key. 85 | */ 86 | public String getName() { 87 | return name; 88 | } 89 | 90 | /** 91 | * Getter for the "pressed" state of the key. 92 | * 93 | * @return Whether or not the key is pressed. 94 | */ 95 | public boolean isKeyPressed() { 96 | return keyPressed; 97 | } 98 | 99 | /** 100 | * Setter for the "pressed" state of the key. 101 | * 102 | * @param keyPressed - The new "pressed" state of the key. 103 | */ 104 | public void setKeyPressed(boolean keyPressed) { 105 | this.keyPressed = keyPressed; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/com/dhk/ui/ButtonThemesUpdater.java: -------------------------------------------------------------------------------- 1 | package com.dhk.ui; 2 | 3 | import com.dhk.models.DhkModel; 4 | 5 | /** 6 | * This class sets the theme for all of the themeable buttons in the view. It aids in setting the theme of the 7 | * application. 8 | * 9 | * @author Jonathan Miller 10 | * @version 1.4.0 11 | * 12 | * @license The MIT License 13 | * @copyright Jonathan Miller 2024 14 | */ 15 | public class ButtonThemesUpdater { 16 | private DhkModel model; 17 | private DhkView view; 18 | 19 | /** 20 | * Constructor for the ButtonThemesUpdater class. 21 | * 22 | * @param model - The model for the application. 23 | * @param view - The view for the application. 24 | */ 25 | public ButtonThemesUpdater(DhkModel model, DhkView view) { 26 | // Get the application's model and view. 27 | this.model = model; 28 | this.view = view; 29 | } 30 | 31 | /** 32 | * This method applies the current theme to all of the idle themeable buttons in the view. 33 | */ 34 | public void updateIdleButtonThemes() { 35 | // If the UI is in dark mode... 36 | if (model.isDarkMode()) { 37 | // Change the paypal donate button to the dark idle icon. 38 | view.getPaypalDonateButton().setIcon(view.getPaypalDonateButton().getPaypalDonateDarkIdleIcon()); 39 | } 40 | // Otherwise, if the UI is in light mode... 41 | else { 42 | // Change the paypal donate button to the light idle icon. 43 | view.getPaypalDonateButton().setIcon(view.getPaypalDonateButton().getPaypalDonateLightIdleIcon()); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/com/dhk/ui/FlatDarculaLaf.properties: -------------------------------------------------------------------------------- 1 | # Change the default font. 2 | defaultFont = 14 "Roboto" 3 | 4 | # Round the corners of the view components. 5 | Component.arc = 12 6 | Button.arc = 12 7 | ScrollBar.thumbArc = 6 8 | 9 | # Customize the scrollbar. 10 | ScrollBar.width = 16 11 | ScrollBar.thumbInsets = 2,2,2,2 12 | 13 | # Change scrollbar colors. 14 | ScrollBar.track = #3e4244 15 | ScrollBar.pressedTrackColor = #3e4244 16 | 17 | # Disable scrollbar hover color change. 18 | ScrollBar.hoverTrackColor = 19 | 20 | # Change the background color. 21 | Panel.background = #3d4042 22 | PopupMenu.background = #3d4042 23 | 24 | # Show the button background for the combo boxes. 25 | ComboBox.buttonStyle = button 26 | 27 | # Change the arrow colors for combo boxes. 28 | ComboBox.buttonHoverArrowColor = #bcbcbc 29 | ComboBox.buttonPressedArrowColor = #d6d6d6 30 | 31 | # Change combo box background colors. 32 | ComboBox.background = #4e5052 33 | ComboBox.popupBackground = #4e5052 34 | ComboBox.editableBackground = #4e5052 35 | ComboBox.focusedBackground = #4e5052 36 | ComboBox.buttonBackground = #4e5052 37 | ComboBox.buttonEditableBackground = #4e5052 38 | ComboBox.buttonFocusedBackground = #4e5052 39 | ComboBox.selectionBackground = #4b6eaf 40 | -------------------------------------------------------------------------------- /src/com/dhk/ui/FlatIntelliJLaf.properties: -------------------------------------------------------------------------------- 1 | # Change the default font. 2 | defaultFont = 14 "Roboto" 3 | 4 | # Round the corners of the view components. 5 | Component.arc = 12 6 | Button.arc = 12 7 | ScrollBar.thumbArc = 6 8 | 9 | # Show the button background for the combo boxes. 10 | ComboBox.buttonStyle = button 11 | 12 | # Customize the scrollbar. 13 | ScrollBar.width = 16 14 | ScrollBar.thumbInsets = 2,2,2,2 15 | 16 | # Change scrollbar colors. 17 | ScrollBar.track = #f2f2f2 18 | ScrollBar.pressedTrackColor = #f2f2f2 19 | 20 | # Disable scrollbar hover color change. 21 | ScrollBar.hoverTrackColor = 22 | 23 | # Change combo box background colors. 24 | ComboBox.background = #ffffff 25 | ComboBox.popupBackground = #ffffff 26 | ComboBox.editableBackground = #ffffff 27 | ComboBox.focusedBackground = #ffffff 28 | ComboBox.buttonBackground = #ffffff 29 | ComboBox.buttonEditableBackground = #ffffff 30 | ComboBox.buttonFocusedBackground = #ffffff -------------------------------------------------------------------------------- /src/com/dhk/ui/ThemeUpdater.java: -------------------------------------------------------------------------------- 1 | package com.dhk.ui; 2 | 3 | import com.formdev.flatlaf.FlatDarculaLaf; 4 | import com.formdev.flatlaf.FlatIntelliJLaf; 5 | import com.formdev.flatlaf.FlatLaf; 6 | import com.formdev.flatlaf.extras.FlatAnimatedLafChange; 7 | import com.formdev.flatlaf.fonts.roboto.FlatRobotoFont; 8 | 9 | /** 10 | * This class sets the theme for the application. It allows the theme of the application to be switched between Light 11 | * and Dark themes. 12 | * 13 | * @author Jonathan Miller 14 | * @version 1.4.0 15 | * 16 | * @license The MIT License 17 | * @copyright Jonathan Miller 2024 18 | */ 19 | public class ThemeUpdater { 20 | 21 | /** 22 | * Constructor for the ThemeUpdater class. 23 | */ 24 | public ThemeUpdater() { 25 | // Install the Roboto font family. 26 | FlatRobotoFont.install(); 27 | 28 | // Enable the Roboto font family. 29 | FlatLaf.setPreferredFontFamily(FlatRobotoFont.FAMILY); 30 | 31 | // Load the FlatLaf properties files. 32 | FlatLaf.registerCustomDefaultsSource("com.dhk.ui"); 33 | } 34 | 35 | /** 36 | * This method updates the "look and feel" of the app. 37 | * 38 | * @param darkMode - Whether or not the dark mode "look and feel" should be applied or not. 39 | */ 40 | public void useDarkMode(boolean darkMode) { 41 | // If the user selects dark mode... 42 | if (darkMode) { 43 | // Set the snapshot that will fade to the new UI. 44 | FlatAnimatedLafChange.showSnapshot(); 45 | 46 | // Apply the dark "look and feel" for the GUI. 47 | FlatDarculaLaf.setup(); 48 | 49 | // Update the UI after changing the theme. 50 | FlatLaf.updateUI(); 51 | 52 | // Fade the snapshot of the old UI to the new UI. 53 | FlatAnimatedLafChange.hideSnapshotWithAnimation(); 54 | } else { 55 | // Set the snapshot that will fade to the new UI. 56 | FlatAnimatedLafChange.showSnapshot(); 57 | 58 | // Apply the light "look and feel" for the GUI. 59 | FlatIntelliJLaf.setup(); 60 | 61 | // Update the UI after changing the theme. 62 | FlatLaf.updateUI(); 63 | 64 | // Fade the snapshot of the old UI to the new UI. 65 | FlatAnimatedLafChange.hideSnapshotWithAnimation(); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/com/dhk/ui/buttons/ClearAllButton.java: -------------------------------------------------------------------------------- 1 | package com.dhk.ui.buttons; 2 | 3 | import java.awt.Dimension; 4 | import java.awt.Insets; 5 | import javax.swing.Icon; 6 | import javax.swing.JButton; 7 | import com.formdev.flatlaf.extras.FlatSVGIcon; 8 | 9 | /** 10 | * This class defines the Clear All button. The icons for the different states of the button are defined here. 11 | * 12 | * @author Jonathan Miller 13 | * @version 1.4.0 14 | * 15 | * @license The MIT License 16 | * @copyright Jonathan Miller 2024 17 | */ 18 | public class ClearAllButton extends JButton { 19 | private static final long serialVersionUID = 1L; 20 | private Icon clearAllIdleIcon; 21 | private Icon clearAllHoverIcon; 22 | private Icon clearAllPressedIcon; 23 | 24 | // Set a fixed size for the button icon. 25 | private final Dimension BUTTON_ICON_SIZE = new Dimension(44, 50); 26 | 27 | /** 28 | * Constructor for the ClearAllButton class. 29 | * 30 | * @param clearAllIdleIconPath - The resource path for the clear all button idle icon. 31 | * @param clearAllHoverIconPath - The resource path for the clear all button hover icon. 32 | */ 33 | public ClearAllButton(String clearAllIdleIconPath, String clearAllHoverIconPath) { 34 | // Initialize clear all button icons. 35 | clearAllIdleIcon = new FlatSVGIcon(getClass().getResource(clearAllIdleIconPath)).derive(0.80f); 36 | clearAllHoverIcon = new FlatSVGIcon(getClass().getResource(clearAllHoverIconPath)).derive(0.80f); 37 | clearAllPressedIcon = new FlatSVGIcon(getClass().getResource(clearAllHoverIconPath)).derive(0.68f); 38 | 39 | // Initialize the clear all button icon to idle icon. 40 | this.setIcon(clearAllIdleIcon); 41 | 42 | // Set the tooltip for the button. 43 | this.setToolTipText("Clear All Slots"); 44 | 45 | // Set the initial button size. 46 | this.setPreferredSize(BUTTON_ICON_SIZE); 47 | 48 | // Remove all input mapping from the button. 49 | this.getInputMap().clear(); 50 | 51 | // Only show the icon for the button. 52 | this.setBorderPainted(false); 53 | this.setContentAreaFilled(false); 54 | this.setFocusPainted(false); 55 | 56 | // Remove space around the icon. 57 | this.setMargin(new Insets(0, 0, 0, 0)); 58 | } 59 | 60 | // ----------------------------------------------------------------------------------------------------------------- 61 | // Getters and Setters 62 | // ----------------------------------------------------------------------------------------------------------------- 63 | 64 | /** 65 | * Getter for the clear all button icon when it is idle. 66 | * 67 | * @return The idle clear all button icon. 68 | */ 69 | public Icon getClearAllIdleIcon() { 70 | return clearAllIdleIcon; 71 | } 72 | 73 | /** 74 | * Getter for the clear all button icon when the cursor is over the button or the button is in focus. 75 | * 76 | * @return The clear all button hover icon. 77 | */ 78 | public Icon getClearAllHoverIcon() { 79 | return clearAllHoverIcon; 80 | } 81 | 82 | /** 83 | * Getter for the clear all button icon when the button is held down. 84 | * 85 | * @return The pressed clear all button icon. 86 | */ 87 | public Icon getClearAllPressedIcon() { 88 | return clearAllPressedIcon; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/com/dhk/ui/buttons/ExitButton.java: -------------------------------------------------------------------------------- 1 | package com.dhk.ui.buttons; 2 | 3 | import java.awt.Dimension; 4 | import java.awt.Insets; 5 | import javax.swing.Icon; 6 | import javax.swing.JButton; 7 | import com.formdev.flatlaf.extras.FlatSVGIcon; 8 | 9 | /** 10 | * This class defines the Exit button. The icons for the different states of the button are defined here. 11 | * 12 | * @author Jonathan Miller 13 | * @version 1.4.0 14 | * 15 | * @license The MIT License 16 | * @copyright Jonathan Miller 2024 17 | */ 18 | public class ExitButton extends JButton { 19 | private static final long serialVersionUID = 1L; 20 | private Icon exitIdleIcon; 21 | private Icon exitHoverIcon; 22 | private Icon exitPressedIcon; 23 | 24 | // Set a fixed size for the button icon. 25 | private final Dimension BUTTON_ICON_SIZE = new Dimension(34, 50); 26 | 27 | /** 28 | * Constructor for the ExitButton class. 29 | * 30 | * @param exitIdleIconPath - The resource path for the exit button idle icon. 31 | * @param exitHoverIconPath - The resource path for the exit button hover icon. 32 | */ 33 | public ExitButton(String exitIdleIconPath, String exitHoverIconPath) { 34 | // Initialize exit button icons. 35 | exitIdleIcon = new FlatSVGIcon(getClass().getResource(exitIdleIconPath)).derive(0.80f); 36 | exitHoverIcon = new FlatSVGIcon(getClass().getResource(exitHoverIconPath)).derive(0.80f); 37 | exitPressedIcon = new FlatSVGIcon(getClass().getResource(exitHoverIconPath)).derive(0.68f); 38 | 39 | // Initialize the exit button icon to the idle icon. 40 | this.setIcon(exitIdleIcon); 41 | 42 | // Set the tooltip for the button. 43 | this.setToolTipText("Exit App"); 44 | 45 | // Set the initial button size. 46 | this.setPreferredSize(BUTTON_ICON_SIZE); 47 | 48 | // Remove all input mapping from the button. 49 | this.getInputMap().clear(); 50 | 51 | // Only show the icon for the button. 52 | this.setBorderPainted(false); 53 | this.setContentAreaFilled(false); 54 | this.setFocusPainted(false); 55 | 56 | // Remove space around the icon. 57 | this.setMargin(new Insets(0, 0, 0, 0)); 58 | } 59 | 60 | // ----------------------------------------------------------------------------------------------------------------- 61 | // Getters and Setters 62 | // ----------------------------------------------------------------------------------------------------------------- 63 | 64 | /** 65 | * Getter for the exit button icon when it is idle. 66 | * 67 | * @return The idle exit button icon. 68 | */ 69 | public Icon getExitIdleIcon() { 70 | return exitIdleIcon; 71 | } 72 | 73 | /** 74 | * Getter for the exit button icon when the cursor is over the button or the button is in focus. 75 | * 76 | * @return The exit button hover icon. 77 | */ 78 | public Icon getExitHoverIcon() { 79 | return exitHoverIcon; 80 | } 81 | 82 | /** 83 | * Getter for the exit button icon when the button is held down. 84 | * 85 | * @return The pressed exit button icon. 86 | */ 87 | public Icon getExitPressedIcon() { 88 | return exitPressedIcon; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /src/com/dhk/utility/DisplayModeInverter.java: -------------------------------------------------------------------------------- 1 | package com.dhk.utility; 2 | 3 | import java.awt.DisplayMode; 4 | 5 | /** 6 | * This class inverts a given display mode by swapping the width and height of the resolution. 7 | * 8 | * @author Jonathan Miller 9 | * @version 1.4.0 10 | * 11 | * @license The MIT License 12 | * @copyright Jonathan Miller 2024 13 | */ 14 | public class DisplayModeInverter { 15 | 16 | /** 17 | * Default constructor for the DisplayModeInverter class. 18 | */ 19 | public DisplayModeInverter() { 20 | } 21 | 22 | /** 23 | * Swap the width and height of the given display mode. 24 | * 25 | * @param displayMode - The display mode to invert. 26 | * @return The inverted display mode. 27 | */ 28 | public DisplayMode invert(DisplayMode displayMode) { 29 | int width = displayMode.getWidth(); 30 | int height = displayMode.getHeight(); 31 | int bitDepth = displayMode.getBitDepth(); 32 | int refreshRate = displayMode.getRefreshRate(); 33 | 34 | DisplayMode invertedDisplayMode = new DisplayMode(height, width, bitDepth, refreshRate); 35 | 36 | return invertedDisplayMode; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/com/dhk/window/FrameUpdater.java: -------------------------------------------------------------------------------- 1 | package com.dhk.window; 2 | 3 | import javax.swing.JFrame; 4 | import javax.swing.JPanel; 5 | import javax.swing.SwingUtilities; 6 | import com.dhk.ui.DhkView; 7 | 8 | /** 9 | * This class updates the view for Display Hot Keys. The frame components and UI are updated with this class. 10 | * 11 | * @author Jonathan Miller 12 | * @version 1.4.0 13 | * 14 | * @license The MIT License 15 | * @copyright Jonathan Miller 2024 16 | */ 17 | public class FrameUpdater { 18 | private JFrame frame; 19 | private JPanel mainPanel; 20 | 21 | /** 22 | * Constructor for the FrameUpdater class. 23 | * 24 | * @param view - The view for the application. 25 | */ 26 | public FrameUpdater(DhkView view) { 27 | // Get the application view's frame and main panel. 28 | this.frame = view.getFrame(); 29 | this.mainPanel = view.getMainPanel(); 30 | } 31 | 32 | /** 33 | * This method updates the frame components. 34 | */ 35 | public void update() { 36 | // Revalidate the main panel components. 37 | mainPanel.revalidate(); 38 | 39 | // Pack the panel components into the frame and automatically size the window. 40 | frame.pack(); 41 | 42 | // Repaint the frame. 43 | frame.repaint(); 44 | } 45 | 46 | /** 47 | * This method updates the UI for each component in the frame. 48 | */ 49 | public void updateUI() { 50 | // Update the UI for each component in the frame. 51 | SwingUtilities.updateComponentTreeUI(frame); 52 | 53 | // Update the frame components. 54 | update(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/dark_mode_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /src/dark_mode_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /src/exit_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /src/exit_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /src/minimize_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /src/minimize_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /src/refresh_app_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /src/refresh_app_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /src/run_on_startup_disabled_dark_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /src/run_on_startup_disabled_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /src/run_on_startup_disabled_light_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /src/run_on_startup_enabled_dark_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /src/run_on_startup_enabled_idle.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /src/run_on_startup_enabled_light_hover.svg: -------------------------------------------------------------------------------- 1 | 2 | 10 | 12 | 16 | 20 | 21 | -------------------------------------------------------------------------------- /src/tray_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jon-mil-92/DisplayHotKeys/e18608c731bd4c88fd8b9fc5f9e5349a8c4d244d/src/tray_icon.png --------------------------------------------------------------------------------