Commit Graph

211 Commits

Author SHA1 Message Date
nathan
b1d4fba159 Moved Hash specific methods from Sys -> HashUtil 2017-07-29 22:20:58 +02:00
nathan
47e73efb52 ByteArrayWrapper.wrap(String) no longer uses SHA256 hash of string, it
uses the UTF8 bytes of the string directly.
2017-07-29 22:17:21 +02:00
nathan
b129364ee0 FileNormalization will return absolute file. 2017-07-29 21:42:37 +02:00
nathan
88312df832 ActiveRenderLoop (for Swing) now accepts Window (instead of just JFrame) 2017-07-28 22:08:18 +02:00
nathan
a1d3b672b0 Moved screen util methods out of swingutil 2017-07-27 23:18:20 +02:00
nathan
c41e05be63 Added getFontWidth 2017-07-27 22:09:57 +02:00
nathan
43dab244a6 Formatting/Comment/Code polish 2017-07-27 22:09:36 +02:00
nathan
b73fef825d Added GTK widget tooltip support. 2017-07-24 14:31:40 +02:00
nathan
e191faa3b8 Cleaned up how errors are thrown for GTK libraries. 2017-07-24 14:30:42 +02:00
nathan
ab8e7e5a79 Added ChromeOS detection 2017-07-23 14:16:41 +02:00
nathan
adbd14eaee Refactored OsType -> OSType 2017-07-23 11:30:52 +02:00
nathan
96724bb0e9 Refactored checking for which GTK version is loaded. The logic has been
simplified.
2017-07-23 11:24:09 +02:00
nathan
b2635cfa8c Removed Gtk import 2017-07-22 13:00:52 +02:00
nathan
be6cf84c37 Moved classes Utilities project to internal Utilities, as they
depended on github projects. The public utilities should not
have any dorkbox dependencies.
2017-07-22 12:22:17 +02:00
nathan
78efb022d9 Removed MathUtil dependency from Version, it was unnecessary 2017-07-22 02:25:50 +02:00
nathan
bf59e5a87c Changed fields to protected scope to permit overriding functionality 2017-07-20 23:57:06 +02:00
nathan
9bb3fa0db8 Added getting version/beta/build info from a version. Code polish. 2017-07-19 01:53:18 +02:00
nathan
a3f24a3d35 Added Version copy constructor, added creating a new version via a
double.
2017-07-19 01:42:06 +02:00
nathan
8d7d35182a Added preferGtk3 to GTK loading. Fail loading GTK if GTK2 is forced, and
GTK2 cannot load. Code polish.
2017-07-19 00:50:42 +02:00
nathan
1abe7b60ab Added exception to GTK load ordering for Kali (it has rendering issues
with GTK3. GTK2 looks just fine)
2017-07-18 16:40:15 +02:00
nathan
c84f6e02cb Added GTK detection to SwingUtil (specific for checking if Swing has
already loaded GTK)
2017-07-18 16:36:46 +02:00
nathan
c8f2bef1d9 Added isNumber for characters 2017-07-18 16:34:06 +02:00
nathan
740087f2cf Code polish, added Shell convenience method 2017-07-18 02:25:10 +02:00
nathan
3ab5076d9b Cache getInfo for linux/unix 2017-07-18 02:20:08 +02:00
nathan
a5d7a7293e Now support GTK3 versions less than 3.10 (3.4 was tested, as released on
Ubuntu 12.04). Make sure not to touch Gtk interface while loading Gtk
2017-07-17 01:41:53 +02:00
nathan
bb15ca12a8 Added version utility class to manage comparing versions. X.X
.X-BETA-hash is the max supported
2017-07-17 00:34:36 +02:00
nathan
4f20a7524b Code polish 2017-07-16 10:42:28 +02:00
nathan
b2acabef58 Code polish 2017-07-16 02:17:40 +02:00
nathan
ebf482086d Made public so build can pickup class 2017-07-16 02:15:12 +02:00
nathan
0ecc75aa7d Updated Desktop utility class to use JNA native access for
browseURL/email/browseDirectory methods. This also fixed issues where
xdg-open could cause strange problems with Chrome on Linux (but not as
the default browser).
2017-07-16 02:08:15 +02:00
nathan
dd7892483e Added gtk_show_uri 2017-07-16 01:43:52 +02:00
nathan
2c31963337 Code polish for the shell executors 2017-07-16 01:43:34 +02:00
nathan
ec0772a9b0 Added Async Shell Executor 2017-07-16 01:41:20 +02:00
nathan
79c41e2a95 Fixed issues where the shell executor could hang 2017-07-16 01:40:58 +02:00
nathan
2ca0b14164 Added Desktop Utility functions, similar to java.awt.Desktop with cases
built-in for Linux/Unix when GTK3 is loaded (and thus, java.awt.Desktop
is not supported). Code derivative from QZTray, which was released
exclusively as Apache 2.0 for this purpose.
2017-07-16 00:16:51 +02:00
nathan
e588ed19c1 ShellProcessBuilder -> ShellExecutor. Static method to simplify shell
execution added. Added ability to pass in environment variables to new
process. Added better detection for current shell in linux/unix (could
be improved...). Added flag for executing process as a shell command.
Output now defaults to en-US.UTF_8
2017-07-15 23:55:36 +02:00
nathan
1554077d27 Renamed JavaProcessBuilder -> JvmExecutor 2017-07-15 23:53:51 +02:00
nathan
38a6899049 ShellProcessBuilder -> ShellExecutor. Static method to simplify shell
execution added. Added ability to pass in environment variables to new
process. Added better detection for current shell in linux/unix (could
be improved...). Added flag for executing process as a shell command.
Output now defaults to en-US.UTF_8
2017-07-15 23:53:31 +02:00
nathan
cf0f04d6a7 Code polish. Thread.notify -> notifyAll 2017-07-15 23:49:00 +02:00
nathan
e8c42ae48d Fixed log message logger 2017-07-15 18:37:47 +02:00
nathan
f143dff1fd Added isGtk2, isGtk3, and isGtkLoaded to OSUtil.DesktopEnv, so that one
can query to see GTK status without loading GTK.
2017-07-15 18:37:03 +02:00
nathan
92c0a7f42a Fixed log message logger 2017-07-15 18:36:00 +02:00
nathan
e0e7bb61f5 Moved Classloader utility methods into their own class. 2017-07-15 18:25:10 +02:00
nathan
67cf2745d2 Code polish 2017-07-15 18:24:39 +02:00
nathan
8ed1e0d3b0 Polished JavaFX and SWT dispatch access to remove hard dependency on
JavaFX and SWT. Now uses JNA to create the classes for SWT access + a
mix of reflection. JavaFX uses reflection.
2017-07-15 18:15:19 +02:00
nathan
cdc2bbd2cf (reverted) Changed Util class names 2017-07-15 18:10:14 +02:00
nathan
4ecafbf50c Removed unnecessary SWT specific code 2017-07-14 18:46:19 +02:00
nathan
7c528918f5 Moved framework (javafx/swt/etc) stuff into it's own class 2017-07-14 18:45:46 +02:00
nathan
d79a5c6ad7 Changed Util class names 2017-07-14 18:45:07 +02:00
nathan
186394a3fc Moved browse() into framework 2017-07-14 18:44:37 +02:00
nathan
bf5142919d Moved JNA to Utility module for use by other applications. 2017-07-14 18:37:46 +02:00
nathan
8cbc753baa Windows JNA now uses JnaHelper 2017-07-14 01:31:37 +02:00
nathan
713837cf4c Code polish for accessing User32 2017-07-14 00:58:28 +02:00
nathan
409d6d0931 Added Unity7 (ubuntu 17.04) desktop env. 2017-07-13 22:42:14 +02:00
nathan
5a4626c678 Dead code cleanup 2017-07-12 02:24:55 +02:00
nathan
3c2e06fdb1 Moved Windows10 check to OSUtil.Windows 2017-07-12 02:02:38 +02:00
nathan
04d40a67b5 Code cleanup 2017-07-12 02:01:58 +02:00
nathan
e4600da849 Removed no longer needed classes 2017-07-12 01:46:23 +02:00
nathan
3929df3380 Code polish 2017-07-12 01:30:16 +02:00
nathan
91e9f28944 Consolidated JNA from Console project into the Utils project 2017-07-11 22:32:26 +02:00
nathan
73163b769e Added isDefaultLookAndFeel() 2017-07-11 14:14:59 +02:00
nathan
247827ec75 Added version check for windows 10+ 2017-07-11 14:14:43 +02:00
nathan
97aee006a1 Code polish. Added getting a buffered image from an icon 2017-07-11 02:03:53 +02:00
nathan
4c4e133ea1 Code polish 2017-07-11 02:03:30 +02:00
nathan
7bb3a54a08 Moved Windows JNA to Utils 2017-07-11 01:56:50 +02:00
nathan
ec1cda690e Added readLines(File) 2017-07-09 01:39:35 +02:00
nathan
bd09906c89 Added ProcessDpiAwareness "enum" class 2017-07-09 01:39:15 +02:00
nathan
48e3f0d784 CacheUtil throws IOExceptions now if there were issues reading file
info (that is to be cached)
2017-07-09 00:01:15 +02:00
nathan
f464b871a2 Changed createTransparentImage -> createImage. If a null color is used,
it will be transparent
2017-07-08 23:58:08 +02:00
nathan
69b88053e4 Code polish 2017-07-08 23:57:06 +02:00
nathan
1dca0e63dc Added stripTrainingNonDigits to MathUtil. 2017-07-04 19:10:04 +02:00
nathan
1f3bbcf76b Fixed issues with sizing images where the width > height. 2017-07-01 21:34:19 +02:00
nathan
4aee1fd6f5 getLargestIconHeightForButton now saves the original icon + text, then
restores those values once done calculating the height
2017-07-01 20:37:11 +02:00
nathan
46ae5cbc78 Formatting, code polish 2017-07-01 14:37:41 +02:00
nathan
01e5eab0ca Added more accurate font height utility methods. Moved font utility
methods into FontUtil class.
2017-06-30 22:27:44 +02:00
nathan
61f4f5a4de Formatting 2017-06-27 00:13:08 +02:00
nathan
083aab845a Added TEMP_DIR to OS. Code polish. 2017-06-26 14:05:31 +02:00
nathan
66dc5447a0 Added XFCE query commands 2017-06-25 23:52:28 +02:00
nathan
6f5bb6d3f9 Code polish/cleanup. Added isWindows8_1_plus() cache various variables
now (which are expensive to compute).
2017-06-15 14:09:35 +02:00
nathan
c8d5cd23c7 Added setting the look and feel VIA class (instead of just by name...) 2017-06-15 11:51:15 +02:00
nathan
d996fd5c76 Code polish 2017-05-29 20:45:34 +02:00
nathan
b8e4f2353e Added ability for FileUtil.read() to pass in a string builder, instead
of dealing only with strings. Removed line.trim() and isEmpty() checks,
 since the objective of these methods are to convert a file to a string.
  Nothing else.
2017-05-29 13:51:41 +02:00
nathan
1c1b6b3dc0 Updated FileUtil.read() method 2017-05-28 01:10:09 +02:00
nathan
8ad232decd Added comments about how the getSystemLookAndFeelClassName on linux will
cause GTK2 to be loaded (can conflict with GTK3)
2017-05-14 17:34:01 +02:00
nathan
bec29c4cd3 Added image utilities 2017-05-10 15:20:59 +02:00
nathan
8a529731b7 Added windows JNA util classes 2017-05-10 15:20:29 +02:00
nathan
fe9c43c02b Added getting font height utils to SwingUtil 2017-03-10 17:03:52 +01:00
nathan
311fad500d Formatting 2017-03-10 17:02:54 +01:00
nathan
ef0cfe2f2e Moved Random utils into their own class 2017-03-10 17:02:23 +01:00
nathan
36f6000b42 Split out random utils into their own class, added number checks 2017-03-10 15:54:22 +01:00
nathan
d3a95fa6ef Added isEven to MathUtil 2017-02-27 13:01:07 +01:00
nathan
b336b92be1 Now use version property instead of CLI parsing 2017-02-27 12:55:26 +01:00
nathan
cb67faf901 updated comments 2017-02-26 23:43:24 +01:00
nathan
d3bc40081d Added more font glyphs to font size detection. Added error when L&F
cannot be loaded.
2017-02-26 11:54:52 +01:00
nathan
d6885798c5 Cannot do things in during static initialization that depends on
static fields. Moved logic to methods.
2017-02-26 00:07:45 +01:00
nathan
896744ae1e Cleaned up/simplified setting the L&F for swing 2017-02-25 23:37:50 +01:00
nathan
30f3f3a3fd Added more specific windows OS detection methods (ie,
ieWindowsXP/Vista/7/8/8.1/10)
2017-02-25 14:05:57 +01:00
nathan
c03a8f0b71 Moved swing font util method into utils class 2017-02-23 01:31:33 +01:00
nathan
e9585ce5b7 Updated storage to throw IOException when there is a problem
deserializing the data from disk
2017-02-18 23:58:08 +01:00
nathan
b6272112e8 Added comments, renamed to StorageSystem 2017-02-18 14:42:34 +01:00
nathan
f5ae7fb32d Fixed logging, so errors still output if no logger is set. 2017-02-18 14:30:08 +01:00
nathan
5c3578ee03 Moved DeafultUI implementations to Utils 2017-02-17 16:25:38 +01:00
nathan
7627f487d4 Can now specify the logger to use for Disk Storage. 2017-02-16 12:09:46 +01:00
nathan
001e84b073 Added File serialization 2017-02-16 11:49:36 +01:00
nathan
8d84ff1b44 Cleaned FileUtil 2017-02-16 00:01:50 +01:00
nathan
897c4a83cb Cleaned up sync issues with Swing Active Rendering 2017-02-16 00:00:55 +01:00
nathan
d041655c6d Changed Store -> StorageType to make more sense. 2017-02-12 23:22:58 +01:00
nathan
92adb94e51 Added file(String) to storage 2017-02-12 22:49:26 +01:00
nathan
6589d6f95b Updated refactored Normalize for strings (not to be confused with
NormalizeRaw)
2017-02-12 22:49:09 +01:00
nathan
a7548cad84 Merged utilities from common + bootstrap into single project. 2017-02-10 13:59:05 +01:00
nathan
e67a8556e9 Cleaned up Utilities 2017-02-10 11:17:13 +01:00