Package zleurtor.scanmanager.view.gui
Class SlavesPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
zleurtor.scanmanager.view.gui.SlavesPanel
- All Implemented Interfaces:
ActionListener
,ComponentListener
,KeyListener
,MouseListener
,MouseMotionListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,MasterListener
public class SlavesPanel
extends JPanel
implements ComponentListener, MasterListener, MouseListener, MouseMotionListener, KeyListener, ActionListener
The panel displaying all the slaves information.
- Author:
- Zleurtor
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionSlavesPanel
(Master newMaster, JTextField theOptionsField) Constructs a new slaves panel using the specified master object. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
final void
final void
final void
final void
final void
Display the slave option in the options text field.void
fileSaved
(MasterEvent evt) The event fired when a file has been saved.int[]
Compute the color balance common to all slaves.final Master
Returns the slaves panel master.final List<SlaveInformation>
Returns the list of selected slaves information.final List<SlaveInformation>
Returns the list of all slaves information.final void
keyPressed
(KeyEvent evt) final void
keyReleased
(KeyEvent evt) final void
final void
log
(MasterEvent evt, org.apache.log4j.lf5.LogLevel level) The event fired when a log file content income.final void
logLevelError
(MasterEvent evt) The event fired when a log level change error income.final void
The event fired when a log level change success income.final void
mouseClicked
(MouseEvent evt) final void
mouseDragged
(MouseEvent evt) final void
mouseEntered
(MouseEvent evt) final void
mouseExited
(MouseEvent evt) final void
mouseMoved
(MouseEvent evt) final void
mousePressed
(MouseEvent evt) final void
mouseReleased
(MouseEvent evt) final void
newSlave
(MasterEvent evt) The event fired when a new slave incame.final void
options
(MasterEvent evt) The event fired when an options changed income.protected final void
final void
setWaitForQuack
(boolean newWaitForQuack) Sets whether or not we are waiting for a snapshot in order to play the "quack" sound.final void
slaveQuit
(MasterEvent evt) The event fired when a new slave has gone.final void
The event fired when the slaves list is cleared.final void
snapshotError
(MasterEvent evt) The event fired when an error occurred during a snapshot process.final void
The event fired when the snapshots have been cleared.final void
The event fired when a snapshot has been successfully processed.final void
streamError
(MasterEvent evt) The event fired when an error occurred during a preview process.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Constructor Details
-
SlavesPanel
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
Returns the slaves panel master.- Returns:
- The slaves panel master.
-
getSlaves
Returns the list of all slaves information.- Returns:
- The list of all slaves information.
-
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
- Overrides:
paintComponent
in classJComponent
-
componentResized
- Specified by:
componentResized
in interfaceComponentListener
-
componentMoved
- Specified by:
componentMoved
in interfaceComponentListener
-
componentShown
- Specified by:
componentShown
in interfaceComponentListener
-
componentHidden
- Specified by:
componentHidden
in interfaceComponentListener
-
slavesCleared
public final void slavesCleared()Description copied from interface:MasterListener
The event fired when the slaves list is cleared.- Specified by:
slavesCleared
in interfaceMasterListener
-
newSlave
Description copied from interface:MasterListener
The event fired when a new slave incame.- Specified by:
newSlave
in interfaceMasterListener
- Parameters:
evt
- The event object containing information on the new slave.
-
slaveQuit
Description copied from interface:MasterListener
The event fired when a new slave has gone.- Specified by:
slaveQuit
in interfaceMasterListener
- Parameters:
evt
- The event object containing information on the slave which has gone.
-
snapshotSuccess
Description copied from interface:MasterListener
The event fired when a snapshot has been successfully processed.- Specified by:
snapshotSuccess
in interfaceMasterListener
- Parameters:
evt
- The event object containing information on the slave which processed the snapshot.
-
snapshotError
Description copied from interface:MasterListener
The event fired when an error occurred during a snapshot process.- Specified by:
snapshotError
in interfaceMasterListener
- 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 interfaceMasterListener
-
streamError
Description copied from interface:MasterListener
The event fired when an error occurred during a preview process.- Specified by:
streamError
in interfaceMasterListener
- Parameters:
evt
- The event object containing information on the slave which failed during the stream process.
-
log
Description copied from interface:MasterListener
The event fired when a log file content income.- Specified by:
log
in interfaceMasterListener
- Parameters:
evt
- The event object containing the slave's log file content.level
- The slave's log level.
-
logLevelError
Description copied from interface:MasterListener
The event fired when a log level change error income.- Specified by:
logLevelError
in interfaceMasterListener
- Parameters:
evt
- The event object containing the slave's log level change error.
-
logLevelSuccess
Description copied from interface:MasterListener
The event fired when a log level change success income.- Specified by:
logLevelSuccess
in interfaceMasterListener
- Parameters:
evt
- The event object containing the slave's log level success.
-
options
Description copied from interface:MasterListener
The event fired when an options changed income.- Specified by:
options
in interfaceMasterListener
- Parameters:
evt
- The event object containing the slave's options.
-
fileSaved
Description copied from interface:MasterListener
The event fired when a file has been saved.- Specified by:
fileSaved
in interfaceMasterListener
- Parameters:
evt
- The event object containing the saved file.
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
mouseClicked
- Specified by:
mouseClicked
in interfaceMouseListener
-
mousePressed
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
- Specified by:
mouseExited
in interfaceMouseListener
-
keyTyped
- Specified by:
keyTyped
in interfaceKeyListener
-
keyPressed
- Specified by:
keyPressed
in interfaceKeyListener
-
keyReleased
- Specified by:
keyReleased
in interfaceKeyListener
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
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.
-