예제 #1
0
  @Override
  public void resetEditor() {
    this.editor.setEnabled(true);
    this.editorField.setFont(this.editorFont);
    this.editorField.setBackground(null);
    this.editorIconLabel.setIcon(null);

    SwingUtils.setOpaque(this.editorIconLabel, false);
    SwingUtils.setOpaque(this.editorField, false);
  }
예제 #2
0
  @Override
  public void resetRenderer() {
    this.renderer.setEnabled(true);

    this.rendererField.setBorder(this.defaultBorder);
    this.rendererField.setOpaque(false);
    this.rendererField.setBackground(null);
    this.rendererField.setFont(this.rendererFont);

    this.renderer.setOpaque(false);
    this.rendererIcon.setIcon(null);

    SwingUtils.setOpaque(this.rendererIcon, false);
    SwingUtils.setOpaque(this.rendererField, false);
  }
        public ConnectionTooltip(DownloadLink link) {
            JLabel lbl;
            this.panel = new TooltipPanel("ins 3,wrap 1", "[grow,fill]", "[grow,fill]");
            DownloadInterface dli = link.getDownloadInstance();
            SingleDownloadController sdc = link.getDownloadLinkController();
            {
                if (dlWatchdog.isLinkForced(link)) {
                    panel.add(lbl = new JLabel(_GUI._.ConnectionColumn_DownloadIsForced(), forced, JLabel.LEADING));
                    SwingUtils.setOpaque(lbl, false);
                    lbl.setForeground(new Color(this.getConfig().getForegroundColor()));
                }
                if (link.isSkipped()) {
                    panel.add(lbl = new JLabel(_GUI._.ConnectionColumn_DownloadIsSkipped(), skipped, JLabel.LEADING));
                    SwingUtils.setOpaque(lbl, false);
                    lbl.setForeground(new Color(this.getConfig().getForegroundColor()));
                }

                /* is the Link resumeable */
                if (link.isResumeable()) {
                    panel.add(lbl = new JLabel(_GUI._.ConnectionColumn_DownloadIsResumeable(), resumeIndicator, JLabel.LEADING));
                    SwingUtils.setOpaque(lbl, false);
                    lbl.setForeground(new Color(this.getConfig().getForegroundColor()));
                }
            }
            if (sdc != null) {
                {
                    /* connection? */
                    HTTPProxy proxy = sdc.getCurrentProxy();
                    if (proxy == null) proxy = HTTPProxy.NONE;
                    panel.add(lbl = new JLabel(_GUI._.ConnectionColumn_getStringValue_connection(proxy), proxy.isRemote() ? proxyConnection : directConnection, JLabel.LEADING));
                    SwingUtils.setOpaque(lbl, false);
                    lbl.setForeground(new Color(this.getConfig().getForegroundColor()));
                }
                if (sdc.getAccount() != null) {
                    /* account in use? */
                    panel.add(lbl = new JLabel(_GUI._.ConnectionColumn_DownloadUsesAccount(sdc.getAccount().getUser()), accountInUse, JLabel.LEADING));
                    SwingUtils.setOpaque(lbl, false);
                    lbl.setForeground(new Color(this.getConfig().getForegroundColor()));
                }
            }
            if (dli != null) {
                panel.add(lbl = new JLabel(_GUI._.ConnectionColumn_getStringValue_chunks(dli.getManagedConnetionHandler().size()), connections, JLabel.LEADING));
                SwingUtils.setOpaque(lbl, false);
                lbl.setForeground(new Color(this.getConfig().getForegroundColor()));
            }
            this.panel.setOpaque(false);
            if (panel.getComponentCount() > 0) add(panel);
        }