From fe7389a146fa7b557711bf5d8447e43e24f22614 Mon Sep 17 00:00:00 2001 From: coalado Date: Fri, 12 Feb 2016 16:07:18 +0000 Subject: [PATCH] git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@32820 ebf7c1c2-ba36-0410-9fe8-c592906822b4 Former-commit-id: ffc006a4419d985dd571cdc7a380274206f12b3a --- .classpath | 160 +++++++++--------- .../editdialog/ConditionDialog.java | 76 ++++----- .../PackagizerFilterRuleDialog.java | 16 +- src/org/jdownloader/controlling/Priority.java | 2 +- .../contextmenu/gui/InfoPanel.java | 75 ++++---- .../contextmenu/gui/NewSubMenuDialog.java | 82 +++++---- .../context/AbstractPriorityActionEntry.java | 24 +-- .../gui/views/downloads/DownloadsPanel.java | 26 +++ .../AbstractNodePropertiesPanel.java | 2 +- .../table/HorizontalScrollbarAction.java | 26 +-- .../addlinksdialog/AddLinksDialog.java | 32 ++-- .../jdownloader/iconsetter/IconResource.java | 79 +++++++-- .../jdownloader/iconsetter/IconSetMaker.java | 35 ++-- .../iconsetter/gui/Icon8Resource.java | 91 ++++++++++ .../iconsetter/gui/IconSetterGui.java | 19 ++- .../jdownloader/iconsetter/gui/SetTable.java | 76 ++++++++- .../iconsetter/gui/SetTableModel.java | 77 ++++++++- .../iconsetter/gui/icon8/Icon8Dialog.java | 112 +++++++++--- .../iconsetter/gui/icon8/Icon8TableModel.java | 23 +++ .../iconsetter/gui/icon8/Style.java | 4 +- .../jdownloader/updatev2/gui/LAFOptions.java | 1 + .../flat/org/jdownloader/images/about.svg | 7 + .../org/jdownloader/images/about.svg.icons8 | 2 + .../flat/org/jdownloader/images/add.svg | 7 + .../org/jdownloader/images/add.svg.icons8 | 2 + .../org/jdownloader/images/advancedConfig.svg | 9 + .../images/advancedConfig.svg.icons8 | 2 + .../flat/org/jdownloader/images/audio.svg | 3 + .../org/jdownloader/images/audio.svg.icons8 | 2 + .../org/jdownloader/images/auto-reconnect.svg | 62 +++++++ .../images/auto-reconnect.svg.icons8 | 2 + .../flat/org/jdownloader/images/backup.svg | 8 + .../org/jdownloader/images/backup.svg.icons8 | 2 + .../flat/org/jdownloader/images/bad.svg | 7 + .../org/jdownloader/images/bad.svg.icons8 | 2 + .../flat/org/jdownloader/images/basicauth.svg | 12 ++ .../jdownloader/images/basicauth.svg.icons8 | 2 + .../flat/org/jdownloader/images/batch.svg | 16 ++ .../org/jdownloader/images/batch.svg.icons8 | 2 + .../flat/org/jdownloader/images/bitcoin.svg | 10 ++ .../org/jdownloader/images/bitcoin.svg.icons8 | 2 + .../flat/org/jdownloader/images/board.svg | 12 ++ .../org/jdownloader/images/board.svg.icons8 | 2 + .../flat/org/jdownloader/images/bottombar.svg | 7 + .../jdownloader/images/bottombar.svg.icons8 | 2 + .../flat/org/jdownloader/images/box.svg | 9 + .../org/jdownloader/images/box.svg.icons8 | 2 + .../flat/org/jdownloader/images/browse.svg | 11 ++ .../org/jdownloader/images/browse.svg.icons8 | 2 + .../flat/org/jdownloader/images/bubble.svg | 3 + .../org/jdownloader/images/bubble.svg.icons8 | 2 + .../flat/org/jdownloader/images/bug.svg | 23 +++ .../org/jdownloader/images/bug.svg.icons8 | 2 + .../flat/org/jdownloader/images/buy.svg | 15 ++ .../org/jdownloader/images/buy.svg.icons8 | 2 + .../flat/org/jdownloader/images/cancel.svg | 62 +++++++ .../org/jdownloader/images/cancel.svg.icons8 | 2 + .../flat/org/jdownloader/images/changelog.svg | 22 +++ .../jdownloader/images/changelog.svg.icons8 | 2 + .../flat/org/jdownloader/images/chat.svg | 4 + .../org/jdownloader/images/chat.svg.icons8 | 2 + .../flat/org/jdownloader/images/chunks.svg | 10 ++ .../org/jdownloader/images/chunks.svg.icons8 | 2 + .../flat/org/jdownloader/images/clear.svg | 6 + .../org/jdownloader/images/clear.svg.icons8 | 2 + .../flat/org/jdownloader/images/clipboard.svg | 15 ++ .../jdownloader/images/clipboard.svg.icons8 | 2 + .../flat/org/jdownloader/images/close.on.svg | 56 ++++++ .../jdownloader/images/close.on.svg.icons8 | 2 + .../flat/org/jdownloader/images/close.svg | 56 ++++++ .../org/jdownloader/images/close.svg.icons8 | 2 + .../org/jdownloader/images/cloud_sync.svg | 16 ++ .../jdownloader/images/cloud_sync.svg.icons8 | 2 + .../flat/org/jdownloader/images/compress.svg | 15 ++ .../jdownloader/images/compress.svg.icons8 | 2 + .../org/jdownloader/images/confirmAll.svg | 54 ++++++ .../jdownloader/images/confirmAll.svg.icons8 | 2 + .../images/confirmSelectedLinks.svg | 59 +++++++ .../images/confirmSelectedLinks.svg.icons8 | 2 + .../flat/org/jdownloader/images/console.svg | 14 ++ .../org/jdownloader/images/console.svg.icons8 | 2 + .../org/jdownloader/images/contributer.svg | 20 +++ .../jdownloader/images/contributer.svg.icons8 | 2 + .../flat/org/jdownloader/images/copy.svg | 18 ++ .../org/jdownloader/images/copy.svg.icons8 | 2 + .../flat/org/jdownloader/images/cut.svg | 11 ++ .../org/jdownloader/images/cut.svg.icons8 | 2 + .../org/jdownloader/images/defaultProxy.svg | 7 + .../images/defaultProxy.svg.icons8 | 2 + .../flat/org/jdownloader/images/delete.svg | 7 + .../org/jdownloader/images/delete.svg.icons8 | 2 + .../flat/org/jdownloader/images/desktop.svg | 10 ++ .../org/jdownloader/images/desktop.svg.icons8 | 2 + .../org/jdownloader/images/dialog/cancel.svg | 62 +++++++ .../images/dialog/cancel.svg.icons8 | 2 + .../org/jdownloader/images/dialog/error.svg | 60 +++++++ .../images/dialog/error.svg.icons8 | 2 + .../org/jdownloader/images/dialog/find.svg | 22 +++ .../jdownloader/images/dialog/find.svg.icons8 | 2 + .../org/jdownloader/images/dialog/help.svg | 65 +++++++ .../jdownloader/images/dialog/help.svg.icons8 | 2 + .../org/jdownloader/images/dialog/info.svg | 60 +++++++ .../jdownloader/images/dialog/info.svg.icons8 | 2 + .../org/jdownloader/images/dialog/login.svg | 7 + .../images/dialog/login.svg.icons8 | 2 + .../org/jdownloader/images/dialog/warning.svg | 58 +++++++ .../images/dialog/warning.svg.icons8 | 2 + .../flat/org/jdownloader/images/dialogOCR.svg | 13 ++ .../jdownloader/images/dialogOCR.svg.icons8 | 2 + .../flat/org/jdownloader/images/document.svg | 12 ++ .../jdownloader/images/document.svg.icons8 | 2 + .../flat/org/jdownloader/images/download.svg | 9 + .../jdownloader/images/download.svg.icons8 | 2 + .../jdownloader/images/downloadmanagment.svg | 15 ++ .../images/downloadmanagment.svg.icons8 | 2 + .../jdownloader/images/downloadpassword.svg | 8 + .../images/downloadpassword.svg.icons8 | 2 + .../org/jdownloader/images/downloadpath.svg | 15 ++ .../images/downloadpath.svg.icons8 | 2 + .../flat/org/jdownloader/images/edit.svg | 7 + .../org/jdownloader/images/edit.svg.icons8 | 2 + .../flat/org/jdownloader/images/error.svg | 60 +++++++ .../org/jdownloader/images/error.svg.icons8 | 2 + .../flat/org/jdownloader/images/event.svg | 75 ++++++++ .../org/jdownloader/images/event.svg.icons8 | 2 + .../flat/org/jdownloader/images/exit.svg | 6 + .../org/jdownloader/images/exit.svg.icons8 | 2 + .../flat/org/jdownloader/images/export.svg | 7 + .../org/jdownloader/images/export.svg.icons8 | 2 + .../flat/org/jdownloader/images/extension.svg | 7 + .../jdownloader/images/extension.svg.icons8 | 2 + .../jdownloader/images/extensionmanager.svg | 79 +++++++++ .../images/extensionmanager.svg.icons8 | 2 + .../flat/org/jdownloader/images/extract.svg | 15 ++ .../org/jdownloader/images/extract.svg.icons8 | 2 + .../jdownloader/images/extraction_true.svg | 135 +++++++++++++++ .../images/extraction_true.svg.icons8 | 2 + .../images/extraction_true_failed.svg | 156 +++++++++++++++++ .../images/extraction_true_failed.svg.icons8 | 2 + .../images/exttable/columnButton.svg | 55 ++++++ .../images/exttable/columnButton.svg.icons8 | 2 + .../org/jdownloader/images/exttable/find.svg | 3 + .../images/exttable/find.svg.icons8 | 2 + .../jdownloader/images/exttable/findmenu.svg | 3 + .../images/exttable/findmenu.svg.icons8 | 2 + .../images/exttable/lockColumn.svg | 73 ++++++++ .../images/exttable/lockColumn.svg.icons8 | 2 + .../images/exttable/resetColumns.svg | 80 +++++++++ .../images/exttable/resetColumns.svg.icons8 | 2 + .../org/jdownloader/images/exttable/sort.svg | 3 + .../images/exttable/sort.svg.icons8 | 2 + .../jdownloader/images/exttable/sortAsc.svg | 57 +++++++ .../images/exttable/sortAsc.svg.icons8 | 2 + .../jdownloader/images/exttable/sortDesc.svg | 57 +++++++ .../images/exttable/sortDesc.svg.icons8 | 2 + .../images/exttable/widthLocked.svg | 63 +++++++ .../images/exttable/widthLocked.svg.icons8 | 2 + .../org/jdownloader/images/false-orange.svg | 60 +++++++ .../images/false-orange.svg.icons8 | 2 + .../flat/org/jdownloader/images/false.svg | 70 ++++++++ .../org/jdownloader/images/false.svg.icons8 | 2 + .../flat/org/jdownloader/images/file.svg | 6 + .../org/jdownloader/images/file.svg.icons8 | 2 + .../flat/org/jdownloader/images/fileIcon.svg | 6 + .../jdownloader/images/fileIcon.svg.icons8 | 2 + .../flat/org/jdownloader/images/filter.svg | 7 + .../org/jdownloader/images/filter.svg.icons8 | 2 + .../flat/org/jdownloader/images/find.svg | 22 +++ .../org/jdownloader/images/find.svg.icons8 | 2 + .../flat/org/jdownloader/images/flags/de.svg | 5 + .../jdownloader/images/flags/de.svg.icons8 | 2 + .../flat/org/jdownloader/images/flags/en.svg | 19 +++ .../jdownloader/images/flags/en.svg.icons8 | 2 + .../flat/org/jdownloader/images/folder.svg | 8 + .../org/jdownloader/images/folder.svg.icons8 | 2 + .../org/jdownloader/images/folder_add.svg | 13 ++ .../jdownloader/images/folder_add.svg.icons8 | 2 + .../org/jdownloader/images/folder_open.svg | 8 + .../jdownloader/images/folder_open.svg.icons8 | 2 + .../flat/org/jdownloader/images/go-bottom.svg | 6 + .../jdownloader/images/go-bottom.svg.icons8 | 2 + .../flat/org/jdownloader/images/go-down.svg | 3 + .../org/jdownloader/images/go-down.svg.icons8 | 2 + .../flat/org/jdownloader/images/go-next.svg | 3 + .../org/jdownloader/images/go-next.svg.icons8 | 2 + .../flat/org/jdownloader/images/go-top.svg | 6 + .../org/jdownloader/images/go-top.svg.icons8 | 2 + .../flat/org/jdownloader/images/go-up.svg | 3 + .../org/jdownloader/images/go-up.svg.icons8 | 2 + .../flat/org/jdownloader/images/gui.svg | 14 ++ .../org/jdownloader/images/gui.svg.icons8 | 2 + .../flat/org/jdownloader/images/import.svg | 7 + .../org/jdownloader/images/import.svg.icons8 | 2 + .../jdownloader/images/logo/myjdownloader.svg | 11 ++ .../images/logo/myjdownloader.svg.icons8 | 2 + .../images/media-playback-pause.svg | 6 + .../images/media-playback-pause.svg.icons8 | 2 + .../images/media-playback-start.svg | 3 + .../images/media-playback-start.svg.icons8 | 2 + .../images/media-playback-stop.svg | 3 + .../images/media-playback-stop.svg.icons8 | 2 + .../flat/org/jdownloader/images/premium.svg | 9 + .../org/jdownloader/images/premium.svg.icons8 | 2 + .../flat/org/jdownloader/images/reconnect.svg | 6 + .../jdownloader/images/reconnect.svg.icons8 | 2 + .../org/jdownloader/images/true-orange.svg | 54 ++++++ .../jdownloader/images/true-orange.svg.icons8 | 2 + .../flat/org/jdownloader/images/true.svg | 54 ++++++ .../org/jdownloader/images/true.svg.icons8 | 2 + 209 files changed, 3351 insertions(+), 317 deletions(-) create mode 100644 themes/themes/flat/org/jdownloader/images/about.svg create mode 100644 themes/themes/flat/org/jdownloader/images/about.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/add.svg create mode 100644 themes/themes/flat/org/jdownloader/images/add.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/advancedConfig.svg create mode 100644 themes/themes/flat/org/jdownloader/images/advancedConfig.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/audio.svg create mode 100644 themes/themes/flat/org/jdownloader/images/audio.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/auto-reconnect.svg create mode 100644 themes/themes/flat/org/jdownloader/images/auto-reconnect.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/backup.svg create mode 100644 themes/themes/flat/org/jdownloader/images/backup.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/bad.svg create mode 100644 themes/themes/flat/org/jdownloader/images/bad.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/basicauth.svg create mode 100644 themes/themes/flat/org/jdownloader/images/basicauth.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/batch.svg create mode 100644 themes/themes/flat/org/jdownloader/images/batch.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/bitcoin.svg create mode 100644 themes/themes/flat/org/jdownloader/images/bitcoin.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/board.svg create mode 100644 themes/themes/flat/org/jdownloader/images/board.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/bottombar.svg create mode 100644 themes/themes/flat/org/jdownloader/images/bottombar.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/box.svg create mode 100644 themes/themes/flat/org/jdownloader/images/box.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/browse.svg create mode 100644 themes/themes/flat/org/jdownloader/images/browse.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/bubble.svg create mode 100644 themes/themes/flat/org/jdownloader/images/bubble.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/bug.svg create mode 100644 themes/themes/flat/org/jdownloader/images/bug.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/buy.svg create mode 100644 themes/themes/flat/org/jdownloader/images/buy.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/cancel.svg create mode 100644 themes/themes/flat/org/jdownloader/images/cancel.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/changelog.svg create mode 100644 themes/themes/flat/org/jdownloader/images/changelog.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/chat.svg create mode 100644 themes/themes/flat/org/jdownloader/images/chat.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/chunks.svg create mode 100644 themes/themes/flat/org/jdownloader/images/chunks.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/clear.svg create mode 100644 themes/themes/flat/org/jdownloader/images/clear.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/clipboard.svg create mode 100644 themes/themes/flat/org/jdownloader/images/clipboard.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/close.on.svg create mode 100644 themes/themes/flat/org/jdownloader/images/close.on.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/close.svg create mode 100644 themes/themes/flat/org/jdownloader/images/close.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/cloud_sync.svg create mode 100644 themes/themes/flat/org/jdownloader/images/cloud_sync.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/compress.svg create mode 100644 themes/themes/flat/org/jdownloader/images/compress.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/confirmAll.svg create mode 100644 themes/themes/flat/org/jdownloader/images/confirmAll.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/confirmSelectedLinks.svg create mode 100644 themes/themes/flat/org/jdownloader/images/confirmSelectedLinks.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/console.svg create mode 100644 themes/themes/flat/org/jdownloader/images/console.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/contributer.svg create mode 100644 themes/themes/flat/org/jdownloader/images/contributer.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/copy.svg create mode 100644 themes/themes/flat/org/jdownloader/images/copy.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/cut.svg create mode 100644 themes/themes/flat/org/jdownloader/images/cut.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/defaultProxy.svg create mode 100644 themes/themes/flat/org/jdownloader/images/defaultProxy.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/delete.svg create mode 100644 themes/themes/flat/org/jdownloader/images/delete.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/desktop.svg create mode 100644 themes/themes/flat/org/jdownloader/images/desktop.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/cancel.svg create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/cancel.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/error.svg create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/error.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/find.svg create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/find.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/help.svg create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/help.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/info.svg create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/info.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/login.svg create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/login.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/warning.svg create mode 100644 themes/themes/flat/org/jdownloader/images/dialog/warning.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/dialogOCR.svg create mode 100644 themes/themes/flat/org/jdownloader/images/dialogOCR.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/document.svg create mode 100644 themes/themes/flat/org/jdownloader/images/document.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/download.svg create mode 100644 themes/themes/flat/org/jdownloader/images/download.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/downloadmanagment.svg create mode 100644 themes/themes/flat/org/jdownloader/images/downloadmanagment.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/downloadpassword.svg create mode 100644 themes/themes/flat/org/jdownloader/images/downloadpassword.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/downloadpath.svg create mode 100644 themes/themes/flat/org/jdownloader/images/downloadpath.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/edit.svg create mode 100644 themes/themes/flat/org/jdownloader/images/edit.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/error.svg create mode 100644 themes/themes/flat/org/jdownloader/images/error.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/event.svg create mode 100644 themes/themes/flat/org/jdownloader/images/event.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exit.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exit.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/export.svg create mode 100644 themes/themes/flat/org/jdownloader/images/export.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/extension.svg create mode 100644 themes/themes/flat/org/jdownloader/images/extension.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/extensionmanager.svg create mode 100644 themes/themes/flat/org/jdownloader/images/extensionmanager.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/extract.svg create mode 100644 themes/themes/flat/org/jdownloader/images/extract.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/extraction_true.svg create mode 100644 themes/themes/flat/org/jdownloader/images/extraction_true.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/extraction_true_failed.svg create mode 100644 themes/themes/flat/org/jdownloader/images/extraction_true_failed.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/columnButton.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/columnButton.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/find.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/find.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/findmenu.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/findmenu.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/lockColumn.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/lockColumn.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/resetColumns.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/resetColumns.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/sort.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/sort.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/sortAsc.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/sortAsc.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/sortDesc.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/sortDesc.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/widthLocked.svg create mode 100644 themes/themes/flat/org/jdownloader/images/exttable/widthLocked.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/false-orange.svg create mode 100644 themes/themes/flat/org/jdownloader/images/false-orange.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/false.svg create mode 100644 themes/themes/flat/org/jdownloader/images/false.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/file.svg create mode 100644 themes/themes/flat/org/jdownloader/images/file.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/fileIcon.svg create mode 100644 themes/themes/flat/org/jdownloader/images/fileIcon.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/filter.svg create mode 100644 themes/themes/flat/org/jdownloader/images/filter.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/find.svg create mode 100644 themes/themes/flat/org/jdownloader/images/find.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/flags/de.svg create mode 100644 themes/themes/flat/org/jdownloader/images/flags/de.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/flags/en.svg create mode 100644 themes/themes/flat/org/jdownloader/images/flags/en.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/folder.svg create mode 100644 themes/themes/flat/org/jdownloader/images/folder.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/folder_add.svg create mode 100644 themes/themes/flat/org/jdownloader/images/folder_add.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/folder_open.svg create mode 100644 themes/themes/flat/org/jdownloader/images/folder_open.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/go-bottom.svg create mode 100644 themes/themes/flat/org/jdownloader/images/go-bottom.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/go-down.svg create mode 100644 themes/themes/flat/org/jdownloader/images/go-down.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/go-next.svg create mode 100644 themes/themes/flat/org/jdownloader/images/go-next.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/go-top.svg create mode 100644 themes/themes/flat/org/jdownloader/images/go-top.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/go-up.svg create mode 100644 themes/themes/flat/org/jdownloader/images/go-up.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/gui.svg create mode 100644 themes/themes/flat/org/jdownloader/images/gui.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/import.svg create mode 100644 themes/themes/flat/org/jdownloader/images/import.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/logo/myjdownloader.svg create mode 100644 themes/themes/flat/org/jdownloader/images/logo/myjdownloader.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/media-playback-pause.svg create mode 100644 themes/themes/flat/org/jdownloader/images/media-playback-pause.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/media-playback-start.svg create mode 100644 themes/themes/flat/org/jdownloader/images/media-playback-start.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/media-playback-stop.svg create mode 100644 themes/themes/flat/org/jdownloader/images/media-playback-stop.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/premium.svg create mode 100644 themes/themes/flat/org/jdownloader/images/premium.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/reconnect.svg create mode 100644 themes/themes/flat/org/jdownloader/images/reconnect.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/true-orange.svg create mode 100644 themes/themes/flat/org/jdownloader/images/true-orange.svg.icons8 create mode 100644 themes/themes/flat/org/jdownloader/images/true.svg create mode 100644 themes/themes/flat/org/jdownloader/images/true.svg.icons8 diff --git a/.classpath b/.classpath index e39d586968..c24ed0b427 100644 --- a/.classpath +++ b/.classpath @@ -1,80 +1,80 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/jd/gui/swing/jdgui/views/settings/panels/linkgrabberfilter/editdialog/ConditionDialog.java b/src/jd/gui/swing/jdgui/views/settings/panels/linkgrabberfilter/editdialog/ConditionDialog.java index 46e01af615..b3a3207966 100644 --- a/src/jd/gui/swing/jdgui/views/settings/panels/linkgrabberfilter/editdialog/ConditionDialog.java +++ b/src/jd/gui/swing/jdgui/views/settings/panels/linkgrabberfilter/editdialog/ConditionDialog.java @@ -10,8 +10,6 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.File; import java.io.FilenameFilter; -import java.net.URISyntaxException; -import java.net.URL; import java.util.ArrayList; import java.util.List; @@ -450,52 +448,48 @@ public abstract class ConditionDialog extends AbstractDialog { } public void actionPerformed(ActionEvent e) { - try { - final JPopupMenu p = new JPopupMenu(); - URL url = NewTheme.I().getURL("images/", "help", ".png"); + final JPopupMenu p = new JPopupMenu(); - File imagesDir = new File(url.toURI()).getParentFile(); + File imagesDir = NewTheme.I().getImagesDirectory(); - String[] names = imagesDir.list(new FilenameFilter() { + String[] names = imagesDir.list(new FilenameFilter() { - public boolean accept(File dir, String name) { - return name.endsWith(".png"); + public boolean accept(File dir, String name) { + return name.endsWith(".png") || name.endsWith(".svg"); + } + }); + + final JList list = new JList(names); + list.setLayoutOrientation(JList.HORIZONTAL_WRAP); + final ListCellRenderer org = list.getCellRenderer(); + list.setCellRenderer(new ListCellRenderer() { + + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + String key = value.toString().substring(0, value.toString().length() - 4); + JLabel ret = (JLabel) org.getListCellRendererComponent(list, "", index, isSelected, cellHasFocus); + ret.setIcon(NewTheme.I().getIcon(key, 20)); + return ret; + } + }); + list.setFixedCellHeight(22); + list.setFixedCellWidth(22); + list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + list.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + + public void valueChanged(ListSelectionEvent e) { + if (e.getValueIsAdjusting()) { + return; } - }); + String v = list.getSelectedValue().toString(); - final JList list = new JList(names); - list.setLayoutOrientation(JList.HORIZONTAL_WRAP); - final ListCellRenderer org = list.getCellRenderer(); - list.setCellRenderer(new ListCellRenderer() { + ConditionDialog.this.setIconKey(v.substring(0, v.length() - 4)); + p.setVisible(false); + } + }); + p.add(list); + p.show(btnIcon, 0, btnIcon.getHeight()); - public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { - String key = value.toString().substring(0, value.toString().length() - 4); - JLabel ret = (JLabel) org.getListCellRendererComponent(list, "", index, isSelected, cellHasFocus); - ret.setIcon(NewTheme.I().getIcon(key, 20)); - return ret; - } - }); - list.setFixedCellHeight(22); - list.setFixedCellWidth(22); - list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - list.getSelectionModel().addListSelectionListener(new ListSelectionListener() { - - public void valueChanged(ListSelectionEvent e) { - if (e.getValueIsAdjusting()) { - return; - } - String v = list.getSelectedValue().toString(); - - ConditionDialog.this.setIconKey(v.substring(0, v.length() - 4)); - p.setVisible(false); - } - }); - p.add(list); - p.show(btnIcon, 0, btnIcon.getHeight()); - } catch (URISyntaxException e1) { - org.appwork.utils.logging2.extmanager.LoggerFactory.getDefaultLogger().log(e1); - } } }); diff --git a/src/jd/gui/swing/jdgui/views/settings/panels/packagizer/PackagizerFilterRuleDialog.java b/src/jd/gui/swing/jdgui/views/settings/panels/packagizer/PackagizerFilterRuleDialog.java index a3d558dbd7..3129c3ec72 100644 --- a/src/jd/gui/swing/jdgui/views/settings/panels/packagizer/PackagizerFilterRuleDialog.java +++ b/src/jd/gui/swing/jdgui/views/settings/panels/packagizer/PackagizerFilterRuleDialog.java @@ -30,13 +30,6 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.text.JTextComponent; -import jd.controlling.linkcrawler.CrawledLink; -import jd.gui.swing.jdgui.JDGui; -import jd.gui.swing.jdgui.views.settings.panels.linkgrabberfilter.editdialog.ConditionDialog; -import jd.gui.swing.jdgui.views.settings.panels.linkgrabberfilter.editdialog.FilterPanel; -import jd.gui.swing.jdgui.views.settings.panels.linkgrabberfilter.test.TestWaitDialog; -import jd.gui.swing.jdgui.views.settings.panels.packagizer.test.PackagizerSingleTestTableModel; - import org.appwork.swing.MigPanel; import org.appwork.swing.components.CheckBoxIcon; import org.appwork.swing.components.ExtCheckBox; @@ -67,6 +60,13 @@ import org.jdownloader.gui.views.DownloadFolderChooserDialog; import org.jdownloader.images.AbstractIcon; import org.jdownloader.images.NewTheme; +import jd.controlling.linkcrawler.CrawledLink; +import jd.gui.swing.jdgui.JDGui; +import jd.gui.swing.jdgui.views.settings.panels.linkgrabberfilter.editdialog.ConditionDialog; +import jd.gui.swing.jdgui.views.settings.panels.linkgrabberfilter.editdialog.FilterPanel; +import jd.gui.swing.jdgui.views.settings.panels.linkgrabberfilter.test.TestWaitDialog; +import jd.gui.swing.jdgui.views.settings.panels.packagizer.test.PackagizerSingleTestTableModel; + public class PackagizerFilterRuleDialog extends ConditionDialog { private class PriorityAction extends AbstractAction { @@ -91,7 +91,7 @@ public class PackagizerFilterRuleDialog extends ConditionDialog } public String getTooltipText() { - return priority._(); + return priority.T(); } } diff --git a/src/org/jdownloader/controlling/Priority.java b/src/org/jdownloader/controlling/Priority.java index b2cf7e2649..f6085c1643 100644 --- a/src/org/jdownloader/controlling/Priority.java +++ b/src/org/jdownloader/controlling/Priority.java @@ -25,7 +25,7 @@ public enum Priority { this.translation = translation; } - public String _() { + public String T() { return translation; } diff --git a/src/org/jdownloader/controlling/contextmenu/gui/InfoPanel.java b/src/org/jdownloader/controlling/contextmenu/gui/InfoPanel.java index 60f59f21b7..39974d232d 100644 --- a/src/org/jdownloader/controlling/contextmenu/gui/InfoPanel.java +++ b/src/org/jdownloader/controlling/contextmenu/gui/InfoPanel.java @@ -10,8 +10,6 @@ import java.awt.event.KeyListener; import java.io.File; import java.io.FilenameFilter; import java.lang.reflect.Constructor; -import java.net.URISyntaxException; -import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -150,54 +148,49 @@ public class InfoPanel extends MigPanel implements ActionListener, Scrollable { @Override public void actionPerformed(ActionEvent e) { - try { - final JPopupMenu p = new JPopupMenu(); + final JPopupMenu p = new JPopupMenu(); - URL url = NewTheme.I().getURL("images/", "help", ".png"); + File imagesDir; - File imagesDir; + imagesDir = NewTheme.I().getImagesDirectory(); - imagesDir = new File(url.toURI()).getParentFile(); + String[] names = imagesDir.list(new FilenameFilter() { - String[] names = imagesDir.list(new FilenameFilter() { + public boolean accept(File dir, String name) { + return name.endsWith(".png") || name.endsWith(".svg"); + } + }); - public boolean accept(File dir, String name) { - return name.endsWith(".png"); - } - }); + final JList list = new JList(names); + list.setLayoutOrientation(JList.HORIZONTAL_WRAP); + final ListCellRenderer org = list.getCellRenderer(); + list.setCellRenderer(new ListCellRenderer() { - final JList list = new JList(names); - list.setLayoutOrientation(JList.HORIZONTAL_WRAP); - final ListCellRenderer org = list.getCellRenderer(); - list.setCellRenderer(new ListCellRenderer() { + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + String key = value.toString().substring(0, value.toString().length() - 4); + JLabel ret = (JLabel) org.getListCellRendererComponent(list, "", index, isSelected, cellHasFocus); + ret.setIcon(NewTheme.I().getIcon(key, 20)); + return ret; + } + }); + list.setFixedCellHeight(22); + list.setFixedCellWidth(22); + list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + list.getSelectionModel().addListSelectionListener(new ListSelectionListener() { - public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { - String key = value.toString().substring(0, value.toString().length() - 4); - JLabel ret = (JLabel) org.getListCellRendererComponent(list, "", index, isSelected, cellHasFocus); - ret.setIcon(NewTheme.I().getIcon(key, 20)); - return ret; - } - }); - list.setFixedCellHeight(22); - list.setFixedCellWidth(22); - list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - list.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + public void valueChanged(ListSelectionEvent e) { + String v = list.getSelectedValue().toString(); + v = v.substring(0, v.length() - 4); + item.setIconKey(v); - public void valueChanged(ListSelectionEvent e) { - String v = list.getSelectedValue().toString(); - v = v.substring(0, v.length() - 4); - item.setIconKey(v); + updateInfo(item); + p.setVisible(false); + managerFrame.fireUpdate(); + } + }); + p.add(list); + p.show(iconChange, 0, iconChange.getHeight()); - updateInfo(item); - p.setVisible(false); - managerFrame.fireUpdate(); - } - }); - p.add(list); - p.show(iconChange, 0, iconChange.getHeight()); - } catch (URISyntaxException e1) { - e1.printStackTrace(); - } } }); // icon=new JLabel(9) diff --git a/src/org/jdownloader/controlling/contextmenu/gui/NewSubMenuDialog.java b/src/org/jdownloader/controlling/contextmenu/gui/NewSubMenuDialog.java index f4a556bd3f..d54ae6cb20 100644 --- a/src/org/jdownloader/controlling/contextmenu/gui/NewSubMenuDialog.java +++ b/src/org/jdownloader/controlling/contextmenu/gui/NewSubMenuDialog.java @@ -5,8 +5,6 @@ import java.awt.Image; import java.awt.event.ActionEvent; import java.io.File; import java.io.FilenameFilter; -import java.net.URISyntaxException; -import java.net.URL; import javax.swing.Icon; import javax.swing.JComponent; @@ -56,58 +54,56 @@ public class NewSubMenuDialog extends AbstractDialog { @Override public void actionPerformed(ActionEvent e) { - try { - final JPopupMenu p = new JPopupMenu(); - URL url = NewTheme.I().getURL("images/", "help", ".png"); + final JPopupMenu p = new JPopupMenu(); - File imagesDir; + File imagesDir; - imagesDir = new File(url.toURI()).getParentFile(); + imagesDir = NewTheme.I().getImagesDirectory(); - String[] names = imagesDir.list(new FilenameFilter() { + String[] names = imagesDir.list(new FilenameFilter() { - public boolean accept(File dir, String name) { - if (name.endsWith(".png")) { + public boolean accept(File dir, String name) { + if (name.endsWith(".png") || name.endsWith(".svg")) { - Image image = NewTheme.I().getImage(name.substring(0, name.length() - 4), -1, false); - if (Math.max(image.getWidth(null), image.getHeight(null)) >= 32) { return true; } + Image image = NewTheme.I().getImage(name.substring(0, name.length() - 4), -1, false); + if (Math.max(image.getWidth(null), image.getHeight(null)) >= 32) { + return true; } - return false; } - }); + return false; + } + }); - final JList list = new JList(names); - list.setLayoutOrientation(JList.HORIZONTAL_WRAP); - final ListCellRenderer org = list.getCellRenderer(); - list.setCellRenderer(new ListCellRenderer() { + final JList list = new JList(names); + list.setLayoutOrientation(JList.HORIZONTAL_WRAP); + final ListCellRenderer org = list.getCellRenderer(); + list.setCellRenderer(new ListCellRenderer() { - public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { - String key = value.toString().substring(0, value.toString().length() - 4); - JLabel ret = (JLabel) org.getListCellRendererComponent(list, "", index, isSelected, cellHasFocus); - ret.setIcon(NewTheme.I().getIcon(key, 20)); - return ret; - } - }); - list.setFixedCellHeight(22); - list.setFixedCellWidth(22); - list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - list.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + String key = value.toString().substring(0, value.toString().length() - 4); + JLabel ret = (JLabel) org.getListCellRendererComponent(list, "", index, isSelected, cellHasFocus); + ret.setIcon(NewTheme.I().getIcon(key, 20)); + return ret; + } + }); + list.setFixedCellHeight(22); + list.setFixedCellWidth(22); + list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + list.getSelectionModel().addListSelectionListener(new ListSelectionListener() { + + public void valueChanged(ListSelectionEvent e) { + String v = list.getSelectedValue().toString(); + v = v.substring(0, v.length() - 4); + iconUrl = v; + setSmallIcon(NewTheme.I().getIcon(iconUrl, 20)); + iconField.setIcon(NewTheme.I().getIcon(iconUrl, 20)); + p.setVisible(false); + } + }); + p.add(list); + p.show(iconField, 0, iconField.getHeight()); - public void valueChanged(ListSelectionEvent e) { - String v = list.getSelectedValue().toString(); - v = v.substring(0, v.length() - 4); - iconUrl = v; - setSmallIcon(NewTheme.I().getIcon(iconUrl, 20)); - iconField.setIcon(NewTheme.I().getIcon(iconUrl, 20)); - p.setVisible(false); - } - }); - p.add(list); - p.show(iconField, 0, iconField.getHeight()); - } catch (URISyntaxException e1) { - e1.printStackTrace(); - } } }); diff --git a/src/org/jdownloader/gui/views/components/packagetable/context/AbstractPriorityActionEntry.java b/src/org/jdownloader/gui/views/components/packagetable/context/AbstractPriorityActionEntry.java index 111a9a2862..94d9b1b4b7 100644 --- a/src/org/jdownloader/gui/views/components/packagetable/context/AbstractPriorityActionEntry.java +++ b/src/org/jdownloader/gui/views/components/packagetable/context/AbstractPriorityActionEntry.java @@ -3,16 +3,6 @@ package org.jdownloader.gui.views.components.packagetable.context; import java.awt.event.ActionEvent; import java.util.ArrayList; -import jd.controlling.TaskQueue; -import jd.controlling.linkcrawler.CrawledLink; -import jd.controlling.linkcrawler.CrawledPackage; -import jd.controlling.packagecontroller.AbstractNode; -import jd.controlling.packagecontroller.AbstractPackageChildrenNode; -import jd.controlling.packagecontroller.AbstractPackageNode; -import jd.gui.swing.jdgui.interfaces.View; -import jd.plugins.DownloadLink; -import jd.plugins.FilePackage; - import org.appwork.utils.event.queue.QueueAction; import org.jdownloader.controlling.Priority; import org.jdownloader.controlling.contextmenu.ActionContext; @@ -27,6 +17,16 @@ import org.jdownloader.gui.views.downloads.table.DownloadsTableModel; import org.jdownloader.gui.views.linkgrabber.LinkGrabberTableModel; import org.jdownloader.translate._JDT; +import jd.controlling.TaskQueue; +import jd.controlling.linkcrawler.CrawledLink; +import jd.controlling.linkcrawler.CrawledPackage; +import jd.controlling.packagecontroller.AbstractNode; +import jd.controlling.packagecontroller.AbstractPackageChildrenNode; +import jd.controlling.packagecontroller.AbstractPackageNode; +import jd.gui.swing.jdgui.interfaces.View; +import jd.plugins.DownloadLink; +import jd.plugins.FilePackage; + public abstract class AbstractPriorityActionEntry, ChildrenType extends AbstractPackageChildrenNode> extends CustomizableTableContextAppAction implements GUIListener, ActionContext { /** @@ -60,9 +60,9 @@ public abstract class AbstractPriorityActionEntry rep = new BasicJDTable(new ExtTableModel("TEST") { + { + setTableData(Arrays.asList(new String[] { "a", "b" })); + } + + @Override + protected void initColumns() { + addColumn(new ExtTextColumn("DI") { + @Override + public boolean isEditable(String obj) { + return true; + } + + @Override + public String getStringValue(String value) { + return "Test"; + } + + }); + } + }); tableScrollPane = new JScrollPane(table); tableScrollPane.addComponentListener(new ComponentListener() { diff --git a/src/org/jdownloader/gui/views/downloads/properties/AbstractNodePropertiesPanel.java b/src/org/jdownloader/gui/views/downloads/properties/AbstractNodePropertiesPanel.java index f71da2bc24..386946a8ff 100644 --- a/src/org/jdownloader/gui/views/downloads/properties/AbstractNodePropertiesPanel.java +++ b/src/org/jdownloader/gui/views/downloads/properties/AbstractNodePropertiesPanel.java @@ -398,7 +398,7 @@ public abstract class AbstractNodePropertiesPanel { private ExtTextArea input; @@ -116,7 +116,7 @@ public class AddLinksDialog extends AbstractDialog { private ExtTextField comment; - private JCheckBox overwritePackagizer; ; + private JCheckBox overwritePackagizer;; public boolean isDeepAnalyse() { return deepAnalyse; @@ -431,7 +431,7 @@ public class AddLinksDialog extends AbstractDialog { priority.setRenderer(new ListCellRenderer() { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { - JLabel r = (JLabel) org.getListCellRendererComponent(list, ((Priority) value)._(), index, isSelected, cellHasFocus); + JLabel r = (JLabel) org.getListCellRendererComponent(list, ((Priority) value).T(), index, isSelected, cellHasFocus); r.setIcon(((Priority) value).loadIcon(20)); return r; } diff --git a/src/org/jdownloader/iconsetter/IconResource.java b/src/org/jdownloader/iconsetter/IconResource.java index a51ae35e00..bee0fdb7d5 100644 --- a/src/org/jdownloader/iconsetter/IconResource.java +++ b/src/org/jdownloader/iconsetter/IconResource.java @@ -1,15 +1,22 @@ package org.jdownloader.iconsetter; +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.image.BufferedImage; import java.io.File; +import java.io.FileInputStream; import java.io.IOException; import java.util.HashSet; +import java.util.Locale; +import java.util.Properties; import javax.imageio.ImageIO; import javax.swing.Icon; import javax.swing.ImageIcon; -import org.appwork.utils.Application; import org.appwork.utils.images.IconIO; +import org.jdownloader.images.IdentifierImageIcon; public class IconResource { @@ -35,27 +42,77 @@ public class IconResource { sets.add(name); } - public String getTags() { + public String getTags(ResourceSet resourceSet) { String name = new File(path).getName(); - name = name.replaceAll("\\..+$", ""); - name = name.replaceAll("[^\\w]+", " "); + // name = name.replaceAll("\\..+$", ""); + name = name.replaceAll("\\W+", " "); + name = name.replaceAll("([a-z])\\s*([A-Z])", "$1 $2"); + name = name.toLowerCase(Locale.ENGLISH); + File svg = getFile(resourceSet, "svg.icons8"); + if (svg.exists()) { + String str; + try { + + Properties props = new Properties(); + FileInputStream fis = new FileInputStream(svg); + try { + props.load(fis); + + } finally { + fis.close(); + } + if (props.getProperty("name") != null) { + name = name.replace(props.getProperty("name").toLowerCase(Locale.ENGLISH), ""); + name += " " + props.getProperty("name"); + + } + + } catch (IOException e) { + e.printStackTrace(); + } + + } return name; } public Icon getIcon(String name, int size) { - File file = Application.getResource("themes/" + name + "/" + getPath()); + File file = new File(IconSetMaker.THEMES, "/themes/" + name + "/" + getPath() + ".svg"); - try { - return new ImageIcon(IconIO.getScaledInstance(ImageIO.read(file), size, size)); - } catch (IOException e) { + if (file.exists()) { - return null; + try { + + Image image = IconIO.getImageFromSVG(file.toURI().toURL(), size, size); + Graphics g = image.getGraphics(); + g.setColor(Color.RED); + g.drawRect(0, 0, image.getWidth(null) - 1, image.getHeight(null) - 1); + g.dispose(); + return new IdentifierImageIcon(image, getPath()); + } catch (IOException e) { + + return null; + } + + } else { + file = new File(IconSetMaker.THEMES, "themes/" + name + "/" + getPath() + ".png"); + + try { + BufferedImage image = IconIO.getScaledInstance(ImageIO.read(file), size, size); + Graphics g = image.getGraphics(); + g.setColor(Color.RED); + g.drawRect(0, 0, image.getWidth(null) - 1, image.getHeight(null) - 1); + g.dispose(); + return new ImageIcon(image); + } catch (IOException e) { + + return null; + } } } - public File getFile(ResourceSet resoureSet) { + public File getFile(ResourceSet resoureSet, String ext) { - return Application.getResource("themes/" + resoureSet.getName() + "/" + getPath()); + return new File(IconSetMaker.THEMES, "themes/" + resoureSet.getName() + "/" + getPath() + "." + ext); } diff --git a/src/org/jdownloader/iconsetter/IconSetMaker.java b/src/org/jdownloader/iconsetter/IconSetMaker.java index bd13709bc1..a1b38a98d1 100644 --- a/src/org/jdownloader/iconsetter/IconSetMaker.java +++ b/src/org/jdownloader/iconsetter/IconSetMaker.java @@ -10,6 +10,7 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; +import org.appwork.exceptions.WTFException; import org.appwork.utils.Application; import org.appwork.utils.FileHandler; import org.appwork.utils.Files; @@ -25,6 +26,20 @@ import com.kitfox.svg.SVGException; import jd.gui.swing.laf.LookAndFeelController; public class IconSetMaker { + public static File WORKSPACE; + public static File THEMES; + + static { + try { + WORKSPACE = new File(Main.class.getResource("/").toURI()).getParentFile(); + } catch (URISyntaxException e) { + throw new WTFException(e); + } + if (WORKSPACE.getName().equals("JDownloaderUpdater")) { + WORKSPACE = new File(WORKSPACE.getParentFile(), "JDownloader"); + } + THEMES = new File(WORKSPACE, "themes"); + } public static void main(String[] args) throws Throwable { Application.setApplication(".jd_home"); @@ -118,21 +133,15 @@ public class IconSetMaker { private void scanThemes() throws MalformedURLException, IOException, InterruptedException, SVGException, DialogClosedException, DialogCanceledException, URISyntaxException { final HashMap map = new HashMap(); - final File standard = Application.getResource("themes/standard"); - - if (standard.exists()) { - Files.deleteRecursiv(standard); + final File jdHome = Application.getResource("themes"); + if (jdHome.exists()) { + Files.deleteRecursiv(jdHome); } - File workspace = new File(Main.class.getResource("/").toURI()).getParentFile(); - if (workspace.getName().equals("JDownloaderUpdater")) { - workspace = new File(workspace.getParentFile(), "JDownloader"); - } - org.jdownloader.startup.Main.copyResource(workspace, "themes/themes", "themes"); - + File standard = new File(THEMES, "themes/standard"); standardSet = scanTheme(map, standard); - for (File folder : Application.getResource("themes/").listFiles(new FileFilter() { + for (File folder : new File(THEMES, "themes/").listFiles(new FileFilter() { @Override public boolean accept(File pathname) { @@ -165,6 +174,7 @@ public class IconSetMaker { if (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".png") || f.getName().toLowerCase(Locale.ENGLISH).endsWith(".svg")) { IconResource ir; String rel = Files.getRelativePath(theme, f); + rel = rel.replaceAll("\\.\\w\\w\\w$", ""); if (rel.startsWith("org/jdownloader/images/uploaded/")) { return true; } @@ -204,7 +214,8 @@ public class IconSetMaker { public ResourceSet createNewResourceSet(String text) { ResourceSet set; resources.add(set = new ResourceSet(text)); - Application.getResource("themes/" + text + "/org/jdownloader/images/").mkdirs(); + + new File(THEMES, "themes/" + text + "/org/jdownloader/images/").mkdirs(); return set; } diff --git a/src/org/jdownloader/iconsetter/gui/Icon8Resource.java b/src/org/jdownloader/iconsetter/gui/Icon8Resource.java index 358623c341..6dd3fab7a0 100644 --- a/src/org/jdownloader/iconsetter/gui/Icon8Resource.java +++ b/src/org/jdownloader/iconsetter/gui/Icon8Resource.java @@ -11,8 +11,25 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URI; +import java.util.LinkedList; +import java.util.Locale; import javax.imageio.ImageIO; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.appwork.utils.StringUtils; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.xml.sax.SAXException; import com.kitfox.svg.SVGDiagram; import com.kitfox.svg.SVGElement; @@ -20,6 +37,10 @@ import com.kitfox.svg.SVGException; import com.kitfox.svg.SVGUniverse; import com.kitfox.svg.animation.AnimationElement; +import jd.nutils.DiffMatchPatch; +import jd.nutils.DiffMatchPatch.Diff; +import jd.nutils.DiffMatchPatch.Operation; + public class Icon8Resource { private String id; @@ -105,4 +126,74 @@ public class Icon8Resource { ImageIO.write(bi, "png", bao = new ByteArrayOutputStream()); return bao.toByteArray(); } + + public byte[] createSVG(Color color) throws UnsupportedEncodingException { + String hex = "#" + String.format("%02x%02x%02x", color.getRed(), color.getGreen(), color.getBlue()); + + try { + + DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); + docFactory.setValidating(false); + + DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); + + Document doc = docBuilder.parse(new ByteArrayInputStream(svg.getBytes("iso-8859-1"))); + + Node svg = doc.getElementsByTagName("svg").item(0); + NamedNodeMap attributes = svg.getAttributes(); + Node style = attributes.getNamedItem("style"); + if (style != null) { + String css = style.getNodeValue(); + if (StringUtils.isNotEmpty(css) && !css.trim().endsWith(";")) { + css = css.trim() + ";"; + } + style.setNodeValue(css + "fill:" + hex + ";"); + + } else { + ((Element) svg).setAttribute("style", "fill:" + hex); + } + + // write the content into xml file + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + Transformer transformer = transformerFactory.newTransformer(); + DOMSource source = new DOMSource(doc); + ByteArrayOutputStream bao; + StreamResult result = new StreamResult(bao = new ByteArrayOutputStream()); + transformer.transform(source, result); + + return bao.toByteArray(); + + } catch (ParserConfigurationException pce) { + pce.printStackTrace(); + } catch (TransformerException tfe) { + tfe.printStackTrace(); + } catch (IOException ioe) { + ioe.printStackTrace(); + } catch (SAXException sae) { + sae.printStackTrace(); + } + + String svg = this.svg.replaceAll("/svg\" ", "/svg\" style=\"fill:" + hex + "\" "); + return svg.getBytes("ASCII"); + + } + + public String getInfoString() { + return "id=" + id + "\r\nname=" + name; + } + + public Number getRelevance(String lastSearchString) { + DiffMatchPatch differ = new DiffMatchPatch(); + + LinkedList diff = differ.diffMain(" " + lastSearchString + " ".toLowerCase(Locale.ENGLISH), " " + name + " ".toLowerCase(Locale.ENGLISH)); + int eq = 0; + for (Diff d : diff) { + if (d.operation == Operation.EQUAL) { + eq += d.text.length() * d.text.length(); + } + } + int relevance = 200 - differ.diffLevenshtein(diff); + + return eq; + } } diff --git a/src/org/jdownloader/iconsetter/gui/IconSetterGui.java b/src/org/jdownloader/iconsetter/gui/IconSetterGui.java index 73e224499b..164b33453e 100644 --- a/src/org/jdownloader/iconsetter/gui/IconSetterGui.java +++ b/src/org/jdownloader/iconsetter/gui/IconSetterGui.java @@ -25,6 +25,7 @@ import org.appwork.utils.swing.EDTRunner; import org.appwork.utils.swing.dialog.InputDialog; import org.jdownloader.gui.IconKey; import org.jdownloader.gui.views.components.PseudoCombo; +import org.jdownloader.iconsetter.IconResource; import org.jdownloader.iconsetter.IconSetMaker; import org.jdownloader.iconsetter.ResourceSet; import org.jdownloader.images.NewTheme; @@ -82,8 +83,8 @@ public class IconSetterGui extends BasicGui { @Override protected void runInEDT() { MigPanel p = new MigPanel("ins 5,wrap 2,", "[][grow,fill]", "[40!,fill][24!]"); - - PseudoCombo combo = new PseudoCombo(owner.getResourceSets().toArray(new ResourceSet[] {})) { + List sets = owner.getResourceSets(); + PseudoCombo combo = new PseudoCombo(sets.toArray(new ResourceSet[] {})) { @Override protected String getLabel(ResourceSet v, boolean closed) { return v.getName(); @@ -98,16 +99,16 @@ public class IconSetterGui extends BasicGui { protected Icon getIcon(ResourceSet v, boolean closed) { try { - File file = Application.getResource("themes/" + v.getName() + "/" + v.getIcons().get(0).getPath()); + IconResource file = v.getIcons().get(0); int smallest = v.getIcons().get(0).getPath().length(); for (int i = 0; i < v.getIcons().size(); i++) { if (v.getIcons().get(i).getPath().length() < smallest) { smallest = v.getIcons().get(i).getPath().length(); - file = Application.getResource("themes/" + v.getName() + "/" + v.getIcons().get(i).getPath()); + file = v.getIcons().get(i); } } - return new ImageIcon(IconIO.getScaledInstance(ImageIO.read(file), 32, 32)); + return file.getIcon(v.getName(), 32); } catch (Throwable e) { return null; @@ -127,7 +128,7 @@ public class IconSetterGui extends BasicGui { InputDialog d = new InputDialog(0, "Choose Name", "Choose Name", null); UIOManager.I().show(null, d); d.getText(); - File file = Application.getResource("themes/" + d.getText() + "/"); + File file = new File(IconSetMaker.THEMES, "themes/" + d.getText() + "/"); if (file.exists()) { UIOManager.I().showErrorMessage(d.getText() + " already exists..."); return; @@ -173,12 +174,12 @@ public class IconSetterGui extends BasicGui { @Override protected Icon getIcon(ResourceSet v, boolean closed) { try { - File file = Application.getResource("themes/" + v.getName() + "/" + v.getIcons().get(0).getPath()); + File file = new File(IconSetMaker.THEMES, "themes/" + v.getName() + "/" + v.getIcons().get(0).getPath()); int smallest = v.getIcons().get(0).getPath().length(); for (int i = 0; i < v.getIcons().size(); i++) { if (v.getIcons().get(i).getPath().length() < smallest) { smallest = v.getIcons().get(i).getPath().length(); - file = Application.getResource("themes/" + v.getName() + "/" + v.getIcons().get(i).getPath()); + file = new File(IconSetMaker.THEMES, "themes/" + v.getName() + "/" + v.getIcons().get(i).getPath()); } } @@ -203,7 +204,7 @@ public class IconSetterGui extends BasicGui { InputDialog d = new InputDialog(0, "Choose Name", "Choose Name", null); UIOManager.I().show(null, d); d.getText(); - File file = Application.getResource("themes/" + d.getText() + "/"); + File file = new File(IconSetMaker.THEMES, "themes/" + d.getText() + "/"); if (file.exists()) { UIOManager.I().showErrorMessage(d.getText() + " already exists..."); return; diff --git a/src/org/jdownloader/iconsetter/gui/SetTable.java b/src/org/jdownloader/iconsetter/gui/SetTable.java index d151a645f8..2674425403 100644 --- a/src/org/jdownloader/iconsetter/gui/SetTable.java +++ b/src/org/jdownloader/iconsetter/gui/SetTable.java @@ -2,36 +2,51 @@ package org.jdownloader.iconsetter.gui; import java.awt.event.ActionEvent; import java.awt.event.MouseEvent; +import java.io.File; import java.util.List; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; -import jd.gui.swing.jdgui.BasicJDTable; - import org.appwork.swing.action.BasicAction; import org.appwork.swing.exttable.ExtColumn; import org.appwork.uio.UIOManager; +import org.appwork.utils.os.CrossSystem; import org.jdownloader.iconsetter.IconResource; import org.jdownloader.iconsetter.IconSetMaker; import org.jdownloader.iconsetter.gui.icon8.Icon8Dialog; +import jd.gui.swing.jdgui.BasicJDTable; + public class SetTable extends BasicJDTable { private IconSetMaker owner; + @Override + public SetTableModel getModel() { + return (SetTableModel) super.getModel(); + } + public SetTable(IconSetMaker owner, SetTableModel setTableModel) { super(setTableModel); setRowHeight(36); this.owner = owner; } + @Override + protected boolean onDoubleClick(MouseEvent e, IconResource obj) { + Icon8Dialog d = new Icon8Dialog(obj, owner); + UIOManager.I().show(null, d); + SetTable.this.repaint(); + return true; + } + @Override protected JPopupMenu onContextMenu(JPopupMenu popup, IconResource contextObject, final List selection, ExtColumn column, MouseEvent mouseEvent) { popup.add(new JMenuItem(new BasicAction() { { - setName("Icon8"); + setName("Icon8 Lookup"); } @Override @@ -44,6 +59,61 @@ public class SetTable extends BasicJDTable { } } })); + final File svg = contextObject.getFile(getModel().getSelected(), "svg"); + if (svg.exists()) { + popup.add(new JMenuItem(new BasicAction() { + { + setName("Show in Explorer (SVG)"); + } + + @Override + public void actionPerformed(ActionEvent e) { + + CrossSystem.showInExplorer(svg); + + } + })); + + popup.add(new JMenuItem(new BasicAction() { + { + setName("Edit File (SVG)"); + } + + @Override + public void actionPerformed(ActionEvent e) { + CrossSystem.openFile(svg); + + } + })); + } + + final File png = contextObject.getFile(getModel().getSelected(), "png"); + if (png.exists()) { + popup.add(new JMenuItem(new BasicAction() { + { + setName("Show in Explorer (PNG)"); + } + + @Override + public void actionPerformed(ActionEvent e) { + + CrossSystem.showInExplorer(png); + + } + })); + popup.add(new JMenuItem(new BasicAction() { + { + setName("Edit File (PNG)"); + } + + @Override + public void actionPerformed(ActionEvent e) { + CrossSystem.openFile(png); + + } + })); + } + return popup; } diff --git a/src/org/jdownloader/iconsetter/gui/SetTableModel.java b/src/org/jdownloader/iconsetter/gui/SetTableModel.java index 2fead41c7a..d13c61ec51 100644 --- a/src/org/jdownloader/iconsetter/gui/SetTableModel.java +++ b/src/org/jdownloader/iconsetter/gui/SetTableModel.java @@ -35,6 +35,10 @@ public class SetTableModel extends ExtTableModel { super.init("SetTableModel"); } + public ResourceSet getSelected() { + return selected; + } + @Override protected void init(String id) { @@ -46,7 +50,16 @@ public class SetTableModel extends ExtTableModel { @Override public String getStringValue(IconResource value) { - return value.getPath().replace("org/jdownloader/images", ""); + + String ret = value.getPath().replace("org/jdownloader/images", ""); + if (value.getFile(getSelected(), "png").exists()) { + ret += " PNG"; + } + if (value.getFile(getSelected(), "svg").exists()) { + ret += " SVG"; + } + + return ret; } }); addColumn(new ExtTextColumn("Standard") { @@ -141,6 +154,68 @@ public class SetTableModel extends ExtTableModel { return null; } }); + + // addColumn(new ExtComponentColumn("Edit") { + // + // private JButton bt = new JButton("Edit"); + // + // @Override + // public boolean isResizable() { + // return false; + // } + // + // @Override + // public int getDefaultWidth() { + // return getMinWidth(); + // } + // + // @Override + // public int getMaxWidth() { + // return getMinWidth(); + // } + // + // @Override + // public int getMinWidth() { + // return 32; + // } + // + // @Override + // public boolean onSingleClick(MouseEvent e, IconResource obj) { + // return super.onSingleClick(e, obj); + // } + // + // @Override + // public boolean isEditable(IconResource obj) { + // return false; + // } + // + // @Override + // protected JComponent getInternalEditorComponent(IconResource value, boolean isSelected, int row, int column) { + // return bt; + // } + // + // @Override + // protected JComponent getInternalRendererComponent(IconResource value, boolean isSelected, boolean hasFocus, int row, int column) + // { + // return bt; + // } + // + // @Override + // public void configureEditorComponent(IconResource value, boolean isSelected, int row, int column) { + // } + // + // @Override + // public void configureRendererComponent(IconResource value, boolean isSelected, boolean hasFocus, int row, int column) { + // } + // + // @Override + // public void resetEditor() { + // } + // + // @Override + // public void resetRenderer() { + // } + // }); } } diff --git a/src/org/jdownloader/iconsetter/gui/icon8/Icon8Dialog.java b/src/org/jdownloader/iconsetter/gui/icon8/Icon8Dialog.java index 609607dc9b..0a66796e10 100644 --- a/src/org/jdownloader/iconsetter/gui/icon8/Icon8Dialog.java +++ b/src/org/jdownloader/iconsetter/gui/icon8/Icon8Dialog.java @@ -65,6 +65,7 @@ public class Icon8Dialog extends AbstractDialog { protected Icon8Table table; private Icon8Resource selectedIcon; private PseudoCombo