uk.ac.starlink.splat.vo
Class SSAServerTable

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by uk.ac.starlink.splat.vo.SSAServerTable
All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible

public class SSAServerTable
extends JPanel
implements PropertyChangeListener

SSAServerTable is a panel displaying the SSA services as a table. It includes also selection options, as waveband and data source options, as well as user generated tags. By rightclicking on a row, a menu will appear to allos tagging the service or displaying its information.

See Also:
Serialized Form

Nested Class Summary
protected  class SSAServerTable.AddNewAction
          Inner class defining action for adding a new server to the list
protected  class SSAServerTable.AddTagAction
          Inner class defining action for adding a new tag
protected  class SSAServerTable.DeleteAction
          Inner class defining action for deleting all known servers.
protected  class SSAServerTable.DeselectAllAction
          Inner class defining action for selecting all known servers.
protected  class SSAServerTable.PopupMenuAction
           
protected  class SSAServerTable.ProxyAction
          Inner class defining action for setting the proxy server.
protected  class SSAServerTable.QueryNewAction
          Inner class defining action for query registry for new SSAP servers.
protected  class SSAServerTable.ReadAction
          Inner class defining action for reading a list of servers.
protected  class SSAServerTable.RemoveMenu
           
protected  class SSAServerTable.RemoveTagAction
          Inner class defining action for removing a new tag
protected  class SSAServerTable.SaveAction
          Inner class defining action for saving a list of servers.
protected  class SSAServerTable.SelectAllAction
          Inner class defining action for selecting all known servers.
protected  class SSAServerTable.SelectTagAction
           
 
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
protected  AddNewServerFrame addServerWindow
          Frame for adding a new server.
protected  uk.ac.starlink.util.gui.BasicFileChooser fileChooser
          File chooser for storing and restoring server lists.
protected  uk.ac.starlink.util.gui.ProxySetupFrame proxyWindow
          The proxy server dialog
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS
 
Constructor Summary
SSAServerTable(SSAServerList list)
          Create an instance.
 
Method Summary
protected  void addNewServer()
          Add new server to the server list
protected  void addNewTag()
          Add new tag to the server list
protected  void deleteServers()
          Remove all servers.
protected  void deselectAllServers()
          deselect all servers.
 int getSelectionCount()
          returns the number of selected rows
 SSAServerList getServerList()
           
protected  void initAddServerWindow()
          Initialise the window to insert a new server to the list.
protected  void initFileChooser()
          Initialise the file chooser to have the necessary filters.
protected  void initMenus()
          Initialise the menu bar, action bar and related actions.
protected  void initUI()
          Initialise the main part of the user interface.
 boolean isServerSelected(String shortName)
          returns true if server is selected, false otherwise.
 void propertyChange(PropertyChangeEvent pvt)
          Event listener to trigger a list update when a new server is added to addServerWIndow
protected  void readServers()
          Restore servers from a previously saved server list.
protected  void removeAllServices()
           
protected  void removeSelectedServices()
          Remove selected services.
protected  void removeService(int row)
          Remove service with row index r
protected  void restoreTags()
          Initialise the known servers which are kept in a resource file along with SPLAT.
protected  void restoreTags(InputStream inputStream)
          Read an InputStream that contains a list of servers to restore.
protected  void saveServers()
          Save server list to a disk file
 void saveServerTags()
          Save tag information to a file
protected  void selectAllServers()
          select all servers.
 void setServerList(SSAServerList slist)
           
 void setSSAServerList(SSAServerList serverList)
          Set the SSAServerList.
protected  void showProxyDialog()
          Set the proxy server and port.
 void updateServers()
          Query a registry for any new SSAP servers.
 void updateTable()
          update the table
 
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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, transferFocusBackward, 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, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fileChooser

protected uk.ac.starlink.util.gui.BasicFileChooser fileChooser
File chooser for storing and restoring server lists.


addServerWindow

protected AddNewServerFrame addServerWindow
Frame for adding a new server.


proxyWindow

protected uk.ac.starlink.util.gui.ProxySetupFrame proxyWindow
The proxy server dialog

Constructor Detail

SSAServerTable

public SSAServerTable(SSAServerList list)
Create an instance.

Method Detail

initUI

protected void initUI()
Initialise the main part of the user interface.


initMenus

protected void initMenus()
Initialise the menu bar, action bar and related actions.


setSSAServerList

public void setSSAServerList(SSAServerList serverList)
Set the SSAServerList.

Parameters:
serverList - the SSAServerList reference.

updateTable

public void updateTable()
update the table


deleteServers

protected void deleteServers()
Remove all servers.


selectAllServers

protected void selectAllServers()
select all servers.


deselectAllServers

protected void deselectAllServers()
deselect all servers.


removeService

protected void removeService(int row)
Remove service with row index r


removeAllServices

protected void removeAllServices()

removeSelectedServices

protected void removeSelectedServices()
Remove selected services.


updateServers

public void updateServers()
Query a registry for any new SSAP servers. New servers must have a different short name.


saveServers

protected void saveServers()
Save server list to a disk file


readServers

protected void readServers()
Restore servers from a previously saved server list.


initFileChooser

protected void initFileChooser()
Initialise the file chooser to have the necessary filters.


initAddServerWindow

protected void initAddServerWindow()
Initialise the window to insert a new server to the list.


addNewServer

protected void addNewServer()
Add new server to the server list


addNewTag

protected void addNewTag()
Add new tag to the server list


saveServerTags

public void saveServerTags()
                    throws SplatException
Save tag information to a file

Throws:
SplatException

restoreTags

protected void restoreTags()
                    throws SplatException
Initialise the known servers which are kept in a resource file along with SPLAT. The format of this file is determined by the XMLEncode form produced for an SSAPRegResource.

Throws:
SplatException

restoreTags

protected void restoreTags(InputStream inputStream)
                    throws SplatException
Read an InputStream that contains a list of servers to restore.

Throws:
SplatException

propertyChange

public void propertyChange(PropertyChangeEvent pvt)
Event listener to trigger a list update when a new server is added to addServerWIndow

Specified by:
propertyChange in interface PropertyChangeListener

getServerList

public SSAServerList getServerList()

setServerList

public void setServerList(SSAServerList slist)

isServerSelected

public boolean isServerSelected(String shortName)
returns true if server is selected, false otherwise.


getSelectionCount

public int getSelectionCount()
returns the number of selected rows


showProxyDialog

protected void showProxyDialog()
Set the proxy server and port.



Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.