|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--org.skunk.swing.TreeNodeChooser
a chooser that can be used as a filechooser, but which can display any tree of objects
| Inner Class Summary | |
protected class |
TreeNodeChooser.ComboRenderer
|
static class |
TreeNodeChooser.SelectionMode
an enumerated type to represent chooser selection modes |
| Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static java.lang.String |
DEFAULT_BRANCH_LABEL
|
static java.lang.String |
DEFAULT_ENTRY_LABEL
|
static java.lang.String |
DEFAULT_LEAF_LABEL
|
| 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, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
TreeNodeChooser(javax.swing.tree.TreeModel treeModel)
constructs a TreeNodeChooser from a TreeModel |
|
| Method Summary | |
java.lang.String |
getEntryFieldText()
returns the text of the entry field |
javax.swing.tree.TreeModel |
getModel()
returns the chooser's TreeModel |
java.lang.String |
getNodeSeparator()
Returns the separator used by the default renderer for the combo box in expressing the current TreePath as a file-path-like string. |
java.lang.Object |
getSelectedBranch()
returns the selected item in the JList of branch nodes |
java.lang.Object |
getSelectedLeaf()
returns the selected item in the JList of leaf nodes |
javax.swing.tree.TreePath |
getSelectedPath()
returns the selected path |
TreeNodeChooser.SelectionMode |
getSelectionMode()
returns the chooser's selection mode -- LEAF_ONLY, BRANCH_ONLY, or LEAF_AND_BRANCH |
boolean |
isEntryFieldEditable()
indicates whether the file name text field is editable |
boolean |
isEntryFieldTextSticky()
indicates whether the text of the entry field is persistent when the chooser's directory is changed. |
boolean |
isRootVisible()
indicates whether the root of the tree model is visible in the chooser |
void |
setBranchLabelText(java.lang.String branchLabelText)
sets the text of the label of list of branch nodes. |
void |
setComboBoxCellRenderer(javax.swing.ListCellRenderer cellRenderer)
install a custom renderer for the combo box. |
void |
setCurrentPath(javax.swing.tree.TreePath currentPath)
sets the selected path and displays it in the chooser |
void |
setEntryFieldEditable(boolean editable)
determine whether the file name text field is editable |
void |
setEntryFieldText(java.lang.String text)
sets the text of the entry field |
void |
setEntryFieldTextSticky(boolean sticky)
determine whether the text of the entry field is persistent when the chooser's directory is changed. |
void |
setEntryLabelText(java.lang.String entryLabelText)
sets the text of the label of the entry field. |
void |
setLeafLabelText(java.lang.String leafLabelText)
sets the text of the label of list of leaf nodes. |
void |
setListCellRenderer(javax.swing.ListCellRenderer cellRenderer)
install a custom renderer for both list boxes. |
void |
setNodeSeparator(java.lang.String nodeSeparator)
sets the separator used by the default renderer for the combo box. |
void |
setRootVisible(boolean rootVisible)
determine the visibility of the root node of the tree model |
void |
setSelectedBranch(java.lang.Object branchObj)
sets the selected item in the JList of branch nodes |
void |
setSelectedLeaf(java.lang.Object leafObj)
sets the selected item in the JList of leaf nodes |
void |
setSelectedPath(javax.swing.tree.TreePath selectedPath)
sets the selected path property, without adjusting the state of the JLists or combo box. |
void |
setSelectionMode(TreeNodeChooser.SelectionMode selectionMode)
sets the chooser's selection mode |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_ENTRY_LABEL
public static final java.lang.String DEFAULT_BRANCH_LABEL
public static final java.lang.String DEFAULT_LEAF_LABEL
| Constructor Detail |
public TreeNodeChooser(javax.swing.tree.TreeModel treeModel)
treeModel - the treeModel| Method Detail |
public javax.swing.tree.TreeModel getModel()
public java.lang.String getNodeSeparator()
public void setNodeSeparator(java.lang.String nodeSeparator)
nodeSeparator - the new node separatorpublic boolean isEntryFieldTextSticky()
public void setEntryFieldTextSticky(boolean sticky)
sticky - whether the text field's value should be stickypublic boolean isEntryFieldEditable()
public void setEntryFieldEditable(boolean editable)
editable - the editability of the text fieldpublic boolean isRootVisible()
public void setRootVisible(boolean rootVisible)
rootVisible - the visibility of the root nodepublic TreeNodeChooser.SelectionMode getSelectionMode()
public void setSelectionMode(TreeNodeChooser.SelectionMode selectionMode)
selectionMode - the new selection modepublic void setEntryLabelText(java.lang.String entryLabelText)
entryLabelText - the new text for the labelpublic void setBranchLabelText(java.lang.String branchLabelText)
branchLabelText - the new text for the labelpublic void setLeafLabelText(java.lang.String leafLabelText)
leafLabelText - the new text for the labelpublic void setListCellRenderer(javax.swing.ListCellRenderer cellRenderer)
cellRenderer - the new ListCellRenderer for the JListspublic void setComboBoxCellRenderer(javax.swing.ListCellRenderer cellRenderer)
cellRenderer - the new ListCellRenderer for the JComboBoxpublic java.lang.Object getSelectedLeaf()
public void setSelectedLeaf(java.lang.Object leafObj)
leafObj - the leaf node to selectpublic java.lang.Object getSelectedBranch()
public void setSelectedBranch(java.lang.Object branchObj)
branchObj - the branch node to selectpublic javax.swing.tree.TreePath getSelectedPath()
public void setSelectedPath(javax.swing.tree.TreePath selectedPath)
selectedPath - the selected pathsetCurrentPathpublic void setCurrentPath(javax.swing.tree.TreePath currentPath)
currentPath - the new path to displaypublic void setEntryFieldText(java.lang.String text)
text - the text for the entry fieldpublic java.lang.String getEntryFieldText()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||