|
org.openide.explorer 6.5.22 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
org.openide.explorer.view.ListView
public class ListView
Explorer view to display items in a list.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JScrollPane |
|---|
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar |
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected JList |
list
The actual JList list |
protected NodeListModel |
model
model to use |
| Fields inherited from class javax.swing.JScrollPane |
|---|
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport |
| 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 | |
|---|---|
ListView()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addNotify()
|
protected JList |
createList()
Creates the list that will display the data. |
protected NodeListModel |
createModel()
Allows subclasses to change the default model used for the list. |
int |
getAllowedDragActions()
Actions constants comes from DnDConstants. |
int |
getAllowedDropActions()
Actions constants comes from DnDConstants. |
ActionListener |
getDefaultProcessor()
Get the current processor for default actions. |
int |
getSelectionMode()
Get the selection mode. |
boolean |
isDragSource()
|
boolean |
isDropTarget()
|
boolean |
isPopupAllowed()
Test whether display of a popup menu is enabled. |
boolean |
isTraversalAllowed()
Test whether hierarchy traversal shortcuts are permitted. |
void |
readExternal(ObjectInput in)
|
void |
removeNotify()
Removes listeners. |
void |
requestFocus()
|
boolean |
requestFocusInWindow()
|
protected boolean |
selectionAccept(Node[] nodes)
Called when explorer manager is about to change the current selection. |
protected void |
selectionChanged(Node[] nodes,
ExplorerManager em)
Called when the list changed selection and the explorer manager should be updated. |
void |
setAllowedDragActions(int actions)
Sets allowed actions for dragging |
void |
setAllowedDropActions(int actions)
Sets allowed actions for dropping. |
void |
setDefaultProcessor(ActionListener value)
Set a new processor for default actions. |
void |
setDragSource(boolean state)
Enables/disables dragging support. |
void |
setDropTarget(boolean state)
Enables/disables dropping support. |
void |
setPopupAllowed(boolean value)
Enable/disable displaying popup menus on list view items. |
void |
setSelectionMode(int selectionMode)
Set whether single-item or multiple-item selections are allowed. |
void |
setTraversalAllowed(boolean value)
Enable/disable hierarchy traversal using CTRL+click (down) and Backspace (up), default is enabled. |
protected void |
showSelection(int[] indexes)
Shows selection. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient JList list
protected transient NodeListModel model
| Constructor Detail |
|---|
public ListView()
| Method Detail |
|---|
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundExceptionpublic boolean isPopupAllowed()
true if sopublic void setPopupAllowed(boolean value)
value - true to enablepublic boolean isTraversalAllowed()
true if sopublic void setTraversalAllowed(boolean value)
CTRL+click (down) and Backspace (up), default is enabled.
value - true to enablepublic ActionListener getDefaultProcessor()
null, double-clicks or pressing Enter on
items in the view will not perform the default action on the selected node; rather the processor
will be notified about the event.
nullpublic void setDefaultProcessor(ActionListener value)
value - the new default-action processor, or null to restore use of the selected node's declared default actiongetDefaultProcessor()public void setSelectionMode(int selectionMode)
selectionMode - one of ListSelectionModel.SINGLE_SELECTION, ListSelectionModel.SINGLE_INTERVAL_SELECTION, or ListSelectionModel.MULTIPLE_INTERVAL_SELECTIONListSelectionModel.setSelectionMode(int)public int getSelectionMode()
setSelectionMode(int)public boolean isDragSource()
public void setDragSource(boolean state)
state - true enables dragging support, false disables it.public boolean isDropTarget()
public void setDropTarget(boolean state)
state - true means drops into view are allowed,
false forbids any drops into this view.public int getAllowedDragActions()
DnDConstants.
All actions (copy, move, link) are allowed by default.
public void setAllowedDragActions(int actions)
actions - new drag actions, using DnDConstantspublic int getAllowedDropActions()
DnDConstants.
All actions are allowed by default.
public void setAllowedDropActions(int actions)
actions - new allowed drop actions, using DnDConstantsprotected JList createList()
protected NodeListModel createModel()
protected void selectionChanged(Node[] nodes, ExplorerManager em) throws PropertyVetoException
nodes - list of nodes that should be selectedem - explorer manager
PropertyVetoException - if the manager does not allow the
selectionprotected boolean selectionAccept(Node[] nodes)
nodes - the nodes to select
protected void showSelection(int[] indexes)
indexes - indexes of objects to selectpublic void addNotify()
addNotify in class JComponentpublic void removeNotify()
removeNotify in class JComponentpublic void requestFocus()
requestFocus in class JComponentpublic boolean requestFocusInWindow()
requestFocusInWindow in class JComponent
|
org.openide.explorer 6.5.22 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||