public class FilestoreChooser
extends javax.swing.JPanel
Node interface.
Though written from scratch, this class is effectively a generalisation
of JFileChooser. JFileChooser looks like it ought
to be generalisable by providing alternative
FileSystemView implementations, but
I've tried it, and that way lies misery.
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponentlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
FilestoreChooser()
Constructs a FilestoreChooser with navigation buttons included.
|
FilestoreChooser(boolean includeButtons)
Constructs a FilestoreChooser with navigation buttons optionally
included.
|
FilestoreChooser(Branch branch)
Constructs a new chooser pointing to a given branch.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConnection(ConnectorAction connAct)
Adds a new branch representing a connection to a remote service to
this chooser.
|
void |
addDefaultBranches()
Populate this browser with a default set of branches.
|
Branch |
getBranch()
Returns the currently selected branch.
|
java.util.List<ConnectorAction> |
getConnectorActions()
Returns a mutable list of the connector instances used by this chooser.
|
javax.swing.ComboBoxModel<Branch> |
getModel()
Returns an object which contains the state of this chooser.
|
javax.swing.Action[] |
getNavigationActions()
Returns the actions which allow the user to do additional navigation.
|
javax.swing.Action |
getOkAction()
Returns the action which is equivalent to hitting an OK button,
that is performing a selection.
|
Node |
getSelectedNode()
Returns the single selected node.
|
Node[] |
getSelectedNodes()
Returns the array of all nodes currently selected.
|
protected void |
leafSelected(Leaf leaf)
This method is called if a successful selection of a single leaf
has taken place.
|
static void |
main(java.lang.String[] args) |
void |
refreshList()
Ensures that the list contains the correct children for the
currently selected branch.
|
void |
setBranch(Branch branch)
Sets the current selected branch.
|
void |
setEnabled(boolean enabled) |
void |
setModel(javax.swing.ComboBoxModel<Branch> model)
Sets the model which contains the state of this chooser.
|
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 FilestoreChooser()
public FilestoreChooser(boolean includeButtons)
includeButtons - whether to include navigation buttons in
the componentpublic FilestoreChooser(Branch branch)
branch - initial branchpublic java.util.List<ConnectorAction> getConnectorActions()
ConnectorAction objectspublic javax.swing.Action getOkAction()
public javax.swing.Action[] getNavigationActions()
public void setEnabled(boolean enabled)
setEnabled in class javax.swing.JComponentpublic void addDefaultBranches()
public void setBranch(Branch branch)
branch - branchpublic void refreshList()
public Branch getBranch()
public void addConnection(ConnectorAction connAct)
connAct - connector actionpublic Node[] getSelectedNodes()
public Node getSelectedNode()
public javax.swing.ComboBoxModel<Branch> getModel()
public void setModel(javax.swing.ComboBoxModel<Branch> model)
getModel() call on another
FilestoreChooser.model - data model to useprotected void leafSelected(Leaf leaf)
leaf - selected leaf (not null)public static void main(java.lang.String[] args)