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 ServersTableJPanel

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

All Implemented Interfaces:
  java.awt.event.ActionListener, 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, ServersTableListener

    public class ServersTableJPanel

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

An object from this class and and ServersTableModelListerner act as the view and controller of the ServerTable in the Mapper object. They simply view the ServersTable and allow user to insert new classes.

See Also:
  Serialized Form

Nested Class Summary

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
`ServersTableJPanel(MainFrame frame)`

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)`
`void` | `buildPropretyJPanel()` This method build the property table
`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 ServerTable object that this JPanel is the view for.
`void` | `hidePropertyJPanel()` This hide the property JPanel
`void` | `hostNameChanged(int serverID, java.lang.String hostname)` This method is invoked when the hostname of a server is changed.
`void` | `keyPressed(java.awt.event.KeyEvent e)`
`void` | `keyReleased(java.awt.event.KeyEvent e)` This method is invoked when the user select a Server from the JTable by using the keyboard
`void` | `keyTyped(java.awt.event.KeyEvent e)`
`void` | `mouseClicked(java.awt.event.MouseEvent e)` This method is invoked when the user click on a Server
`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` | `passwordChanged(int serverID, java.lang.String password)` This method is invoked when the password of a server is changed.
`void` | `printModel(OurDefaultTableModel model)`
`void` | `propertyChange(java.beans.PropertyChangeEvent evt)` This handler is triggered when the divider location of the splitPane is changed.
`void` | `removeSelectedServer()` This method removes a Server when removeButton is clicked
`void` | `repaint()`
`void` | `ServersTableLister(long serverID, java.lang.String hostname, java.lang.String password, boolean down)`
`void` | `showPropertyJPanelToAddServer()` This method shows a Panel that allow the user to enter info about a new Server object to be added
`void` | `showServerInfo()` This method show the info about the selected Server.
`void` | `upDownStatusChanged(int serverID, boolean down)` This method is invoked when the down/up status of a server is changed.

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

### ServersTableJPanel

    public ServersTableJPanel(MainFrame frame)

Parameters:
  `frame` - is the MainFrame object that contains this Panel.

Method Detail

### fillJTable

    public void fillJTable()

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

### buildPropretyJPanel

    public void buildPropretyJPanel()

  This method build the property table

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`

### showPropertyJPanelToAddServer

    public void showPropertyJPanelToAddServer()

  This method shows a Panel that allow the user to enter info about a new Server object to be added

### hidePropertyJPanel

    public void hidePropertyJPanel()

  This hide the property JPanel

### removeSelectedServer

    public void removeSelectedServer()

  This method removes a Server when removeButton is clicked

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent evt)

  This handler is triggered when the divider location of the splitPane is changed.

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

### 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

### showServerInfo

    public void showServerInfo()

  This method show the info about the selected Server. It is invoked when a user clicks on a Server in the JTable.

### mouseClicked

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

  This method is invoked when the user click on a Server

  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`

### repaint

    public void repaint()

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

### keyPressed

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

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

### keyReleased

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

  This method is invoked when the user select a Server from the JTable by using the keyboard

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

### keyTyped

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

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

### ServersTableLister

    public void ServersTableLister(long serverID,
                                   java.lang.String hostname,
                                   java.lang.String password,
                                   boolean down)

  See Also:
    `ServersTableListener`

### hostNameChanged

    public void hostNameChanged(int serverID,
                                java.lang.String hostname)

  Description copied from interface: `ServersTableListener`
  This method is invoked when the hostname of a server is changed.

  Specified by:
    `hostNameChanged` in interface `ServersTableListener`
  Parameters:
    `serverID` - The ID of the server in subject.
    `hostname` - The new hostname.
  See Also:
    `ServersTableListener`

### passwordChanged

    public void passwordChanged(int serverID,
                                java.lang.String password)

  Description copied from interface: `ServersTableListener`
  This method is invoked when the password of a server is changed.

  Specified by:
    `passwordChanged` in interface `ServersTableListener`
  Parameters:
    `serverID` - The ID of the server in subject.
    `password` - The new password.
  See Also:
    `ServersTableListener`

### upDownStatusChanged

    public void upDownStatusChanged(int serverID,
                                    boolean down)

  Description copied from interface: `ServersTableListener`
  This method is invoked when the down/up status of a server is changed.

  Specified by:
    `upDownStatusChanged` in interface `ServersTableListener`
  Parameters:
    `serverID` - The ID of the server in subject.
    `down` - The new up/down status.
  See Also:
    `ServersTableListener`

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