Class CatalogDialog
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Dialog
-
- javax.swing.JDialog
-
- ca.cgjennings.apps.arkham.plugins.catalog.CatalogDialog
-
- All Implemented Interfaces:
AgnosticDialog
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public final class CatalogDialog extends javax.swing.JDialog implements AgnosticDialog
A dialog that can download, display, and install plug-ins from catalogues- Author:
- Chris Jennings
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
-
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CATALOG_PROPERTY
Property that changes when the dialog switches to a new catalog.static java.lang.String
CATLINK_PREFIX
The string "eonscat:", the prefix that marks a Strange Eons cat link.-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description CatalogDialog(java.awt.Frame parent)
Creates a new dialog for downloading plug-ins.CatalogDialog(java.awt.Frame parent, java.net.URL defaultCatalogToOpen)
Creates a new dialog for downloading plug-ins.CatalogDialog(java.awt.Frame parent, java.net.URL defaultCatalogToOpen, boolean allowCache)
Creates a new dialog for downloading plug-ins.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
static java.lang.String
getCatalogSearchClip()
Returns the currenteonscat:
link text that is on the clipboard, ornull
if the clipboard is empty or not aneonscat:
link.java.lang.String
getListingFilter()
Returns the current filter being applied to catalogue listings.void
handleCancelAction(java.awt.event.ActionEvent e)
Performs whatever action is required when the Cancel button is pressed.void
handleOKAction(java.awt.event.ActionEvent e)
Performs whatever action is required when the OK button is pressed.void
selectFilteredListingsForInstallation()
Selects all currently visible plug-ins for installation if possible.void
setListingFilter(java.lang.String filter)
Sets the current listing filter.void
setPopupText(java.lang.String popupText)
Sets a text message that will be displayed the next time the this dialog gains focus, or clears the current message ifnull
.-
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
CATALOG_PROPERTY
public static final java.lang.String CATALOG_PROPERTY
Property that changes when the dialog switches to a new catalog.- See Also:
- Constant Field Values
-
CATLINK_PREFIX
public static final java.lang.String CATLINK_PREFIX
The string "eonscat:", the prefix that marks a Strange Eons cat link. A cat link consists of this prefix followed the text of a catalog search filter. When Strange Eons gains focus and a cat link is on the clipboard, a catalog dialog showing the results of the specified search filter will be displayed. For example, putting the following text on the clipboard (or system selection on *NIX) would filter out everything but the Developer Tools plug-in (since it has the specified UUID):
eonscat:39f10fa9-6574-4be1-9dd6-3e658c9a6fd3
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CatalogDialog
public CatalogDialog(java.awt.Frame parent)
Creates a new dialog for downloading plug-ins.- Parameters:
parent
- the parent window, typically the application window
-
CatalogDialog
public CatalogDialog(java.awt.Frame parent, java.net.URL defaultCatalogToOpen)
Creates a new dialog for downloading plug-ins.- Parameters:
parent
- the parent window, typically the application windowdefaultCatalogToOpen
- catalog to open, ornull
for the default catalog
-
CatalogDialog
public CatalogDialog(java.awt.Frame parent, java.net.URL defaultCatalogToOpen, boolean allowCache)
Creates a new dialog for downloading plug-ins.- Parameters:
parent
- the parent window, typically the application windowdefaultCatalogToOpen
- catalog to open, ornull
for the default catalogallowCache
- a hint passed on to the catalogue that suggests whether it should allow cached versions of the catalogue
-
-
Method Detail
-
setListingFilter
public void setListingFilter(java.lang.String filter)
Sets the current listing filter. This is a comma-separated list of search tokens that can be edited by the user. Each token is matched against either a default set of keys (including name, description, core, tags, and id) or else against a specific tag. To match a specific tag, start the token with the tag name followed by '='. Tokens that start with '!' will hide listings that match the rest of the token. If all tokens start with '!', then all listings that are not hidden will be shown. Otherwise, only listings that match the non-'!' tokens and do not match the '!' tokens will be shown.- Parameters:
filter
- the filter text
-
getListingFilter
public java.lang.String getListingFilter()
Returns the current filter being applied to catalogue listings. If no filter is applied, an empty string is returned.- Returns:
- the current listing filter
- See Also:
setListingFilter(java.lang.String)
-
selectFilteredListingsForInstallation
public void selectFilteredListingsForInstallation()
Selects all currently visible plug-ins for installation if possible. Does not affect the selection state of any plug-ins that are filtered out of the view.
-
setPopupText
public void setPopupText(java.lang.String popupText)
Sets a text message that will be displayed the next time the this dialog gains focus, or clears the current message ifnull
. This can be used to provide an explanatory message or additional help when the dialog is being displayed under program control (for example, if the program is specifying the filter text).
-
getCatalogSearchClip
public static java.lang.String getCatalogSearchClip()
Returns the currenteonscat:
link text that is on the clipboard, ornull
if the clipboard is empty or not aneonscat:
link. On platforms with a system selection (primarily those based on the X Window System), the system selection is checked first. If there is no system selection or it does not contain a link, then then system clipboard is checked.- Returns:
- a catalogue link, without the
CATLINK_PREFIX
, if one is present in the system selection or clipboard; otherwisenull
-
dispose
public void dispose()
- Overrides:
dispose
in classjava.awt.Window
-
handleOKAction
public void handleOKAction(java.awt.event.ActionEvent e)
Description copied from interface:AgnosticDialog
Performs whatever action is required when the OK button is pressed. Called when the (possibly swapped) OK button generates an ActionEvent.- Specified by:
handleOKAction
in interfaceAgnosticDialog
- Parameters:
e
- theActionEvent
generated by the button
-
handleCancelAction
public void handleCancelAction(java.awt.event.ActionEvent e)
Description copied from interface:AgnosticDialog
Performs whatever action is required when the Cancel button is pressed. Called when the (possibly swapped) OK button generates an ActionEvent.- Specified by:
handleCancelAction
in interfaceAgnosticDialog
- Parameters:
e
- theActionEvent
generated by the button
-
-