vanetsim.gui.helpers
Class ButtonCreator

java.lang.Object
  extended by vanetsim.gui.helpers.ButtonCreator

public final class ButtonCreator
extends java.lang.Object


Constructor Summary
ButtonCreator()
           
 
Method Summary
static javax.swing.JButton getJButton(java.lang.String imageName, java.lang.String command, java.lang.String altString, java.awt.event.ActionListener listener)
          Convenience method to get a JButton with an image on it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonCreator

public ButtonCreator()
Method Detail

getJButton

public static javax.swing.JButton getJButton(java.lang.String imageName,
                                             java.lang.String command,
                                             java.lang.String altString,
                                             java.awt.event.ActionListener listener)
Convenience method to get a JButton with an image on it.

Parameters:
imageName - the filename of the image relative to the vanetsim/images directory
command - a command string which can be used to track events in actionPerformed()
altString - an alternative string to display on the button when the original image can't be loaded and as a tooltip
listener - an ActionListener which performs actions on button clicks
Returns:
the JButton created