Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## interfacing
Class ServersAvailabilityJPanel

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      interfacing.ServersAvailabilityJPanel

All Implemented Interfaces:
  java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

    public class ServersAvailabilityJPanel

extends javax.swing.JPanel
implements java.awt.event.MouseListener, java.beans.PropertyChangeListener, java.awt.event.KeyListener

The JPanel allow you to set availability parameters to each server

See Also:
  Serialized Form

Nested Class Summary
`static class` | `ServersAvailabilityJPanel.MessageToServerJPanel` This JPanel shows the MessageToServer Object and shows both the failuresPeriodMean and upTimeMean for the trace for the Server objects selected.
`static class` | `ServersAvailabilityJPanel.WeightsPanel` This class is responsible for viewing the wieghts.

Nested classes/interfaces inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Field Summary

Fields inherited from class javax.swing.JComponent
`TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

Fields inherited from class java.awt.Component
`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
`ServersAvailabilityJPanel(MainFrame frame)`

Method Summary
`void` | `applyMessage(MessageToServer message)` This method is invoked by the MessageToServerJPanel objects to notify this JPanel of the user applying a message to the selection.
`void` | `applyMessageAndFillTraces(MessageToServer message, double failuresPeriodsMean, double upTimeMean)` This method is invoked by the MessageToServerJPanel objects to notify this JPanel of the user applying a message to the selection.
`void` | `disableInput()` This method disables input from user
`void` | `enableInput()` This method enable input from user
`void` | `fillJTable()` This method fill the table model (tableModel) of the corresponding data from the serversTable object that this JPanel is the view for.
`boolean` | `isThereASeceltion()`
`void` | `keyPressed(java.awt.event.KeyEvent arg0)`
`void` | `keyReleased(java.awt.event.KeyEvent e)` This is used to show the corresponding data on the left side when a Server is selected
`void` | `keyTyped(java.awt.event.KeyEvent arg0)`
`void` | `mouseClicked(java.awt.event.MouseEvent e)` This is used to show the corresponding data on the left side when a Server is clicked
`void` | `mouseEntered(java.awt.event.MouseEvent e)`
`void` | `mouseExited(java.awt.event.MouseEvent e)`
`void` | `mousePressed(java.awt.event.MouseEvent e)`
`void` | `mouseReleased(java.awt.event.MouseEvent e)`
`void` | `printModel(OurDefaultTableModel model)`
`void` | `propertyChange(java.beans.PropertyChangeEvent evt)` Used to keep the JTable look nice
`void` | `repaint()` This method refill the JTable with the data when the JPanel is repainted

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, setUI, updateUI`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update`

Methods inherited from class java.awt.Container
`add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ServersAvailabilityJPanel

    public ServersAvailabilityJPanel(MainFrame frame)

Parameters:
  `frame` - is the container of this JPanel.

Method Detail

### fillJTable

    public void fillJTable()

  This method fill the table model (tableModel) of the corresponding data from the serversTable object that this JPanel is the view for. The jTable object is changed correspondingly.

### repaint

    public void repaint()

  This method refill the JTable with the data when the JPanel is repainted

  Overrides:
    `repaint` in class `java.awt.Component`

### printModel

    public void printModel(OurDefaultTableModel model)

### disableInput

    public void disableInput()

  This method disables input from user

### enableInput

    public void enableInput()

  This method enable input from user

### isThereASeceltion

    public boolean isThereASeceltion()

  Returns:
    true if some rows are selected in the JTable, false otherwise.

### applyMessageAndFillTraces

    public void applyMessageAndFillTraces(MessageToServer message,
                                          double failuresPeriodsMean,
                                          double upTimeMean)

  This method is invoked by the MessageToServerJPanel objects to notify this JPanel of the user applying a message to the selection. This method changes the message to be sent to the server and also regenerate the artificial failures rates according to the failuresPeriodsMean and upTimeMean.

  Parameters:
    `message` - The message to be applied
    `failuresPeriodsMean` - the new failuresPeriodsMean
    `upTimeMean` - the new upTimeMean

### applyMessage

    public void applyMessage(MessageToServer message)

  This method is invoked by the MessageToServerJPanel objects to notify this JPanel of the user applying a message to the selection. This method changes the message to be sent to the server.

  Parameters:
    `message` - The message to be applied

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent evt)

  Used to keep the JTable look nice

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`

### mouseClicked

    public void mouseClicked(java.awt.event.MouseEvent e)

  This is used to show the corresponding data on the left side when a Server is clicked

  Specified by:
    `mouseClicked` in interface `java.awt.event.MouseListener`

### mouseEntered

    public void mouseEntered(java.awt.event.MouseEvent e)

  Specified by:
    `mouseEntered` in interface `java.awt.event.MouseListener`

### mouseExited

    public void mouseExited(java.awt.event.MouseEvent e)

  Specified by:
    `mouseExited` in interface `java.awt.event.MouseListener`

### mousePressed

    public void mousePressed(java.awt.event.MouseEvent e)

  Specified by:
    `mousePressed` in interface `java.awt.event.MouseListener`

### mouseReleased

    public void mouseReleased(java.awt.event.MouseEvent e)

  Specified by:
    `mouseReleased` in interface `java.awt.event.MouseListener`

### keyPressed

    public void keyPressed(java.awt.event.KeyEvent arg0)

  Specified by:
    `keyPressed` in interface `java.awt.event.KeyListener`

### keyReleased

    public void keyReleased(java.awt.event.KeyEvent e)

  This is used to show the corresponding data on the left side when a Server is selected

  Specified by:
    `keyReleased` in interface `java.awt.event.KeyListener`

### keyTyped

    public void keyTyped(java.awt.event.KeyEvent arg0)

  Specified by:
    `keyTyped` in interface `java.awt.event.KeyListener`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD