/** * @param iconSize */ JButton createStopButton(String iconSize) { JButton stop = new JButton(JMeterUtils.getResString("stop")); // $NON-NLS-1$ ImageIcon stopImage = JMeterUtils.getImage("toolbar/" + iconSize + "/process-stop-4.png"); stop.setIcon(stopImage); stop.setActionCommand(ACTION_STOP); stop.setEnabled(false); return stop; }
/** * This looks for the requested image in the classpath under * org.apache.jmeter.images.<em><name></em>, and also sets the description * of the image, which is useful if the icon is going to be placed * on the clipboard. * * @param name * the name of the image * @param description * the description of the image * @return The Image value */ public static ImageIcon getImage(String name, String description) { ImageIcon icon = getImage(name); if(icon != null) { icon.setDescription(description); } return icon; }
/** * Create a new JavaConfigGui as either a standalone or an embedded * component. * * @param displayNameField * tells whether the component name should be displayed with the * GUI. If true, this is a standalone component. If false, this * component is embedded in some other component. */ public JavaConfigGui(boolean displayNameField) { this.displayName = displayNameField; ImageIcon image = JMeterUtils.getImage("warning.png"); warningLabel = new JLabel(JMeterUtils.getResString("java_request_warning"), image, SwingConstants.LEFT); // $NON-NLS-1$ init(); }
private JPanel createControls() { String iconSize = JMeterUtils.getPropDefault(JMeterToolBar.TOOLBAR_ICON_SIZE, JMeterToolBar.DEFAULT_TOOLBAR_ICON_SIZE); start = new JButton(JMeterUtils.getResString("start")); // $NON-NLS-1$ ImageIcon startImage = JMeterUtils.getImage("toolbar/" + iconSize + "/arrow-right-3.png"); start.setIcon(startImage); start.addActionListener(this); start.setActionCommand(ACTION_START); start.setEnabled(true); stop = createStopButton(iconSize); stop.addActionListener(this); ImageIcon restartImage = JMeterUtils.getImage("toolbar/" + iconSize + "/edit-redo-7.png"); restart = new JButton(JMeterUtils.getResString("restart")); // $NON-NLS-1$ restart.setIcon(restartImage); restart.addActionListener(this); restart.setActionCommand(ACTION_RESTART); restart.setEnabled(false); JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("proxy_general_lifecycle"))); // $NON-NLS-1$ panel.add(start); panel.add(Box.createHorizontalStrut(10)); panel.add(stop); panel.add(Box.createHorizontalStrut(10)); panel.add(restart); return panel; }
/** * Constructor */ public SplashScreen() { imageLabel.setIcon(JMeterUtils.getImage("jmeter.png")); imageLabel.setBorder(new EmptyBorder(10, 10, 10, 10)); setLayout(borderLayout); add(imageLabel, BorderLayout.CENTER); add(progressBar, BorderLayout.SOUTH); pack(); setLocationRelativeTo(null); }
ImageIcon image = JMeterUtils.getImage("warning.png"); warningLabel = new JLabel(JMeterUtils.getResString("if_controller_warning"), image, SwingConstants.CENTER); // $NON-NLS-1$ warningLabel.setForeground(Color.RED);
JLabel jmeterLogo = new JLabel(JMeterUtils.getImage("jmeter.png")); JLabel copyright = new JLabel(JMeterUtils.getJMeterCopyright(), SwingConstants.CENTER); JLabel rights = new JLabel("All Rights Reserved.", SwingConstants.CENTER);
moduleToRunTreeNodes.setSelectionModel(tsm); ImageIcon image = JMeterUtils.getImage("warning.png"); warningLabel = new JLabel("", image, SwingConstants.LEFT); // $NON-NLS-1$ warningLabel.setForeground(Color.RED);
setIconImage(JMeterUtils.getImage("icon-apache.png").getImage());// $NON-NLS-1$