java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
cmpt213.assignment4.packagedeliveries.client.view.util.customUI.ColumnHeader
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ColumnHeader extends JPanel
Custom column header that will be added to a JScroll pane; uses HeaderButtons. Implements how different buttons will behave on click.
See Also:
  • Field Details

  • Constructor Details

    • ColumnHeader

      public ColumnHeader(ActionListener al)
      Constructor for column header, sets look and feel of buttons.
      Parameters:
      al - Action Listener that buttons will add.
  • Method Details

    • changeColumnText

      public void changeColumnText(Util.SCREEN_STATE state)
      Changes the colour and state of each button depending on the state.
      Parameters:
      state - Current screen state of UI.
    • buttonClicked

      public void buttonClicked(Util.SCREEN_STATE btnState)
      Updates states of all buttons when a button is clicked. Ensures colour changes correctly.
      Parameters:
      btnState - Current State of the screen and button.