All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
TToolBar.CalibrationButton, TToolBar.DrawingButton, TToolBar.RulerButton

public class TButton extends JButton
A button based on VideoPlayer.PlayerButton that is used throughout Tracker.
Author:
Douglas Brown
See Also:
  • Field Details

    • context

      protected String context
    • alwaysShowBorder

      protected boolean alwaysShowBorder
  • Constructor Details

    • TButton

      public TButton()
      Constructs a TButton.
    • TButton

      public TButton(TTrack track)
      Constructs a TButton with a TTrack.
      Parameters:
      track - the track
    • TButton

      public TButton(Icon icon)
      Constructs a TButton with an Icon.
      Parameters:
      icon - the icon
    • TButton

      public TButton(Icon off, Icon on)
      Constructs a TButton with icons for selected and unselected states.
      Parameters:
      off - the unselected state icon
      on - the selected state icon
  • Method Details

    • setIcons

      public void setIcons(Icon off, Icon on)
      Sets the icons for selected and unselected states.
      Parameters:
      off - the unselected state icon
      on - the selected state icon
    • setTrack

      public void setTrack(TTrack track)
      Sets the track associated with this button.
      Parameters:
      track - the track
    • getTrack

      public TTrack getTrack()
      Gets the track associated with this button.
      Returns:
      the track
    • getPopup

      protected JPopupMenu getPopup()
      Gets the TMenuBar's trackMenu popup menu to display. If a track is associated with this button, the track menu is returned, but subclasses can override this method to return any popup menu.
      Returns:
      the popup menu, or null if none
    • showPopup

      protected void showPopup()
    • alwaysShowBorder

      protected void alwaysShowBorder(boolean showBorder)