mirror of
https://github.com/mirror/jdownloader.git
synced 2025-03-05 02:48:14 +00:00
- Hostericons fixed
git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@5928 ebf7c1c2-ba36-0410-9fe8-c592906822b4
This commit is contained in:
parent
4d160820dc
commit
ff67e65d72
@ -533,7 +533,7 @@ public class Main {
|
||||
for (String clazz : classes) {
|
||||
try {
|
||||
Class<?> plgClass;
|
||||
plgClass = classLoader.loadClass(clazz.replace("/", ".").replace(".class", ""));
|
||||
plgClass = classLoader.loadClass(clazz.replace("/", ".").replace(".class", "").substring(1));
|
||||
if (plgClass == null) {
|
||||
JDLogger.getLogger().info("Could not load " + clazz);
|
||||
continue;
|
||||
|
@ -336,7 +336,7 @@ public class FilePackageInfo extends JTabbedPanel implements ActionListener {
|
||||
fp = downloadLink.getFilePackage();
|
||||
this.txtpathlabel.setText(downloadLink.getFileOutput());
|
||||
this.typeicon.setIcon(downloadLink.getIcon());
|
||||
if (downloadLink.getPlugin() != null) {
|
||||
if (downloadLink.getPlugin() != null && downloadLink.getPlugin().hasHosterIcon()) {
|
||||
this.hosterlabel.setIcon(downloadLink.getPlugin().getHosterIcon());
|
||||
} else {
|
||||
this.hosterlabel.setIcon(null);
|
||||
|
@ -243,7 +243,7 @@ public class TreeTableRenderer extends DefaultTableRenderer {
|
||||
// ((JComponent) co).setToolTipText(null);
|
||||
((JRendererLabel) co).setText("plugin missing");
|
||||
} else {
|
||||
if (dLink.getPlugin().useIcon()) {
|
||||
if (dLink.getPlugin().hasHosterIcon()) {
|
||||
sb.append(dLink.getPlugin().getHost());
|
||||
sb.append(dLink.getPlugin().getSessionInfo());
|
||||
((JRendererLabel) co).setText(dLink.getPlugin().getSessionInfo());
|
||||
|
@ -87,10 +87,10 @@ public class LinkGrabberTreeTableRenderer extends DefaultTableRenderer {
|
||||
}
|
||||
|
||||
private void initLocale() {
|
||||
strOnline = JDLocale.L("linkgrabber.onlinestatus.online","online");
|
||||
strOffline = JDLocale.L("linkgrabber.onlinestatus.offline","offline");
|
||||
strUnchecked = JDLocale.L("linkgrabber.onlinestatus.unchecked","not checked");
|
||||
strUnCheckable=JDLocale.L("linkgrabber.onlinestatus.uncheckable","temp. uncheckable");
|
||||
strOnline = JDLocale.L("linkgrabber.onlinestatus.online", "online");
|
||||
strOffline = JDLocale.L("linkgrabber.onlinestatus.offline", "offline");
|
||||
strUnchecked = JDLocale.L("linkgrabber.onlinestatus.unchecked", "not checked");
|
||||
strUnCheckable = JDLocale.L("linkgrabber.onlinestatus.uncheckable", "temp. uncheckable");
|
||||
}
|
||||
|
||||
private void initIcons() {
|
||||
@ -141,7 +141,7 @@ public class LinkGrabberTreeTableRenderer extends DefaultTableRenderer {
|
||||
break;
|
||||
case LinkGrabberTreeTableModel.COL_HOSTER:
|
||||
|
||||
if (dLink.getPlugin().useIcon()) {
|
||||
if (dLink.getPlugin().hasHosterIcon()) {
|
||||
co = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
clearSB();
|
||||
sb.append(dLink.getPlugin().getHost());
|
||||
@ -192,7 +192,7 @@ public class LinkGrabberTreeTableRenderer extends DefaultTableRenderer {
|
||||
case UNCHECKABLE:
|
||||
((JRendererLabel) co).setIcon(this.imgUnknown);
|
||||
clearSB();
|
||||
sb.append(strUnCheckable );
|
||||
sb.append(strUnCheckable);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -201,7 +201,6 @@ public class LinkGrabberTreeTableRenderer extends DefaultTableRenderer {
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
((JRendererLabel) co).setIcon(imgFailed);
|
||||
sb.append(strOffline);
|
||||
|
@ -132,15 +132,17 @@ public class JDImage {
|
||||
* gibt ein bild zu dem übergebenem pfad zurück. nutzt einen cache
|
||||
*
|
||||
* @param imageName
|
||||
* Name des Bildes das zurückgeliefert werden soll
|
||||
* Name des Bildes das zurückgeliefert werden soll (Endung ist
|
||||
* .png)
|
||||
* @return Das gewünschte Bild oder null, falls es nicht gefunden werden
|
||||
* kann
|
||||
*/
|
||||
public static BufferedImage getImage(String imageName) {
|
||||
File file;
|
||||
if (!(file = JDUtilities.getResourceFile("jd/img/" + imageName + ".png")).exists()) return null;
|
||||
BufferedImage ret;
|
||||
if ((ret = BUFFERED_IMAGE_CACHE.get(imageName)) != null) { return ret; }
|
||||
File file = JDUtilities.getResourceFile("jd/img/" + imageName + ".png");
|
||||
if (!file.exists()) return null;
|
||||
|
||||
BufferedImage ret = BUFFERED_IMAGE_CACHE.get(imageName);
|
||||
if (ret != null) return ret;
|
||||
|
||||
try {
|
||||
ret = ImageIO.read(file);
|
||||
@ -152,8 +154,9 @@ public class JDImage {
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
public static BufferedImage getImage(File file) {
|
||||
|
||||
|
||||
BufferedImage ret;
|
||||
if ((ret = BUFFERED_IMAGE_CACHE.get(file.getAbsolutePath())) != null) { return ret; }
|
||||
|
||||
@ -167,6 +170,7 @@ public class JDImage {
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
public static ImageIcon getImageIcon(String string) {
|
||||
ImageIcon ret;
|
||||
if ((ret = IMAGE_ICON_CACHE.get(string)) != null) { return ret; }
|
||||
@ -174,6 +178,7 @@ public class JDImage {
|
||||
IMAGE_ICON_CACHE.put(string, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static ImageIcon getImageIcon(File pat) {
|
||||
ImageIcon ret;
|
||||
if ((ret = IMAGE_ICON_CACHE.get(pat.getAbsolutePath())) != null) { return ret; }
|
||||
@ -182,5 +187,4 @@ public class JDImage {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -685,8 +685,8 @@ public abstract class PluginForHost extends Plugin {
|
||||
return "";
|
||||
}
|
||||
|
||||
public boolean useIcon() {
|
||||
return false;
|
||||
public final boolean hasHosterIcon() {
|
||||
return JDImage.getImage("hosterlogos/" + getHost()) != null;
|
||||
}
|
||||
|
||||
public final ImageIcon getHosterIcon() {
|
||||
@ -697,11 +697,9 @@ public abstract class PluginForHost extends Plugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* CReates a dummyHosterIcon
|
||||
*
|
||||
* @return
|
||||
* Creates a dummyHosterIcon
|
||||
*/
|
||||
private Image createDefaultIcon() {
|
||||
private final Image createDefaultIcon() {
|
||||
int w = 16;
|
||||
int h = 16;
|
||||
int size = 9;
|
||||
|
@ -162,12 +162,8 @@ public class BluehostTo extends PluginForHost {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean useIcon() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// @Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws IOException, PluginException {
|
||||
// dateiname, dateihash, dateisize, dateidownloads, zeit bis HH
|
||||
this.setBrowserExclusive();
|
||||
br.setCookie("http://bluehost.to", "bluehost_lang", "DE");
|
||||
|
@ -313,10 +313,6 @@ public class Netloadin extends PluginForHost {
|
||||
return 800;
|
||||
}
|
||||
|
||||
public boolean useIcon() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// @Override
|
||||
public void handlePremium(DownloadLink downloadLink, Account account) throws Exception {
|
||||
requestFileInformation(downloadLink);
|
||||
|
@ -564,7 +564,7 @@ public class Rapidshare extends PluginForHost {
|
||||
String freeOrPremiumSelectPostURL = null;
|
||||
Request request = null;
|
||||
String error = null;
|
||||
|
||||
|
||||
// long startTime = System.currentTimeMillis();
|
||||
br = login(account, true);
|
||||
|
||||
@ -1038,10 +1038,6 @@ public class Rapidshare extends PluginForHost {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean useIcon() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// @Override
|
||||
public AccountInfo fetchAccountInfo(Account account) throws Exception {
|
||||
|
||||
|
@ -124,10 +124,6 @@ public class ShragleCom extends PluginForHost {
|
||||
dl.startDownload();
|
||||
}
|
||||
|
||||
public boolean useIcon() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// @Override
|
||||
public AvailableStatus requestFileInformation(DownloadLink downloadLink) throws PluginException, IOException {
|
||||
setBrowserExclusive();
|
||||
|
@ -48,10 +48,6 @@ public class Uploadedto extends PluginForHost {
|
||||
// 20).setDefaultValue(1).setStep(1));
|
||||
}
|
||||
|
||||
public boolean useIcon() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Korrigiert den Downloadlink in ein einheitliches Format
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user