Refaktoring.. renamed packages

git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@6903 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
coalado 2009-07-30 00:19:48 +00:00
parent 96d3612932
commit a63c46690a
91 changed files with 1568 additions and 185 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
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;

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.gui.skins.simple;
package jd.gui.skins.jdgui.components.premiumbar;
import java.awt.Cursor;

View File

@ -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 {
/**

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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 {

View File

@ -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 {

View File

@ -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;
/**

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.gui.skins.jdgui.swing;
package jd.gui.swing;
import javax.swing.SwingUtilities;

View File

@ -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 <http://www.gnu.org/licenses/>.
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");
}
}

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
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;

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
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;

View File

@ -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 <http://www.gnu.org/licenses/>.
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));
}
}

View File

@ -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 <http://www.gnu.org/licenses/>.
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<ActionListener> listenerList = new ArrayList<ActionListener>();
private String approveButtonText;
private JButton btnBrowse;
private JComboBox cmboInput;
private File currentPath;
private Vector<String> files;
private int fileSelectionMode = JFileChooser.FILES_ONLY;
private FileFilter fileFilter;
public ComboBrowseFile(String string) {
Vector<String> list = SubConfiguration.getConfig("GUI").getGenericProperty(string, new Vector<String>());
setFiles(list);
this.setName(string);
initGUI();
}
public ComboBrowseFile(Vector<String> files) {
super();
if (files == null) files = new Vector<String>();
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<String>(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<String> 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 <code>ActionListener</code> to the ComboBrowseFile.
*
* @param l
* the <code>ActionListener</code> to be added
*/
public void addActionListener(ActionListener l) {
listenerList.add(l);
}
/**
* Removes an <code>ActionListener</code> from the ComboBrowseFile.
*
* @param l
* the <code>ActionListener</code> to be removed
*/
public void removeActionListener(ActionListener l) {
listenerList.remove(l);
}
}

View File

@ -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 <http://www.gnu.org/licenses/>.
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<URL> history = new ArrayList<URL>();
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());
}
}
}

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.gui.skins.jdgui.components;
package jd.gui.swing.components;
import java.awt.Graphics;
import java.awt.event.ActionEvent;

View File

@ -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 <http://www.gnu.org/licenses/>.
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;
}
}

View File

@ -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 <http://www.gnu.org/licenses/>.
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());
}
}
}
}

View File

@ -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 <http://www.gnu.org/licenses/>.
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());
}
}
}
}

View File

@ -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 <http://www.gnu.org/licenses/>.
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);
}
}

View File

@ -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;

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.gui.skins.simple.components.multiprogressbar;
package jd.gui.swing.components;
import java.awt.BasicStroke;
import java.awt.Color;

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.gui.skins.simple.components.multiprogressbar;
package jd.gui.swing.components;
public class ProgressEntry {

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.gui.skins.simple.components;
package jd.gui.swing.components;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.gui.skins.jdgui.components.linkbutton;
package jd.gui.swing.components.linkbutton;
import java.awt.Component;
import java.awt.Cursor;

View File

@ -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;

View File

@ -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 <http://www.gnu.org/licenses/>.
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<String, ChartAPIEntity> collData = new HashMap<String, ChartAPIEntity>();
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<String, ChartAPIEntity> 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();
}

View File

@ -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 <http://www.gnu.org/licenses/>.
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;
}
}

View File

@ -14,7 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
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 {

View File

@ -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 <http://www.gnu.org/licenses/>.
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<Entry<String, Object>> it =
// cfg.getProperties().entrySet().iterator(); it.hasNext();) {
// Entry<String, Object> 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<Entry<String, Object>> it = cfg.getProperties().entrySet().iterator(); it.hasNext();) {
Entry<String, Object> 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
//

View File

@ -1,4 +1,4 @@
package jd.gui.skins.jdgui.swing.menu;
package jd.gui.swing.menu;
import java.util.ArrayList;
import java.util.Collections;

View File

@ -1,4 +1,4 @@
package jd.gui.skins.jdgui.swing.menu;
package jd.gui.swing.menu;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JMenu;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;