sg.edu.nus.gui.bootstrap
Class Pane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTabbedPane
                  extended by sg.edu.nus.gui.bootstrap.Pane
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.SwingConstants

public final class Pane
extends javax.swing.JTabbedPane
implements java.awt.event.ActionListener

Implement the content pane of the bootstrap server.

Version:
1.0 2005-12-30, 2008-6-3
Author:
Xu Linhao, modified by Han Xixian
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.JTabbedPane
SCROLL_TAB_LAYOUT, WRAP_TAB_LAYOUT
 
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 javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Pane(BootstrapGUI bootstrap)
          Init the content pane.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 void clearGlobalSchemaTable()
          Clear all content in globalSchema Table
 void firePeerTableRowInserted(int row, java.lang.Object[] data)
          Insert a row into the table.
 void firePeerTableRowRemoved(int row)
          Remove a row from the table.
 void firePeerTableRowRemoved(PeerInfo info)
          Remove a row from the table with specified data value.
 java.lang.String[] getLogEvent()
          Returns the String representation of LogEvent.
 int getPeerTableRowCount()
          Get the row count of the table.
 javax.swing.JPanel getSchemaTreePane()
          Get Schema Tree Panel.
 void log(LogEvent event)
          Add LogEvent to the event panel.
 void removeLogEvents()
          Remove all log events.
 void removeOnlinePeer(int row)
          Remove a row from the table that stores all online peers.
 void removeOnlinePeers()
          Remove all online peers.
 void setEnableDistributeGlobalSchema(boolean b)
          Enables or disables distributeGlobalSchema button, depending on the value of the parameter b
 void setEnableTestNetworkStatus(boolean b)
          Enables or disables testNetworkStatus button, depending on the value of the parameter b
 void setNetworkStatus(boolean webStatus, boolean MySQLStatus, boolean superpeerStatus)
          Set Network Status.
 boolean testNetworkStatus()
          Test Network Status to distribute global schema to SuperPeers.
 
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, insertTab, isEnabledAt, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, 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, 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
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, 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, 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

Pane

public Pane(BootstrapGUI bootstrap)
Init the content pane.

Parameters:
bootstrap - the handler of the main frame
Method Detail

getSchemaTreePane

public javax.swing.JPanel getSchemaTreePane()
Get Schema Tree Panel.

Returns:
the instance of the Schema Tree Panel

getPeerTableRowCount

public int getPeerTableRowCount()
Get the row count of the table.

Returns:
the number of the table

firePeerTableRowInserted

public void firePeerTableRowInserted(int row,
                                     java.lang.Object[] data)
Insert a row into the table.

Parameters:
row - the row that the data to be inserted
data - the data to be inserted

firePeerTableRowRemoved

public void firePeerTableRowRemoved(int row)
Remove a row from the table.

Parameters:
row - the row to be removed

firePeerTableRowRemoved

public void firePeerTableRowRemoved(PeerInfo info)
Remove a row from the table with specified data value.

Parameters:
info - the information of the peer

testNetworkStatus

public boolean testNetworkStatus()
Test Network Status to distribute global schema to SuperPeers.

Returns:
the result of Test (true or false)

setNetworkStatus

public void setNetworkStatus(boolean webStatus,
                             boolean MySQLStatus,
                             boolean superpeerStatus)
Set Network Status.

Parameters:
webStatus - the status of Web
MySQLStatus - the status of MySQL
superpeerStatus - the status of superpeerStatus

setEnableTestNetworkStatus

public void setEnableTestNetworkStatus(boolean b)
Enables or disables testNetworkStatus button, depending on the value of the parameter b

Parameters:
b - If true, this component is enabled; otherwise this component is disabled

setEnableDistributeGlobalSchema

public void setEnableDistributeGlobalSchema(boolean b)
Enables or disables distributeGlobalSchema button, depending on the value of the parameter b

Parameters:
b - If true, this component is enabled; otherwise this component is disabled

clearGlobalSchemaTable

public void clearGlobalSchemaTable()
Clear all content in globalSchema Table


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

removeOnlinePeers

public void removeOnlinePeers()
Remove all online peers.


removeOnlinePeer

public void removeOnlinePeer(int row)
Remove a row from the table that stores all online peers.

Parameters:
row - the row to be removed

log

public void log(LogEvent event)
Add LogEvent to the event panel.

Parameters:
event - the LogEvent to be added to the event panel

getLogEvent

public java.lang.String[] getLogEvent()
                               throws java.lang.IndexOutOfBoundsException
Returns the String representation of LogEvent.

Returns:
the String representation of LogEvent
Throws:
java.lang.IndexOutOfBoundsException

removeLogEvents

public void removeLogEvents()
Remove all log events.