Class SlavesPanel

All Implemented Interfaces:
ActionListener, ComponentListener, KeyListener, MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, MasterListener

The panel displaying all the slaves information.
Author:
Zleurtor
See Also:
  • Constructor Details

    • SlavesPanel

      public SlavesPanel(Master newMaster, JTextField theOptionsField)
      Constructs a new slaves panel using the specified master object.
      Parameters:
      newMaster - The master object which shall execute slaves panel actions.
      theOptionsField - The options text field.
  • Method Details

    • getMaster

      public final Master getMaster()
      Returns the slaves panel master.
      Returns:
      The slaves panel master.
    • getSlaves

      public final List<SlaveInformation> getSlaves()
      Returns the list of all slaves information.
      Returns:
      The list of all slaves information.
    • getSelected

      public final List<SlaveInformation> getSelected()
      Returns the list of selected slaves information.
      Returns:
      The list of selected slaves information.
    • setWaitForQuack

      public final void setWaitForQuack(boolean newWaitForQuack)
      Sets whether or not we are waiting for a snapshot in order to play the "quack" sound.
      Parameters:
      newWaitForQuack - true if we are waiting for a snapshot, false otherwise.
    • paintComponent

      protected final void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • componentResized

      public final void componentResized(ComponentEvent e)
      Specified by:
      componentResized in interface ComponentListener
    • componentMoved

      public final void componentMoved(ComponentEvent e)
      Specified by:
      componentMoved in interface ComponentListener
    • componentShown

      public final void componentShown(ComponentEvent e)
      Specified by:
      componentShown in interface ComponentListener
    • componentHidden

      public final void componentHidden(ComponentEvent e)
      Specified by:
      componentHidden in interface ComponentListener
    • slavesCleared

      public final void slavesCleared()
      Description copied from interface: MasterListener
      The event fired when the slaves list is cleared.
      Specified by:
      slavesCleared in interface MasterListener
    • newSlave

      public final void newSlave(MasterEvent evt)
      Description copied from interface: MasterListener
      The event fired when a new slave incame.
      Specified by:
      newSlave in interface MasterListener
      Parameters:
      evt - The event object containing information on the new slave.
    • slaveQuit

      public final void slaveQuit(MasterEvent evt)
      Description copied from interface: MasterListener
      The event fired when a new slave has gone.
      Specified by:
      slaveQuit in interface MasterListener
      Parameters:
      evt - The event object containing information on the slave which has gone.
    • snapshotSuccess

      public final void snapshotSuccess(MasterEvent evt)
      Description copied from interface: MasterListener
      The event fired when a snapshot has been successfully processed.
      Specified by:
      snapshotSuccess in interface MasterListener
      Parameters:
      evt - The event object containing information on the slave which processed the snapshot.
    • snapshotError

      public final void snapshotError(MasterEvent evt)
      Description copied from interface: MasterListener
      The event fired when an error occurred during a snapshot process.
      Specified by:
      snapshotError in interface MasterListener
      Parameters:
      evt - The event object containing information on the slave which failed during the snapshot.
    • snapshotsCleared

      public final void snapshotsCleared()
      Description copied from interface: MasterListener
      The event fired when the snapshots have been cleared.
      Specified by:
      snapshotsCleared in interface MasterListener
    • streamError

      public final void streamError(MasterEvent evt)
      Description copied from interface: MasterListener
      The event fired when an error occurred during a preview process.
      Specified by:
      streamError in interface MasterListener
      Parameters:
      evt - The event object containing information on the slave which failed during the stream process.
    • log

      public final void log(MasterEvent evt, org.apache.log4j.lf5.LogLevel level)
      Description copied from interface: MasterListener
      The event fired when a log file content income.
      Specified by:
      log in interface MasterListener
      Parameters:
      evt - The event object containing the slave's log file content.
      level - The slave's log level.
    • logLevelError

      public final void logLevelError(MasterEvent evt)
      Description copied from interface: MasterListener
      The event fired when a log level change error income.
      Specified by:
      logLevelError in interface MasterListener
      Parameters:
      evt - The event object containing the slave's log level change error.
    • logLevelSuccess

      public final void logLevelSuccess(MasterEvent evt)
      Description copied from interface: MasterListener
      The event fired when a log level change success income.
      Specified by:
      logLevelSuccess in interface MasterListener
      Parameters:
      evt - The event object containing the slave's log level success.
    • options

      public final void options(MasterEvent evt)
      Description copied from interface: MasterListener
      The event fired when an options changed income.
      Specified by:
      options in interface MasterListener
      Parameters:
      evt - The event object containing the slave's options.
    • fileSaved

      public void fileSaved(MasterEvent evt)
      Description copied from interface: MasterListener
      The event fired when a file has been saved.
      Specified by:
      fileSaved in interface MasterListener
      Parameters:
      evt - The event object containing the saved file.
    • mouseDragged

      public final void mouseDragged(MouseEvent evt)
      Specified by:
      mouseDragged in interface MouseMotionListener
    • mouseMoved

      public final void mouseMoved(MouseEvent evt)
      Specified by:
      mouseMoved in interface MouseMotionListener
    • mouseClicked

      public final void mouseClicked(MouseEvent evt)
      Specified by:
      mouseClicked in interface MouseListener
    • mousePressed

      public final void mousePressed(MouseEvent evt)
      Specified by:
      mousePressed in interface MouseListener
    • mouseReleased

      public final void mouseReleased(MouseEvent evt)
      Specified by:
      mouseReleased in interface MouseListener
    • mouseEntered

      public final void mouseEntered(MouseEvent evt)
      Specified by:
      mouseEntered in interface MouseListener
    • mouseExited

      public final void mouseExited(MouseEvent evt)
      Specified by:
      mouseExited in interface MouseListener
    • keyTyped

      public final void keyTyped(KeyEvent evt)
      Specified by:
      keyTyped in interface KeyListener
    • keyPressed

      public final void keyPressed(KeyEvent evt)
      Specified by:
      keyPressed in interface KeyListener
    • keyReleased

      public final void keyReleased(KeyEvent evt)
      Specified by:
      keyReleased in interface KeyListener
    • actionPerformed

      public final void actionPerformed(ActionEvent evt)
      Specified by:
      actionPerformed in interface ActionListener
    • displayOptions

      public final void displayOptions()
      Display the slave option in the options text field.
    • getCommonColorBalance

      public int[] getCommonColorBalance()
      Compute the color balance common to all slaves. If the slaves don't have a common color balance, 100% is returned.
      Returns:
      The color balance common to all slaves, or 100% if the slaves don't have a common color balance.