Class BlinkenLight

All Implemented Interfaces:
ActionListener, MouseListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, SwingConstants, PortEventListener, PortExtendedStatusListener, PortMgmtListener, PortStatusListener

This class implements a color-changing indicator driven by a PortConnector to indicate the state of the driver.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Constructor Details

    • BlinkenLight

      public BlinkenLight(PortConnector port)
      Create a control button for an existing PortConnector object to display the realtime status of the port and allow invoking the configuration panel for that port.
      Parameters:
      port - PortConnector to monitor
  • Method Details

    • portReceiving

      public void portReceiving(PortConnector port, boolean isReceiving)
      Reports when the specified port starts or stops receiving a message.
      Specified by:
      portReceiving in interface PortEventListener
      Parameters:
      port - PortConnector of relevant port
      isReceiving - boolean true if receiving is starting, false if receiving is ending
    • portTransmitting

      public void portTransmitting(PortConnector port, boolean isTransmitting)
      Reports when the specified port starts or stops transmitting a message.
      Specified by:
      portTransmitting in interface PortEventListener
      Parameters:
      port - PortConnector of relevant port
      isTransmitting - boolean true if transmitting is starting, false if transmitting is ending
    • portFailed

      public void portFailed(PortConnector port)
      Reports when the port fails for some reason.
      Specified by:
      portFailed in interface PortEventListener
      Parameters:
      port - PortConnector of relevant port
    • portClosed

      public void portClosed(PortConnector connector)
      The specified port has been closed.
      Specified by:
      portClosed in interface PortStatusListener
      Parameters:
      connector - PortConnector that was closed
    • portOpened

      public void portOpened(PortConnector connector)
      The specified port has been successfully opened.
      Specified by:
      portOpened in interface PortStatusListener
      Parameters:
      connector - PortConnector that was opened
    • portStatusChanged

      public void portStatusChanged(PortConnector connector)
      The status of the specified port has changed other than opening or closing, or beginning or ending transmit or receive.
      Specified by:
      portStatusChanged in interface PortExtendedStatusListener
      Parameters:
      connector - PortConnector whose status has changed
    • portCreated

      public void portCreated(PortConnector connector)
      The specified port has been added to the configuration..
      Specified by:
      portCreated in interface PortMgmtListener
      Parameters:
      connector - PortConnector that was added
    • portDeleted

      public void portDeleted(PortConnector connector)
      The specified port has been removed from the configuration..
      Specified by:
      portDeleted in interface PortMgmtListener
      Parameters:
      connector - PortConnector that was removed
    • getPort

      public PortConnector getPort()
      Get the port associated with this BlinkenLight.
      Returns:
      PortConnector
    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Invoked when the mouse button has been clicked (pressed and released) on a component.
      Specified by:
      mouseClicked in interface MouseListener
    • mousePressed

      public void mousePressed(MouseEvent e)
      Invoked when a mouse button has been pressed on a component.
      Specified by:
      mousePressed in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Invoked when a mouse button has been released on a component.
      Specified by:
      mouseReleased in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      Invoked when the mouse enters a component.
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent e)
      Invoked when the mouse exits a component.
      Specified by:
      mouseExited in interface MouseListener
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Invoked when an action occurs.
      Specified by:
      actionPerformed in interface ActionListener