mirror of
https://github.com/mirror/jdownloader.git
synced 2025-03-03 09:57:30 +00:00
java 1.5
git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@5477 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
parent
9ebab9805c
commit
ed27dc2623
@ -67,7 +67,7 @@ public class CPluginWrapper extends PluginWrapper {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean canHandle(String data) {
|
||||
return getPlugin().canHandle(data);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class DecryptPluginWrapper extends PluginWrapper {
|
||||
this(host, className, patternSupported, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public PluginForDecrypt getPlugin() {
|
||||
return (PluginForDecrypt) super.getPlugin();
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public class HostPluginWrapper extends PluginWrapper {
|
||||
this(host, className, patternSupported, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public PluginForHost getPlugin() {
|
||||
return (PluginForHost) super.getPlugin();
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public class Installer {
|
||||
// logger.info("ConfigDialog");
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
ConfigEntriesPanel p = new ConfigEntriesPanel(configContainer);
|
||||
JPanel panel = new JPanel(new BorderLayout());
|
||||
|
@ -180,7 +180,7 @@ public class JDClassLoader extends java.lang.ClassLoader {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected URL findResource(String name) {
|
||||
|
||||
URL url;
|
||||
@ -231,7 +231,7 @@ public class JDClassLoader extends java.lang.ClassLoader {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public URL getResource(String name) {
|
||||
|
||||
if (jars != null) {
|
||||
@ -267,7 +267,7 @@ public class JDClassLoader extends java.lang.ClassLoader {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Enumeration<URL> getResources(String name) throws IOException {
|
||||
Vector<URL> urls = new Vector<URL>();
|
||||
|
||||
@ -312,7 +312,7 @@ public class JDClassLoader extends java.lang.ClassLoader {
|
||||
* System-Classloader geladen werden kann. Erst zum Schluß wird versucht,
|
||||
* diese Klasse selbst zu laden.
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
|
||||
Class<?> c = findLoadedClass(name);
|
||||
if (c == null) {
|
||||
|
@ -233,7 +233,7 @@ public class JDInit {
|
||||
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
JOptionPane.showMessageDialog(null, JDLocale.L("installer.welcome", "Welcome to jDownloader."));
|
||||
return null;
|
||||
@ -261,7 +261,7 @@ public class JDInit {
|
||||
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
JOptionPane.showMessageDialog(new JFrame(), JDLocale.L("installer.error.noWriteRights", "Error. You do not have permissions to write to the dir"));
|
||||
return null;
|
||||
@ -276,7 +276,7 @@ public class JDInit {
|
||||
logger.severe("INSTALL abgebrochen2");
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
JOptionPane.showMessageDialog(new JFrame(), JDLocale.L("installer.abortInstallation", "Error. User aborted installation."));
|
||||
return null;
|
||||
|
@ -37,6 +37,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
@ -54,6 +55,7 @@ import jd.gui.UserIO;
|
||||
import jd.gui.skins.simple.GuiRunnable;
|
||||
import jd.gui.skins.simple.JDEventQueue;
|
||||
import jd.gui.skins.simple.SimpleGuiConstants;
|
||||
import jd.gui.skins.simple.components.JLinkButton;
|
||||
import jd.gui.userio.SimpleUserIO;
|
||||
import jd.http.Browser;
|
||||
import jd.http.URLConnectionAdapter;
|
||||
@ -163,9 +165,9 @@ public class Main {
|
||||
JDInitFlags.SWITCH_RETURNED_FROM_UPDATE = true;
|
||||
}
|
||||
}
|
||||
|
||||
preInitChecks();
|
||||
UserIO.setInstance(SimpleUserIO.getInstance());
|
||||
preInitChecks();
|
||||
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
|
||||
if (args[i].equals("-prot")) {
|
||||
@ -260,7 +262,7 @@ public class Main {
|
||||
LOGGER.info("init Splash");
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
// @Override
|
||||
public Object runSave() {
|
||||
try {
|
||||
splashScreen = new SplashScreen(JDTheme.I("gui.splash"));
|
||||
@ -348,6 +350,19 @@ public class Main {
|
||||
LOGGER.warning("Javacheck: Wrong Java Version! JDownloader needs at least Java 1.5 or higher!");
|
||||
System.exit(0);
|
||||
}
|
||||
if(JDUtilities.getJavaVersion()<1.6 && !OSDetector.isMac()){
|
||||
int returnValue = UserIO.getInstance().requestConfirmDialog(UserIO.DONT_SHOW_AGAIN|UserIO.NO_CANCEL_OPTION,JDLocale.LF("gui.javacheck.newerjavaavailable.title","Outdated Javaversion found: %s!",JDUtilities.getJavaVersion()), JDLocale.L("gui.javacheck.newerjavaavailable.msg","Although JDownloader runs on your javaversion, we advise to install the latest java updates. \r\nJDownloader will run more stable, faster, and will look better. \r\n\r\nVisit http://jdownloader.org/download."), JDTheme.II("gui.images.warning",32,32), null,null);
|
||||
if((returnValue&UserIO.RETURN_SKIPPED_BY_DONT_SHOW)==0){
|
||||
try {
|
||||
JLinkButton.openURL("http://jdownloader.org/download/index?updatejava=1");
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -423,7 +438,7 @@ public class Main {
|
||||
Main.increaseSplashStatus();
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
// @Override
|
||||
public Object runSave() {
|
||||
init.initGUI(controller);
|
||||
return null;
|
||||
|
@ -62,7 +62,7 @@ public class OptionalPluginWrapper extends PluginWrapper {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public PluginOptional getPlugin() {
|
||||
return (PluginOptional) loadedPlugin;
|
||||
}
|
||||
@ -116,7 +116,7 @@ public class OptionalPluginWrapper extends PluginWrapper {
|
||||
return "OPTIONAL_PLUGIN_" + loadedPlugin.getHost();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public int compareTo(PluginWrapper plg) {
|
||||
return getPlugin().getHost().toLowerCase().compareTo(plg.getPlugin().getHost().toLowerCase());
|
||||
}
|
||||
|
@ -1226,7 +1226,7 @@ public class LetterComperator {
|
||||
*
|
||||
* @return parameterstring
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
Hashtable<String, Object> hs = new Hashtable<String, Object>();
|
||||
// if(getDecodedValue().equalsIgnoreCase("v")&&getBothElementsNum()==3){
|
||||
|
@ -253,7 +253,7 @@ public class Property implements Serializable {
|
||||
*
|
||||
* @return PropertyString
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return "Property(" + saveCount + "): " + properties;
|
||||
}
|
||||
|
@ -260,7 +260,7 @@ public class BasicWindow extends JFrame {
|
||||
private void initWindow() {
|
||||
final BasicWindow _this = this;
|
||||
addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
//@Override
|
||||
public void windowClosing(WindowEvent event) {
|
||||
Window window = event.getWindow();
|
||||
_this.setVisible(true);
|
||||
@ -278,7 +278,7 @@ public class BasicWindow extends JFrame {
|
||||
setBackground(Color.LIGHT_GRAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void pack() {
|
||||
try {
|
||||
super.pack();
|
||||
|
@ -68,7 +68,7 @@ public class ImageComponent extends JComponent {
|
||||
*
|
||||
* @param g
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void paintComponent(Graphics g) {
|
||||
g.drawImage(image, 0, 0, null);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class ScrollPaneWindow extends BasicWindow {
|
||||
* @param y
|
||||
* @param cmp
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void setComponent(final int x, final int y, final Component cmp) {
|
||||
if (cmp == null) { return; }
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@ -81,7 +81,7 @@ public class ScrollPaneWindow extends BasicWindow {
|
||||
* @param y
|
||||
* @param img
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void setImage(final int x, final int y, final Image img) {
|
||||
if (img == null) { return; }
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@ -99,7 +99,7 @@ public class ScrollPaneWindow extends BasicWindow {
|
||||
* @param y
|
||||
* @param cmp
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void setText(final int x, final int y, final Object cmp) {
|
||||
if (cmp == null) { return;
|
||||
// final ScrollPaneWindow _this=this;
|
||||
|
@ -813,7 +813,7 @@ public class Letter extends PixelGrid {
|
||||
* @param owner
|
||||
* the owner to set
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void setOwner(JAntiCaptcha owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
@ -878,7 +878,7 @@ public class Letter extends PixelGrid {
|
||||
return object;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return getDecodedValue() + " [" + getSourcehash() + "][" + getGoodDetections() + "/" + getBadDetections() + "]";
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ public class PixelObject implements Comparable<PixelObject> {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return super.toString() + " " + getLocation()[0] + "-" + getLocation()[1];
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public class MultiThreadDetection {
|
||||
letter = l;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
letter.detected = jac.getLetter(letter);
|
||||
startDetection(this);
|
||||
|
@ -176,7 +176,7 @@ public class UTILITIES {
|
||||
*/
|
||||
public static Image loadImage(final File file) {
|
||||
GuiRunnable<Image> run = new GuiRunnable<Image>() {
|
||||
@Override
|
||||
//@Override
|
||||
public Image runSave() {
|
||||
JFrame jf = new JFrame();
|
||||
Image img = jf.getToolkit().getImage(file.getAbsolutePath());
|
||||
|
@ -312,7 +312,7 @@ public class Property implements Serializable {
|
||||
*
|
||||
* @return PropertyString
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
if (properties.size() == 0) return "";
|
||||
return "Property(" + saveCount + "): " + properties;
|
||||
|
@ -24,7 +24,7 @@ public class AccountManager extends SubConfiguration implements ControlListener
|
||||
super("AccountManager");
|
||||
this.broadcaster = new JDBroadcaster<AccountListener, AccountsUpdateEvent>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void fireEvent(AccountListener listener, AccountsUpdateEvent event) {
|
||||
listener.onUpdate();
|
||||
}
|
||||
@ -98,13 +98,13 @@ public class AccountManager extends SubConfiguration implements ControlListener
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public synchronized void setProperty(String key, Object value) {
|
||||
init();
|
||||
super.setProperty(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object getProperty(String key, Object def) {
|
||||
init();
|
||||
return super.getProperty(key, def);
|
||||
@ -127,7 +127,7 @@ public class AccountManager extends SubConfiguration implements ControlListener
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
init();
|
||||
super.save();
|
||||
|
@ -79,7 +79,7 @@ public class ClipboardHandler extends Thread implements ControlListener {
|
||||
return JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_CLIPBOARD_ALWAYS_ACTIVE, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
while (true) {
|
||||
waitFlag = true;
|
||||
|
@ -387,7 +387,7 @@ public class DistributeData extends Thread {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
|
||||
Vector<DownloadLink> links = findLinks();
|
||||
|
@ -28,7 +28,7 @@ import jd.utils.JDUtilities;
|
||||
|
||||
class DownloadControllerBroadcaster extends JDBroadcaster<DownloadControllerListener, DownloadControllerEvent> {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void fireEvent(DownloadControllerListener listener, DownloadControllerEvent event) {
|
||||
listener.onDownloadControllerEvent(event);
|
||||
|
||||
|
@ -343,7 +343,7 @@ if(value){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
Vector<DownloadLink> links;
|
||||
ArrayList<DownloadLink> updates = new ArrayList<DownloadLink>();
|
||||
|
@ -17,7 +17,7 @@ import jd.utils.JDUtilities;
|
||||
|
||||
class LinkGrabberControllerBroadcaster extends JDBroadcaster<LinkGrabberControllerListener, LinkGrabberControllerEvent> {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void fireEvent(LinkGrabberControllerListener listener, LinkGrabberControllerEvent event) {
|
||||
listener.onLinkGrabberControllerEvent(event);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class LogFormatter extends SimpleFormatter {
|
||||
private StringBuilder sb;
|
||||
private StringBuffer text;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public synchronized String format(LogRecord record) {
|
||||
|
||||
sb = new StringBuilder();
|
||||
|
@ -26,7 +26,7 @@ import jd.utils.JDUtilities;
|
||||
|
||||
class ProgressControllerBroadcaster extends JDBroadcaster<ProgressControllerListener, ProgressControllerEvent> {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void fireEvent(ProgressControllerListener listener, ProgressControllerEvent event) {
|
||||
listener.handle_ProgressControllerEvent(event);
|
||||
|
||||
@ -108,7 +108,7 @@ public class ProgressController {
|
||||
setStatus(currentValue - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void finalize() {
|
||||
if (finalizing) return;
|
||||
finished = true;
|
||||
@ -209,7 +209,7 @@ public class ProgressController {
|
||||
fireChanges();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return "ProgressController " + id;
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ public class SingleDownloadController extends Thread {
|
||||
*
|
||||
* @see java.lang.Thread#run()
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
|
||||
/**
|
||||
|
@ -41,7 +41,7 @@ public class ExternExecute extends Interaction implements Serializable, ActionLi
|
||||
doInteraction(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doInteraction(Object arg) {
|
||||
if (getBooleanProperty(PROPERTY_DISABLED, false)) {
|
||||
logger.info("deaktiviert");
|
||||
@ -59,12 +59,12 @@ public class ExternExecute extends Interaction implements Serializable, ActionLi
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getInteractionName() {
|
||||
return JDLocale.L("interaction.externExecute.name", "Extern Execute");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initConfig() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_BUTTON, this, JDLocale.L("interaction.externExecute.test", "Programm aufrufen")));
|
||||
|
||||
@ -79,7 +79,7 @@ public class ExternExecute extends Interaction implements Serializable, ActionLi
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_SPINNER, this, PROPERTY_WAIT_FOR_RETURN, JDLocale.L("interaction.externExecute.waitForTermination", "Warten x Sekunden bis Befehl beendet ist [sek](-1 für unendlich)"), -1, 1800).setDefaultValue(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return JDLocale.L("interaction.externExecute.toString", "Externes Programm aufrufen");
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ public abstract class Interaction extends Property implements Serializable {
|
||||
this.trigger = trigger;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public abstract String toString();
|
||||
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ public class InteractionTrigger implements Serializable {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return name + " (" + description + ")";
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ public class JDExit extends Interaction implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4825002404662625527L;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doInteraction(Object arg) {
|
||||
logger.info("Starting Exit");
|
||||
CountdownConfirmDialog shutDownMessage = new CountdownConfirmDialog(((SimpleGUI) JDUtilities.getGUI()), "JD will close itself in 10 secs!", 10, true, CountdownConfirmDialog.STYLE_OK | CountdownConfirmDialog.STYLE_CANCEL);
|
||||
@ -42,16 +42,16 @@ public class JDExit extends Interaction implements Serializable {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getInteractionName() {
|
||||
return JDLocale.L("interaction.jdexit.name", "JD Beenden");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initConfig() {
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return JDLocale.L("interaction.jdexit.name", "JD Beenden");
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public class PackageManager extends Interaction implements Serializable {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doInteraction(Object arg) {
|
||||
checkNewInstalled();
|
||||
|
||||
@ -149,7 +149,7 @@ public class PackageManager extends Interaction implements Serializable {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getInteractionName() {
|
||||
return JDLocale.L("interaction.packagemanager.name", "Pakete aktualisieren");
|
||||
}
|
||||
@ -228,7 +228,7 @@ public class PackageManager extends Interaction implements Serializable {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initConfig() {
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ public class PackageManager extends Interaction implements Serializable {
|
||||
WebUpdater.getConfig("JDU").save();
|
||||
|
||||
new Thread() {
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
@ -308,7 +308,7 @@ public class PackageManager extends Interaction implements Serializable {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return JDLocale.L("interaction.packagemanager.name", "Pakete aktualisieren");
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class ResetLink extends Interaction implements Serializable {
|
||||
|
||||
private static final String PARAM_LAST_OR_ALL = "LAST_OR_ALL";
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doInteraction(Object arg) {
|
||||
logger.info("Starting Reset Link");
|
||||
int type = this.getIntegerProperty(PARAM_LAST_OR_ALL, 1);
|
||||
@ -58,17 +58,17 @@ public class ResetLink extends Interaction implements Serializable {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getInteractionName() {
|
||||
return JDLocale.L("interaction.resetLink.name", "Downloadlink zurücksetzen");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initConfig() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_COMBOBOX_INDEX, this, PARAM_LAST_OR_ALL, new String[] { JDLocale.L("interaction.resetLink.options.all", "all Links"), JDLocale.L("interaction.resetLink.options.lastLink", "only last Link") }, JDLocale.L("interaction.resetLink.whichLink", "Welcher Link soll zurückgesetzt werden?")).setDefaultValue(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return JDLocale.L("interaction.resetLink.name", "Downloadlink zurücksetzen");
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class SimpleExecute extends Interaction implements Serializable, ActionLi
|
||||
doInteraction(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doInteraction(Object arg) {
|
||||
String command = Replacer.insertVariables(getStringProperty(PROPERTY_COMMAND));
|
||||
String parameter = Replacer.insertVariables(getStringProperty(PROPERTY_PARAMETER));
|
||||
@ -68,12 +68,12 @@ public class SimpleExecute extends Interaction implements Serializable, ActionLi
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getInteractionName() {
|
||||
return JDLocale.L("interaction.simpleExecute.name", "Programm/Script ausführen");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initConfig() {
|
||||
ConfigEntry cfg;
|
||||
ConfigEntry conditionEntry;
|
||||
@ -96,7 +96,7 @@ public class SimpleExecute extends Interaction implements Serializable, ActionLi
|
||||
cfg.setEnabledCondidtion(conditionEntry, "==", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return JDLocale.L("interaction.simpleExecute.name", "Programm/Script ausführen");
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class BatchReconnect extends ReconnectMethod {
|
||||
configuration = SubConfiguration.getConfig("BATCHRECONNECT");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initConfig() {
|
||||
ConfigEntry cfg;
|
||||
config.addEntry(cfg = new ConfigEntry(ConfigContainer.TYPE_TEXTFIELD, configuration, PROPERTY_TERMINAL, JDLocale.L("interaction.batchreconnect.terminal", "Interpreter")));
|
||||
@ -60,7 +60,7 @@ public class BatchReconnect extends ReconnectMethod {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected boolean runCommands(ProgressController progress) {
|
||||
int waitForReturn = configuration.getIntegerProperty(PROPERTY_IP_WAIT_FOR_RETURN, -1);
|
||||
String executeIn = configuration.getStringProperty(PROPERTY_RECONNECT_EXECUTE_FOLDER);
|
||||
@ -84,7 +84,7 @@ public class BatchReconnect extends ReconnectMethod {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return JDLocale.L("interaction.batchreconnect.toString", "Batch reconnect durchführen");
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class ExternReconnect extends ReconnectMethod {
|
||||
configuration = JDUtilities.getConfiguration();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initConfig() {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_BROWSEFILE, configuration, PROPERTY_RECONNECT_COMMAND, JDLocale.L("interaction.externreconnect.command", "Befehl (absolute Pfade verwenden)")));
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_TEXTAREA, configuration, PROPERTY_RECONNECT_PARAMETER, JDLocale.L("interaction.externreconnect.parameter", "Parameter (1 Parameter/Zeile)")));
|
||||
@ -54,7 +54,7 @@ public class ExternReconnect extends ReconnectMethod {
|
||||
config.addEntry(new ConfigEntry(ConfigContainer.TYPE_SPINNER, configuration, PROPERTY_IP_WAIT_FOR_RETURN, JDLocale.L("interaction.externreconnect.waitForTermination", "Warten x Sekunden bis Befehl beendet ist [sek]"), -1, 600).setDefaultValue(-1));
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected boolean runCommands(ProgressController progress) {
|
||||
int waitForReturn = configuration.getIntegerProperty(PROPERTY_IP_WAIT_FOR_RETURN, -1);
|
||||
String command = configuration.getStringProperty(PROPERTY_RECONNECT_COMMAND);
|
||||
@ -70,7 +70,7 @@ public class ExternReconnect extends ReconnectMethod {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return JDLocale.L("interaction.externreconnect.toString", "Externes Reconnectprogramm aufrufen");
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public class HTTPLiveHeader extends ReconnectMethod {
|
||||
configuration = JDUtilities.getConfiguration();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected boolean runCommands(ProgressController progress) {
|
||||
String script;
|
||||
if (configuration.getIntegerProperty(ReconnectMethod.PARAM_RECONNECT_TYPE, ReconnectMethod.LIVEHEADER) == ReconnectMethod.CLR) {
|
||||
@ -508,11 +508,11 @@ public class HTTPLiveHeader extends ReconnectMethod {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initConfig() {
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return JDLocale.L("interaction.liveHeader.name", "HTTP Live Header");
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ public class Base64 {
|
||||
* @return next byte
|
||||
* @since 1.3
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public int read() throws java.io.IOException {
|
||||
// Do we need to get data?
|
||||
if (position < 0) {
|
||||
@ -287,7 +287,7 @@ public class Base64 {
|
||||
* @return bytes read into array or -1 if end of stream is encountered.
|
||||
* @since 1.3
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public int read(byte[] dest, int off, int len) throws java.io.IOException {
|
||||
int i;
|
||||
int b;
|
||||
@ -389,7 +389,7 @@ public class Base64 {
|
||||
*
|
||||
* @since 1.3
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void close() throws java.io.IOException {
|
||||
// 1. Ensure that pending characters are written
|
||||
flushBase64();
|
||||
@ -452,7 +452,7 @@ public class Base64 {
|
||||
* max number of bytes to read into array
|
||||
* @since 1.3
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void write(byte[] theBytes, int off, int len) throws java.io.IOException {
|
||||
// Encoding suspended?
|
||||
if (suspendEncoding) {
|
||||
@ -476,7 +476,7 @@ public class Base64 {
|
||||
* the byte to write
|
||||
* @since 1.3
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void write(int theByte) throws java.io.IOException {
|
||||
// Encoding suspended?
|
||||
if (suspendEncoding) {
|
||||
|
@ -153,7 +153,7 @@ public class ControlEvent extends AWTEvent {
|
||||
this.parameter = parameter;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public int getID() {
|
||||
return controlID;
|
||||
}
|
||||
@ -162,7 +162,7 @@ public class ControlEvent extends AWTEvent {
|
||||
return parameter;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return "[source:" + source + ", controlID:" + controlID + ", parameter:" + parameter + "]";
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ import javax.swing.UIManager.LookAndFeelInfo;
|
||||
|
||||
import jd.config.SubConfiguration;
|
||||
import jd.config.container.JDLabelContainer;
|
||||
import jd.controlling.JDLogger;
|
||||
import jd.gui.skins.simple.SimpleGuiConstants;
|
||||
import jd.nutils.JDImage;
|
||||
import jd.nutils.OSDetector;
|
||||
@ -173,22 +174,23 @@ public class JDLookAndFeelManager implements Serializable, JDLabelContainer {
|
||||
public static void setUIManager() {
|
||||
if (uiInitated) return;
|
||||
uiInitated = true;
|
||||
String key = "os.name";
|
||||
|
||||
installJGoodies();
|
||||
if (JDUtilities.getJavaVersion() >= 1.6) installSubstance();
|
||||
|
||||
// installSynthetica();
|
||||
|
||||
String value = System.getProperty(key);
|
||||
|
||||
// System.setProperty(key, "Windows XP"); /*dieser eintrag sorgt dafür
|
||||
// das JD unter linux nicht mehr startet*/
|
||||
|
||||
try {
|
||||
JDLogger.getLogger().info("Use Look & Feel: "+getPlaf().getClassName());
|
||||
UIManager.setLookAndFeel(getPlaf().getClassName());
|
||||
} catch (Exception e) {
|
||||
jd.controlling.JDLogger.getLogger().log(java.util.logging.Level.SEVERE, "Exception occured", e);
|
||||
}
|
||||
System.setProperty(key, value);
|
||||
|
||||
// try {
|
||||
// UIManager.setLookAndFeel(
|
||||
// "com.jgoodies.looks.windows.WindowsLookAndFeel");
|
||||
@ -279,7 +281,7 @@ public class JDLookAndFeelManager implements Serializable, JDLabelContainer {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj instanceof JDLookAndFeelManager) && ((JDLookAndFeelManager) obj).getClassName() != null && ((JDLookAndFeelManager) obj).getClassName().equals(className);
|
||||
}
|
||||
@ -292,7 +294,7 @@ public class JDLookAndFeelManager implements Serializable, JDLabelContainer {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
if (className == null) return null;
|
||||
if (staticName != null) return staticName;
|
||||
|
@ -5,6 +5,8 @@ import java.io.File;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
public abstract class UserIO {
|
||||
|
||||
|
||||
/**
|
||||
* Flag to set that no Automatic captcha detection should be used in the
|
||||
* userinput
|
||||
@ -17,6 +19,14 @@ public abstract class UserIO {
|
||||
public static final int NO_COUNTDOWN = 1<<2;
|
||||
public static final int NO_OK_OPTION = 1<<3;
|
||||
public static final int NO_CANCEL_OPTION = 1<<4;
|
||||
public static final int DONT_SHOW_AGAIN = 1<<5;
|
||||
/**Return IDS
|
||||
*
|
||||
*/
|
||||
public static final int RETURN_OK = 1<<1;
|
||||
public static final int RETURN_CANCEL = 1<<2;
|
||||
public static final int RETURN_DONT_SHOW_AGAIN = 1<<3;
|
||||
public static final int RETURN_SKIPPED_BY_DONT_SHOW = 1<<4;
|
||||
protected static UserIO INSTANCE = null;
|
||||
|
||||
protected UserIO() {
|
||||
@ -49,13 +59,13 @@ public abstract class UserIO {
|
||||
|
||||
}
|
||||
|
||||
public boolean requestConfirmDialog(int flag, String title, String message, ImageIcon icon, String okOption, String cancelOption) {
|
||||
public int requestConfirmDialog(int flag, String title, String message, ImageIcon icon, String okOption, String cancelOption) {
|
||||
synchronized (INSTANCE) {
|
||||
return showConfirmDialog(flag, title, message, icon, okOption,cancelOption);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
abstract protected boolean showConfirmDialog(int flag, String title, String message, ImageIcon icon, String okOption, String cancelOption);
|
||||
abstract protected int showConfirmDialog(int flag, String title, String message, ImageIcon icon, String okOption, String cancelOption);
|
||||
|
||||
}
|
||||
|
@ -33,11 +33,11 @@ public class AddonPane extends JTabbedPanel implements ActionListener {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onDisplay() {
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onHide() {
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class AgbDialog extends JDialog implements ActionListener {
|
||||
|
||||
countdownThread = new Thread() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
int c = countdown;
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class ConvertDialog extends JFrame {
|
||||
this.ext = ext;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
return text;
|
||||
}
|
||||
@ -132,7 +132,7 @@ public class ConvertDialog extends JFrame {
|
||||
if (displaymodes.size() == 1) // Bei einer einzigen Auswahl
|
||||
{ return displaymodes.get(0); } // diese zurückgeben
|
||||
GuiRunnable<ConversionMode> run = new GuiRunnable<ConversionMode>() {
|
||||
@Override
|
||||
//@Override
|
||||
public ConversionMode runSave() {
|
||||
if (ConvertDialog.keepformat) {
|
||||
boolean newFormatChoosable = false;
|
||||
|
@ -26,7 +26,7 @@ public class IconMenuBar extends JMenuBar {
|
||||
this.setMinimumSize(new Dimension(width, height));
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void paint(Graphics g) {
|
||||
// super.paint(g);
|
||||
g.drawImage(appIcon, 0, 0, null);
|
||||
|
@ -62,7 +62,7 @@ public class InputDialog extends JDialog implements ActionListener, KeyListener
|
||||
|
||||
countdownThread = new Thread() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
int c = countdown;
|
||||
while (!isVisible()) {
|
||||
|
@ -123,7 +123,7 @@ public class JDAboutDialog extends JDialog {
|
||||
private void getPage(final JTextPane textPane) {
|
||||
new Thread() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
try {
|
||||
Browser br = new Browser();
|
||||
|
@ -36,7 +36,7 @@ public class JDCollapser extends JXTaskPane implements MouseListener {
|
||||
this.setAnimated(SimpleGuiConstants.isAnimated());
|
||||
JDController.getInstance().addControlListener(new ConfigPropertyListener(SimpleGuiConstants.ANIMATION_ENABLED) {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onPropertyChanged(Property source, String propertyName) {
|
||||
setAnimated(SimpleGuiConstants.isAnimated());
|
||||
|
||||
|
@ -59,13 +59,13 @@ public class JDEventQueue extends EventQueue {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isEnabled() {
|
||||
return c.isEditable() && c.isEnabled() && c.getSelectedText() != null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void dispatchEvent(AWTEvent ev) {
|
||||
super.dispatchEvent(ev);
|
||||
if (!(ev instanceof MouseEvent)) { return; }
|
||||
@ -94,7 +94,7 @@ public class JDEventQueue extends EventQueue {
|
||||
c.copy();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isEnabled() {
|
||||
return c.isEnabled() && c.getSelectedText() != null;
|
||||
}
|
||||
@ -107,7 +107,7 @@ public class JDEventQueue extends EventQueue {
|
||||
c.paste();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isEnabled() {
|
||||
if (c.isEditable() && c.isEnabled()) {
|
||||
Transferable contents = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(this);
|
||||
@ -134,7 +134,7 @@ public class JDEventQueue extends EventQueue {
|
||||
c.selectAll();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isEnabled() {
|
||||
return c.isEnabled() && c.getText().length() > 0;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class JDMenuAction extends AbstractAction {
|
||||
return menuItem.getActionID();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isEnabled() {
|
||||
return menuItem.isEnabled();
|
||||
}
|
||||
|
@ -1,22 +1,42 @@
|
||||
package jd.gui.skins.simple;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.Window;
|
||||
|
||||
import javax.swing.JMenuBar;
|
||||
import javax.swing.JRootPane;
|
||||
|
||||
import jd.gui.skins.simple.startmenu.JDStartMenu;
|
||||
|
||||
import org.jvnet.lafwidget.animation.effects.GhostPaintingUtils;
|
||||
import org.jvnet.substance.SubstanceLookAndFeel;
|
||||
import org.jvnet.substance.SubstanceRootPaneUI;
|
||||
import org.jvnet.substance.api.SubstanceColorScheme;
|
||||
import org.jvnet.substance.api.SubstanceSkin;
|
||||
import org.jvnet.substance.painter.decoration.DecorationAreaType;
|
||||
import org.jvnet.substance.utils.SubstanceColorUtilities;
|
||||
import org.jvnet.substance.utils.SubstanceCoreUtilities;
|
||||
import org.jvnet.substance.utils.SubstanceTextUtilities;
|
||||
import org.jvnet.substance.utils.SubstanceTitlePane;
|
||||
|
||||
public class JDSubstanceTitlePane extends SubstanceTitlePane {
|
||||
|
||||
private static final long serialVersionUID = -2571143182567635859L;
|
||||
private SubstanceColorScheme scheme;
|
||||
|
||||
public JDSubstanceTitlePane(JRootPane root, SubstanceRootPaneUI ui) {
|
||||
super(root, ui);
|
||||
final JRootPane rootPane = this.getRootPane();
|
||||
SubstanceSkin skin = SubstanceCoreUtilities.getSkin(rootPane);
|
||||
scheme = skin.getMainDefaultColorScheme(DecorationAreaType.PRIMARY_TITLE_PANE);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected JMenuBar createMenuBar() {
|
||||
JMenuBar ret = super.createMenuBar();
|
||||
|
||||
@ -30,4 +50,62 @@ public class JDSubstanceTitlePane extends SubstanceTitlePane {
|
||||
JDStartMenu.createMenu(menuBar.getMenu(0));
|
||||
}
|
||||
|
||||
private Window getWindow() {
|
||||
return this.window;
|
||||
}
|
||||
|
||||
public Frame getFrame() {
|
||||
Window window = this.getWindow();
|
||||
|
||||
if (window instanceof Frame) { return (Frame) window; }
|
||||
return null;
|
||||
}
|
||||
|
||||
public void paintComponent(Graphics g) {
|
||||
Window w = this.getWindow();
|
||||
String theTitle = null;
|
||||
if (w instanceof Frame) {
|
||||
theTitle = ((Frame) w).getTitle();
|
||||
((Frame) w).setTitle(null);
|
||||
super.paintComponent(g);
|
||||
((Frame) w).setTitle(theTitle);
|
||||
int xOffset = 0;
|
||||
int width = this.getWidth();
|
||||
int height = this.getHeight();
|
||||
JRootPane rootPane = this.getRootPane();
|
||||
if (theTitle != null) {
|
||||
Rectangle titleTextRect = this.getTitleTextRectangle();
|
||||
FontMetrics fm = rootPane.getFontMetrics(g.getFont());
|
||||
|
||||
|
||||
|
||||
xOffset = width/2-fm.stringWidth(theTitle)/2;
|
||||
}
|
||||
|
||||
Graphics2D graphics = (Graphics2D) g.create();
|
||||
Font font = SubstanceLookAndFeel.getFontPolicy().getFontSet("Substance", null).getWindowTitleFont();
|
||||
graphics.setFont(font);
|
||||
|
||||
// draw the title (if needed)
|
||||
if (theTitle != null) {
|
||||
FontMetrics fm = rootPane.getFontMetrics(graphics.getFont());
|
||||
int yOffset = ((height - fm.getHeight()) / 2) + fm.getAscent();
|
||||
|
||||
SubstanceTextUtilities.paintTextWithDropShadow(this, graphics, SubstanceColorUtilities.getForegroundColor(scheme), theTitle, width, height, xOffset, yOffset);
|
||||
}
|
||||
|
||||
GhostPaintingUtils.paintGhostImages(this, graphics);
|
||||
|
||||
// long end = System.nanoTime();
|
||||
// System.out.println(end - start);
|
||||
graphics.dispose();
|
||||
|
||||
return;
|
||||
} else {
|
||||
super.paintComponent(g);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class JDToolBar extends JToolBar implements ControlListener {
|
||||
JDUtilities.getController().addControlListener(this);
|
||||
this.setFloatable(false);
|
||||
this.setLayout(new MigLayout(" ins 0", "[][][][][][][][][][][][][][grow,fill]"));
|
||||
if (noTitlePane) {
|
||||
if (noTitlePane||true) {
|
||||
|
||||
IconMenuBar mb = new IconMenuBar();
|
||||
JMenu menu = new JMenu("");
|
||||
@ -232,7 +232,7 @@ public class JDToolBar extends JToolBar implements ControlListener {
|
||||
public void controlEvent(final ControlEvent event) {
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
switch (event.getID()) {
|
||||
case ControlEvent.CONTROL_DOWNLOAD_START:
|
||||
|
@ -161,7 +161,7 @@ public class LogPane extends JTabbedPanel implements ActionListener, ControlList
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String toString() {
|
||||
String content = logField.getSelectedText();
|
||||
if (content == null || content.length() == 0) {
|
||||
@ -170,7 +170,7 @@ public class LogPane extends JTabbedPanel implements ActionListener, ControlList
|
||||
return content;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onDisplay() {
|
||||
/*
|
||||
* enable autoscrolling by setting the caret to the last position
|
||||
@ -188,7 +188,7 @@ public class LogPane extends JTabbedPanel implements ActionListener, ControlList
|
||||
logField.setCaretPosition(logField.getText().length());
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onHide() {
|
||||
JDUtilities.getController().removeControlListener(this);
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ public class PremiumStatus extends JPanel implements ControlListener, AccountLis
|
||||
if (redrawinprogress) return;
|
||||
redrawinprogress = true;
|
||||
new GuiRunnable<Object>() {
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
synchronized (Lock) {
|
||||
try {
|
||||
|
@ -193,7 +193,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
|
||||
JDController.getInstance().addControlListener(new ConfigPropertyListener(SimpleGuiConstants.ANIMATION_ENABLED) {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onPropertyChanged(Property source, String propertyName) {
|
||||
|
||||
}
|
||||
@ -213,7 +213,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
this.setAnimate();
|
||||
JDController.getInstance().addControlListener(new ConfigPropertyListener(SimpleGuiConstants.ANIMATION_ENABLED) {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onPropertyChanged(Property source, String propertyName) {
|
||||
setAnimate();
|
||||
}
|
||||
@ -403,7 +403,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
// break;
|
||||
// // case JDAction.APP_RECONNECT:
|
||||
// // new Thread() {
|
||||
// // @Override
|
||||
// // //@Override
|
||||
// // public void run() {
|
||||
// // doReconnect();
|
||||
// // }
|
||||
@ -512,7 +512,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
public synchronized void addLinksToGrabber(final Vector<DownloadLink> links, final boolean hideGrabber) {
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
logger.info("Add links to Linkgrabber: " + links.size());
|
||||
DownloadLink[] linkList = links.toArray(new DownloadLink[] {});
|
||||
@ -1001,7 +1001,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
|
||||
GuiRunnable<Boolean> run = new GuiRunnable<Boolean>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Boolean runSave() {
|
||||
Object[] options = { JDLocale.L("gui.btn_yes", "Yes"), JDLocale.L("gui.btn_no", "No") };
|
||||
int n = JOptionPane.showOptionDialog(SimpleGUI.this, message, title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
|
||||
@ -1015,7 +1015,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
|
||||
public boolean showCountdownConfirmDialog(final String string, final int sec) {
|
||||
return new GuiRunnable<Boolean>() {
|
||||
@Override
|
||||
//@Override
|
||||
public Boolean runSave() {
|
||||
return CountdownConfirmDialog.showCountdownConfirmDialog(SimpleGUI.this, string, sec);
|
||||
|
||||
@ -1030,7 +1030,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
final String msg = toHTML ? "<font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">" + message + "</font>" : message;
|
||||
|
||||
return new GuiRunnable<Integer>() {
|
||||
@Override
|
||||
//@Override
|
||||
public Integer runSave() {
|
||||
try {
|
||||
return JHelpDialog.showHelpMessage(SimpleGUI.this, title, msg, new URL(url), helpMsg, sec);
|
||||
@ -1047,7 +1047,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
|
||||
public boolean showHTMLDialog(final String title, final String htmlQuestion) {
|
||||
return new GuiRunnable<Boolean>() {
|
||||
@Override
|
||||
//@Override
|
||||
public Boolean runSave() {
|
||||
|
||||
return HTMLDialog.showDialog(SimpleGUI.this, title, htmlQuestion);
|
||||
@ -1063,7 +1063,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
|
||||
JOptionPane.showMessageDialog(SimpleGUI.this, string);
|
||||
@ -1077,7 +1077,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
public String showTextAreaDialog(final String title, final String question, final String def) {
|
||||
|
||||
GuiRunnable<String> run = new GuiRunnable<String>() {
|
||||
@Override
|
||||
//@Override
|
||||
public String runSave() {
|
||||
return TextAreaDialog.showDialog(SimpleGUI.this, title, question, def);
|
||||
}
|
||||
@ -1093,7 +1093,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
|
||||
public String showUserInputDialog(final String string, final String def) {
|
||||
GuiRunnable<String> run = new GuiRunnable<String>() {
|
||||
@Override
|
||||
//@Override
|
||||
public String runSave() {
|
||||
return JOptionPane.showInputDialog(SimpleGUI.this, string, def);
|
||||
}
|
||||
@ -1105,7 +1105,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
public String[] showTextAreaDialog(final String title, final String questionOne, final String questionTwo, final String defaultOne, final String defaultTwo) {
|
||||
|
||||
GuiRunnable<String[]> run = new GuiRunnable<String[]>() {
|
||||
@Override
|
||||
//@Override
|
||||
public String[] runSave() {
|
||||
return TextAreaDialog.showDialog(SimpleGUI.this, title, questionOne, questionTwo, defaultOne, defaultTwo);
|
||||
}
|
||||
@ -1117,7 +1117,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
public String[] showTwoTextFieldDialog(final String title, final String questionOne, final String questionTwo, final String defaultOne, final String defaultTwo) {
|
||||
|
||||
GuiRunnable<String[]> run = new GuiRunnable<String[]>() {
|
||||
@Override
|
||||
//@Override
|
||||
public String[] runSave() {
|
||||
return TwoTextFieldDialog.showDialog(SimpleGUI.this, title, questionOne, questionTwo, defaultOne, defaultTwo);
|
||||
}
|
||||
@ -1129,7 +1129,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
public static void displayConfig(final ConfigContainer container, final int i) {
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
ConfigEntriesPanel cep;
|
||||
JDCollapser.getInstance().setContentPanel(cep = new ConfigEntriesPanel(container));
|
||||
@ -1199,7 +1199,7 @@ public class SimpleGUI extends JXFrame implements UIInterface, ActionListener, W
|
||||
public void showAccountInformation(final PluginForHost pluginForHost, final Account account) {
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
AccountInfo ai;
|
||||
try {
|
||||
|
@ -182,7 +182,7 @@ public class BrowseFile extends JPanel implements ActionListener {
|
||||
editable = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void setEnabled(boolean value) {
|
||||
txtInput.setEnabled(value);
|
||||
btnBrowse.setEnabled(value);
|
||||
|
@ -53,7 +53,7 @@ public abstract class ChartAPI extends JComponent {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
BufferedImage image = null;
|
||||
try {
|
||||
@ -174,7 +174,7 @@ public abstract class ChartAPI extends JComponent {
|
||||
this.transparentRGB = color.getRGB();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public int filterRGB(int x, int y, int rgb) {
|
||||
|
||||
if (Colors.getColorDifference(rgb, transparentRGB) > 40.0) return rgb | 0x44000000;
|
||||
|
@ -80,7 +80,7 @@ public class ClickPositionDialog extends JDialog implements ActionListener, Hype
|
||||
|
||||
countdownThread = new Thread() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
|
||||
while (!isVisible() && isDisplayable()) {
|
||||
|
@ -270,7 +270,7 @@ public class ComboBrowseFile extends JPanel implements ActionListener {
|
||||
editable = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void setEnabled(boolean value) {
|
||||
cmboInput.setEnabled(value);
|
||||
btnBrowse.setEnabled(value);
|
||||
|
@ -137,7 +137,7 @@ public class CountdownConfirmDialog extends JDialog implements ActionListener, H
|
||||
|
||||
countdownThread = new Thread() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
|
||||
while (!isVisible() && isDisplayable()) {
|
||||
|
@ -104,7 +104,7 @@ public class DownloadLinksPanel extends JTabbedPanel implements ActionListener,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onDisplay() {
|
||||
visible = true;
|
||||
updateTableTask(REFRESH_DATA_AND_STRUCTURE_CHANGED, null);
|
||||
@ -115,7 +115,7 @@ public class DownloadLinksPanel extends JTabbedPanel implements ActionListener,
|
||||
internalTreeTable.addKeyListener(internalTreeTable);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onHide() {
|
||||
visible = false;
|
||||
JDUtilities.getDownloadController().getBroadcaster().removeListener(this);
|
||||
|
@ -146,7 +146,7 @@ public class DownloadTreeTable extends JXTreeTable implements TreeExpansionListe
|
||||
|
||||
// addHighlighter(new FilepackageRowHighlighter(this, Color.RED,
|
||||
// Color.BLUE, Color.RED, Color.BLUE) {
|
||||
// @Override
|
||||
// //@Override
|
||||
// public boolean doHighlight(FilePackage fp) {
|
||||
// return true;
|
||||
// }
|
||||
@ -154,7 +154,7 @@ public class DownloadTreeTable extends JXTreeTable implements TreeExpansionListe
|
||||
addHighlighter(new PainterHighlighter(HighlightPredicate.IS_FOLDER, getFolderPainter(this)));
|
||||
|
||||
// Highlighter extendPrefWidth = new AbstractHighlighter() {
|
||||
// @Override
|
||||
// //@Override
|
||||
// protected Component doHighlight(Component component, ComponentAdapter
|
||||
// adapter) {
|
||||
// Dimension dim = component.getPreferredSize();
|
||||
@ -210,7 +210,7 @@ public class DownloadTreeTable extends JXTreeTable implements TreeExpansionListe
|
||||
Color background = JDTheme.C("gui.color.downloadlist.error_post", "ff9936", 100);
|
||||
|
||||
addHighlighter(new DownloadLinkRowHighlighter(this, background, background) {
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doHighlight(DownloadLink dLink) {
|
||||
return dLink.getLinkStatus().getRemainingWaittime() > 0 || dLink.getPlugin() == null || dLink.getPlugin().getRemainingHosterWaittime() > 0;
|
||||
}
|
||||
@ -222,7 +222,7 @@ public class DownloadTreeTable extends JXTreeTable implements TreeExpansionListe
|
||||
Color background = JDTheme.C("gui.color.downloadlist.error_post", "ff9936", 120);
|
||||
|
||||
addHighlighter(new DownloadLinkRowHighlighter(this, background, background) {
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doHighlight(DownloadLink link) {
|
||||
return link.getLinkStatus().hasStatus(LinkStatus.ERROR_POST_PROCESS);
|
||||
}
|
||||
@ -234,7 +234,7 @@ public class DownloadTreeTable extends JXTreeTable implements TreeExpansionListe
|
||||
Color background = JDTheme.C("gui.color.downloadlist.row_link_disabled", "adadad", 100);
|
||||
|
||||
addHighlighter(new DownloadLinkRowHighlighter(this, background, background) {
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doHighlight(DownloadLink link) {
|
||||
return !link.isEnabled();
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class DownloadTreeTableModel extends AbstractTreeTableModel {
|
||||
return count;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Class<?> getColumnClass(int column) {
|
||||
switch (column) {
|
||||
case COL_HIDDEN:
|
||||
@ -128,7 +128,7 @@ public class DownloadTreeTableModel extends AbstractTreeTableModel {
|
||||
return COLUMN_NAMES.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getColumnName(int column) {
|
||||
return COLUMN_NAMES[column];
|
||||
}
|
||||
@ -188,13 +188,13 @@ public class DownloadTreeTableModel extends AbstractTreeTableModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isCellEditable(Object node, int column) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void setValueAt(Object value, Object node, int col) {
|
||||
JDLogger.getLogger().info("NNNN");
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class TreeTableRenderer extends DefaultTableRenderer {
|
||||
strWaitIO = JDLocale.L("gui.linkgrabber.waitinguserio", "Waiting for user input");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
hasFocus = false;
|
||||
column = this.table.getColumn(column).getModelIndex();
|
||||
|
@ -57,7 +57,7 @@ public class TreeTableTransferHandler extends TransferHandler {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
//@Override
|
||||
public boolean canImport(TreeTableTransferHandler.TransferSupport info) {
|
||||
if (isDragging) {
|
||||
if (draggingObjects == null) return false;
|
||||
@ -85,7 +85,7 @@ public class TreeTableTransferHandler extends TransferHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected Transferable createTransferable(JComponent c) {
|
||||
isDragging = true;
|
||||
Vector<FilePackage> packages = treeTable.getSelectedFilePackages();
|
||||
@ -102,7 +102,7 @@ public class TreeTableTransferHandler extends TransferHandler {
|
||||
return new StringSelection("JDAFFE");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void exportDone(JComponent source, Transferable data, int action) {
|
||||
isDragging = false;
|
||||
}
|
||||
@ -211,13 +211,13 @@ public class TreeTableTransferHandler extends TransferHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public int getSourceActions(JComponent c) {
|
||||
return MOVE;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
//@Override
|
||||
public boolean importData(TreeTableTransferHandler.TransferSupport info) {
|
||||
try {
|
||||
Transferable tr = info.getTransferable();
|
||||
|
@ -102,7 +102,7 @@ public class DragNDrop extends JComponent implements DropTargetListener {
|
||||
* @param g
|
||||
* Graphicobjekt
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public void paintComponent(Graphics g) {
|
||||
g.drawImage(image, 0, 0, null);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class JDFileChooser extends JFileChooser {
|
||||
return super.createDialog(parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public File getSelectedFile() {
|
||||
File ret = super.getSelectedFile();
|
||||
|
||||
@ -73,7 +73,7 @@ public class JDFileChooser extends JFileChooser {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public File[] getSelectedFiles() {
|
||||
File[] ret = super.getSelectedFiles();
|
||||
|
||||
|
@ -13,7 +13,7 @@ public class JDUnderlinedText extends MouseAdapter {
|
||||
private Font originalFont;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
//@Override
|
||||
public void mouseEntered(MouseEvent evt) {
|
||||
if (!(evt.getSource() instanceof JComponent)) return;
|
||||
JComponent src = (JComponent) evt.getSource();
|
||||
@ -27,7 +27,7 @@ public class JDUnderlinedText extends MouseAdapter {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void mouseExited(MouseEvent evt) {
|
||||
if (!(evt.getSource() instanceof JComponent)) return;
|
||||
JComponent src = (JComponent) evt.getSource();
|
||||
|
@ -73,7 +73,7 @@ public class JHelpDialog extends JDialog implements ActionListener {
|
||||
d.getBtn1().setText(helpMsg);
|
||||
d.getBtn2().setText(JDLocale.L("gui.btn_ok", "OK"));
|
||||
d.action1 = d.new Action() {
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doAction() {
|
||||
try {
|
||||
JLinkButton.openURL(url);
|
||||
@ -148,7 +148,7 @@ public class JHelpDialog extends JDialog implements ActionListener {
|
||||
|
||||
countdownThread = new Thread() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
int c = countdown;
|
||||
|
||||
|
@ -65,7 +65,7 @@ class BasicLinkButtonUI extends MetalButtonUI {
|
||||
public BasicLinkButtonUI() {
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void paintText(Graphics g, JComponent com, Rectangle rect, String s) {
|
||||
JLinkButton bn = (JLinkButton) com;
|
||||
ButtonModel bnModel = bn.getModel();
|
||||
@ -433,7 +433,7 @@ public class JLinkButton extends JButton {
|
||||
* private void setDefault() { UIManager.getDefaults().put("LinkButtonUI",
|
||||
* "BasicLinkButtonUI"); }
|
||||
*/
|
||||
@Override
|
||||
//@Override
|
||||
public String getUIClassID() {
|
||||
return "LinkButtonUI";
|
||||
}
|
||||
@ -462,7 +462,7 @@ public class JLinkButton extends JButton {
|
||||
return isLinkVisited;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected String paramString() {
|
||||
String str;
|
||||
if (linkBehavior == ALWAYS_UNDERLINE) {
|
||||
@ -551,7 +551,7 @@ public class JLinkButton extends JButton {
|
||||
repaint();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void updateUI() {
|
||||
setUI(BasicLinkButtonUI.createUI(this));
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public class LinkAdder extends JTabbedPanel {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onDisplay() {
|
||||
this.mainClipBoardEnabled = ClipboardHandler.getClipboard().isEnabled();
|
||||
ClipboardHandler.getClipboard().setEnabled(false);
|
||||
@ -142,7 +142,7 @@ public class LinkAdder extends JTabbedPanel {
|
||||
if (text.getText().contains(newText)) return;
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
text.setText(text.getText() + "\r\n" + newText);
|
||||
return null;
|
||||
@ -151,7 +151,7 @@ public class LinkAdder extends JTabbedPanel {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onHide() {
|
||||
setClipboard(false);
|
||||
ClipboardHandler.getClipboard().setEnabled(mainClipBoardEnabled);
|
||||
|
@ -21,7 +21,7 @@ import jd.utils.JDLocale;
|
||||
|
||||
class LinkCheckBroadcaster extends JDBroadcaster<LinkCheckListener, LinkCheckEvent> {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void fireEvent(LinkCheckListener listener, LinkCheckEvent event) {
|
||||
listener.handle_LinkCheckEvent(event);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ import jd.utils.JDUtilities;
|
||||
|
||||
class LinkGrabberFilePackageBroadcaster extends JDBroadcaster<LinkGrabberFilePackageListener, LinkGrabberFilePackageEvent> {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void fireEvent(LinkGrabberFilePackageListener listener, LinkGrabberFilePackageEvent event) {
|
||||
listener.handle_LinkGrabberFilePackageEvent(event);
|
||||
}
|
||||
|
@ -164,13 +164,13 @@ public class LinkGrabberFilePackageInfo extends JTabbedPanel implements ActionL
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onDisplay() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onHide() {
|
||||
if (this.fp == null) return;
|
||||
fp = null;
|
||||
|
@ -127,7 +127,7 @@ public class LinkGrabberPanel extends JTabbedPanel implements ActionListener, Li
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onHide() {
|
||||
LGINSTANCE.getBroadcaster().removeListener(this);
|
||||
Update_Async.stop();
|
||||
@ -211,7 +211,7 @@ public class LinkGrabberPanel extends JTabbedPanel implements ActionListener, Li
|
||||
Update_Async.restart();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onDisplay() {
|
||||
fireTableChanged(1, null);
|
||||
LGINSTANCE.getBroadcaster().addListener(this);
|
||||
|
@ -381,7 +381,7 @@ public class LinkGrabberTreeTable extends JXTreeTable implements MouseListener,
|
||||
Color background = JDTheme.C("gui.color.downloadlist.row_link_disabled", "adadad", 100);
|
||||
|
||||
addHighlighter(new DownloadLinkRowHighlighter(this, background, background) {
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doHighlight(DownloadLink link) {
|
||||
return !link.isEnabled();
|
||||
}
|
||||
@ -413,7 +413,7 @@ public class LinkGrabberTreeTable extends JXTreeTable implements MouseListener,
|
||||
Color background = JDTheme.C("gui.color.linkgrabber.error_exists", "ff7f00", 120);
|
||||
|
||||
addHighlighter(new DownloadLinkRowHighlighter(this, background, background) {
|
||||
@Override
|
||||
//@Override
|
||||
public boolean doHighlight(DownloadLink link) {
|
||||
if (link.getLinkStatus().hasStatus(LinkStatus.ERROR_ALREADYEXISTS)) return true;
|
||||
return false;
|
||||
|
@ -76,7 +76,7 @@ public class LinkGrabberTreeTableModel extends AbstractTreeTableModel {
|
||||
return count;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Class<?> getColumnClass(int column) {
|
||||
switch (column) {
|
||||
case COL_HIDDEN:
|
||||
@ -100,7 +100,7 @@ public class LinkGrabberTreeTableModel extends AbstractTreeTableModel {
|
||||
return COLUMN_NAMES.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getColumnName(int column) {
|
||||
return COLUMN_NAMES[column];
|
||||
}
|
||||
@ -183,7 +183,7 @@ public class LinkGrabberTreeTableModel extends AbstractTreeTableModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isCellEditable(Object node, int column) {
|
||||
return true;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public class LinkGrabberTreeTableRenderer extends DefaultTableRenderer {
|
||||
imgFailed = JDTheme.II("gui.images.bad", 16, 16);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
hasFocus = false;
|
||||
column = this.table.getColumn(column).getModelIndex();
|
||||
|
@ -43,7 +43,7 @@ public class LinkGrabberTreeTableTransferHandler extends TransferHandler {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
//@Override
|
||||
public boolean canImport(TransferSupport info) {
|
||||
if (isDragging) {
|
||||
if (draggingObjects == null) return false;
|
||||
@ -74,7 +74,7 @@ public class LinkGrabberTreeTableTransferHandler extends TransferHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected Transferable createTransferable(JComponent c) {
|
||||
isDragging = true;
|
||||
Vector<LinkGrabberFilePackage> packages = treeTable.getSelectedFilePackages();
|
||||
@ -91,7 +91,7 @@ public class LinkGrabberTreeTableTransferHandler extends TransferHandler {
|
||||
return new StringSelection("JDAFFE");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void exportDone(JComponent source, Transferable data, int action) {
|
||||
isDragging = false;
|
||||
}
|
||||
@ -201,13 +201,13 @@ public class LinkGrabberTreeTableTransferHandler extends TransferHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public int getSourceActions(JComponent c) {
|
||||
return MOVE;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
//@Override
|
||||
public boolean importData(TransferSupport info) {
|
||||
try {
|
||||
Transferable tr = info.getTransferable();
|
||||
|
@ -73,7 +73,7 @@ public class ConfigEntriesPanel extends ConfigPanel {
|
||||
return subPanels;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
if (inited) return;
|
||||
this.inited = true;
|
||||
@ -129,7 +129,7 @@ public class ConfigEntriesPanel extends ConfigPanel {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
loadConfigEntries();
|
||||
}
|
||||
@ -146,7 +146,7 @@ public class ConfigEntriesPanel extends ConfigPanel {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
if (subPanels != null) {
|
||||
for (int i = 0; i < subPanels.size(); i++) {
|
||||
|
@ -168,7 +168,7 @@ public abstract class ConfigPanel extends JTabbedPanel {
|
||||
|
||||
public abstract void save();
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onDisplay() {
|
||||
System.out.println("Display " + this);
|
||||
loadConfigEntries();
|
||||
|
@ -62,7 +62,7 @@ public class ConfigPanelEventmanager extends ConfigPanel implements ActionListen
|
||||
|
||||
private static final long serialVersionUID = 1155282457354673850L;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Class<?> getColumnClass(int columnIndex) {
|
||||
return String.class;
|
||||
}
|
||||
@ -71,7 +71,7 @@ public class ConfigPanelEventmanager extends ConfigPanel implements ActionListen
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getColumnName(int column) {
|
||||
switch (column) {
|
||||
case 0:
|
||||
@ -216,7 +216,7 @@ public class ConfigPanelEventmanager extends ConfigPanel implements ActionListen
|
||||
pop.setVisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
|
||||
|
||||
@ -271,7 +271,7 @@ public class ConfigPanelEventmanager extends ConfigPanel implements ActionListen
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
}
|
||||
|
||||
@ -300,7 +300,7 @@ public class ConfigPanelEventmanager extends ConfigPanel implements ActionListen
|
||||
this.changes = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
subConfig.setProperty(Configuration.PARAM_INTERACTIONS, interactions);
|
||||
subConfig.save();
|
||||
|
@ -66,7 +66,7 @@ public class ConfigPanelGUI extends ConfigPanel {
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
ConfigContainer container = new ConfigContainer(this);
|
||||
|
||||
@ -246,12 +246,12 @@ public class ConfigPanelGUI extends ConfigPanel {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
loadConfigEntries();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
cep.save();
|
||||
subConfig.save();
|
||||
|
@ -41,7 +41,7 @@ public class ConfigPanelGeneral extends ConfigPanel {
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
ConfigEntry conditionEntry;
|
||||
|
||||
@ -59,12 +59,12 @@ ConfigGroup logging = new ConfigGroup(JDLocale.L("gui.config.general.logging", "
|
||||
this.add(panel, BorderLayout.NORTH);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
loadConfigEntries();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
saveConfigEntries();
|
||||
logger.setLevel((Level) configuration.getProperty(Configuration.PARAM_LOGGER_LEVEL));
|
||||
|
@ -67,7 +67,7 @@ public class ConfigPanelPluginForHost extends ConfigPanel implements ActionListe
|
||||
|
||||
private static final long serialVersionUID = 1155282457354673850L;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Class<?> getColumnClass(int columnIndex) {
|
||||
return getValueAt(0, columnIndex).getClass();
|
||||
}
|
||||
@ -76,7 +76,7 @@ public class ConfigPanelPluginForHost extends ConfigPanel implements ActionListe
|
||||
return 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getColumnName(int column) {
|
||||
switch (column) {
|
||||
case 0:
|
||||
@ -134,12 +134,12 @@ public class ConfigPanelPluginForHost extends ConfigPanel implements ActionListe
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
return columnIndex == 3 || columnIndex == 4 || columnIndex == 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void setValueAt(Object value, int row, int col) {
|
||||
if (col == 3) {
|
||||
if ((Boolean) value) {
|
||||
@ -231,7 +231,7 @@ public class ConfigPanelPluginForHost extends ConfigPanel implements ActionListe
|
||||
loadEntry(pluginsForHost.get(table.getSelectedRow()));
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
|
||||
tableModel = new InternalTableModel();
|
||||
@ -318,7 +318,7 @@ public class ConfigPanelPluginForHost extends ConfigPanel implements ActionListe
|
||||
this.add(bpanel, "spanx,gapleft 10, gapright 10");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
}
|
||||
|
||||
@ -346,7 +346,7 @@ public class ConfigPanelPluginForHost extends ConfigPanel implements ActionListe
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
Vector<String> priority = new Vector<String>();
|
||||
for (HostPluginWrapper plg : pluginsForHost) {
|
||||
|
@ -107,7 +107,7 @@ public class ConfigPanelReconnect extends ConfigPanel implements ActionListener
|
||||
while (true) {
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
time.setText(Formatter.formatSeconds((System.currentTimeMillis() - timel) / 1000));
|
||||
time.setEnabled(true);
|
||||
@ -128,7 +128,7 @@ public class ConfigPanelReconnect extends ConfigPanel implements ActionListener
|
||||
JDUtilities.getConfiguration().setProperty(ReconnectMethod.PARAM_RETRIES, 0);
|
||||
progress.setStatus(30);
|
||||
new Thread() {
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
boolean tmp = JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_DISABLE_RECONNECT, false);
|
||||
JDUtilities.getConfiguration().setProperty(Configuration.PARAM_DISABLE_RECONNECT, false);
|
||||
@ -166,7 +166,7 @@ public class ConfigPanelReconnect extends ConfigPanel implements ActionListener
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
/* 0=LiveHeader, 1=Extern, 2=Batch,3=CLR */
|
||||
|
||||
@ -265,7 +265,7 @@ public class ConfigPanelReconnect extends ConfigPanel implements ActionListener
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
loadConfigEntries();
|
||||
}
|
||||
@ -275,7 +275,7 @@ public class ConfigPanelReconnect extends ConfigPanel implements ActionListener
|
||||
return PropertyType.getMax(ret, super.hasChanges(), ((ConfigPanel) tabbed.getSelectedComponent()).hasChanges());
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
|
||||
saveConfigEntries();
|
||||
|
@ -341,7 +341,7 @@ public class PremiumPanel extends JPanel implements ControlListener, ActionListe
|
||||
add(info, "skip,spanx,growx,newline");
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void setEnabled(final boolean flag) {
|
||||
if (flag == txtPassword.isEnabled()) return;
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@ -489,7 +489,7 @@ public class PremiumPanel extends JPanel implements ControlListener, ActionListe
|
||||
}
|
||||
|
||||
private class ChartRefresh extends Thread {
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
Long collectTraffic = new Long(0);
|
||||
freeTrafficChart.clear();
|
||||
@ -525,7 +525,7 @@ public class PremiumPanel extends JPanel implements ControlListener, ActionListe
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void cut() {
|
||||
StringSelection stringSelection = new StringSelection(String.valueOf(this.getSelectedText()));
|
||||
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
@ -541,7 +541,7 @@ public class PremiumPanel extends JPanel implements ControlListener, ActionListe
|
||||
this.setSelectionEnd(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void copy() {
|
||||
StringSelection stringSelection = new StringSelection(String.valueOf(this.getSelectedText()));
|
||||
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
@ -562,7 +562,7 @@ public class PremiumPanel extends JPanel implements ControlListener, ActionListe
|
||||
premiumActivated = JDUtilities.getConfiguration().getBooleanProperty(Configuration.PARAM_USE_GLOBAL_PREMIUM, true);
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
for (AccountPanel ap : accs) {
|
||||
if (premiumActivated) {
|
||||
|
@ -54,7 +54,7 @@ public class SubPanelCLRReconnect extends ConfigPanel implements ActionListener
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
|
||||
JPanel buttons = new JPanel();
|
||||
@ -80,12 +80,12 @@ public class SubPanelCLRReconnect extends ConfigPanel implements ActionListener
|
||||
// add(routerScript);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
loadConfigEntries();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
saveConfigEntries();
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class SubPanelLiveHeaderReconnect extends ConfigPanel implements ActionLi
|
||||
}
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
JDRRGui jd = new JDRRGui(SimpleGUI.CURRENTGUI, ((JTextField) ip.getInput()[0]).getText());
|
||||
jd.setModal(true);
|
||||
@ -195,7 +195,7 @@ public class SubPanelLiveHeaderReconnect extends ConfigPanel implements ActionLi
|
||||
});
|
||||
searchField.addFocusListener(new FocusAdapter() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void focusGained(FocusEvent e) {
|
||||
|
||||
if (searchField.getText().equals(text)) {
|
||||
@ -203,7 +203,7 @@ public class SubPanelLiveHeaderReconnect extends ConfigPanel implements ActionLi
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void focusLost(FocusEvent e) {
|
||||
if (searchField.getText().equals("")) {
|
||||
|
||||
@ -298,7 +298,7 @@ public class SubPanelLiveHeaderReconnect extends ConfigPanel implements ActionLi
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
|
||||
this.setLayout(new MigLayout("ins 0 30 0 0, wrap 2", "[grow 10,fill][grow,fill]", "[]5[]5[]"));
|
||||
@ -339,12 +339,12 @@ public class SubPanelLiveHeaderReconnect extends ConfigPanel implements ActionLi
|
||||
// add(routerScript);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
loadConfigEntries();
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
saveConfigEntries();
|
||||
|
||||
|
@ -44,7 +44,7 @@ public class SubPanelOptionalInstaller extends ConfigPanel implements ActionList
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Class<?> getColumnClass(int columnIndex) {
|
||||
return getValueAt(0, columnIndex).getClass();
|
||||
}
|
||||
@ -53,7 +53,7 @@ public class SubPanelOptionalInstaller extends ConfigPanel implements ActionList
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getColumnName(int column) {
|
||||
switch (column) {
|
||||
case 0:
|
||||
@ -97,12 +97,12 @@ public class SubPanelOptionalInstaller extends ConfigPanel implements ActionList
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
return columnIndex == 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void setValueAt(Object value, int row, int col) {
|
||||
if (col == 4) {
|
||||
PackageData element = packageData.get(row);
|
||||
@ -138,7 +138,7 @@ public class SubPanelOptionalInstaller extends ConfigPanel implements ActionList
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
|
||||
panel.setLayout(new MigLayout("ins 10,wrap 2", "[fill,grow 10]10[fill,grow]", "[fill,grow,null:150000:null][]"));
|
||||
@ -231,11 +231,11 @@ public class SubPanelOptionalInstaller extends ConfigPanel implements ActionList
|
||||
add(panel);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class SubPanelPluginsOptional extends ConfigPanel implements ActionListen
|
||||
|
||||
private static final long serialVersionUID = 1155282457354673850L;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Class<?> getColumnClass(int columnIndex) {
|
||||
return getValueAt(0, columnIndex).getClass();
|
||||
}
|
||||
@ -62,7 +62,7 @@ public class SubPanelPluginsOptional extends ConfigPanel implements ActionListen
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public String getColumnName(int column) {
|
||||
switch (column) {
|
||||
case 0:
|
||||
@ -99,12 +99,12 @@ public class SubPanelPluginsOptional extends ConfigPanel implements ActionListen
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
return columnIndex == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void setValueAt(Object value, int row, int col) {
|
||||
if (col == 0) {
|
||||
OptionalPluginWrapper plgWrapper = pluginsOptional.get(row);
|
||||
@ -157,7 +157,7 @@ public class SubPanelPluginsOptional extends ConfigPanel implements ActionListen
|
||||
SimpleGUI.displayConfig(pluginsOptional.get(table.getSelectedRow()).getPlugin().getConfig(), 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void initPanel() {
|
||||
panel.setLayout(new MigLayout("ins 10,wrap 2", "[fill,grow 10]10[fill,grow]", "[fill,grow,null:150000:null][]"));
|
||||
|
||||
@ -201,7 +201,7 @@ public class SubPanelPluginsOptional extends ConfigPanel implements ActionListen
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void load() {
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ public class SubPanelPluginsOptional extends ConfigPanel implements ActionListen
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void save() {
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ public class ExitAction extends StartAction {
|
||||
|
||||
private static final long serialVersionUID = -1428029294638573437L;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void init() {
|
||||
this.setIconDim(new Dimension(24, 24));
|
||||
this.setIcon("gui.images.exit");
|
||||
|
@ -13,7 +13,7 @@ public class RestartAction extends StartAction {
|
||||
|
||||
private static final long serialVersionUID = 1333126351380171619L;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void init() {
|
||||
this.setIconDim(new Dimension(24, 24));
|
||||
this.setIcon("gui.images.restart");
|
||||
|
@ -22,17 +22,17 @@ abstract public class TaskButton extends TaskPanel {
|
||||
|
||||
private boolean collapsed = false;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public boolean isCollapsed() {
|
||||
return collapsed;
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void setDeligateCollapsed(boolean collapsed) {
|
||||
setCollapsed(collapsed);
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void setCollapsed(boolean collapsed) {
|
||||
super.setCollapsed(true);
|
||||
boolean oldValue = isCollapsed();
|
||||
@ -41,7 +41,7 @@ abstract public class TaskButton extends TaskPanel {
|
||||
firePropertyChange("collapsed", oldValue, isCollapsed());
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
broadcastEvent(new ActionEvent(this, ACTION_CLICK, "Toggle"));
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public abstract class TaskPanel extends JXTaskPane implements MouseListener, Pro
|
||||
this.setAnimated(SimpleGuiConstants.isAnimated());
|
||||
JDController.getInstance().addControlListener(new ConfigPropertyListener( SimpleGuiConstants.ANIMATION_ENABLED) {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void onPropertyChanged(Property source, String propertyName) {
|
||||
setAnimated(SimpleGuiConstants.isAnimated());
|
||||
|
||||
|
@ -22,12 +22,12 @@ public class SimpleUserIO extends UserIO {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
// @Override
|
||||
protected String showCaptchaDialog(final int flag, final String methodname, final File captchafile, final String suggestion, final String explain) {
|
||||
if ((flag & UserIO.NO_USER_INTERACTION) > 0) return suggestion;
|
||||
return new GuiRunnable<String>() {
|
||||
|
||||
@Override
|
||||
// @Override
|
||||
public String runSave() {
|
||||
return new CaptchaDialog(flag, methodname, captchafile, suggestion, explain).getCaptchaText();
|
||||
}
|
||||
@ -43,17 +43,17 @@ public class SimpleUserIO extends UserIO {
|
||||
// ), "01234", null);
|
||||
// System.out.println("result: " + res);
|
||||
|
||||
UserIO.getInstance().requestConfirmDialog(UserIO.NO_COUNTDOWN|UserIO.NO_OK_OPTION, "title", "message final\r\n int flag, f\r\ninal String title, final\r\n S\r\ntring message, final Ima\r\ngeIcon icon, final String okOption, final String cancelOption) {", JDTheme.II("gui.clicknload", 32, 32), null, null);
|
||||
System.out.println(UserIO.getInstance().requestConfirmDialog(UserIO.DONT_SHOW_AGAIN|UserIO.NO_COUNTDOWN | UserIO.NO_OK_OPTION, "title23", "message final\r\n int flag, f\r\ninal String title, final\r\n S\r\ntring message, final Ima\r\ngeIcon icon, final String okOption, final String cancelOption) {", JDTheme.II("gui.clicknload", 32, 32), null, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean showConfirmDialog(final int flag, final String title, final String message, final ImageIcon icon, final String okOption, final String cancelOption) {
|
||||
if ((flag & UserIO.NO_USER_INTERACTION) > 0) return false;
|
||||
return new GuiRunnable<Boolean>() {
|
||||
// @Override
|
||||
protected int showConfirmDialog(final int flag, final String title, final String message, final ImageIcon icon, final String okOption, final String cancelOption) {
|
||||
if ((flag & UserIO.NO_USER_INTERACTION) > 0) return 0;
|
||||
return new GuiRunnable<Integer>() {
|
||||
|
||||
@Override
|
||||
public Boolean runSave() {
|
||||
return new ConfirmDialog(flag, title, message, icon, okOption, cancelOption).getReturnValue();
|
||||
// @Override
|
||||
public Integer runSave() {
|
||||
return new ConfirmDialog(flag, title, message, icon, okOption, cancelOption).getReturnID();
|
||||
}
|
||||
}.getReturnValue();
|
||||
}
|
||||
|
196
src/jd/gui/userio/dialog/AbstractDialog.java
Normal file
196
src/jd/gui/userio/dialog/AbstractDialog.java
Normal file
@ -0,0 +1,196 @@
|
||||
// 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.userio.dialog;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.WindowConstants;
|
||||
|
||||
import jd.config.SubConfiguration;
|
||||
import jd.gui.UserIO;
|
||||
import jd.gui.skins.simple.SimpleGUI;
|
||||
import jd.gui.skins.simple.SimpleGuiConstants;
|
||||
import jd.nutils.JDHash;
|
||||
import jd.nutils.Screen;
|
||||
import jd.utils.JDLocale;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
public abstract class AbstractDialog extends JCountdownDialog implements ActionListener {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -169149552591067268L;
|
||||
|
||||
private static final String DIALOGS_CONFIG = "DIALOGS";
|
||||
|
||||
private JButton btnCancel;
|
||||
|
||||
private JButton btnOK;
|
||||
|
||||
protected JPanel contentpane;
|
||||
|
||||
private int flag;
|
||||
|
||||
private Object returnValue = null;
|
||||
|
||||
private ImageIcon icon;
|
||||
|
||||
private String okOption;
|
||||
|
||||
private String cancelOption;
|
||||
|
||||
private JCheckBox dont;
|
||||
|
||||
public AbstractDialog(int flag, String title, ImageIcon icon, String okOption, String cancelOption) {
|
||||
super(SimpleGUI.CURRENTGUI);
|
||||
contentpane = new JPanel(new MigLayout("ins 0,wrap 1", "[fill,grow]", "[fill,grow]"));
|
||||
this.flag = flag;
|
||||
setTitle(title);
|
||||
|
||||
this.icon = icon;
|
||||
this.okOption = (okOption == null) ? JDLocale.L("gui.btn_ok", null) : okOption;
|
||||
this.cancelOption = (okOption == null) ? JDLocale.L("gui.btn_cancel", null) : cancelOption;
|
||||
|
||||
}
|
||||
|
||||
public void init() {
|
||||
if ((flag & UserIO.DONT_SHOW_AGAIN) > 0) {
|
||||
SubConfiguration cfg = SubConfiguration.getConfig(DIALOGS_CONFIG);
|
||||
// System.out.println(cfg+toString()+"This restore" +
|
||||
// "DONT_SHOW_AGAIN_" + JDHash.getMD5(this.toString()) + " " +
|
||||
// cfg.getProperty("DONT_SHOW_AGAIN_" +
|
||||
// JDHash.getMD5(this.toString())));
|
||||
Object value;
|
||||
if ((value = cfg.getProperty("DONT_SHOW_AGAIN_" + JDHash.getMD5(this.toString()))) != null) {
|
||||
if (value instanceof Integer) {
|
||||
int i = ((Integer) value).intValue();
|
||||
this.returnValue = (i & (UserIO.RETURN_OK | UserIO.RETURN_CANCEL)) | UserIO.RETURN_DONT_SHOW_AGAIN | UserIO.RETURN_SKIPPED_BY_DONT_SHOW;
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
this.setModal(true);
|
||||
|
||||
this.setLayout(new MigLayout("ins 5,wrap 1", "[fill,grow]"));
|
||||
|
||||
btnOK = new JButton(this.okOption);
|
||||
btnOK.addActionListener(this);
|
||||
|
||||
btnCancel = new JButton(this.cancelOption);
|
||||
btnCancel.addActionListener(this);
|
||||
|
||||
this.getRootPane().setDefaultButton(btnOK);
|
||||
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
if (icon != null) {
|
||||
add(new JLabel(this.icon), "split 2,alignx left,aligny center,shrinkx,gapright 10");
|
||||
}
|
||||
contentInit(contentpane);
|
||||
add(contentpane, "pushx,growx,pushy,growy,spanx,aligny center,wrap");
|
||||
add(this.countDownLabel, "split 5,growx");
|
||||
|
||||
if ((flag & UserIO.DONT_SHOW_AGAIN) > 0) {
|
||||
dont = new JCheckBox();
|
||||
|
||||
dont.setHorizontalAlignment(JCheckBox.TRAILING);
|
||||
|
||||
add(new JLabel(JDLocale.L("gui.dialogs.dontshowthisagain", "Don't show this again")));
|
||||
add(dont, "alignx right");
|
||||
}
|
||||
if ((flag & UserIO.NO_OK_OPTION) == 0) {
|
||||
add(btnOK, "alignx right");
|
||||
}
|
||||
if ((flag & UserIO.NO_CANCEL_OPTION) == 0) {
|
||||
add(btnCancel, "alignx right");
|
||||
}
|
||||
this.setMinimumSize(new Dimension(300, -1));
|
||||
this.pack();
|
||||
this.setResizable(false);
|
||||
if (SimpleGUI.CURRENTGUI == null || SimpleGUI.CURRENTGUI.getExtendedState() == JFrame.ICONIFIED || !SimpleGUI.CURRENTGUI.isVisible() || !SimpleGUI.CURRENTGUI.isActive()) {
|
||||
this.setLocation(Screen.getDockBottomRight(this));
|
||||
} else {
|
||||
this.setLocation(Screen.getCenterOfComponent(SimpleGUI.CURRENTGUI, this));
|
||||
}
|
||||
this.toFront();
|
||||
this.setAlwaysOnTop(true);
|
||||
SubConfiguration cfg = SubConfiguration.getConfig(SimpleGuiConstants.GUICONFIGNAME);
|
||||
if ((flag & UserIO.NO_COUNTDOWN) == 0) this.countdown(Math.max(2, cfg.getIntegerProperty(SimpleGuiConstants.PARAM_INPUTTIMEOUT, 20)));
|
||||
|
||||
this.setVisible(true);
|
||||
this.toFront();
|
||||
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "dialog-" + this.getTitle();
|
||||
}
|
||||
|
||||
abstract public void contentInit(JPanel contentpane);
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (e.getSource() == btnOK) {
|
||||
setReturnValue(true);
|
||||
|
||||
} else if (e.getSource() == btnCancel) {
|
||||
|
||||
setReturnValue(false);
|
||||
}
|
||||
dispose();
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
protected void onCountdown() {
|
||||
|
||||
setReturnValue(false);
|
||||
this.dispose();
|
||||
}
|
||||
|
||||
private void setReturnValue(boolean b) {
|
||||
returnValue = b ? UserIO.RETURN_OK : UserIO.RETURN_CANCEL;
|
||||
if ((flag & UserIO.DONT_SHOW_AGAIN) > 0) {
|
||||
|
||||
if (dont.isSelected()) {
|
||||
returnValue = b ? UserIO.RETURN_OK | UserIO.RETURN_DONT_SHOW_AGAIN : UserIO.RETURN_CANCEL | UserIO.RETURN_DONT_SHOW_AGAIN;
|
||||
SubConfiguration cfg = SubConfiguration.getConfig(DIALOGS_CONFIG);
|
||||
cfg.setProperty("DONT_SHOW_AGAIN_" + JDHash.getMD5(this.toString()), (Integer) returnValue);
|
||||
cfg.save();
|
||||
// System.out.println(cfg+toString()+" This save" +
|
||||
// "DONT_SHOW_AGAIN_" + JDHash.getMD5(this.toString()) + " " +
|
||||
// returnValue);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Object getReturnValue() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
}
|
@ -140,7 +140,7 @@ public class CaptchaDialog extends JCountdownDialog implements ActionListener, K
|
||||
// "jAntiCaptcha active!"));
|
||||
// final String host = plugin.getHost();
|
||||
// jacThread = new Thread("JAC") {
|
||||
// @Override
|
||||
// //@Override
|
||||
// public void run() {
|
||||
//
|
||||
// String code = null;
|
||||
@ -234,7 +234,7 @@ public class CaptchaDialog extends JCountdownDialog implements ActionListener, K
|
||||
|
||||
private String code;
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected Object doInBackground() throws Exception {
|
||||
CaptchaController cc = new CaptchaController(method, imagefile, null, null);
|
||||
this.code = cc.getCode(flag | UserIO.NO_USER_INTERACTION);
|
||||
@ -289,7 +289,7 @@ public class CaptchaDialog extends JCountdownDialog implements ActionListener, K
|
||||
public void keyTyped(KeyEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
protected void onCountdown() {
|
||||
this.captchaText = textField.getText();
|
||||
this.dispose();
|
||||
|
@ -1,142 +1,38 @@
|
||||
// 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.userio.dialog;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextPane;
|
||||
import javax.swing.WindowConstants;
|
||||
|
||||
import jd.config.SubConfiguration;
|
||||
import jd.gui.UserIO;
|
||||
import jd.gui.skins.simple.SimpleGUI;
|
||||
import jd.gui.skins.simple.SimpleGuiConstants;
|
||||
import jd.nutils.Screen;
|
||||
import jd.utils.JDLocale;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
public class ConfirmDialog extends AbstractDialog {
|
||||
|
||||
public class ConfirmDialog extends JCountdownDialog implements ActionListener {
|
||||
private JTextPane textField;
|
||||
private String message;
|
||||
|
||||
public ConfirmDialog(int flag, String title, String message, ImageIcon icon, String okOption, String cancelOption) {
|
||||
super(flag, title, icon, okOption, cancelOption);
|
||||
this.message = message;
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -169149552591067268L;
|
||||
|
||||
private JButton btnCancel;
|
||||
|
||||
private JButton btnOK;
|
||||
|
||||
private JTextPane textField;
|
||||
|
||||
private int flag;
|
||||
|
||||
private Boolean returnValue = false;
|
||||
|
||||
private String message;
|
||||
|
||||
private ImageIcon icon;
|
||||
|
||||
private String okOption;
|
||||
|
||||
private String cancelOption;
|
||||
|
||||
public ConfirmDialog(int flag, String title, String message, ImageIcon icon, String okOption, String cancelOption) {
|
||||
super(SimpleGUI.CURRENTGUI);
|
||||
this.flag = flag;
|
||||
setTitle(title);
|
||||
this.message = message;
|
||||
this.icon = icon;
|
||||
this.okOption = (okOption == null) ? JDLocale.L("gui.btn_ok", null) : okOption;
|
||||
this.cancelOption = (okOption == null) ? JDLocale.L("gui.btn_cancel", null) : cancelOption;
|
||||
init();
|
||||
}
|
||||
|
||||
public void init() {
|
||||
|
||||
this.setModal(true);
|
||||
|
||||
this.setLayout(new MigLayout("ins 5,wrap 1", "[fill,grow]"));
|
||||
private static final long serialVersionUID = -7647771640756844691L;
|
||||
|
||||
public void contentInit(JPanel cp) {
|
||||
textField = new JTextPane();
|
||||
textField.setBorder(null);
|
||||
textField.setBackground(null);
|
||||
textField.setOpaque(false);
|
||||
textField.setText(this.message);
|
||||
textField.setEditable(false);
|
||||
|
||||
btnOK = new JButton(this.okOption);
|
||||
btnOK.addActionListener(this);
|
||||
|
||||
btnCancel = new JButton(this.cancelOption);
|
||||
btnCancel.addActionListener(this);
|
||||
|
||||
this.getRootPane().setDefaultButton(btnOK);
|
||||
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
if (icon != null) {
|
||||
add(new JLabel(this.icon), "split 2,alignx left,aligny center,shrinkx,gapright 10");
|
||||
}
|
||||
add(textField, "pushx,growx,pushy,growy,spanx,aligny center,wrap");
|
||||
add(this.countDownLabel, "split 3,growx");
|
||||
if ((flag & UserIO.NO_OK_OPTION) == 0) add(btnOK, "alignx right");
|
||||
if ((flag & UserIO.NO_CANCEL_OPTION) == 0) add(btnCancel, "alignx right");
|
||||
this.setMinimumSize(new Dimension(300, -1));
|
||||
this.pack();
|
||||
this.setResizable(false);
|
||||
if (SimpleGUI.CURRENTGUI == null || SimpleGUI.CURRENTGUI.getExtendedState() == JFrame.ICONIFIED || !SimpleGUI.CURRENTGUI.isVisible() || !SimpleGUI.CURRENTGUI.isActive()) {
|
||||
this.setLocation(Screen.getDockBottomRight(this));
|
||||
} else {
|
||||
this.setLocation(Screen.getCenterOfComponent(SimpleGUI.CURRENTGUI, this));
|
||||
}
|
||||
this.toFront();
|
||||
this.setAlwaysOnTop(true);
|
||||
SubConfiguration cfg = SubConfiguration.getConfig(SimpleGuiConstants.GUICONFIGNAME);
|
||||
if ((flag & UserIO.NO_COUNTDOWN) == 0) this.countdown(Math.max(2, cfg.getIntegerProperty(SimpleGuiConstants.PARAM_INPUTTIMEOUT, 20)));
|
||||
|
||||
this.setVisible(true);
|
||||
this.toFront();
|
||||
|
||||
cp.add(textField);
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (e.getSource() == btnOK) {
|
||||
this.returnValue = true;
|
||||
|
||||
} else if (e.getSource() == btnCancel) {
|
||||
this.returnValue = false;
|
||||
|
||||
}
|
||||
dispose();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCountdown() {
|
||||
this.returnValue = false;
|
||||
this.dispose();
|
||||
}
|
||||
|
||||
public Boolean getReturnValue() {
|
||||
public Integer getReturnID() {
|
||||
// TODO Auto-generated method stub
|
||||
return returnValue;
|
||||
return (Integer) super.getReturnValue();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public abstract class JCountdownDialog extends JDialog {
|
||||
this.countdown = time;
|
||||
countdownThread = new Thread() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public void run() {
|
||||
|
||||
while (!isVisible()) {
|
||||
@ -55,7 +55,7 @@ public abstract class JCountdownDialog extends JDialog {
|
||||
|
||||
new GuiRunnable<Object>() {
|
||||
|
||||
@Override
|
||||
//@Override
|
||||
public Object runSave() {
|
||||
countDownLabel.setText(JDLocale.LF("gui.dialogs.countdown.label", "%s sec", left));
|
||||
return null;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user