Search in sources :

Example 86 with ImageIcon

use of javax.swing.ImageIcon in project zaproxy by zaproxy.

the class SearchPanel method getBtnPrev.

private JButton getBtnPrev() {
    if (btnPrev == null) {
        btnPrev = new JButton();
        btnPrev.setText(Constant.messages.getString("search.toolbar.label.previous"));
        // 'arrow up' icon
        btnPrev.setIcon(new ImageIcon(SearchPanel.class.getResource("/resource/icon/16/108.png")));
        btnPrev.setToolTipText(Constant.messages.getString("search.toolbar.tooltip.previous"));
        DisplayUtils.scaleIcon(btnPrev);
        btnPrev.addActionListener(new java.awt.event.ActionListener() {

            @Override
            public void actionPerformed(java.awt.event.ActionEvent e) {
                highlightPrevResult();
            }
        });
    }
    return btnPrev;
}
Also used : ImageIcon(javax.swing.ImageIcon) ActionListener(java.awt.event.ActionListener) JButton(javax.swing.JButton) ActionEvent(java.awt.event.ActionEvent)

Example 87 with ImageIcon

use of javax.swing.ImageIcon in project zaproxy by zaproxy.

the class SpiderPanel method getNewScanButton.

@Override
public JButton getNewScanButton() {
    if (scanButton == null) {
        scanButton = new JButton(Constant.messages.getString("spider.toolbar.button.new"));
        scanButton.setIcon(DisplayUtils.getScaledIcon(new ImageIcon(SpiderPanel.class.getResource("/resource/icon/16/spider.png"))));
        scanButton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                extension.showSpiderDialog(null);
            }
        });
    }
    return scanButton;
}
Also used : ImageIcon(javax.swing.ImageIcon) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton)

Example 88 with ImageIcon

use of javax.swing.ImageIcon in project zaproxy by zaproxy.

the class SpiderPanel method getShowMessagesToggleButton.

private JToggleButton getShowMessagesToggleButton() {
    if (showMessageToggleButton == null) {
        showMessageToggleButton = new JToggleButton(Constant.messages.getString("spider.toolbar.button.showmessages.label"), new ImageIcon(SpiderPanel.class.getResource("/resource/icon/16/178.png")));
        showMessageToggleButton.setToolTipText(Constant.messages.getString("spider.toolbar.button.showmessages.tooltip"));
        showMessageToggleButton.addItemListener(new ItemListener() {

            @Override
            public void itemStateChanged(ItemEvent e) {
                if (ItemEvent.SELECTED == e.getStateChange()) {
                    showTabs();
                } else {
                    hideMessagesTab();
                }
            }
        });
    }
    return showMessageToggleButton;
}
Also used : ImageIcon(javax.swing.ImageIcon) ItemEvent(java.awt.event.ItemEvent) JToggleButton(javax.swing.JToggleButton) ItemListener(java.awt.event.ItemListener)

Example 89 with ImageIcon

use of javax.swing.ImageIcon in project zxing by zxing.

the class GUIRunner method chooseImage.

private void chooseImage() throws MalformedURLException {
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.showOpenDialog(this);
    Path file = fileChooser.getSelectedFile().toPath();
    Icon imageIcon = new ImageIcon(file.toUri().toURL());
    setSize(imageIcon.getIconWidth(), imageIcon.getIconHeight() + 100);
    imageLabel.setIcon(imageIcon);
    String decodeText = getDecodeText(file);
    textArea.setText(decodeText);
}
Also used : Path(java.nio.file.Path) ImageIcon(javax.swing.ImageIcon) JFileChooser(javax.swing.JFileChooser) Icon(javax.swing.Icon) ImageIcon(javax.swing.ImageIcon)

Example 90 with ImageIcon

use of javax.swing.ImageIcon in project ACS by ACS-Community.

the class ReducedChainDlg method initGUI.

/**
	 * Initialize the GUI
	 */
private void initGUI() {
    setIconImage(new ImageIcon(AlarmGUIType.class.getResource(AlarmGUIType.iconFolder + "arrow_in.png")).getImage());
    setModalityType(Dialog.ModalityType.MODELESS);
    setDefaultCloseOperation(HIDE_ON_CLOSE);
    rootPane.setLayout(new BorderLayout());
    JTabbedPane tabbedPane = new JTabbedPane();
    JScrollPane tableScrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    tableScrollPane.setViewportView(table);
    table.addRemoveColumn(AlarmTableColumn.ICON, false);
    tabbedPane.addTab("Table view", tableScrollPane);
    JScrollPane treeScrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    treeScrollPane.setViewportView(tree);
    tabbedPane.addTab("Tree view", treeScrollPane);
    rootPane.add(tabbedPane, BorderLayout.CENTER);
    JPanel buttonPnl = new JPanel();
    buttonPnl.add(refreshBtn);
    refreshBtn.addActionListener(this);
    refreshBtn.setEnabled(false);
    buttonPnl.add(closeBtn);
    closeBtn.addActionListener(this);
    rootPane.add(buttonPnl, BorderLayout.SOUTH);
    pack();
    setVisible(true);
}
Also used : JScrollPane(javax.swing.JScrollPane) ImageIcon(javax.swing.ImageIcon) JPanel(javax.swing.JPanel) AlarmGUIType(alma.acsplugins.alarmsystem.gui.table.AlarmGUIType) BorderLayout(java.awt.BorderLayout) JTabbedPane(javax.swing.JTabbedPane)

Aggregations

ImageIcon (javax.swing.ImageIcon)427 JButton (javax.swing.JButton)109 ActionEvent (java.awt.event.ActionEvent)83 ActionListener (java.awt.event.ActionListener)70 JLabel (javax.swing.JLabel)67 Dimension (java.awt.Dimension)62 BufferedImage (java.awt.image.BufferedImage)51 JPanel (javax.swing.JPanel)48 Insets (java.awt.Insets)42 Image (java.awt.Image)31 BorderLayout (java.awt.BorderLayout)28 IOException (java.io.IOException)28 URL (java.net.URL)26 GridBagLayout (java.awt.GridBagLayout)23 JMenuItem (javax.swing.JMenuItem)23 Color (java.awt.Color)21 Point (java.awt.Point)21 LogTypeHelper (com.cosylab.logging.engine.log.LogTypeHelper)20 JToggleButton (javax.swing.JToggleButton)20 JScrollPane (javax.swing.JScrollPane)19