if (netInfo.isFirewalled()) { warnungen.setVisible(true); warnungIcon.setVisible(true); label7.setText(firewallWarning); } else { warnungen.setVisible(false); warnungIcon.setVisible(false); label7.setText("");
if (netInfo.isFirewalled() != firewalled){ firewalled = !firewalled; warnungen.setVisible(firewalled); warnungIcon.setVisible(firewalled); if (firewalled){ label7.setText(firewallWarning); } else{ label7.setText(""); } repaint();
    public void fireContentChanged(int type, Object content) {        try {            if (type == DataUpdateListener.NETINFO_CHANGED) {                if (firstChange) {                    firstChange = false;                    new NachrichtenWorker().start();                }                netInfo = (NetworkInfo) content;                StringBuffer temp = new StringBuffer(label6Text);                int pos = temp.indexOf("%d");                if (pos != -1) {                    temp.replace(pos, pos + 2,                                 netInfo.getAJUserGesamtAsStringWithPoints());                }                pos = temp.indexOf("%d");                if (pos != -1) {                    temp.replace(pos, pos + 2,                                 netInfo.getAJAnzahlDateienAsStringWithPoints());                }                pos = temp.indexOf("%s");                if (pos != -1) {                    temp.replace(pos, pos + 2,                                 netInfo.getAJGesamtShareWithPoints(0));                }                label6.setText(temp.toString());                if (netInfo.isFirewalled()) {                    warnungen.setVisible(true);                    warnungIcon.setVisible(true);                    label7.setText(firewallWarning);                }                else {                    warnungen.setVisible(false);                    warnungIcon.setVisible(false);                    label7.setText("");                }                String tmp = netInfo.getWelcomeMessage();                if (tmp.compareTo(serverMessage.getText()) != 0) {                    serverMessage.setText(netInfo.getWelcomeMessage());                    serverMessage.setCaretPosition(0);                }            }            else if (type == DataUpdateListener.INFORMATION_CHANGED) {                information = (Information) content;                StringBuffer temp = new StringBuffer(label9Text);                int pos = temp.indexOf("%s");                if (pos != -1) {                    if (information.getVerbindungsStatus() ==                        Information.VERBUNDEN) {                        if (information.getServerName() == null                            || information.getServerName().length() == 0) {                            ServerDO serverDO = information.getServerDO();                            if (serverDO != null) {                                String tmp = serverDO.getHost() + ":" +                                    serverDO.getPort();                                temp.replace(pos, pos + 2, tmp);                            }                            else {                                temp.replace(pos, pos + 2, "?");                            }                        }                        else {                            temp.replace(pos, pos + 2,                                         information.getServerName());                        }                    }                    else {                        temp.replace(pos, pos + 2, keinServer);                    }                    pos = temp.indexOf("%d");                    if (pos != -1) {                        temp.replace(pos, pos + 2, Integer.toString(                            ApplejuiceFassade.                            getInstance().                            getAllServer().                            size()));                    }                }                label9.setText(temp.toString());                temp = new StringBuffer(label10Text);                pos = temp.indexOf("%d");                if (pos != -1) {                    temp.replace(pos, pos + 2, Long.toString(information.                        getOpenConnections()));                }                label10.setText(temp.toString());            }        }        catch (Exception e) {            if (logger.isEnabledFor(Level.ERROR)) {                logger.error(ApplejuiceFassade.ERROR_MESSAGE, e);            }        }    }