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;
}
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;
}
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;
}
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);
}
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);
}
Aggregations