Examples of ResourceMap


Examples of org.jdesktop.application.ResourceMap

        super(app);

        initComponents();
        LOGGER.debug("Components initialized.");
        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener()
        {

            @Override
            public void actionPerformed(ActionEvent e)
            {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++)
        {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener()
        {

            @Override
            public void actionPerformed(ActionEvent e)
            {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
View Full Code Here

Examples of org.jdesktop.application.ResourceMap

/*  36 */     JLabel appHomepageLabel = new JLabel();
/*  37 */     JLabel appDescLabel = new JLabel();
/*  38 */     JLabel imageLabel = new JLabel();
/*     */
/*  40 */     setDefaultCloseOperation(2);
/*  41 */     ResourceMap resourceMap = ((ClipTartApp)Application.getInstance(ClipTartApp.class)).getContext().getResourceMap(ClipTartAboutBox.class);
/*  42 */     setTitle(resourceMap.getString("title", new Object[0]));
/*  43 */     setModal(true);
/*  44 */     setName("aboutBox");
/*  45 */     setResizable(false);
/*     */
/*  47 */     ActionMap actionMap = ((ClipTartApp)Application.getInstance(ClipTartApp.class)).getContext().getActionMap(ClipTartAboutBox.class, this);
/*  48 */     this.closeButton.setAction(actionMap.get("closeAboutBox"));
/*  49 */     this.closeButton.setName("closeButton");
/*     */
/*  51 */     appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | 0x1, appTitleLabel.getFont().getSize() + 4));
/*  52 */     appTitleLabel.setText(resourceMap.getString("Application.title", new Object[0]));
/*  53 */     appTitleLabel.setName("appTitleLabel");
/*     */
/*  55 */     versionLabel.setFont(versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | 0x1));
/*  56 */     versionLabel.setText(resourceMap.getString("versionLabel.text", new Object[0]));
/*  57 */     versionLabel.setName("versionLabel");
/*     */
/*  59 */     appVersionLabel.setText(resourceMap.getString("Application.version", new Object[0]));
/*  60 */     appVersionLabel.setName("appVersionLabel");
/*     */
/*  62 */     vendorLabel.setFont(vendorLabel.getFont().deriveFont(vendorLabel.getFont().getStyle() | 0x1));
/*  63 */     vendorLabel.setText(resourceMap.getString("vendorLabel.text", new Object[0]));
/*  64 */     vendorLabel.setName("vendorLabel");
/*     */
/*  66 */     appVendorLabel.setText(resourceMap.getString("Application.vendor", new Object[0]));
/*  67 */     appVendorLabel.setName("appVendorLabel");
/*     */
/*  69 */     homepageLabel.setFont(homepageLabel.getFont().deriveFont(homepageLabel.getFont().getStyle() | 0x1));
/*  70 */     homepageLabel.setText(resourceMap.getString("homepageLabel.text", new Object[0]));
/*  71 */     homepageLabel.setName("homepageLabel");
/*     */
/*  73 */     appHomepageLabel.setText(resourceMap.getString("Application.homepage", new Object[0]));
/*  74 */     appHomepageLabel.setName("appHomepageLabel");
/*     */
/*  76 */     appDescLabel.setText(resourceMap.getString("appDescLabel.text", new Object[0]));
/*  77 */     appDescLabel.setName("appDescLabel");
/*     */
/*  79 */     imageLabel.setIcon(resourceMap.getIcon("imageLabel.icon"));
/*  80 */     imageLabel.setName("imageLabel");
/*     */
/*  82 */     GroupLayout layout = new GroupLayout(getContentPane());
/*  83 */     getContentPane().setLayout(layout);
/*  84 */     layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(imageLabel).addGap(18, 18, 18).addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup().addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(versionLabel).addComponent(vendorLabel).addComponent(homepageLabel)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(appVersionLabel).addComponent(appVendorLabel).addComponent(appHomepageLabel))).addComponent(appTitleLabel, GroupLayout.Alignment.LEADING).addComponent(appDescLabel, GroupLayout.Alignment.LEADING, -1, 266, 32767).addComponent(this.closeButton)).addContainerGap()));
View Full Code Here

Examples of org.jdesktop.application.ResourceMap

/*     */   {
/*  37 */     super(app);
/*     */
/*  39 */     initComponents();
/*     */
/*  43 */     ResourceMap resourceMap = getResourceMap();
/*  44 */     int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout").intValue();
/*  45 */     this.messageTimer = new Timer(messageTimeout, new ActionListener()
/*     */     {
/*     */       public void actionPerformed(ActionEvent e)
/*     */       {
/*     */       }
/*     */     });
/*  51 */     this.messageTimer.setRepeats(false);
/*  52 */     int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate").intValue();
/*  53 */     for (int i = 0; i < this.busyIcons.length; i++) {
/*  54 */       this.busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
/*     */     }
/*  56 */     this.busyIconTimer = new Timer(busyAnimationRate, new ActionListener()
/*     */     {
/*     */       public void actionPerformed(ActionEvent e) {
/*  59 */         ClipTartView.access$002(ClipTartView.this, (ClipTartView.this.busyIconIndex + 1) % ClipTartView.this.busyIcons.length);
/*     */       }
/*     */     });
/*  63 */     this.idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
/*     */
/*  68 */     TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
/*  69 */     taskMonitor.addPropertyChangeListener(new PropertyChangeListener()
/*     */     {
/*     */       public void propertyChange(PropertyChangeEvent evt) {
View Full Code Here

Examples of org.jdesktop.application.ResourceMap

/* 123 */     this.lblText = new JTextArea();
/* 124 */     this.bntClear = new JButton();
/*     */
/* 126 */     this.mainPanel.setName("mainPanel");
/*     */
/* 128 */     ResourceMap resourceMap = ((ClipTartApp)Application.getInstance(ClipTartApp.class)).getContext().getResourceMap(ClipTartView.class);
/* 129 */     this.btnCopy.setText(resourceMap.getString("btnCopy.text", new Object[0]));
/* 130 */     this.btnCopy.setName("btnCopy");
/* 131 */     this.btnCopy.addActionListener(new ActionListener() {
/*     */       public void actionPerformed(ActionEvent evt) {
/* 133 */         ClipTartView.this.btnCopyActionPerformed(evt);
/*     */       }
/*     */     });
/* 137 */     this.btnHelp.setText(resourceMap.getString("btnHelp.text", new Object[0]));
/* 138 */     this.btnHelp.setName("btnHelp");
/* 139 */     this.btnHelp.addActionListener(new ActionListener() {
/*     */       public void actionPerformed(ActionEvent evt) {
/* 141 */         ClipTartView.this.btnHelpActionPerformed(evt);
/*     */       }
/*     */     });
/* 145 */     this.jScrollPane1.setName("jScrollPane1");
/*     */
/* 147 */     this.lblText.setColumns(20);
/* 148 */     this.lblText.setRows(5);
/* 149 */     this.lblText.setName("lblText");
/* 150 */     this.jScrollPane1.setViewportView(this.lblText);
/*     */
/* 152 */     this.bntClear.setText(resourceMap.getString("bntClear.text", new Object[0]));
/* 153 */     this.bntClear.setName("bntClear");
/* 154 */     this.bntClear.addActionListener(new ActionListener() {
/*     */       public void actionPerformed(ActionEvent evt) {
/* 156 */         ClipTartView.this.bntClearActionPerformed(evt);
/*     */       }
View Full Code Here

Examples of org.jdesktop.application.ResourceMap

        for (String s : encodeList) {
            selectEncode.addItem(s);
        }

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
View Full Code Here

Examples of org.jdesktop.application.ResourceMap

        super(app);

        initComponents();

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
View Full Code Here

Examples of org.jdesktop.application.ResourceMap

        super(app);

        initComponents();

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
View Full Code Here

Examples of org.jdesktop.application.ResourceMap

        super(app);

        initComponents();

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
View Full Code Here

Examples of org.jdesktop.application.ResourceMap

        super(app);

        initComponents();

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
View Full Code Here

Examples of org.jdesktop.application.ResourceMap

        super(app);

        initComponents();

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.