Class JaxoGridButtons

All Implemented Interfaces:
MouseListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, JaxoLocalized

public class JaxoGridButtons extends JPanel implements MouseListener, PropertyChangeListener, JaxoLocalized
Responsible for displaying and modifying the buttons of the grid button menu.
Since:
2.0
See Also:
  • Constructor Details

    • JaxoGridButtons

      public JaxoGridButtons()
      Constructor: lays out the grid button panel.
  • Method Details

    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Applies a property change event.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      e - the change event.
    • addActionListener

      public final void addActionListener(ActionListener l)
      Adds the given ActionListener to all buttons in this panel.
      Parameters:
      l - The ActionListener to add.
    • setDefault

      public final void setDefault(int mode)
      Set the button corresponding to mode as default. If mode is not a grid mode, all buttons are set as not default.
      Parameters:
      mode - The button to set as default.
    • pressButton

      public final void pressButton(int mode)
      Sets the specified button as pressed. If mode is not a grid mode, all buttons are set as not pressed.
      Parameters:
      mode - The mode specifying the button to be pressed, as defined in JaxoConstants.
    • updateLanguage

      public final void updateLanguage()
      Updates the component with the current language as set in the preferences (JaxoPrefs.PREF_LANGUAGE).
      Specified by:
      updateLanguage in interface JaxoLocalized
    • mousePressed

      public final void mousePressed(MouseEvent e)
      Processes the right-click on the zoom button.
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      e - The MouseEvent to be processed.
    • mouseClicked

      public final void mouseClicked(MouseEvent e)
      Does nothing.
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      e - The MouseEvent to be processed.
    • mouseEntered

      public final void mouseEntered(MouseEvent e)
      Does nothing.
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      e - The MouseEvent to be processed.
    • mouseExited

      public final void mouseExited(MouseEvent e)
      Does nothing.
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      e - The MouseEvent to be processed.
    • mouseReleased

      public final void mouseReleased(MouseEvent e)
      Does nothing.
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      e - The MouseEvent to be processed.