From a63c46690ad2fe81f5c571542ce4d7cecea9f921 Mon Sep 17 00:00:00 2001 From: coalado Date: Thu, 30 Jul 2009 00:19:48 +0000 Subject: [PATCH] Refaktoring.. renamed packages git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@6903 ebf7c1c2-ba36-0410-9fe8-c592906822b4 --- src/jd/Installer.java | 2 +- src/jd/KikinDialog.java | 2 +- src/jd/Main.java | 4 +- src/jd/SplashScreen.java | 2 +- src/jd/Tester.java | 2 +- src/jd/captcha/utils/Utilities.java | 2 +- src/jd/controlling/AccountController.java | 2 +- .../controlling/SingleDownloadController.java | 4 +- src/jd/gui/skins/jdgui/JDGui.java | 28 +- src/jd/gui/skins/jdgui/TabProgress.java | 2 +- .../skins/jdgui/actions/ActionController.java | 2 +- .../skins/jdgui/components/JDStatusBar.java | 1 + .../{ => premiumbar}/PremiumStatus.java | 9 +- .../premiumbar}/TinyProgressBar.java | 2 +- .../jdgui/components/toolbar/MainToolBar.java | 4 +- .../jdgui/components/toolbar/ToolBar.java | 2 +- .../gui/skins/jdgui/events/EDTEventQueue.java | 2 +- src/jd/gui/skins/jdgui/menu/AddonsMenu.java | 2 +- src/jd/gui/skins/jdgui/menu/PremiumMenu.java | 2 +- .../skins/jdgui/menu/actions/AboutAction.java | 2 +- .../jdgui/menu/actions/BackupAction.java | 2 +- .../jdgui/menu/actions/KnowledgeAction.java | 2 +- .../jdgui/menu/actions/LatestChanges.java | 2 +- .../skins/jdgui/settings/GUIConfigEntry.java | 2 +- .../panels/ConfigPanelPluginForHost.java | 2 +- .../jdgui/settings/panels/gui/Browser.java | 2 +- .../panels/reconnect/MethodSelection.java | 2 +- .../settings/subpanels/PremiumPanel.java | 6 +- .../SubPanelLiveHeaderReconnect.java | 2 +- src/jd/gui/skins/jdgui/userio/UserIOGui.java | 2 +- .../downloadview/DownloadLinksPanel.java | 6 +- .../views/downloadview/DownloadTable.java | 6 +- .../views/downloadview/FilePackageInfo.java | 2 +- .../jdgui/views/info/DownloadInfoPanel.java | 2 +- .../views/info/LinkGrabberInfoPanel.java | 2 +- .../skins/jdgui/views/info/LogInfoPanel.java | 2 +- .../linkgrabberview/LinkGrabberPanel.java | 6 +- .../linkgrabberview/LinkGrabberTable.java | 4 +- .../sidebars/configuration/ConfigSidebar.java | 2 +- .../configuration/ConfigTreeModel.java | 2 +- .../jdgui/views/toolbar/ViewToolbar.java | 2 +- src/jd/gui/skins/simple/AgbDialog.java | 2 +- src/jd/gui/skins/simple/ConvertDialog.java | 2 +- src/jd/gui/skins/simple/LogPane.java | 2 +- src/jd/gui/skins/simple/MouseFollower.java | 2 +- src/jd/gui/skins/simple/SimpleGUI.java | 6 +- src/jd/gui/skins/swing/Factory.java | 2 +- src/jd/gui/skins/swing/MacOSController.java | 4 +- src/jd/gui/skins/swing/dialog/HelpDialog.java | 2 +- .../skins/swing/dialog/JCountdownDialog.java | 2 +- .../{skins/jdgui => }/swing/GuiRunnable.java | 2 +- src/jd/gui/swing/JUndoManager.java | 99 ++++++ .../components}/AboutDialog.java | 4 +- .../jdgui => swing}/components/Balloon.java | 6 +- src/jd/gui/swing/components/BrowseFile.java | 198 +++++++++++ .../gui/swing/components/ComboBrowseFile.java | 310 ++++++++++++++++++ .../gui/swing/components/DnDWebBrowser.java | 239 ++++++++++++++ .../components/JDCollapser.java | 2 +- .../gui/swing/components/JDFileChooser.java | 76 +++++ src/jd/gui/swing/components/JDTextArea.java | 68 ++++ src/jd/gui/swing/components/JDTextField.java | 63 ++++ .../swing/components/JDUnderlinedText.java | 54 +++ .../components/JExtCheckBoxMenuItem.java | 2 +- .../components}/MultiProgressBar.java | 2 +- .../components}/ProgressEntry.java | 2 +- .../components/SpeedMeterPanel.java | 2 +- .../components/linkbutton/JLink.java | 2 +- .../linkbutton/JLinkButtonEditor.java | 2 +- .../gui/swing/components/pieapi/ChartAPI.java | 218 ++++++++++++ .../components/pieapi/ChartAPIEntity.java | 60 ++++ .../components/pieapi}/PieChartAPI.java | 5 +- .../gui/swing/laf/LookAndFeelController.java | 135 ++++---- .../jdgui => }/swing/menu/HosterMenu.java | 2 +- .../{skins/jdgui => }/swing/menu/Menu.java | 2 +- .../nativeintegration/LocalBrowser.java | 2 +- src/jd/plugins/PluginForDecrypt.java | 2 +- src/jd/plugins/decrypter/RaubkopiererWs.java | 2 +- src/jd/plugins/decrypter/Serienjunkies.java | 2 +- .../optional/HTTPLiveHeaderScripter.java | 2 +- src/jd/plugins/optional/jdchat/JDChat.java | 2 +- .../optional/jdtrayicon/JDLightTray.java | 2 +- .../optional/jdtrayicon/TrayIconTooltip.java | 2 +- .../optional/langfileeditor/LFEGui.java | 4 +- src/jd/router/GetRouterInfo.java | 2 +- src/jd/router/reconnectrecorder/Gui.java | 2 +- src/jd/utils/JDFileReg.java | 2 +- src/jd/utils/ReplaceInFiles.java | 2 +- src/jd/utils/WebUpdate.java | 2 +- src/tests/singletests/StartUp.java | 2 +- src/tests/utils/TestUtils.java | 2 +- tools/ReplaceInFiles.java | 2 +- 91 files changed, 1568 insertions(+), 185 deletions(-) rename src/jd/gui/skins/jdgui/components/{ => premiumbar}/PremiumStatus.java (96%) rename src/jd/gui/skins/{simple => jdgui/components/premiumbar}/TinyProgressBar.java (94%) rename src/jd/gui/{skins/jdgui => }/swing/GuiRunnable.java (95%) create mode 100644 src/jd/gui/swing/JUndoManager.java rename src/jd/gui/{skins/simple => swing/components}/AboutDialog.java (96%) rename src/jd/gui/{skins/jdgui => swing}/components/Balloon.java (95%) create mode 100644 src/jd/gui/swing/components/BrowseFile.java create mode 100644 src/jd/gui/swing/components/ComboBrowseFile.java create mode 100644 src/jd/gui/swing/components/DnDWebBrowser.java rename src/jd/gui/{skins/jdgui => swing}/components/JDCollapser.java (95%) create mode 100644 src/jd/gui/swing/components/JDFileChooser.java create mode 100644 src/jd/gui/swing/components/JDTextArea.java create mode 100644 src/jd/gui/swing/components/JDTextField.java create mode 100644 src/jd/gui/swing/components/JDUnderlinedText.java rename src/jd/gui/{skins/jdgui => swing}/components/JExtCheckBoxMenuItem.java (93%) rename src/jd/gui/{skins/simple/components/multiprogressbar => swing/components}/MultiProgressBar.java (96%) rename src/jd/gui/{skins/simple/components/multiprogressbar => swing/components}/ProgressEntry.java (92%) rename src/jd/gui/{skins/simple => swing}/components/SpeedMeterPanel.java (96%) rename src/jd/gui/{skins/jdgui => swing}/components/linkbutton/JLink.java (96%) rename src/jd/gui/{skins/jdgui => swing}/components/linkbutton/JLinkButtonEditor.java (92%) create mode 100644 src/jd/gui/swing/components/pieapi/ChartAPI.java create mode 100644 src/jd/gui/swing/components/pieapi/ChartAPIEntity.java rename src/jd/gui/{skins/simple/components => swing/components/pieapi}/PieChartAPI.java (91%) rename src/jd/gui/{skins/jdgui => }/swing/menu/HosterMenu.java (93%) rename src/jd/gui/{skins/jdgui => }/swing/menu/Menu.java (94%) diff --git a/src/jd/Installer.java b/src/jd/Installer.java index 98f1fa5c78..dce35af7dc 100644 --- a/src/jd/Installer.java +++ b/src/jd/Installer.java @@ -38,11 +38,11 @@ import jd.config.Configuration; import jd.config.SubConfiguration; import jd.controlling.JDLogger; import jd.gui.UserIO; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.simple.components.BrowseFile; import jd.gui.skins.swing.Factory; import jd.gui.skins.swing.dialog.AbstractDialog; import jd.gui.skins.swing.dialog.ContainerDialog; +import jd.gui.swing.GuiRunnable; import jd.nutils.JDFlags; import jd.nutils.JDImage; import jd.nutils.OSDetector; diff --git a/src/jd/KikinDialog.java b/src/jd/KikinDialog.java index ac9595e638..603ffa2614 100644 --- a/src/jd/KikinDialog.java +++ b/src/jd/KikinDialog.java @@ -33,8 +33,8 @@ import javax.swing.event.HyperlinkEvent; import javax.swing.event.HyperlinkListener; import jd.gui.UserIO; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.swing.dialog.AbstractDialog; +import jd.gui.swing.components.linkbutton.JLink; import jd.http.Browser; import jd.nutils.JDImage; import jd.nutils.OSDetector; diff --git a/src/jd/Main.java b/src/jd/Main.java index d53e7e90ef..52d40ef105 100644 --- a/src/jd/Main.java +++ b/src/jd/Main.java @@ -58,10 +58,10 @@ import jd.event.ControlEvent; import jd.gui.UserIO; import jd.gui.skins.jdgui.GUIUtils; import jd.gui.skins.jdgui.JDGuiConstants; -import jd.gui.skins.jdgui.components.linkbutton.JLink; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.userio.UserIOGui; import jd.gui.skins.swing.MacOSController; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.linkbutton.JLink; import jd.http.Browser; import jd.http.URLConnectionAdapter; import jd.nutils.OSDetector; diff --git a/src/jd/SplashScreen.java b/src/jd/SplashScreen.java index b802e9b372..d855a7811d 100644 --- a/src/jd/SplashScreen.java +++ b/src/jd/SplashScreen.java @@ -43,7 +43,7 @@ import jd.controlling.JDController; import jd.event.ControlEvent; import jd.event.ControlListener; import jd.gui.skins.jdgui.GUIUtils; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.gui.swing.laf.LookAndFeelController; import jd.nutils.nativeintegration.ScreenDevices; import jd.utils.JDTheme; diff --git a/src/jd/Tester.java b/src/jd/Tester.java index 12ffa2cdf6..59ee0bd912 100644 --- a/src/jd/Tester.java +++ b/src/jd/Tester.java @@ -7,7 +7,7 @@ import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.UIManager; -import jd.gui.skins.jdgui.components.linkbutton.JLink; +import jd.gui.swing.components.linkbutton.JLink; import net.miginfocom.swing.MigLayout; import de.javasoft.plaf.synthetica.SyntheticaStandardLookAndFeel; diff --git a/src/jd/captcha/utils/Utilities.java b/src/jd/captcha/utils/Utilities.java index ccf697c9a0..d060f04cba 100644 --- a/src/jd/captcha/utils/Utilities.java +++ b/src/jd/captcha/utils/Utilities.java @@ -27,7 +27,7 @@ import javax.swing.JFileChooser; import javax.swing.JFrame; import jd.controlling.JDLogger; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.utils.JDUtilities; /** diff --git a/src/jd/controlling/AccountController.java b/src/jd/controlling/AccountController.java index 60cfdae58f..e68bb6d452 100644 --- a/src/jd/controlling/AccountController.java +++ b/src/jd/controlling/AccountController.java @@ -28,7 +28,7 @@ import jd.config.Configuration; import jd.config.SubConfiguration; import jd.event.JDBroadcaster; import jd.event.JDEvent; -import jd.gui.skins.jdgui.components.Balloon; +import jd.gui.swing.components.Balloon; import jd.plugins.Account; import jd.plugins.PluginForHost; import jd.utils.JDTheme; diff --git a/src/jd/controlling/SingleDownloadController.java b/src/jd/controlling/SingleDownloadController.java index bce116406b..f6d3b2d277 100644 --- a/src/jd/controlling/SingleDownloadController.java +++ b/src/jd/controlling/SingleDownloadController.java @@ -26,9 +26,9 @@ import jd.config.Configuration; import jd.config.SubConfiguration; import jd.controlling.interaction.Interaction; import jd.event.ControlEvent; -import jd.gui.skins.jdgui.components.Balloon; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.simple.AgbDialog; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.Balloon; import jd.http.Browser.BrowserException; import jd.nutils.Formatter; import jd.plugins.DownloadLink; diff --git a/src/jd/gui/skins/jdgui/JDGui.java b/src/jd/gui/skins/jdgui/JDGui.java index 4ce1666bff..0d0b312151 100644 --- a/src/jd/gui/skins/jdgui/JDGui.java +++ b/src/jd/gui/skins/jdgui/JDGui.java @@ -17,16 +17,15 @@ package jd.gui.skins.jdgui; import java.awt.Color; +import java.awt.Cursor; import java.awt.Dimension; import java.awt.Image; import java.awt.Toolkit; -import java.awt.event.ActionEvent; import java.awt.event.WindowEvent; import java.text.DateFormat; import java.util.ArrayList; import java.util.Date; -import javax.swing.AbstractAction; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; @@ -50,8 +49,6 @@ import jd.gui.UIConstants; import jd.gui.UserIF; import jd.gui.UserIO; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.components.Balloon; -import jd.gui.skins.jdgui.components.JDCollapser; import jd.gui.skins.jdgui.components.JDStatusBar; import jd.gui.skins.jdgui.components.toolbar.MainToolBar; import jd.gui.skins.jdgui.events.EDTEventQueue; @@ -68,7 +65,6 @@ import jd.gui.skins.jdgui.menu.actions.ExitAction; import jd.gui.skins.jdgui.menu.actions.RestartAction; import jd.gui.skins.jdgui.settings.ConfigPanel; import jd.gui.skins.jdgui.settings.GUIConfigEntry; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.views.ConfigurationView; import jd.gui.skins.jdgui.views.DownloadView; import jd.gui.skins.jdgui.views.LinkgrabberView; @@ -76,8 +72,11 @@ import jd.gui.skins.jdgui.views.LogView; import jd.gui.skins.jdgui.views.TabbedPanelView; import jd.gui.skins.jdgui.views.linkgrabberview.LinkGrabberPanel; import jd.gui.skins.simple.components.ChartAPIEntity; -import jd.gui.skins.simple.components.PieChartAPI; import jd.gui.skins.swing.dialog.ContainerDialog; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.Balloon; +import jd.gui.swing.components.JDCollapser; +import jd.gui.swing.components.pieapi.PieChartAPI; import jd.nutils.Formatter; import jd.nutils.JDFlags; import jd.nutils.JDImage; @@ -112,6 +111,7 @@ public class JDGui extends SwingGui implements LinkGrabberDistributeEvent { private LogView logView; private MainToolBar toolBar; + private JPanel waitingPane; private JDGui() { super(""); @@ -264,7 +264,8 @@ public class JDGui extends SwingGui implements LinkGrabberDistributeEvent { private void initComponents() { this.menuBar = createMenuBar(); statusBar = new JDStatusBar(); - + this.waitingPane = new JPanel(); + waitingPane.setOpaque(false); mainTabbedPane = MainTabbedPane.getInstance(); multiProgressBar = new TabProgress(); @@ -280,14 +281,7 @@ public class JDGui extends SwingGui implements LinkGrabberDistributeEvent { // mainTabbedPane.add(new JLabel("III4")); mainTabbedPane.addTab(downloadView); - mainTabbedPane.setClosableAction(new AbstractAction() { - public void actionPerformed(ActionEvent e) { - System.out.println("KKK"); - - } - - }, -1); mainTabbedPane.addTab(linkgrabberView); mainTabbedPane.addTab(configurationView); @@ -504,7 +498,11 @@ public class JDGui extends SwingGui implements LinkGrabberDistributeEvent { @Override public void setWaiting(boolean b) { - // TODO Auto-generated method stub + SwingGui.checkEDT(); + this.getMainFrame().setGlassPane(this.waitingPane); + waitingPane.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + this.getMainFrame().getGlassPane().setVisible(true); + } @Override diff --git a/src/jd/gui/skins/jdgui/TabProgress.java b/src/jd/gui/skins/jdgui/TabProgress.java index b9589c8638..e069351d42 100644 --- a/src/jd/gui/skins/jdgui/TabProgress.java +++ b/src/jd/gui/skins/jdgui/TabProgress.java @@ -36,7 +36,7 @@ import javax.swing.JSeparator; import jd.controlling.ProgressController; import jd.event.ControlEvent; import jd.event.ControlListener; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.utils.JDTheme; import jd.utils.JDUtilities; import jd.utils.locale.JDL; diff --git a/src/jd/gui/skins/jdgui/actions/ActionController.java b/src/jd/gui/skins/jdgui/actions/ActionController.java index 2c78032d32..4a8ba5a1f8 100644 --- a/src/jd/gui/skins/jdgui/actions/ActionController.java +++ b/src/jd/gui/skins/jdgui/actions/ActionController.java @@ -24,9 +24,9 @@ import jd.event.JDBroadcaster; import jd.gui.UserIF; import jd.gui.UserIO; import jd.gui.skins.jdgui.actions.event.ActionControllerListener; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.views.linkgrabberview.LinkGrabberPanel; import jd.gui.skins.simple.components.JDFileChooser; +import jd.gui.swing.GuiRunnable; import jd.nutils.JDFlags; import jd.nutils.io.JDFileFilter; import jd.parser.html.HTMLParser; diff --git a/src/jd/gui/skins/jdgui/components/JDStatusBar.java b/src/jd/gui/skins/jdgui/components/JDStatusBar.java index 352bfa137b..e375d161cb 100644 --- a/src/jd/gui/skins/jdgui/components/JDStatusBar.java +++ b/src/jd/gui/skins/jdgui/components/JDStatusBar.java @@ -30,6 +30,7 @@ import jd.config.Property; import jd.config.SubConfiguration; import jd.event.ControlEvent; import jd.event.ControlListener; +import jd.gui.skins.jdgui.components.premiumbar.PremiumStatus; import jd.nutils.Formatter; import jd.utils.JDTheme; import jd.utils.JDUtilities; diff --git a/src/jd/gui/skins/jdgui/components/PremiumStatus.java b/src/jd/gui/skins/jdgui/components/premiumbar/PremiumStatus.java similarity index 96% rename from src/jd/gui/skins/jdgui/components/PremiumStatus.java rename to src/jd/gui/skins/jdgui/components/premiumbar/PremiumStatus.java index 7612baeceb..254e1c82de 100644 --- a/src/jd/gui/skins/jdgui/components/PremiumStatus.java +++ b/src/jd/gui/skins/jdgui/components/premiumbar/PremiumStatus.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.jdgui.components; +package jd.gui.skins.jdgui.components.premiumbar; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -44,10 +44,9 @@ import jd.controlling.AccountControllerListener; import jd.controlling.JDController; import jd.gui.UserIO; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.swing.GuiRunnable; -import jd.gui.skins.jdgui.swing.menu.HosterMenu; -import jd.gui.skins.jdgui.swing.menu.Menu; -import jd.gui.skins.simple.TinyProgressBar; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.menu.HosterMenu; +import jd.gui.swing.menu.Menu; import jd.nutils.Formatter; import jd.nutils.JDFlags; import jd.plugins.Account; diff --git a/src/jd/gui/skins/simple/TinyProgressBar.java b/src/jd/gui/skins/jdgui/components/premiumbar/TinyProgressBar.java similarity index 94% rename from src/jd/gui/skins/simple/TinyProgressBar.java rename to src/jd/gui/skins/jdgui/components/premiumbar/TinyProgressBar.java index 9d9f90f4c1..c4e2470856 100644 --- a/src/jd/gui/skins/simple/TinyProgressBar.java +++ b/src/jd/gui/skins/jdgui/components/premiumbar/TinyProgressBar.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.simple; +package jd.gui.skins.jdgui.components.premiumbar; import java.awt.Cursor; diff --git a/src/jd/gui/skins/jdgui/components/toolbar/MainToolBar.java b/src/jd/gui/skins/jdgui/components/toolbar/MainToolBar.java index aabf70a7c2..b3236d05cb 100644 --- a/src/jd/gui/skins/jdgui/components/toolbar/MainToolBar.java +++ b/src/jd/gui/skins/jdgui/components/toolbar/MainToolBar.java @@ -19,8 +19,8 @@ package jd.gui.skins.jdgui.components.toolbar; import jd.controlling.JDController; import jd.event.ControlEvent; import jd.event.ControlListener; -import jd.gui.skins.jdgui.swing.GuiRunnable; -import jd.gui.skins.simple.components.SpeedMeterPanel; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.SpeedMeterPanel; public class MainToolBar extends ToolBar implements ControlListener { /** diff --git a/src/jd/gui/skins/jdgui/components/toolbar/ToolBar.java b/src/jd/gui/skins/jdgui/components/toolbar/ToolBar.java index 2ab9125ca9..8054a4b13f 100644 --- a/src/jd/gui/skins/jdgui/components/toolbar/ToolBar.java +++ b/src/jd/gui/skins/jdgui/components/toolbar/ToolBar.java @@ -17,7 +17,7 @@ import jd.gui.skins.jdgui.actions.ActionControlEvent; import jd.gui.skins.jdgui.actions.ActionController; import jd.gui.skins.jdgui.actions.ToolBarAction; import jd.gui.skins.jdgui.actions.event.ActionControllerListener; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.utils.JDTheme; import net.miginfocom.swing.MigLayout; diff --git a/src/jd/gui/skins/jdgui/events/EDTEventQueue.java b/src/jd/gui/skins/jdgui/events/EDTEventQueue.java index e416691233..5371cf8734 100644 --- a/src/jd/gui/skins/jdgui/events/EDTEventQueue.java +++ b/src/jd/gui/skins/jdgui/events/EDTEventQueue.java @@ -43,8 +43,8 @@ import javax.swing.SwingUtilities; import javax.swing.text.JTextComponent; import jd.gui.skins.jdgui.JDGui; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.simple.MouseFollower; +import jd.gui.swing.components.linkbutton.JLink; import jd.nutils.Formatter; import jd.utils.JDTheme; import jd.utils.locale.JDL; diff --git a/src/jd/gui/skins/jdgui/menu/AddonsMenu.java b/src/jd/gui/skins/jdgui/menu/AddonsMenu.java index 2af1b52698..5757a7a983 100644 --- a/src/jd/gui/skins/jdgui/menu/AddonsMenu.java +++ b/src/jd/gui/skins/jdgui/menu/AddonsMenu.java @@ -25,7 +25,7 @@ import javax.swing.JMenuItem; import jd.OptionalPluginWrapper; import jd.config.MenuItem; import jd.gui.UserIF; -import jd.gui.skins.jdgui.swing.menu.Menu; +import jd.gui.swing.menu.Menu; import jd.plugins.Plugin; import jd.utils.JDTheme; import jd.utils.locale.JDL; diff --git a/src/jd/gui/skins/jdgui/menu/PremiumMenu.java b/src/jd/gui/skins/jdgui/menu/PremiumMenu.java index 45daa74589..e67d4a945b 100644 --- a/src/jd/gui/skins/jdgui/menu/PremiumMenu.java +++ b/src/jd/gui/skins/jdgui/menu/PremiumMenu.java @@ -23,7 +23,7 @@ import javax.swing.JCheckBoxMenuItem; import jd.config.Configuration; import jd.gui.UserIO; -import jd.gui.skins.jdgui.swing.menu.HosterMenu; +import jd.gui.swing.menu.HosterMenu; import jd.nutils.JDFlags; import jd.utils.JDTheme; import jd.utils.JDUtilities; diff --git a/src/jd/gui/skins/jdgui/menu/actions/AboutAction.java b/src/jd/gui/skins/jdgui/menu/actions/AboutAction.java index d06027fa6c..0cb480acba 100644 --- a/src/jd/gui/skins/jdgui/menu/actions/AboutAction.java +++ b/src/jd/gui/skins/jdgui/menu/actions/AboutAction.java @@ -18,7 +18,7 @@ package jd.gui.skins.jdgui.menu.actions; import java.awt.event.ActionEvent; -import jd.gui.skins.simple.AboutDialog; +import jd.gui.swing.components.AboutDialog; public class AboutAction extends StartAction { diff --git a/src/jd/gui/skins/jdgui/menu/actions/BackupAction.java b/src/jd/gui/skins/jdgui/menu/actions/BackupAction.java index c27aca8355..2edb7ca8f3 100644 --- a/src/jd/gui/skins/jdgui/menu/actions/BackupAction.java +++ b/src/jd/gui/skins/jdgui/menu/actions/BackupAction.java @@ -18,7 +18,7 @@ package jd.gui.skins.jdgui.menu.actions; import java.awt.event.ActionEvent; -import jd.gui.skins.jdgui.components.Balloon; +import jd.gui.swing.components.Balloon; import jd.update.JDUpdateUtils; import jd.utils.JDTheme; import jd.utils.locale.JDL; diff --git a/src/jd/gui/skins/jdgui/menu/actions/KnowledgeAction.java b/src/jd/gui/skins/jdgui/menu/actions/KnowledgeAction.java index 93b0415234..b4a88afe60 100644 --- a/src/jd/gui/skins/jdgui/menu/actions/KnowledgeAction.java +++ b/src/jd/gui/skins/jdgui/menu/actions/KnowledgeAction.java @@ -18,7 +18,7 @@ package jd.gui.skins.jdgui.menu.actions; import java.awt.event.ActionEvent; -import jd.gui.skins.jdgui.components.linkbutton.JLink; +import jd.gui.swing.components.linkbutton.JLink; public class KnowledgeAction extends StartAction { diff --git a/src/jd/gui/skins/jdgui/menu/actions/LatestChanges.java b/src/jd/gui/skins/jdgui/menu/actions/LatestChanges.java index 8f5b236275..867d115d96 100644 --- a/src/jd/gui/skins/jdgui/menu/actions/LatestChanges.java +++ b/src/jd/gui/skins/jdgui/menu/actions/LatestChanges.java @@ -18,7 +18,7 @@ package jd.gui.skins.jdgui.menu.actions; import java.awt.event.ActionEvent; -import jd.gui.skins.jdgui.components.linkbutton.JLink; +import jd.gui.swing.components.linkbutton.JLink; public class LatestChanges extends StartAction { diff --git a/src/jd/gui/skins/jdgui/settings/GUIConfigEntry.java b/src/jd/gui/skins/jdgui/settings/GUIConfigEntry.java index f680af72d6..debd1b542b 100644 --- a/src/jd/gui/skins/jdgui/settings/GUIConfigEntry.java +++ b/src/jd/gui/skins/jdgui/settings/GUIConfigEntry.java @@ -48,11 +48,11 @@ import jd.config.ConfigContainer; import jd.config.ConfigEntry; import jd.config.container.JDLabelContainer; import jd.controlling.JDLogger; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.settings.subpanels.PremiumPanel; import jd.gui.skins.simple.components.BrowseFile; import jd.gui.skins.simple.components.JDTextArea; import jd.gui.skins.simple.components.JDTextField; +import jd.gui.swing.components.linkbutton.JLink; import jd.utils.locale.JDL; /** diff --git a/src/jd/gui/skins/jdgui/settings/panels/ConfigPanelPluginForHost.java b/src/jd/gui/skins/jdgui/settings/panels/ConfigPanelPluginForHost.java index 5621206056..28fa4a3bb1 100644 --- a/src/jd/gui/skins/jdgui/settings/panels/ConfigPanelPluginForHost.java +++ b/src/jd/gui/skins/jdgui/settings/panels/ConfigPanelPluginForHost.java @@ -41,9 +41,9 @@ import jd.config.Configuration; import jd.config.ConfigEntry.PropertyType; import jd.gui.UserIF; import jd.gui.UserIO; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.settings.ConfigPanel; import jd.gui.skins.simple.SimpleGUI; +import jd.gui.swing.components.linkbutton.JLink; import jd.nutils.Colors; import jd.nutils.JDFlags; import jd.utils.JDTheme; diff --git a/src/jd/gui/skins/jdgui/settings/panels/gui/Browser.java b/src/jd/gui/skins/jdgui/settings/panels/gui/Browser.java index a697d82244..6de04c5352 100644 --- a/src/jd/gui/skins/jdgui/settings/panels/gui/Browser.java +++ b/src/jd/gui/skins/jdgui/settings/panels/gui/Browser.java @@ -30,9 +30,9 @@ import jd.controlling.JDLogger; import jd.gui.UserIO; import jd.gui.skins.jdgui.GUIUtils; import jd.gui.skins.jdgui.JDGuiConstants; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.settings.ConfigPanel; import jd.gui.skins.jdgui.settings.GUIConfigEntry; +import jd.gui.swing.components.linkbutton.JLink; import jd.nutils.JDFlags; import jd.nutils.OSDetector; import jd.nutils.nativeintegration.LocalBrowser; diff --git a/src/jd/gui/skins/jdgui/settings/panels/reconnect/MethodSelection.java b/src/jd/gui/skins/jdgui/settings/panels/reconnect/MethodSelection.java index bf82b6e975..c25fd95319 100644 --- a/src/jd/gui/skins/jdgui/settings/panels/reconnect/MethodSelection.java +++ b/src/jd/gui/skins/jdgui/settings/panels/reconnect/MethodSelection.java @@ -42,8 +42,8 @@ import jd.gui.skins.jdgui.settings.ConfigPanel; import jd.gui.skins.jdgui.settings.GUIConfigEntry; import jd.gui.skins.jdgui.settings.subpanels.SubPanelCLRReconnect; import jd.gui.skins.jdgui.settings.subpanels.SubPanelLiveHeaderReconnect; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.swing.Factory; +import jd.gui.swing.GuiRunnable; import jd.nutils.Formatter; import jd.utils.JDTheme; import jd.utils.JDUtilities; diff --git a/src/jd/gui/skins/jdgui/settings/subpanels/PremiumPanel.java b/src/jd/gui/skins/jdgui/settings/subpanels/PremiumPanel.java index ff89a0a722..3adf103486 100644 --- a/src/jd/gui/skins/jdgui/settings/subpanels/PremiumPanel.java +++ b/src/jd/gui/skins/jdgui/settings/subpanels/PremiumPanel.java @@ -56,14 +56,14 @@ import jd.controlling.JDLogger; import jd.event.ControlEvent; import jd.event.ControlListener; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.settings.GUIConfigEntry; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.views.downloadview.JDProgressBar; import jd.gui.skins.simple.components.ChartAPIEntity; import jd.gui.skins.simple.components.JDTextField; -import jd.gui.skins.simple.components.PieChartAPI; import jd.gui.skins.swing.Factory; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.linkbutton.JLink; +import jd.gui.swing.components.pieapi.PieChartAPI; import jd.http.Encoding; import jd.nutils.Formatter; import jd.plugins.Account; diff --git a/src/jd/gui/skins/jdgui/settings/subpanels/SubPanelLiveHeaderReconnect.java b/src/jd/gui/skins/jdgui/settings/subpanels/SubPanelLiveHeaderReconnect.java index d1da1bc893..84536b6a2c 100644 --- a/src/jd/gui/skins/jdgui/settings/subpanels/SubPanelLiveHeaderReconnect.java +++ b/src/jd/gui/skins/jdgui/settings/subpanels/SubPanelLiveHeaderReconnect.java @@ -50,7 +50,7 @@ import jd.gui.UserIO; import jd.gui.skins.SwingGui; import jd.gui.skins.jdgui.settings.ConfigPanel; import jd.gui.skins.jdgui.settings.GUIConfigEntry; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.http.Encoding; import jd.router.FindRouterIP; import jd.router.GetRouterInfo; diff --git a/src/jd/gui/skins/jdgui/userio/UserIOGui.java b/src/jd/gui/skins/jdgui/userio/UserIOGui.java index b440b307e7..7f6d265a74 100644 --- a/src/jd/gui/skins/jdgui/userio/UserIOGui.java +++ b/src/jd/gui/skins/jdgui/userio/UserIOGui.java @@ -23,7 +23,6 @@ import javax.swing.ImageIcon; import javax.swing.filechooser.FileFilter; import jd.gui.UserIO; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.simple.components.JDFileChooser; import jd.gui.skins.swing.dialog.CaptchaDialog; import jd.gui.skins.swing.dialog.ClickPositionDialog; @@ -33,6 +32,7 @@ import jd.gui.skins.swing.dialog.HtmlDialog; import jd.gui.skins.swing.dialog.InputDialog; import jd.gui.skins.swing.dialog.TextAreaDialog; import jd.gui.skins.swing.dialog.TwoTextFieldDialog; +import jd.gui.swing.GuiRunnable; import jd.gui.userio.DummyFrame; import jd.nutils.JDFlags; import jd.utils.JDTheme; diff --git a/src/jd/gui/skins/jdgui/views/downloadview/DownloadLinksPanel.java b/src/jd/gui/skins/jdgui/views/downloadview/DownloadLinksPanel.java index 070f427bdf..4af611e402 100644 --- a/src/jd/gui/skins/jdgui/views/downloadview/DownloadLinksPanel.java +++ b/src/jd/gui/skins/jdgui/views/downloadview/DownloadLinksPanel.java @@ -46,11 +46,11 @@ import jd.gui.skins.SwingGui; import jd.gui.skins.jdgui.GUIUtils; import jd.gui.skins.jdgui.InfoPanelHandler; import jd.gui.skins.jdgui.JDGuiConstants; -import jd.gui.skins.jdgui.components.JDCollapser; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.interfaces.SwitchPanel; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.simple.components.JDFileChooser; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.JDCollapser; +import jd.gui.swing.components.linkbutton.JLink; import jd.nutils.JDFlags; import jd.nutils.io.JDFileFilter; import jd.nutils.io.JDIO; diff --git a/src/jd/gui/skins/jdgui/views/downloadview/DownloadTable.java b/src/jd/gui/skins/jdgui/views/downloadview/DownloadTable.java index 44966d7d25..cdf43fea6f 100644 --- a/src/jd/gui/skins/jdgui/views/downloadview/DownloadTable.java +++ b/src/jd/gui/skins/jdgui/views/downloadview/DownloadTable.java @@ -52,10 +52,10 @@ import jd.config.Property; import jd.config.SubConfiguration; import jd.controlling.DownloadWatchDog; import jd.event.ControlEvent; -import jd.gui.skins.jdgui.components.JExtCheckBoxMenuItem; -import jd.gui.skins.jdgui.swing.GuiRunnable; -import jd.gui.skins.jdgui.swing.menu.Menu; import jd.gui.skins.simple.components.RowHighlighter; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.JExtCheckBoxMenuItem; +import jd.gui.swing.menu.Menu; import jd.plugins.DownloadLink; import jd.plugins.FilePackage; import jd.plugins.LinkStatus; diff --git a/src/jd/gui/skins/jdgui/views/downloadview/FilePackageInfo.java b/src/jd/gui/skins/jdgui/views/downloadview/FilePackageInfo.java index 5e54ff894c..9f571f7ad2 100644 --- a/src/jd/gui/skins/jdgui/views/downloadview/FilePackageInfo.java +++ b/src/jd/gui/skins/jdgui/views/downloadview/FilePackageInfo.java @@ -34,7 +34,7 @@ import jd.gui.skins.jdgui.interfaces.SwitchPanel; import jd.gui.skins.simple.components.ComboBrowseFile; import jd.gui.skins.simple.components.JDFileChooser; import jd.gui.skins.simple.components.JDTextField; -import jd.gui.skins.simple.components.multiprogressbar.MultiProgressBar; +import jd.gui.swing.components.MultiProgressBar; import jd.nutils.Formatter; import jd.plugins.DownloadLink; import jd.plugins.FilePackage; diff --git a/src/jd/gui/skins/jdgui/views/info/DownloadInfoPanel.java b/src/jd/gui/skins/jdgui/views/info/DownloadInfoPanel.java index 13f0164662..58a8548293 100644 --- a/src/jd/gui/skins/jdgui/views/info/DownloadInfoPanel.java +++ b/src/jd/gui/skins/jdgui/views/info/DownloadInfoPanel.java @@ -2,7 +2,7 @@ package jd.gui.skins.jdgui.views.info; import jd.controlling.DownloadController; import jd.controlling.DownloadInformations; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.nutils.Formatter; import jd.utils.JDTheme; import jd.utils.JDUtilities; diff --git a/src/jd/gui/skins/jdgui/views/info/LinkGrabberInfoPanel.java b/src/jd/gui/skins/jdgui/views/info/LinkGrabberInfoPanel.java index 343593addf..9961e74dc4 100644 --- a/src/jd/gui/skins/jdgui/views/info/LinkGrabberInfoPanel.java +++ b/src/jd/gui/skins/jdgui/views/info/LinkGrabberInfoPanel.java @@ -9,7 +9,7 @@ import javax.swing.JCheckBox; import jd.controlling.LinkGrabberController; import jd.gui.skins.jdgui.GUIUtils; import jd.gui.skins.jdgui.JDGuiConstants; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.nutils.Formatter; import jd.plugins.LinkGrabberFilePackage; import jd.utils.JDTheme; diff --git a/src/jd/gui/skins/jdgui/views/info/LogInfoPanel.java b/src/jd/gui/skins/jdgui/views/info/LogInfoPanel.java index 126eada11d..3861060b40 100644 --- a/src/jd/gui/skins/jdgui/views/info/LogInfoPanel.java +++ b/src/jd/gui/skins/jdgui/views/info/LogInfoPanel.java @@ -6,8 +6,8 @@ import java.awt.event.ActionListener; import javax.swing.JButton; import jd.controlling.JDLogger; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.swing.Factory; +import jd.gui.swing.GuiRunnable; import jd.utils.JDTheme; import jd.utils.locale.JDL; diff --git a/src/jd/gui/skins/jdgui/views/linkgrabberview/LinkGrabberPanel.java b/src/jd/gui/skins/jdgui/views/linkgrabberview/LinkGrabberPanel.java index 0ac8cf78f7..cb94a7b94c 100644 --- a/src/jd/gui/skins/jdgui/views/linkgrabberview/LinkGrabberPanel.java +++ b/src/jd/gui/skins/jdgui/views/linkgrabberview/LinkGrabberPanel.java @@ -48,12 +48,12 @@ import jd.gui.skins.jdgui.GUIUtils; import jd.gui.skins.jdgui.InfoPanelHandler; import jd.gui.skins.jdgui.JDGuiConstants; import jd.gui.skins.jdgui.actions.ThreadedAction; -import jd.gui.skins.jdgui.components.Balloon; -import jd.gui.skins.jdgui.components.JDCollapser; import jd.gui.skins.jdgui.interfaces.SwitchPanel; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.views.toolbar.ViewToolbar; import jd.gui.skins.simple.components.JDFileChooser; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.Balloon; +import jd.gui.swing.components.JDCollapser; import jd.nutils.io.JDFileFilter; import jd.nutils.io.JDIO; import jd.nutils.jobber.Jobber; diff --git a/src/jd/gui/skins/jdgui/views/linkgrabberview/LinkGrabberTable.java b/src/jd/gui/skins/jdgui/views/linkgrabberview/LinkGrabberTable.java index 26475aaa20..dd8f523f61 100644 --- a/src/jd/gui/skins/jdgui/views/linkgrabberview/LinkGrabberTable.java +++ b/src/jd/gui/skins/jdgui/views/linkgrabberview/LinkGrabberTable.java @@ -51,9 +51,9 @@ import jd.config.Property; import jd.config.SubConfiguration; import jd.controlling.LinkGrabberController; import jd.gui.skins.jdgui.actions.ActionController; -import jd.gui.skins.jdgui.components.JExtCheckBoxMenuItem; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.simple.components.RowHighlighter; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.JExtCheckBoxMenuItem; import jd.plugins.DownloadLink; import jd.plugins.LinkGrabberFilePackage; import jd.plugins.LinkStatus; diff --git a/src/jd/gui/skins/jdgui/views/sidebars/configuration/ConfigSidebar.java b/src/jd/gui/skins/jdgui/views/sidebars/configuration/ConfigSidebar.java index 50e81c482d..dcdf8c7e02 100644 --- a/src/jd/gui/skins/jdgui/views/sidebars/configuration/ConfigSidebar.java +++ b/src/jd/gui/skins/jdgui/views/sidebars/configuration/ConfigSidebar.java @@ -9,9 +9,9 @@ import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; import jd.gui.skins.jdgui.interfaces.SideBarPanel; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.views.ConfigurationView; import jd.gui.skins.jdgui.views.sidebars.configuration.ConfigTreeModel.TreeEntry; +import jd.gui.swing.GuiRunnable; import net.miginfocom.swing.MigLayout; public class ConfigSidebar extends SideBarPanel { diff --git a/src/jd/gui/skins/jdgui/views/sidebars/configuration/ConfigTreeModel.java b/src/jd/gui/skins/jdgui/views/sidebars/configuration/ConfigTreeModel.java index db74ae283d..b83d87359b 100644 --- a/src/jd/gui/skins/jdgui/views/sidebars/configuration/ConfigTreeModel.java +++ b/src/jd/gui/skins/jdgui/views/sidebars/configuration/ConfigTreeModel.java @@ -12,7 +12,7 @@ import jd.gui.skins.jdgui.interfaces.SwitchPanel; import jd.gui.skins.jdgui.settings.panels.ConfigPanelAddons; import jd.gui.skins.jdgui.settings.panels.ConfigPanelGeneral; import jd.gui.skins.jdgui.settings.panels.ConfigPanelPluginForHost; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.utils.JDTheme; import jd.utils.JDUtilities; import jd.utils.locale.JDL; diff --git a/src/jd/gui/skins/jdgui/views/toolbar/ViewToolbar.java b/src/jd/gui/skins/jdgui/views/toolbar/ViewToolbar.java index 4bae2a12ea..02c2e4622a 100644 --- a/src/jd/gui/skins/jdgui/views/toolbar/ViewToolbar.java +++ b/src/jd/gui/skins/jdgui/views/toolbar/ViewToolbar.java @@ -19,7 +19,7 @@ import jd.gui.skins.jdgui.actions.ActionControlEvent; import jd.gui.skins.jdgui.actions.ActionController; import jd.gui.skins.jdgui.actions.ToolBarAction; import jd.gui.skins.jdgui.actions.event.ActionControllerListener; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.utils.JDTheme; import net.miginfocom.swing.MigLayout; diff --git a/src/jd/gui/skins/simple/AgbDialog.java b/src/jd/gui/skins/simple/AgbDialog.java index 8fcfe4794e..c18f158996 100644 --- a/src/jd/gui/skins/simple/AgbDialog.java +++ b/src/jd/gui/skins/simple/AgbDialog.java @@ -24,8 +24,8 @@ import javax.swing.JLabel; import javax.swing.JPanel; import jd.gui.UserIO; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.swing.dialog.AbstractDialog; +import jd.gui.swing.components.linkbutton.JLink; import jd.nutils.JDFlags; import jd.plugins.DownloadLink; import jd.utils.locale.JDL; diff --git a/src/jd/gui/skins/simple/ConvertDialog.java b/src/jd/gui/skins/simple/ConvertDialog.java index c97b3cd6a1..f1f952d87b 100644 --- a/src/jd/gui/skins/simple/ConvertDialog.java +++ b/src/jd/gui/skins/simple/ConvertDialog.java @@ -24,7 +24,7 @@ import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.utils.locale.JDL; /** diff --git a/src/jd/gui/skins/simple/LogPane.java b/src/jd/gui/skins/simple/LogPane.java index 50dbbf95e3..21e003e1ac 100644 --- a/src/jd/gui/skins/simple/LogPane.java +++ b/src/jd/gui/skins/simple/LogPane.java @@ -40,10 +40,10 @@ import jd.event.ControlEvent; import jd.event.ControlListener; import jd.gui.UserIO; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.interfaces.SwitchPanel; import jd.gui.skins.jdgui.views.info.LogInfoPanel; import jd.gui.skins.simple.components.JDFileChooser; +import jd.gui.swing.components.linkbutton.JLink; import jd.http.Encoding; import jd.http.HTMLEntities; import jd.nutils.JDFlags; diff --git a/src/jd/gui/skins/simple/MouseFollower.java b/src/jd/gui/skins/simple/MouseFollower.java index e9667a09a8..af4a3179c9 100644 --- a/src/jd/gui/skins/simple/MouseFollower.java +++ b/src/jd/gui/skins/simple/MouseFollower.java @@ -22,7 +22,7 @@ import java.awt.Point; import javax.swing.JComponent; import javax.swing.JWindow; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; public class MouseFollower { diff --git a/src/jd/gui/skins/simple/SimpleGUI.java b/src/jd/gui/skins/simple/SimpleGUI.java index 10c9afbd71..d8e07b008d 100644 --- a/src/jd/gui/skins/simple/SimpleGUI.java +++ b/src/jd/gui/skins/simple/SimpleGUI.java @@ -52,10 +52,7 @@ import jd.gui.UserIO; import jd.gui.skins.jdgui.GUIUtils; import jd.gui.skins.jdgui.JDGuiConstants; import jd.gui.skins.jdgui.TabProgress; -import jd.gui.skins.jdgui.components.Balloon; -import jd.gui.skins.jdgui.components.JDCollapser; import jd.gui.skins.jdgui.components.JDStatusBar; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.components.toolbar.MainToolBar; import jd.gui.skins.jdgui.interfaces.JDMouseAdapter; import jd.gui.skins.jdgui.interfaces.SwitchPanel; @@ -70,6 +67,9 @@ import jd.gui.skins.jdgui.menu.SaveMenu; import jd.gui.skins.jdgui.menu.actions.ExitAction; import jd.gui.skins.jdgui.menu.actions.RestartAction; import jd.gui.skins.jdgui.views.downloadview.DownloadLinksPanel; +import jd.gui.swing.components.Balloon; +import jd.gui.swing.components.JDCollapser; +import jd.gui.swing.components.linkbutton.JLink; import jd.gui.swing.laf.LookAndFeelController; import jd.nutils.JDFlags; import jd.nutils.JDImage; diff --git a/src/jd/gui/skins/swing/Factory.java b/src/jd/gui/skins/swing/Factory.java index ce3ca33ff1..872c247bae 100644 --- a/src/jd/gui/skins/swing/Factory.java +++ b/src/jd/gui/skins/swing/Factory.java @@ -30,8 +30,8 @@ import javax.swing.JSeparator; import jd.config.ConfigGroup; import jd.controlling.JDLogger; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.simple.components.JDUnderlinedText; +import jd.gui.swing.components.linkbutton.JLink; import jd.utils.JDTheme; import net.miginfocom.swing.MigLayout; diff --git a/src/jd/gui/skins/swing/MacOSController.java b/src/jd/gui/skins/swing/MacOSController.java index 96210279b2..7e80a386c8 100644 --- a/src/jd/gui/skins/swing/MacOSController.java +++ b/src/jd/gui/skins/swing/MacOSController.java @@ -17,8 +17,8 @@ package jd.gui.skins.swing; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.swing.GuiRunnable; -import jd.gui.skins.simple.AboutDialog; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.AboutDialog; import jd.utils.JDUtilities; import com.apple.eawt.Application; diff --git a/src/jd/gui/skins/swing/dialog/HelpDialog.java b/src/jd/gui/skins/swing/dialog/HelpDialog.java index 2ab48b4345..a04377f14a 100644 --- a/src/jd/gui/skins/swing/dialog/HelpDialog.java +++ b/src/jd/gui/skins/swing/dialog/HelpDialog.java @@ -25,7 +25,7 @@ import javax.swing.JPanel; import javax.swing.JTextPane; import jd.controlling.JDLogger; -import jd.gui.skins.jdgui.components.linkbutton.JLink; +import jd.gui.swing.components.linkbutton.JLink; import jd.utils.JDTheme; import jd.utils.locale.JDL; import net.miginfocom.swing.MigLayout; diff --git a/src/jd/gui/skins/swing/dialog/JCountdownDialog.java b/src/jd/gui/skins/swing/dialog/JCountdownDialog.java index 5e17e329c4..bfa7351761 100644 --- a/src/jd/gui/skins/swing/dialog/JCountdownDialog.java +++ b/src/jd/gui/skins/swing/dialog/JCountdownDialog.java @@ -25,7 +25,7 @@ import javax.swing.JFrame; import javax.swing.JLabel; import jd.gui.skins.jdgui.interfaces.JDMouseAdapter; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.nutils.Formatter; import jd.utils.JDTheme; import jd.utils.JDUtilities; diff --git a/src/jd/gui/skins/jdgui/swing/GuiRunnable.java b/src/jd/gui/swing/GuiRunnable.java similarity index 95% rename from src/jd/gui/skins/jdgui/swing/GuiRunnable.java rename to src/jd/gui/swing/GuiRunnable.java index 521dbd6d47..13476b5074 100644 --- a/src/jd/gui/skins/jdgui/swing/GuiRunnable.java +++ b/src/jd/gui/swing/GuiRunnable.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.jdgui.swing; +package jd.gui.swing; import javax.swing.SwingUtilities; diff --git a/src/jd/gui/swing/JUndoManager.java b/src/jd/gui/swing/JUndoManager.java new file mode 100644 index 0000000000..7468ca8816 --- /dev/null +++ b/src/jd/gui/swing/JUndoManager.java @@ -0,0 +1,99 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2008 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing; + +import java.awt.Event; +import java.awt.event.ActionEvent; +import java.awt.event.KeyEvent; + +import javax.swing.AbstractAction; +import javax.swing.KeyStroke; +import javax.swing.event.UndoableEditEvent; +import javax.swing.event.UndoableEditListener; +import javax.swing.text.JTextComponent; +import javax.swing.undo.CannotRedoException; +import javax.swing.undo.CannotUndoException; +import javax.swing.undo.UndoManager; + +import jd.controlling.JDLogger; + +public class JUndoManager { + + /** + * Adds Undo/Redo capabilities to the passed in JTextComponent, it also + * binds the JTextComponent with the Ctrl-z and Ctrl-y key strokes. + * + * @param area + */ + public static void addUndoRedo(JTextComponent area) { + + final UndoManager undo = new UndoManager(); + + // Listen for undo and redo events + area.getDocument().addUndoableEditListener(new UndoableEditListener() { + public void undoableEditHappened(UndoableEditEvent evt) { + undo.addEdit(evt.getEdit()); + } + }); + + // action for the undo command + AbstractAction undo_action = new AbstractAction() { + + private static final long serialVersionUID = -1151050746658519934L; + + public void actionPerformed(ActionEvent evt) { + try { + if (undo.canUndo()) { + undo.undo(); + } + } catch (CannotUndoException e) { + JDLogger.exception(e); + } + } + + }; + + // action for the redo command + AbstractAction redo_action = new AbstractAction() { + + private static final long serialVersionUID = 7373087464871959970L; + + public void actionPerformed(ActionEvent evt) { + try { + if (undo.canRedo()) { + undo.redo(); + } + } catch (CannotRedoException e) { + JDLogger.exception(e); + } + } + + }; + + // Create an undo action and add it to the text component + area.getActionMap().put("Undo", undo_action); + + // Bind the undo action to ctl-Z + area.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Z, Event.CTRL_MASK), "Undo"); + + // Create a redo action and add it to the text component + area.getActionMap().put("Redo", redo_action); + + // Bind the redo action to ctl-Y + area.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Y, Event.CTRL_MASK), "Redo"); + } +} diff --git a/src/jd/gui/skins/simple/AboutDialog.java b/src/jd/gui/swing/components/AboutDialog.java similarity index 96% rename from src/jd/gui/skins/simple/AboutDialog.java rename to src/jd/gui/swing/components/AboutDialog.java index 712fb4a2b3..eebc41aaf9 100644 --- a/src/jd/gui/skins/simple/AboutDialog.java +++ b/src/jd/gui/swing/components/AboutDialog.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.simple; +package jd.gui.swing.components; import java.awt.Color; import java.io.IOException; @@ -33,8 +33,8 @@ import javax.swing.event.ListSelectionListener; import jd.controlling.JDLogger; import jd.gui.UserIO; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.swing.dialog.AbstractDialog; +import jd.gui.swing.components.linkbutton.JLink; import jd.http.Browser; import jd.nutils.JDImage; import jd.utils.JDUtilities; diff --git a/src/jd/gui/skins/jdgui/components/Balloon.java b/src/jd/gui/swing/components/Balloon.java similarity index 95% rename from src/jd/gui/skins/jdgui/components/Balloon.java rename to src/jd/gui/swing/components/Balloon.java index ba087345fb..8ce401471f 100644 --- a/src/jd/gui/skins/jdgui/components/Balloon.java +++ b/src/jd/gui/swing/components/Balloon.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.jdgui.components; +package jd.gui.swing.components; import java.awt.Dimension; import java.awt.Point; @@ -32,9 +32,9 @@ import javax.swing.JWindow; import jd.gui.skins.SwingGui; import jd.gui.skins.jdgui.GUIUtils; import jd.gui.skins.jdgui.JDGuiConstants; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.interfaces.JDMouseAdapter; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.linkbutton.JLink; import jd.nutils.JDImage; import jd.nutils.Screen; import jd.utils.JDTheme; diff --git a/src/jd/gui/swing/components/BrowseFile.java b/src/jd/gui/swing/components/BrowseFile.java new file mode 100644 index 0000000000..0833664820 --- /dev/null +++ b/src/jd/gui/swing/components/BrowseFile.java @@ -0,0 +1,198 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2008 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing.components; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; + +import javax.swing.JButton; +import javax.swing.JFileChooser; +import javax.swing.JPanel; +import javax.swing.JTextField; + +import jd.utils.locale.JDL; +import net.miginfocom.swing.MigLayout; + +public class BrowseFile extends JPanel implements ActionListener { + + private static final long serialVersionUID = 1L; + + private String approveButtonText = "OK"; + + private JButton btnBrowse; + + private File currentPath; + + private boolean editable = false; + + private int fileSelectionMode = JFileChooser.FILES_ONLY; + + private JTextField txtInput; + + public BrowseFile() { + super(); + initGUI(); + } + + public void actionPerformed(ActionEvent e) { + File newPath; + ActionEvent event = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, ""); + + if (e.getSource() == txtInput) { + newPath = new File(txtInput.getText()); + setCurrentPath(newPath); + dispatchEvent(event); + } else if (e.getSource() == btnBrowse) { + newPath = getPath(); + if (newPath != null) { + setCurrentPath(newPath); + dispatchEvent(event); + } + } + + } + + /** + * @return the approveButtonText + */ + public String getApproveButtonText() { + return approveButtonText; + } + + /** + * @return the currentPath + */ + public File getCurrentPath() { + return currentPath; + } + + /** + * + * @return null or a File object pointing to a directory + */ + private File getDirectoryFromTxtInput() { + File directory = null; + String stringPath = txtInput.getText(); + + if (null != stringPath) { + directory = new File(txtInput.getText()); + if (directory.exists()) { + if (directory.isFile()) { + directory = directory.getParentFile(); + } + } else { + directory = null; + } + } + + return directory; + } + + public boolean getEditable() { + return editable; + } + + /** + * @return the fileSelectionMode + */ + public int getFileSelectionMode() { + return fileSelectionMode; + } + + private File getPath() { + JDFileChooser fc = new JDFileChooser(); + fc.setApproveButtonText(approveButtonText); + fc.setFileSelectionMode(fileSelectionMode); + fc.setCurrentDirectory(getDirectoryFromTxtInput()); + if (fc.showOpenDialog(this) == JDFileChooser.APPROVE_OPTION) { + File ret = fc.getSelectedFile(); + return ret; + } + return null; + + } + + public String getText() { + return txtInput.getText(); + } + + private void initGUI() { + + setLayout(new MigLayout("ins 0", "[grow 100,fill,160:null:null]3[grow 30,fill]")); + txtInput = new JTextField(); + txtInput.setEditable(editable); + txtInput.addActionListener(this); + btnBrowse = new JButton(JDL.L("gui.btn_select", "Browse")); + btnBrowse.addActionListener(this); + + add(txtInput); + add(btnBrowse); + } + + /** + * @param approveButtonText + * the approveButtonText to set + */ + public void setApproveButtonText(String approveButtonText) { + this.approveButtonText = approveButtonText; + } + + public void setButtonText(String text) { + btnBrowse.setText(text); + } + + /** + * @param currentPath + * the currentPath to set + */ + public void setCurrentPath(final File currentPath) { + if (currentPath == null) { return; } + this.currentPath = currentPath; + + txtInput.setText(currentPath.getAbsolutePath()); + + } + + public void setEditable(boolean value) { + txtInput.setEditable(value); + editable = value; + } + + // @Override + public void setEnabled(boolean value) { + txtInput.setEnabled(value); + btnBrowse.setEnabled(value); + + } + + /** + * @param fileSelectionMode + * the fileSelectionMode to set + */ + public void setFileSelectionMode(int fileSelectionMode) { + this.fileSelectionMode = fileSelectionMode; + } + + public void setText(String text) { + if (text == null) { + text = ""; + } + setCurrentPath(new File(text)); + } + +} diff --git a/src/jd/gui/swing/components/ComboBrowseFile.java b/src/jd/gui/swing/components/ComboBrowseFile.java new file mode 100644 index 0000000000..7d19a72515 --- /dev/null +++ b/src/jd/gui/swing/components/ComboBrowseFile.java @@ -0,0 +1,310 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2008 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing.components; + +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.util.ArrayList; +import java.util.Vector; + +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JFileChooser; +import javax.swing.JPanel; +import javax.swing.filechooser.FileFilter; + +import jd.config.SubConfiguration; +import jd.utils.locale.JDL; +import net.miginfocom.swing.MigLayout; + +public class ComboBrowseFile extends JPanel implements ActionListener { + + private static final long serialVersionUID = -3852915099917640687L; + + private ArrayList listenerList = new ArrayList(); + + private String approveButtonText; + + private JButton btnBrowse; + + private JComboBox cmboInput; + + private File currentPath; + + private Vector files; + + private int fileSelectionMode = JFileChooser.FILES_ONLY; + + private FileFilter fileFilter; + + public ComboBrowseFile(String string) { + Vector list = SubConfiguration.getConfig("GUI").getGenericProperty(string, new Vector()); + setFiles(list); + + this.setName(string); + initGUI(); + } + + public ComboBrowseFile(Vector files) { + super(); + if (files == null) files = new Vector(); + setFiles(files); + initGUI(); + } + + public void actionPerformed(ActionEvent e) { + if (e.getSource() == cmboInput) { + Object sel = cmboInput.getSelectedItem(); + if (sel != null) { + setCurrentPath(new File(sel.toString())); + } + } else if (e.getSource() == btnBrowse) { + setCurrentPath(getPath()); + } + for (ActionListener l : listenerList) { + l.actionPerformed(new ActionEvent(this, e.getID(), e.getActionCommand())); + } + } + + /** + * @return the approveButtonText + */ + public String getApproveButtonText() { + return approveButtonText; + } + + /** + * @return the currentPath + */ + public File getCurrentPath() { + return currentPath; + } + + /** + * @return null or a File object pointing to a directory + */ + private File getDirectoryFromTxtInput() { + File directory = null; + + Object sel = cmboInput.getSelectedItem(); + if (sel != null) { + directory = new File(sel.toString()); + if (directory.exists()) { + if (directory.isFile()) { + directory = directory.getParentFile(); + } + } else { + directory = null; + } + } + + return directory; + } + + public boolean getEditable() { + return cmboInput.isEditable(); + } + + /** + * @return the fileFilter or null, when no fileFilter is specified + */ + public FileFilter getFileFilter() { + return fileFilter; + } + + /** + * @return the fileSelectionMode + */ + public int getFileSelectionMode() { + return fileSelectionMode; + } + + private File getPath() { + JDFileChooser fc = new JDFileChooser(); + if (approveButtonText != null) fc.setApproveButtonText(approveButtonText); + fc.setFileSelectionMode(fileSelectionMode); + if (fileFilter != null) fc.setFileFilter(fileFilter); + fc.setCurrentDirectory(getDirectoryFromTxtInput()); + if (fc.showOpenDialog(this) == JDFileChooser.APPROVE_OPTION) return fc.getSelectedFile(); + return null; + } + + public String getText() { + if (cmboInput.getSelectedItem() == null) return ""; + return cmboInput.getSelectedItem().toString(); + } + + private void initGUI() { + this.setLayout(new MigLayout("insets 0", "[left, grow]15px[]", "")); + + cmboInput = new JComboBox(files) { + + private static final long serialVersionUID = 5288948184335860046L; + + public Dimension getMaximumSize() { + return new Dimension(20, 20); + } + + public Dimension getMinimumSize() { + return new Dimension(20, 20); + } + + public Dimension getPreferredSize() { + return new Dimension(20, 20); + } + + }; + cmboInput.setEditable(false); + cmboInput.addActionListener(this); + if (cmboInput.getItemCount() > 0) cmboInput.setSelectedIndex(0); + + btnBrowse = new JButton(JDL.L("gui.btn_select", "Auswählen")); + btnBrowse.addActionListener(this); + + this.add(cmboInput, "grow"); + this.add(btnBrowse, "wrap"); + } + + public JButton getButton() { + return btnBrowse; + } + + public JComboBox getInput() { + return cmboInput; + } + + /** + * @param approveButtonText + * the approveButtonText to set + */ + public void setApproveButtonText(String approveButtonText) { + this.approveButtonText = approveButtonText; + } + + public void setButtonText(String text) { + btnBrowse.setText(text); + } + + /** + * @param currentPath + * the currentPath to set + */ + public void setCurrentPath(final File currentPath) { + if (currentPath == null || currentPath.equals(this.currentPath)) return; + this.currentPath = currentPath; + String item = currentPath.toString(); + files.remove(item); + files.add(0, item); + + SubConfiguration.getConfig("GUI").setProperty(getName(), new Vector(files.subList(0, Math.min(files.size(), 20)))); + SubConfiguration.getConfig("GUI").save(); + + if (getText() != null && getText().equalsIgnoreCase(currentPath.toString())) return; + cmboInput.setSelectedIndex(0); + /* EXPERIMENTAL: rausgenommen da freezes verursacht hat */ + // cmboInput.invalidate(); + } + + public void setEditable(final boolean value) { + EventQueue.invokeLater(new Runnable() { + public void run() { + cmboInput.setEditable(value); + } + }); + } + + // @Override + public void setEnabled(final boolean value) { + EventQueue.invokeLater(new Runnable() { + public void run() { + cmboInput.setEnabled(value); + btnBrowse.setEnabled(value); + } + }); + } + + /** + * @param fileFilter + * the fileFilter to set + */ + public void setFileFilter(FileFilter fileFilter) { + this.fileFilter = fileFilter; + for (int i = files.size() - 1; i >= 0; --i) { + if (!fileFilter.accept(new File(files.get(i)))) files.remove(i); + } + } + + private void setFiles(Vector files) { + for (int i = files.size() - 1; i >= 0; --i) { + if (!new File(files.get(i)).exists()) files.remove(i); + } + this.files = files; + } + + /** + * @param fileSelectionMode + * the fileSelectionMode to set + */ + public void setFileSelectionMode(int fileSelectionMode) { + this.fileSelectionMode = fileSelectionMode; + if (fileSelectionMode == JFileChooser.DIRECTORIES_ONLY) { + for (int i = files.size() - 1; i >= 0; --i) { + if (!new File(files.get(i)).isDirectory()) files.remove(i); + } + } else if (fileSelectionMode == JFileChooser.FILES_ONLY) { + for (int i = files.size() - 1; i >= 0; --i) { + if (!new File(files.get(i)).isFile()) files.remove(i); + } + } + } + + public void setText(final String text) { + EventQueue.invokeLater(new Runnable() { + public void run() { + if (text == null) { + setCurrentPath(new File("")); + } else { + setCurrentPath(new File(text)); + } + } + }); + } + + /** + * Adds an ActionListener to the ComboBrowseFile. + * + * @param l + * the ActionListener to be added + */ + public void addActionListener(ActionListener l) { + listenerList.add(l); + } + + /** + * Removes an ActionListener from the ComboBrowseFile. + * + * @param l + * the ActionListener to be removed + */ + public void removeActionListener(ActionListener l) { + listenerList.remove(l); + } + +} diff --git a/src/jd/gui/swing/components/DnDWebBrowser.java b/src/jd/gui/swing/components/DnDWebBrowser.java new file mode 100644 index 0000000000..4a099efaab --- /dev/null +++ b/src/jd/gui/swing/components/DnDWebBrowser.java @@ -0,0 +1,239 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2008 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing.components; + +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.Transferable; +import java.awt.datatransfer.UnsupportedFlavorException; +import java.awt.dnd.DnDConstants; +import java.awt.dnd.DropTarget; +import java.awt.dnd.DropTargetDragEvent; +import java.awt.dnd.DropTargetDropEvent; +import java.awt.dnd.DropTargetEvent; +import java.awt.dnd.DropTargetListener; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JEditorPane; +import javax.swing.JFrame; +import javax.swing.JScrollPane; +import javax.swing.JTextField; +import javax.swing.JToolBar; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; + +import jd.controlling.JDLogger; + +public class DnDWebBrowser extends JDialog { + + private class DropTargetHandler implements DropTargetListener { + public void dragEnter(DropTargetDragEvent event) { + if (event.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { + event.acceptDrag(DnDConstants.ACTION_COPY); + } else { + event.rejectDrag(); + } + } + + public void dragExit(DropTargetEvent event) { + } + + public void dragOver(DropTargetDragEvent event) { + } + + @SuppressWarnings("unchecked") + public void drop(DropTargetDropEvent event) { + Transferable transferable = event.getTransferable(); + if (transferable.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { + event.acceptDrop(DnDConstants.ACTION_COPY); + try { + List fileList = (List) transferable.getTransferData(DataFlavor.javaFileListFlavor); + + Iterator iterator = fileList.iterator(); + + while (iterator.hasNext()) { + File file = (File) iterator.next(); + browserPane.goToURL(file.toURI().toURL()); + } + event.dropComplete(true); + } catch (UnsupportedFlavorException flavorException) { + JDLogger.exception(flavorException); + event.dropComplete(false); + } catch (IOException ioException) { + JDLogger.exception(ioException); + event.dropComplete(false); + } + } else { + event.rejectDrop(); + } + } + + public void dropActionChanged(DropTargetDragEvent event) { + } + + } + + private static final long serialVersionUID = 1L; + + private WebBrowserPane browserPane = new WebBrowserPane(); + + private WebToolBar toolBar; + + public DnDWebBrowser(JFrame owner) { + super(owner); + setModal(true); + toolBar = new WebToolBar(browserPane); + + browserPane.setDropTarget(new DropTarget(browserPane, DnDConstants.ACTION_COPY, new DropTargetHandler())); + + Container contentPane = getContentPane(); + contentPane.add(toolBar, BorderLayout.NORTH); + contentPane.add(new JScrollPane(browserPane), BorderLayout.CENTER); + } + + public void goTo(URL url) { + try { + browserPane.setPage(url); + toolBar.urlTextField.setText(url.toString()); + } catch (IOException e) { + + JDLogger.exception(e); + } + } +} + +class WebBrowserPane extends JEditorPane { + + private static final long serialVersionUID = 1L; + + private List history = new ArrayList(); + + private int historyIndex; + + public WebBrowserPane() { + setEditable(false); + } + + public URL back() { + historyIndex--; + if (historyIndex < 0) { + historyIndex = 0; + } + URL url = history.get(historyIndex); + displayPage(url); + + return url; + } + + private void displayPage(URL pageURL) { + try { + setPage(pageURL); + } catch (IOException ioException) { + JDLogger.exception(ioException); + } + } + + public URL forward() { + historyIndex++; + if (historyIndex >= history.size()) { + historyIndex = history.size() - 1; + } + + URL url = history.get(historyIndex); + displayPage(url); + + return url; + } + + public void goToURL(URL url) { + displayPage(url); + history.add(url); + historyIndex = history.size() - 1; + } +} + +class WebToolBar extends JToolBar implements HyperlinkListener { + + private static final long serialVersionUID = 1L; + + private JButton backButton; + + private JButton forwardButton; + + public JTextField urlTextField; + + private WebBrowserPane webBrowserPane; + + public WebToolBar(WebBrowserPane browser) { + super("Web Navigation"); + webBrowserPane = browser; + webBrowserPane.addHyperlinkListener(this); + urlTextField = new JTextField(25); + urlTextField.setEditable(true); + urlTextField.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + try { + URL url = new URL(urlTextField.getText()); + webBrowserPane.goToURL(url); + } catch (MalformedURLException urlException) { + JDLogger.exception(urlException); + } + } + }); + backButton = new JButton("back"); + + backButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent event) { + URL url = webBrowserPane.back(); + urlTextField.setText(url.toString()); + } + }); + forwardButton = new JButton("forward"); + + forwardButton.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent event) { + URL url = webBrowserPane.forward(); + urlTextField.setText(url.toString()); + } + }); + add(backButton); + add(forwardButton); + add(urlTextField); + + } + + public void hyperlinkUpdate(HyperlinkEvent event) { + if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + URL url = event.getURL(); + webBrowserPane.goToURL(url); + urlTextField.setText(url.toString()); + } + } +} \ No newline at end of file diff --git a/src/jd/gui/skins/jdgui/components/JDCollapser.java b/src/jd/gui/swing/components/JDCollapser.java similarity index 95% rename from src/jd/gui/skins/jdgui/components/JDCollapser.java rename to src/jd/gui/swing/components/JDCollapser.java index d34d8e31a7..b9646914d6 100644 --- a/src/jd/gui/skins/jdgui/components/JDCollapser.java +++ b/src/jd/gui/swing/components/JDCollapser.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.jdgui.components; +package jd.gui.swing.components; import java.awt.Graphics; import java.awt.event.ActionEvent; diff --git a/src/jd/gui/swing/components/JDFileChooser.java b/src/jd/gui/swing/components/JDFileChooser.java new file mode 100644 index 0000000000..af9e994eec --- /dev/null +++ b/src/jd/gui/swing/components/JDFileChooser.java @@ -0,0 +1,76 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2008 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing.components; + +import java.io.File; + +import javax.swing.JFileChooser; + +import jd.utils.JDUtilities; + +/** + * Ein Wrapper um JFileChooser + * + * @author JD-Team + */ +public class JDFileChooser extends JFileChooser { + + private static final long serialVersionUID = 3315263822025280362L; + private String fcID; + + public JDFileChooser() { + this(null); + } + + /** + * Über die id kann eine ID für den filechooser ausgewählt werden . JD + * Fielchooser merkt sich für diese id den zuletzt verwendeten Pfad + * + * @param id + */ + public JDFileChooser(String id) { + super(); + fcID = id; + setCurrentDirectory(JDUtilities.getCurrentWorkingDirectory(fcID)); + } + + // @Override + public File getSelectedFile() { + File ret = super.getSelectedFile(); + + if (ret == null) return null; + if (ret.isDirectory()) { + JDUtilities.setCurrentWorkingDirectory(ret, fcID); + } else { + JDUtilities.setCurrentWorkingDirectory(ret.getParentFile(), fcID); + } + return ret; + } + + // @Override + public File[] getSelectedFiles() { + File[] ret = super.getSelectedFiles(); + + if (ret == null || ret.length == 0) return ret; + if (ret[0].isDirectory()) { + JDUtilities.setCurrentWorkingDirectory(ret[0], fcID); + } else { + JDUtilities.setCurrentWorkingDirectory(ret[0].getParentFile(), fcID); + } + return ret; + } +} \ No newline at end of file diff --git a/src/jd/gui/swing/components/JDTextArea.java b/src/jd/gui/swing/components/JDTextArea.java new file mode 100644 index 0000000000..096df72848 --- /dev/null +++ b/src/jd/gui/swing/components/JDTextArea.java @@ -0,0 +1,68 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2008 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing.components; + +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; + +import javax.swing.JTextArea; + +import jd.gui.swing.JUndoManager; + +public class JDTextArea extends JTextArea implements FocusListener { + + private boolean autoselect = false; + + private static final long serialVersionUID = -4013847546677327448L; + + public JDTextArea(String text) { + super(text); + addFocusAndUndo(); + } + + public JDTextArea(int a, int b) { + super(a, b); + addFocusAndUndo(); + } + + private void addFocusAndUndo() { + addFocusListener(this); + JUndoManager.addUndoRedo(this); + } + + public JDTextArea() { + this(null); + + // setLineWrap(true); + } + + public void setAutoSelect(boolean b) { + autoselect = b; + } + + public void focusLost(FocusEvent fe) { + } + + public void focusGained(FocusEvent fe) { + if (autoselect) { + setCaretPosition(0); + if (getText() != null) { + moveCaretPosition(getText().length()); + } + } + } +} diff --git a/src/jd/gui/swing/components/JDTextField.java b/src/jd/gui/swing/components/JDTextField.java new file mode 100644 index 0000000000..31bc88e89e --- /dev/null +++ b/src/jd/gui/swing/components/JDTextField.java @@ -0,0 +1,63 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2008 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing.components; + +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; + +import javax.swing.JTextField; + +import jd.gui.swing.JUndoManager; + +public class JDTextField extends JTextField implements FocusListener { + + private boolean autoselect = false; + + private static final long serialVersionUID = -4013847546677327448L; + + public JDTextField(String text) { + super(text); + addFocusListener(this); + JUndoManager.addUndoRedo(this); + } + + public JDTextField() { + this(null); + } + + public JDTextField(boolean b) { + this(null); + autoselect = b; + } + + public void setAutoSelect(boolean b) { + autoselect = b; + } + + public void focusLost(FocusEvent fe) { + } + + public void focusGained(FocusEvent fe) { + if (autoselect) { + setCaretPosition(0); + if (getText() != null) { + moveCaretPosition(getText().length()); + } + } + } + +} \ No newline at end of file diff --git a/src/jd/gui/swing/components/JDUnderlinedText.java b/src/jd/gui/swing/components/JDUnderlinedText.java new file mode 100644 index 0000000000..5afb90ee3e --- /dev/null +++ b/src/jd/gui/swing/components/JDUnderlinedText.java @@ -0,0 +1,54 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2009 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing.components; + +import java.awt.Font; +import java.awt.event.MouseEvent; +import java.awt.font.TextAttribute; +import java.util.Map; + +import javax.swing.JComponent; + +import jd.gui.skins.jdgui.interfaces.JDMouseAdapter; + +public class JDUnderlinedText extends JDMouseAdapter { + + private final JComponent comp; + + private Font originalFont; + + public JDUnderlinedText(JComponent comp) { + this.comp = comp; + } + + @SuppressWarnings("unchecked") + @Override + public void mouseEntered(MouseEvent evt) { + originalFont = comp.getFont(); + if (comp.isEnabled()) { + Map attributes = originalFont.getAttributes(); + attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON); + comp.setFont(originalFont.deriveFont(attributes)); + } + } + + @Override + public void mouseExited(MouseEvent evt) { + comp.setFont(originalFont); + } + +} diff --git a/src/jd/gui/skins/jdgui/components/JExtCheckBoxMenuItem.java b/src/jd/gui/swing/components/JExtCheckBoxMenuItem.java similarity index 93% rename from src/jd/gui/skins/jdgui/components/JExtCheckBoxMenuItem.java rename to src/jd/gui/swing/components/JExtCheckBoxMenuItem.java index fc7aa5a904..705523727e 100644 --- a/src/jd/gui/skins/jdgui/components/JExtCheckBoxMenuItem.java +++ b/src/jd/gui/swing/components/JExtCheckBoxMenuItem.java @@ -1,4 +1,4 @@ -package jd.gui.skins.jdgui.components; +package jd.gui.swing.components; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; diff --git a/src/jd/gui/skins/simple/components/multiprogressbar/MultiProgressBar.java b/src/jd/gui/swing/components/MultiProgressBar.java similarity index 96% rename from src/jd/gui/skins/simple/components/multiprogressbar/MultiProgressBar.java rename to src/jd/gui/swing/components/MultiProgressBar.java index 4f2eae7025..e41cde809d 100644 --- a/src/jd/gui/skins/simple/components/multiprogressbar/MultiProgressBar.java +++ b/src/jd/gui/swing/components/MultiProgressBar.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.simple.components.multiprogressbar; +package jd.gui.swing.components; import java.awt.BasicStroke; import java.awt.Color; diff --git a/src/jd/gui/skins/simple/components/multiprogressbar/ProgressEntry.java b/src/jd/gui/swing/components/ProgressEntry.java similarity index 92% rename from src/jd/gui/skins/simple/components/multiprogressbar/ProgressEntry.java rename to src/jd/gui/swing/components/ProgressEntry.java index f8c67cd074..ba8c2c20ef 100644 --- a/src/jd/gui/skins/simple/components/multiprogressbar/ProgressEntry.java +++ b/src/jd/gui/swing/components/ProgressEntry.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.simple.components.multiprogressbar; +package jd.gui.swing.components; public class ProgressEntry { diff --git a/src/jd/gui/skins/simple/components/SpeedMeterPanel.java b/src/jd/gui/swing/components/SpeedMeterPanel.java similarity index 96% rename from src/jd/gui/skins/simple/components/SpeedMeterPanel.java rename to src/jd/gui/swing/components/SpeedMeterPanel.java index a80745be65..f90969cb55 100644 --- a/src/jd/gui/skins/simple/components/SpeedMeterPanel.java +++ b/src/jd/gui/swing/components/SpeedMeterPanel.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.simple.components; +package jd.gui.swing.components; import java.awt.AlphaComposite; import java.awt.BasicStroke; diff --git a/src/jd/gui/skins/jdgui/components/linkbutton/JLink.java b/src/jd/gui/swing/components/linkbutton/JLink.java similarity index 96% rename from src/jd/gui/skins/jdgui/components/linkbutton/JLink.java rename to src/jd/gui/swing/components/linkbutton/JLink.java index 88155f3af7..c85316bc54 100644 --- a/src/jd/gui/skins/jdgui/components/linkbutton/JLink.java +++ b/src/jd/gui/swing/components/linkbutton/JLink.java @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.jdgui.components.linkbutton; +package jd.gui.swing.components.linkbutton; import java.awt.Component; import java.awt.Cursor; diff --git a/src/jd/gui/skins/jdgui/components/linkbutton/JLinkButtonEditor.java b/src/jd/gui/swing/components/linkbutton/JLinkButtonEditor.java similarity index 92% rename from src/jd/gui/skins/jdgui/components/linkbutton/JLinkButtonEditor.java rename to src/jd/gui/swing/components/linkbutton/JLinkButtonEditor.java index 0114ffbf06..b7b661839c 100644 --- a/src/jd/gui/skins/jdgui/components/linkbutton/JLinkButtonEditor.java +++ b/src/jd/gui/swing/components/linkbutton/JLinkButtonEditor.java @@ -1,4 +1,4 @@ -package jd.gui.skins.jdgui.components.linkbutton; +package jd.gui.swing.components.linkbutton; import java.awt.Component; import java.awt.event.ActionEvent; diff --git a/src/jd/gui/swing/components/pieapi/ChartAPI.java b/src/jd/gui/swing/components/pieapi/ChartAPI.java new file mode 100644 index 0000000000..176ba6cc7a --- /dev/null +++ b/src/jd/gui/swing/components/pieapi/ChartAPI.java @@ -0,0 +1,218 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2008 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing.components.pieapi; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.image.BufferedImage; +import java.awt.image.RGBImageFilter; +import java.io.IOException; +import java.net.URL; +import java.util.HashMap; +import java.util.logging.Logger; + +import javax.imageio.ImageIO; +import javax.swing.JComponent; + +import jd.http.Encoding; +import jd.nutils.Colors; +import jd.utils.locale.JDL; + +/** + * Die ChartAPI greift auf die Google Chart API zurück Sie funktioniert nur mit + * einer intakten Internet-Verbindung! + * + * @author gluewurm + * + */ +public abstract class ChartAPI extends JComponent { + + private static final long serialVersionUID = -3619951791325759665L; + + private class PictureLoader extends Thread { + private String path; + + public PictureLoader(String path) { + this.path = path; + } + + //@Override + public void run() { + BufferedImage image = null; + try { + URL url = new URL(path); + image = ImageIO.read(url); + } catch (IOException ex) { + logger.finest("Can not read : " + path); + } + if (image != null) setImage(image); + } + } + + private final String serverAdress = "chart.apis.google.com"; + private Logger logger = jd.controlling.JDLogger.getLogger(); + private HashMap collData = new HashMap(); + private int width; + private int height; + private Color backgroundColor; + protected Image image; + private PictureLoader loader; + private String caption; + + public ChartAPI(String caption, int width, int height) { + this.caption = caption; + this.width = width; + this.height = height; + this.backgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f); + setPreferredSize(new Dimension(width, height)); + } + + public void clear() { + collData.clear(); + } + + public void addEntity(ChartAPIEntity input) { + collData.put(input.getCaption(), input); + } + + public void removeEntity(ChartAPIEntity input) { + collData.remove(input.getCaption()); + } + + public void removeEntity(String caption) { + collData.remove(caption); + } + + public ChartAPIEntity getEntity(String caption) { + return collData.get(caption); + } + + public HashMap getHashMap() { + return collData; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public Color getBackgroundColor() { + return backgroundColor; + } + + // public void setBackgroundColor(Color backgroundColor) { + // this.backgroundColor = backgroundColor; + // } + + public String getServerAdress() { + return serverAdress; + } + + public String createCaptionString() { + String data = ""; + for (ChartAPIEntity tmp : collData.values()) { + data += Encoding.urlEncode(tmp.getCaption()) + "|"; + } + return data; + } + + public long getMaxValue() { + long max = 0; + for (ChartAPIEntity tmp : collData.values()) { + if (Long.valueOf(tmp.getData()) > max) max = Long.valueOf(tmp.getData()); + } + return max; + } + + public String getRelativeValue(String input) { + double calc = Double.valueOf(input) / Double.valueOf(getMaxValue()) * 100; + if (calc < 0.01 && calc > 0.0) + calc = 0.01; + else if (calc < 0) calc = 0; + String ret = String.valueOf(calc); + if (ret.length() > 16) ret = ret.substring(0, 16); + return ret; + } + + public void downloadImage(String path) { + loader = new PictureLoader(path); + loader.start(); + } + + public class TransparentFilter extends RGBImageFilter { + private final int transparentRGB; + + public TransparentFilter(Color color) { + this.transparentRGB = color.getRGB(); + } + + //@Override + public int filterRGB(int x, int y, int rgb) { + + if (Colors.getColorDifference(rgb, transparentRGB) > 40.0) return rgb | 0x44000000; + return rgb & 0xffffff; + } + } + + public void setImage(Image image) { + + // TransparentFilter filter = new + // TransparentFilter(this.backgroundColor); + // + // FilteredImageSource filteredSrc = new + // FilteredImageSource(image.getSource(), filter); + + this.image = image;// Toolkit.getDefaultToolkit().createImage(filteredSrc); + + Dimension d = new Dimension(image.getWidth(null), image.getHeight(null)); + setPreferredSize(d); + revalidate(); + repaint(); + } + + public void paintComponent(Graphics g) { + g.setFont(new Font("Arial", Font.BOLD, 12)); + if (image != null) { + int x = (getWidth() - image.getWidth(null)) / 2; + int y = (getHeight() - image.getHeight(null)) / 2; + g.drawImage(image, x, y, this); + g.drawString(caption, 0, 10); + return; + } + + g.drawImage(image, 0, 0, null); + g.drawString(JDL.LF("plugins.config.premium.chartapi.caption.error", "%s Chart is loading or not available", caption), 0, 10); + } + + public abstract String createDataString(); + + public abstract String getUrl(); +} diff --git a/src/jd/gui/swing/components/pieapi/ChartAPIEntity.java b/src/jd/gui/swing/components/pieapi/ChartAPIEntity.java new file mode 100644 index 0000000000..0101b03a6a --- /dev/null +++ b/src/jd/gui/swing/components/pieapi/ChartAPIEntity.java @@ -0,0 +1,60 @@ +// jDownloader - Downloadmanager +// Copyright (C) 2008 JD-Team support@jdownloader.org +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +package jd.gui.swing.components.pieapi; + +import java.awt.Color; + +public class ChartAPIEntity { + private String caption = ""; + private String data = ""; + private Color color; + + public ChartAPIEntity(String caption, Object data, Color RGB) { + this.caption = caption; + this.data = data.toString(); + this.color = RGB; + } + + public ChartAPIEntity(String caption, Object data) { + this.caption = caption; + this.data = data.toString(); + } + + public String getCaption() { + return caption; + } + + public void setCaption(String caption) { + this.caption = caption; + } + + public String getData() { + return data; + } + + public void setData(Object data) { + this.data = data.toString(); + } + + public Color getColor() { + return color; + } + + public void setColor(Color color) { + this.color = color; + } +} diff --git a/src/jd/gui/skins/simple/components/PieChartAPI.java b/src/jd/gui/swing/components/pieapi/PieChartAPI.java similarity index 91% rename from src/jd/gui/skins/simple/components/PieChartAPI.java rename to src/jd/gui/swing/components/pieapi/PieChartAPI.java index 52a8e6d5d6..381cb7c842 100644 --- a/src/jd/gui/skins/simple/components/PieChartAPI.java +++ b/src/jd/gui/swing/components/pieapi/PieChartAPI.java @@ -14,7 +14,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -package jd.gui.skins.simple.components; +package jd.gui.swing.components.pieapi; + +import jd.gui.skins.simple.components.ChartAPI; +import jd.gui.skins.simple.components.ChartAPIEntity; public class PieChartAPI extends ChartAPI { diff --git a/src/jd/gui/swing/laf/LookAndFeelController.java b/src/jd/gui/swing/laf/LookAndFeelController.java index 9f3314695c..e548e6ac88 100644 --- a/src/jd/gui/swing/laf/LookAndFeelController.java +++ b/src/jd/gui/swing/laf/LookAndFeelController.java @@ -16,15 +16,19 @@ package jd.gui.swing.laf; // You should have received a copy of the GNU General Public License // along with this program. If not, see . +import java.awt.Insets; import java.io.File; import java.io.FileInputStream; import java.net.URL; import java.util.ArrayList; import java.util.Enumeration; +import java.util.Iterator; import java.util.Properties; +import java.util.Map.Entry; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; +import javax.swing.UIDefaults; import javax.swing.UIManager; import javax.swing.UIManager.LookAndFeelInfo; @@ -36,6 +40,9 @@ import jd.nutils.OSDetector; import jd.parser.Regex; import jd.utils.JDUtilities; +import com.jtattoo.plaf.AbstractLookAndFeel; +import com.jtattoo.plaf.BaseTheme; + public class LookAndFeelController { /** @@ -139,9 +146,10 @@ public class LookAndFeelController { * @return */ private static LookAndFeelWrapper getDefaultLAFM() { - //de.javasoft.plaf.synthetica.SyntheticaSkyMetallicLookAndFeel + // de.javasoft.plaf.synthetica.SyntheticaSkyMetallicLookAndFeel return new LookAndFeelWrapper("de.javasoft.plaf.synthetica.SyntheticaSkyMetallicL2ookAndFeel"); -// return new LookAndFeelWrapper("de.javasoft.plaf.synthetica.SyntheticaBlackStarLookAndFeel"); + // return new + // LookAndFeelWrapper("de.javasoft.plaf.synthetica.SyntheticaBlackStarLookAndFeel"); // LookAndFeelWrapper[] sup = getSupportedLookAndFeels(); // if (sup.length == 0) return new @@ -245,33 +253,33 @@ public class LookAndFeelController { // UIManager.put("Synthetica​.tabbedPane​.tab​.text​.position​.leading", // true); - UIManager.put("Synthetica.window.opaque", true); + // UIManager.put("Synthetica.window.opaque", true); // UIManager.put("Synthetica​.cache.enabled", true); // -// UIManager.put("Synthetica​.tableHeader​.horizontalAlignment", JLabel.CENTER); + // UIManager.put("Synthetica​.tableHeader​.horizontalAlignment", + // JLabel.CENTER); -// UIManager.put("Synthetica.window.decoration", false); + // UIManager.put("Synthetica.window.decoration", false); // UIManager.put("Synthetica​.rootPane​.titlePane​.menuButton​.useOriginalImageSize", // Boolean.TRUE); -// UIManager.put("Synthetica​.tabbedPane​.tab​.animation​.cycles", 100); -// UIManager.put("Synthetica​.tabbedPane​.tabs​.stretch", Boolean.TRUE); + // UIManager.put("Synthetica​.tabbedPane​.tab​.animation​.cycles", + // 100); + // UIManager.put("Synthetica​.tabbedPane​.tabs​.stretch", + // Boolean.TRUE); UIManager.setLookAndFeel(getPlaf().getClassName()); // UIManager.setLookAndFeel(new SyntheticaStandardLookAndFeel()); // overwrite defaults - // SubConfiguration cfg = SubConfiguration.getConfig(DEFAULT_PREFIX - // + "." + LookAndFeelController.getPlaf().getClassName()); + SubConfiguration cfg = SubConfiguration.getConfig(DEFAULT_PREFIX + "." + LookAndFeelController.getPlaf().getClassName()); - // postSetup(getPlaf().getClassName()); - // - // for (Iterator> it = - // cfg.getProperties().entrySet().iterator(); it.hasNext();) { - // Entry next = it.next(); - // JDLogger.getLogger().info("Use special LAF Property: " + - // next.getKey() + " = " + next.getValue()); - // UIManager.put(next.getKey(), next.getValue()); - // } + postSetup(getPlaf().getClassName()); + + for (Iterator> it = cfg.getProperties().entrySet().iterator(); it.hasNext();) { + Entry next = it.next(); + JDLogger.getLogger().info("Use special LAF Property: " + next.getKey() + " = " + next.getValue()); + UIManager.put(next.getKey(), next.getValue()); + } } catch (Exception e) { JDLogger.exception(e); @@ -279,55 +287,46 @@ public class LookAndFeelController { } - // /** - // * Executes laf dependend commands AFTER setting the laf - // * - // * @param className - // */ - // private static void postSetup(String className) { - // if (className.equals("com.jtattoo.plaf.acryl.AcrylLookAndFeel")) { - // AbstractLookAndFeel.setTheme(new - // jd.gui.swing.laf.ext.jtattoo.acryl.themes.AcrylJDTheme()); - // - // // jd.gui.swing.laf.ext.jattoo.ui.BluredPopupUI - // // set own uis - // UIDefaults defaults = UIManager.getDefaults(); - // defaults.put("PopupMenu.blurParameter", new int[] { - // 2, 2, 3 - // }); - // defaults.put("PopupMenuAlpha", 0.7f); - // defaults.put("PopupMenuUI", - // "jd.gui.swing.laf.ext.jattoo.ui.BluredPopupUI"); - // defaults.put("RootPaneUI", - // "jd.gui.swing.laf.ext.jtattoo.acryl.ui.AcrylRootPaneUI"); - // defaults.put("CheckBoxUI", - // "jd.gui.swing.laf.ext.jattoo.ui.BaseJDCheckBoxUI"); - // defaults.put("ButtonUI", - // "jd.gui.swing.laf.ext.jattoo.ui.BaseJDButtonUI"); - // defaults.put("ProgressBarUI", - // "jd.gui.swing.laf.ext.jtattoo.acryl.ui.AcrylProgressBarUI"); - // defaults.put("TabbedPane.tabInsets", new Insets(0, 5, 0, 5)); - // // defaults.put("ProgressBar.selectionForeground", new Color(100, - // // 100, 100)); - // Properties props = new Properties(); - // props.put("dynamicLayout", "on"); - // props.put("logoString", ""); - // props.put("textAntiAliasingMode", "GRAY"); - // props.put("windowDecoration", "off"); - // props.put("dynamicLayout", "on"); - // props.put("textAntiAliasing", "off"); - // BaseTheme.setProperties(props); - // } - // UIManager.put("Synthetica.dialog.icon.enabled", true); - // - // UIManager.put("Synthetica​.rootPane​.titlePane​.menuButton​.useOriginalImageSize", - // Boolean.TRUE); - // UIManager.put("Synthetica​.tabbedPane​.tab​.animation​.cycles", 100); - // UIManager.put("Synthetica​.tabbedPane​.tabs​.stretch", Boolean.TRUE); - // // - // // JTattooUtils.setJTattooRootPane(this); - // - // } + /** + * Executes laf dependend commands AFTER setting the laf + * + * @param className + */ + private static void postSetup(String className) { + if (className.equals("com.jtattoo.plaf.acryl.AcrylLookAndFeel")) { + AbstractLookAndFeel.setTheme(new jd.gui.swing.laf.ext.jtattoo.acryl.themes.AcrylJDTheme()); + + // jd.gui.swing.laf.ext.jattoo.ui.BluredPopupUI + // set own uis + UIDefaults defaults = UIManager.getDefaults(); + defaults.put("PopupMenu.blurParameter", new int[] { + 2, 2, 3 + }); + defaults.put("PopupMenuAlpha", 0.7f); + defaults.put("PopupMenuUI", "jd.gui.swing.laf.ext.jattoo.ui.BluredPopupUI"); + defaults.put("RootPaneUI", "jd.gui.swing.laf.ext.jtattoo.acryl.ui.AcrylRootPaneUI"); + defaults.put("CheckBoxUI", "jd.gui.swing.laf.ext.jattoo.ui.BaseJDCheckBoxUI"); + defaults.put("ButtonUI", "jd.gui.swing.laf.ext.jattoo.ui.BaseJDButtonUI"); + defaults.put("ProgressBarUI", "jd.gui.swing.laf.ext.jtattoo.acryl.ui.AcrylProgressBarUI"); + defaults.put("TabbedPane.tabInsets", new Insets(0, 5, 0, 5)); + // defaults.put("ProgressBar.selectionForeground", new Color(100, + // 100, 100)); + Properties props = new Properties(); + props.put("dynamicLayout", "on"); + props.put("logoString", ""); + props.put("textAntiAliasingMode", "GRAY"); + props.put("windowDecoration", "off"); + props.put("dynamicLayout", "on"); + props.put("textAntiAliasing", "off"); + BaseTheme.setProperties(props); + } + + UIManager.put("Synthetica​.rootPane​.titlePane​.menuButton​.useOriginalImageSize", Boolean.TRUE); + + // + // JTattooUtils.setJTattooRootPane(this); + + } /* * Execvutes LAF dependen commands BEFORE initializing the LAF @@ -369,8 +368,6 @@ public class LookAndFeelController { UIManager.installLookAndFeel("SmartLookAndFeel", "com.jtattoo.plaf.smart.SmartLookAndFeel"); } - - // private static void installJGoodies() { // // com.jgoodies.plaf.plastic.PlasticXPLookAndFeel // diff --git a/src/jd/gui/skins/jdgui/swing/menu/HosterMenu.java b/src/jd/gui/swing/menu/HosterMenu.java similarity index 93% rename from src/jd/gui/skins/jdgui/swing/menu/HosterMenu.java rename to src/jd/gui/swing/menu/HosterMenu.java index eaaef38c30..1b553d8db9 100644 --- a/src/jd/gui/skins/jdgui/swing/menu/HosterMenu.java +++ b/src/jd/gui/swing/menu/HosterMenu.java @@ -1,4 +1,4 @@ -package jd.gui.skins.jdgui.swing.menu; +package jd.gui.swing.menu; import java.util.ArrayList; import java.util.Collections; diff --git a/src/jd/gui/skins/jdgui/swing/menu/Menu.java b/src/jd/gui/swing/menu/Menu.java similarity index 94% rename from src/jd/gui/skins/jdgui/swing/menu/Menu.java rename to src/jd/gui/swing/menu/Menu.java index 0c73778c81..238a2bcfca 100644 --- a/src/jd/gui/skins/jdgui/swing/menu/Menu.java +++ b/src/jd/gui/swing/menu/Menu.java @@ -1,4 +1,4 @@ -package jd.gui.skins.jdgui.swing.menu; +package jd.gui.swing.menu; import javax.swing.JCheckBoxMenuItem; import javax.swing.JMenu; diff --git a/src/jd/nutils/nativeintegration/LocalBrowser.java b/src/jd/nutils/nativeintegration/LocalBrowser.java index 67c5df6547..a38316bdc5 100644 --- a/src/jd/nutils/nativeintegration/LocalBrowser.java +++ b/src/jd/nutils/nativeintegration/LocalBrowser.java @@ -22,8 +22,8 @@ import java.io.Serializable; import java.net.URL; import java.util.ArrayList; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.simple.components.DnDWebBrowser; +import jd.gui.swing.GuiRunnable; import jd.nutils.Executer; import jd.nutils.OSDetector; import edu.stanford.ejalbert.BrowserLauncher; diff --git a/src/jd/plugins/PluginForDecrypt.java b/src/jd/plugins/PluginForDecrypt.java index a39d77d6bc..c975e9abe4 100644 --- a/src/jd/plugins/PluginForDecrypt.java +++ b/src/jd/plugins/PluginForDecrypt.java @@ -33,7 +33,7 @@ import jd.controlling.LinkGrabberController; import jd.controlling.ProgressController; import jd.event.ControlEvent; import jd.gui.UserIO; -import jd.gui.skins.jdgui.components.linkbutton.JLink; +import jd.gui.swing.components.linkbutton.JLink; import jd.http.Browser; import jd.http.Encoding; import jd.nutils.Formatter; diff --git a/src/jd/plugins/decrypter/RaubkopiererWs.java b/src/jd/plugins/decrypter/RaubkopiererWs.java index eb080fb743..2f75507e4e 100644 --- a/src/jd/plugins/decrypter/RaubkopiererWs.java +++ b/src/jd/plugins/decrypter/RaubkopiererWs.java @@ -36,7 +36,7 @@ import jd.PluginWrapper; import jd.captcha.specials.Raubkopierer; import jd.controlling.ProgressController; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.http.Browser; import jd.http.Encoding; import jd.http.HTMLEntities; diff --git a/src/jd/plugins/decrypter/Serienjunkies.java b/src/jd/plugins/decrypter/Serienjunkies.java index f197d9cd53..0139ee8f43 100644 --- a/src/jd/plugins/decrypter/Serienjunkies.java +++ b/src/jd/plugins/decrypter/Serienjunkies.java @@ -45,7 +45,7 @@ import jd.controlling.DistributeData; import jd.controlling.ProgressController; import jd.controlling.reconnect.Reconnecter; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.http.Browser; import jd.http.Encoding; import jd.http.URLConnectionAdapter; diff --git a/src/jd/plugins/optional/HTTPLiveHeaderScripter.java b/src/jd/plugins/optional/HTTPLiveHeaderScripter.java index a634ee82de..95a9e0b5f9 100644 --- a/src/jd/plugins/optional/HTTPLiveHeaderScripter.java +++ b/src/jd/plugins/optional/HTTPLiveHeaderScripter.java @@ -55,9 +55,9 @@ import jd.config.MenuItem; import jd.controlling.reconnect.HTTPLiveHeader; import jd.gui.UserIO; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.interfaces.SwitchPanel; import jd.gui.skins.simple.components.JDFileChooser; +import jd.gui.swing.components.linkbutton.JLink; import jd.http.Encoding; import jd.nutils.io.JDFileFilter; import jd.nutils.io.JDIO; diff --git a/src/jd/plugins/optional/jdchat/JDChat.java b/src/jd/plugins/optional/jdchat/JDChat.java index d839b45b4b..9a9032284a 100644 --- a/src/jd/plugins/optional/jdchat/JDChat.java +++ b/src/jd/plugins/optional/jdchat/JDChat.java @@ -52,9 +52,9 @@ import jd.event.ControlEvent; import jd.event.ControlListener; import jd.gui.UserIO; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.components.linkbutton.JLink; import jd.gui.skins.jdgui.interfaces.SideBarPanel; import jd.gui.skins.jdgui.interfaces.SwitchPanel; +import jd.gui.swing.components.linkbutton.JLink; import jd.nutils.OSDetector; import jd.nutils.io.JDIO; import jd.parser.Regex; diff --git a/src/jd/plugins/optional/jdtrayicon/JDLightTray.java b/src/jd/plugins/optional/jdtrayicon/JDLightTray.java index f9ec8b04e4..5af7b32b90 100644 --- a/src/jd/plugins/optional/jdtrayicon/JDLightTray.java +++ b/src/jd/plugins/optional/jdtrayicon/JDLightTray.java @@ -42,7 +42,7 @@ import jd.config.SubConfiguration; import jd.controlling.JDLogger; import jd.event.ControlEvent; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.swing.GuiRunnable; +import jd.gui.swing.GuiRunnable; import jd.nutils.JDImage; import jd.nutils.OSDetector; import jd.plugins.OptionalPlugin; diff --git a/src/jd/plugins/optional/jdtrayicon/TrayIconTooltip.java b/src/jd/plugins/optional/jdtrayicon/TrayIconTooltip.java index 3b923f5e53..bd8077afbc 100644 --- a/src/jd/plugins/optional/jdtrayicon/TrayIconTooltip.java +++ b/src/jd/plugins/optional/jdtrayicon/TrayIconTooltip.java @@ -30,8 +30,8 @@ import javax.swing.SwingUtilities; import jd.controlling.DownloadController; import jd.controlling.DownloadInformations; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.views.downloadview.JDProgressBar; +import jd.gui.swing.GuiRunnable; import jd.nutils.Formatter; import jd.utils.JDUtilities; import jd.utils.locale.JDL; diff --git a/src/jd/plugins/optional/langfileeditor/LFEGui.java b/src/jd/plugins/optional/langfileeditor/LFEGui.java index 9bd355c05b..dfd250a81e 100644 --- a/src/jd/plugins/optional/langfileeditor/LFEGui.java +++ b/src/jd/plugins/optional/langfileeditor/LFEGui.java @@ -55,9 +55,9 @@ import jd.event.MessageListener; import jd.gui.UserIO; import jd.gui.skins.SwingGui; import jd.gui.skins.jdgui.interfaces.SwitchPanel; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.simple.components.ChartAPIEntity; -import jd.gui.skins.simple.components.PieChartAPI; +import jd.gui.swing.GuiRunnable; +import jd.gui.swing.components.pieapi.PieChartAPI; import jd.nutils.JDFlags; import jd.nutils.io.JDIO; import jd.nutils.svn.ResolveHandler; diff --git a/src/jd/router/GetRouterInfo.java b/src/jd/router/GetRouterInfo.java index 95f6f70753..3ed0ffb734 100644 --- a/src/jd/router/GetRouterInfo.java +++ b/src/jd/router/GetRouterInfo.java @@ -49,8 +49,8 @@ import jd.controlling.reconnect.Reconnecter; import jd.gui.UserIO; import jd.gui.skins.SwingGui; import jd.gui.skins.jdgui.settings.GUIConfigEntry; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.simple.ProgressDialog; +import jd.gui.swing.GuiRunnable; import jd.http.Browser; import jd.http.RequestHeader; import jd.http.URLConnectionAdapter; diff --git a/src/jd/router/reconnectrecorder/Gui.java b/src/jd/router/reconnectrecorder/Gui.java index 75932f96ac..65973ada40 100644 --- a/src/jd/router/reconnectrecorder/Gui.java +++ b/src/jd/router/reconnectrecorder/Gui.java @@ -34,7 +34,7 @@ import jd.config.SubConfiguration; import jd.controlling.JDLogger; import jd.controlling.reconnect.ReconnectMethod; import jd.gui.UserIO; -import jd.gui.skins.jdgui.components.linkbutton.JLink; +import jd.gui.swing.components.linkbutton.JLink; import jd.nutils.JDFlags; import jd.nutils.Screen; import jd.parser.Regex; diff --git a/src/jd/utils/JDFileReg.java b/src/jd/utils/JDFileReg.java index dc235a7f72..a030aa962d 100644 --- a/src/jd/utils/JDFileReg.java +++ b/src/jd/utils/JDFileReg.java @@ -27,9 +27,9 @@ import javax.swing.JTextArea; import jd.config.SubConfiguration; import jd.controlling.JDLogger; import jd.gui.UserIO; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.swing.dialog.AbstractDialog; import jd.gui.skins.swing.dialog.ContainerDialog; +import jd.gui.swing.GuiRunnable; import jd.nutils.JDImage; import jd.nutils.OSDetector; import jd.nutils.io.JDIO; diff --git a/src/jd/utils/ReplaceInFiles.java b/src/jd/utils/ReplaceInFiles.java index f998135028..ec58991b63 100644 --- a/src/jd/utils/ReplaceInFiles.java +++ b/src/jd/utils/ReplaceInFiles.java @@ -24,9 +24,9 @@ import java.util.regex.Pattern; import javax.swing.JFileChooser; import jd.gui.UserIO; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.userio.UserIOGui; import jd.gui.skins.simple.components.JDFileChooser; +import jd.gui.swing.GuiRunnable; import jd.nutils.DiffMatchPatch; import jd.nutils.JDFlags; import jd.nutils.DiffMatchPatch.Diff; diff --git a/src/jd/utils/WebUpdate.java b/src/jd/utils/WebUpdate.java index 1c0e8a4f02..e17d232d8d 100644 --- a/src/jd/utils/WebUpdate.java +++ b/src/jd/utils/WebUpdate.java @@ -35,7 +35,7 @@ import jd.controlling.ProgressController; import jd.event.MessageEvent; import jd.event.MessageListener; import jd.gui.UserIO; -import jd.gui.skins.jdgui.components.Balloon; +import jd.gui.swing.components.Balloon; import jd.http.Browser; import jd.http.URLConnectionAdapter; import jd.nutils.JDFlags; diff --git a/src/tests/singletests/StartUp.java b/src/tests/singletests/StartUp.java index 4c594cf885..ec0c8ed03a 100644 --- a/src/tests/singletests/StartUp.java +++ b/src/tests/singletests/StartUp.java @@ -28,8 +28,8 @@ import jd.controlling.JDController; import jd.controlling.PasswordListController; import jd.controlling.interaction.Interaction; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.swing.MacOSController; +import jd.gui.swing.GuiRunnable; import jd.nutils.OSDetector; import jd.utils.JDTheme; import jd.utils.JDUtilities; diff --git a/src/tests/utils/TestUtils.java b/src/tests/utils/TestUtils.java index f2907de37b..609f68b1e1 100644 --- a/src/tests/utils/TestUtils.java +++ b/src/tests/utils/TestUtils.java @@ -33,9 +33,9 @@ import jd.controlling.interaction.Interaction; import jd.event.ControlEvent; import jd.gui.UserIO; import jd.gui.skins.SwingGui; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.userio.UserIOGui; import jd.gui.skins.swing.MacOSController; +import jd.gui.swing.GuiRunnable; import jd.http.Browser; import jd.nutils.OSDetector; import jd.parser.html.Form; diff --git a/tools/ReplaceInFiles.java b/tools/ReplaceInFiles.java index 01ac34d93d..7f3163cd75 100644 --- a/tools/ReplaceInFiles.java +++ b/tools/ReplaceInFiles.java @@ -22,9 +22,9 @@ import java.util.regex.Pattern; import javax.swing.JFileChooser; import jd.gui.UserIO; -import jd.gui.skins.jdgui.swing.GuiRunnable; import jd.gui.skins.jdgui.userio.UserIOGui; import jd.gui.skins.simple.components.JDFileChooser; +import jd.gui.swing.GuiRunnable; import jd.nutils.DiffMatchPatch; import jd.nutils.JDFlags; import jd.nutils.DiffMatchPatch.Diff;