Class LightControlPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class LightControlPane extends JPanel
Pane to add / edit Light Controls for a new or given Light.

Light Control Table with new control / edit individual Control buttons. Uses separate JFrame to Edit a Single Control.

Defaults to No Light Controls for a New Light.

Code originally within LightTableAction.

See Also:
  • Constructor Details

    • LightControlPane

      Create a Panel for Light Controls. No Controls as default.
    • LightControlPane

      Create a Panel for Light Controls.
      Parameters:
      l - Light to display Light Controls for.
  • Method Details

    • addControlPressed

      protected void addControlPressed(ActionEvent e)
      Respond to pressing the Add Control button.
      Parameters:
      e - the event containing the press action
    • updateControlPressed

      protected void updateControlPressed(LightControl oldControl, LightControl newControl)
      Respond to pressing the Update Control button in the New / Edit Control Frame.
      Parameters:
      oldControl - the LightControl to remove
      newControl - the LightControl to add
    • setLightFromControlTable

      Set Controls from the Control Table to the Light. Removes any existing Light Controls on the Light.
      Parameters:
      g - Light to set Controls to.
    • editControlAction

      Respond to Edit button on row in the Light Control Table.
      Parameters:
      lc - the Light Control to edit.
    • addControlToTable

      protected void addControlToTable(LightControl lc)
      Add a Single Light Control to the Table.
      Parameters:
      lc - the Light Control to add.
    • getControlList

      Get Light Control List currently displayed in the Table. Returned by the TableModel as unmodifiable.
      Returns:
      List of Light Controls.
    • setToLight

      public final void setToLight(Light l)
      Set the Table to the Light Controls of a single Light.
      Parameters:
      l - the Light to set display for.
    • getLastSelectedControlIndex

      protected int getLastSelectedControlIndex()
      UI Function to get Last Selected Light Control Index within AddEditSingleLightControl.java
      Returns:
      Light Control Index.
    • setLastSelectedControlIndex

      protected void setLastSelectedControlIndex(int newIndex)
    • closeEditControlWindow

      protected void closeEditControlWindow()
    • dispose

      public void dispose()