/*************************************************** * * cismet GmbH, Saarbruecken, Germany * * ... and it just works. * ****************************************************/ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package de.cismet.tools.gui.downloadmanager; import org.openide.util.NbBundle; import javax.swing.JPanel; /** * DOCUMENT ME! * * @author daniel * @version $Revision$, $Date$ */ public class DownloadDesktopNotificationPanel extends JPanel { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel lblFiller; private javax.swing.JLabel lblIcon; private javax.swing.JLabel lblSubTitle1; private javax.swing.JLabel lblSubTitle2; private javax.swing.JLabel lblSubTitle3; private javax.swing.JLabel lblTitle; private javax.swing.JPanel pnlSubTitle; // End of variables declaration//GEN-END:variables //~ Constructors ----------------------------------------------------------- /** * Creates new form DowloadDesktopNotification. * * @param downloadName DOCUMENT ME! * @param isErroneous DOCUMENT ME! */ public DownloadDesktopNotificationPanel(final String downloadName, final boolean isErroneous) { // this.downloadName = downloadName; initComponents(); this.setOpaque(false); lblSubTitle2.setText(downloadName); if (isErroneous) { lblTitle.setText(org.openide.util.NbBundle.getMessage( DownloadDesktopNotificationPanel.class, "DownloadDesktopNotificationPanel.lblTitle.erroneous.text")); lblSubTitle3.setText(org.openide.util.NbBundle.getMessage( DownloadDesktopNotificationPanel.class, "DownloadDesktopNotificationPanel.lblSubTitle3.erroneous.text")); } } //~ Methods ---------------------------------------------------------------- // @Override // public void paintComponent(final Graphics g) { // super.paintComponent(g); // final Graphics2D g2d = (Graphics2D)g; // g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f)); // g2d.setPaint(new Color(100, 100, 100)); // g2d.fillRect(0, 0, this.getWidth(), this.getHeight()); // } /** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The * content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); lblIcon = new javax.swing.JLabel(); pnlSubTitle = new javax.swing.JPanel(); lblSubTitle2 = new javax.swing.JLabel(); lblSubTitle1 = new javax.swing.JLabel(); lblSubTitle3 = new javax.swing.JLabel(); lblFiller = new javax.swing.JLabel(); setOpaque(false); setLayout(new java.awt.GridBagLayout()); lblTitle.setFont(new java.awt.Font("DejaVu Sans", 1, 13)); // NOI18N lblTitle.setForeground(new java.awt.Color(255, 255, 255)); lblTitle.setText(org.openide.util.NbBundle.getMessage( DownloadDesktopNotificationPanel.class, "DownloadDesktopNotificationPanel.lblTitle.text")); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10); add(lblTitle, gridBagConstraints); lblIcon.setForeground(new java.awt.Color(254, 254, 254)); lblIcon.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/cismet/tools/gui/downloadmanager/res/download.png"))); // NOI18N lblIcon.setText(org.openide.util.NbBundle.getMessage( DownloadDesktopNotificationPanel.class, "DownloadDesktopNotificationPanel.lblIcon.text")); // NOI18N lblIcon.setFocusable(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridheight = 2; gridBagConstraints.insets = new java.awt.Insets(0, 5, 5, 0); add(lblIcon, gridBagConstraints); pnlSubTitle.setOpaque(false); pnlSubTitle.setLayout(new java.awt.GridBagLayout()); lblSubTitle2.setFont(new java.awt.Font("DejaVu Sans", 0, 10)); // NOI18N lblSubTitle2.setForeground(new java.awt.Color(255, 255, 255)); lblSubTitle2.setText(org.openide.util.NbBundle.getMessage( DownloadDesktopNotificationPanel.class, "DownloadDesktopNotificationPanel.lblSubTitle2.text")); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(0, 5, 20, 5); pnlSubTitle.add(lblSubTitle2, gridBagConstraints); lblSubTitle1.setFont(new java.awt.Font("DejaVu Sans", 0, 10)); // NOI18N lblSubTitle1.setForeground(new java.awt.Color(254, 254, 254)); lblSubTitle1.setText(org.openide.util.NbBundle.getMessage( DownloadDesktopNotificationPanel.class, "DownloadDesktopNotificationPanel.lblSubTitle1.text")); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(0, 0, 20, 0); pnlSubTitle.add(lblSubTitle1, gridBagConstraints); lblSubTitle3.setFont(new java.awt.Font("DejaVu Sans", 0, 10)); // NOI18N lblSubTitle3.setForeground(new java.awt.Color(254, 254, 254)); lblSubTitle3.setText(org.openide.util.NbBundle.getMessage( DownloadDesktopNotificationPanel.class, "DownloadDesktopNotificationPanel.lblSubTitle3.text")); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; gridBagConstraints.insets = new java.awt.Insets(0, 0, 20, 0); pnlSubTitle.add(lblSubTitle3, gridBagConstraints); lblFiller.setText(org.openide.util.NbBundle.getMessage( DownloadDesktopNotificationPanel.class, "DownloadDesktopNotificationPanel.lblFiller.text")); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; pnlSubTitle.add(lblFiller, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10); add(pnlSubTitle, gridBagConstraints); } // </editor-fold>//GEN-END:initComponents }