public class RegistryPanel extends JPanel
Subclasses can be notified of the completion of a successful query
by overriding the gotData(uk.ac.starlink.vo.RegResource[]) method.
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategylistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
RegistryPanel(RegistryQueryFactory queryFactory,
boolean showCapabilities)
Constructs a RegistryPanel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionListener(ActionListener listener)
Adds a listener to be notified when one of the resources has been
selected (currently, double-click or hit Enter).
|
void |
cancelQuery()
Invoked when the cancel button is pressed.
|
void |
displayAdviceMessage(String[] lines)
Displays a user-directed message in the panel which contains the
results table.
|
protected void |
fireAction()
Sends an action event to all registered action listeners.
|
RegCapabilityInterface[] |
getCapabilities(RegResource resource)
Returns an array of all the relevant capabilities of a given resource.
|
ListSelectionModel |
getCapabilitySelectionModel()
Returns the selection model used by the user to select capability items
from a completed query.
|
JComponent |
getControlBox()
Returns a container into which (small) additional controls can be added.
|
Action |
getRegistryUpdateAction()
Returns an action which will update the list of registries by making
a search in the registry for suitable registry entries.
|
RegResource[] |
getResources()
Returns an array of all the results from the most recently completed
registry query.
|
ListSelectionModel |
getResourceSelectionModel()
Returns the selection model used by the user to select resource items
from a completed query.
|
RegCapabilityInterface[] |
getSelectedCapabilities()
Returns an array of all the capabilities associated with the
currently selected resource which are themselves currently selected.
|
RegResource[] |
getSelectedResources()
Returns an array of any of the results from the most recent
registry query which are currently selected by the user.
|
Action |
getSubmitQueryAction()
Returns the action for submitting the query described by this
component's current state.
|
protected void |
gotData(RegResource[] resources)
Called from the event dispatch thread when a successful
registry query which returns 1 or more records has been completed.
|
JMenu |
makeColumnVisibilityMenu(String name)
Constructs a menu which allows the user to select which attributes
of each displayed resource are visible.
|
void |
performAutoQuery(String workingMsg)
Invoking this method withdraws the parts of the GUI which permit the
user to specify a registry query, and peforms a fixed query without
further ado.
|
void |
performQuery(RegistryQuery query,
String workingMessage)
Submits a query and inserts the results, when ready, into this panel.
|
void |
removeActionListener(ActionListener listener)
Removes a listener previously added by addActionListener.
|
void |
setEnabled(boolean enabled) |
void |
submitQuery()
Invoked when the Submit button is pressed.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, 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, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, validateTreeaction, 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, 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, transferFocusBackward, transferFocusUpCyclepublic RegistryPanel(RegistryQueryFactory queryFactory, boolean showCapabilities)
queryFactory - object which supplies the query details;
if it has a graphical component, that will be displayed
for the user to interact withshowCapabilities - true to display a selectable table of
RegCapabilityInterfaces below the table of
RegResourcespublic void performAutoQuery(String workingMsg)
workingMsg - message to display near progress bar while
query is ongoingprotected void gotData(RegResource[] resources)
resources - non-empty array of resources returned from a
successful querypublic RegResource[] getResources()
public RegCapabilityInterface[] getCapabilities(RegResource resource)
resource - resourcepublic RegResource[] getSelectedResources()
public RegCapabilityInterface[] getSelectedCapabilities()
public void submitQuery()
public void performQuery(RegistryQuery query, String workingMessage)
query - query to executeworkingMessage - text to display to user while query is runningpublic void cancelQuery()
public ListSelectionModel getResourceSelectionModel()
RegResourcepublic ListSelectionModel getCapabilitySelectionModel()
RegCapabilityInterface)public void displayAdviceMessage(String[] lines)
lines - lines of message text (one element per screen line)public Action getSubmitQueryAction()
public JMenu makeColumnVisibilityMenu(String name)
name - menu namepublic Action getRegistryUpdateAction()
public JComponent getControlBox()
public void addActionListener(ActionListener listener)
listener - listener to addpublic void removeActionListener(ActionListener listener)
listener - listener to removeprotected void fireAction()
public void setEnabled(boolean enabled)
setEnabled in class JComponentCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.