Weitere aktuelle Java-Titel finden Sie bei dpunkt.
Interface javax.swing.tree.TreeSelectionModel
1.2
Deklaration
public interface
TreeSelectionModel
Beschreibung
Das Interface für die Selektion im Baum.
Datenelemente
public final static
int
SINGLE_TREE_SELECTION
public final static
int
CONTIGUOUS_TREE_SELECTION
public final static
int
DISCONTIGUOUS_TREE_SELECTION
Methoden
public
void
setSelectionMode
(
int
mode)
public
int
getSelectionMode
()
public
void
setSelectionPath
(
TreePath
path)
public
void
setSelectionPaths
(
TreePath
[] paths)
public
void
addSelectionPath
(
TreePath
path)
public
void
addSelectionPaths
(
TreePath
[] paths)
public
void
removeSelectionPath
(
TreePath
path)
public
void
removeSelectionPaths
(
TreePath
[] paths)
public
TreePath
getSelectionPath
()
public
TreePath
[]
getSelectionPaths
()
public
int
getSelectionCount
()
public
boolean
isPathSelected
(
TreePath
path)
public
boolean
isSelectionEmpty
()
public
void
clearSelection
()
public
void
setRowMapper
(
RowMapper
newMapper)
public
RowMapper
getRowMapper
()
public
int
[]
getSelectionRows
()
public
int
getMinSelectionRow
()
public
int
getMaxSelectionRow
()
public
boolean
isRowSelected
(
int
row)
public
void
resetRowSelection
()
public
int
getLeadSelectionRow
()
public
TreePath
getLeadSelectionPath
()
public
void
addPropertyChangeListener
(PropertyChangeListener listener)
public
void
removePropertyChangeListener
(PropertyChangeListener listener)
public
void
addTreeSelectionListener
(
TreeSelectionListener
x)
public
void
removeTreeSelectionListener
(
TreeSelectionListener
x)
Datenelemente im Detail
public final static
int
SINGLE_TREE_SELECTION
Nur ein Pfad kann selektiert werden.
public final static
int
CONTIGUOUS_TREE_SELECTION
Nacheinanderfolgende Pfade können selektiert werden.
public final static
int
DISCONTIGUOUS_TREE_SELECTION
Alles kann selektiert werden.
Methoden im Detail
public
void
setSelectionMode
(
int
mode)
Setzt den Selektionsmodus.
public
int
getSelectionMode
()
Liefert den Selektionsmodus.
public
void
setSelectionPath
(
TreePath
path)
Setzt den Selektionspfad.
public
void
setSelectionPaths
(
TreePath
[] paths)
Setzt die Selektionspfade.
public
void
addSelectionPath
(
TreePath
path)
Fügt den Pfad zur Selektion hinzu.
public
void
addSelectionPaths
(
TreePath
[] paths)
Fügt die Pfade zur Selektion hinzu.
public
void
removeSelectionPath
(
TreePath
path)
Deselektiert den Pfad.
public
void
removeSelectionPaths
(
TreePath
[] paths)
Deselektiert die Pfade.
public
TreePath
getSelectionPath
()
Liefert den ersten Selektionspfad.
public
TreePath
[]
getSelectionPaths
()
Liefert die Selektionspfade.
public
int
getSelectionCount
()
Liefert die Anzahl der Selektionspfade.
public
boolean
isPathSelected
(
TreePath
path)
Liefert die Aussage, ob der Pfad selektiert ist.
public
boolean
isSelectionEmpty
()
Liefert
true
, wenn die Selektion leer ist.
public
void
clearSelection
()
Leert die Selektion.
public
void
setRowMapper
(
RowMapper
newMapper)
Setzt den
RowMapper
.
public
RowMapper
getRowMapper
()
Liefert den
RowMapper
.
public
int
[]
getSelectionRows
()
Liefert die selektierten Zeilen.
public
int
getMinSelectionRow
()
Liefert die kleinste selektierte Zeile.
public
int
getMaxSelectionRow
()
Liefert die größte selektierte Zeile.
public
boolean
isRowSelected
(
int
row)
Gibt an, ob die Zeile selektiert ist.
public
void
resetRowSelection
()
Aktualisiert die Zuordnung von Zeilen zu Pfaden.
public
int
getLeadSelectionRow
()
Liefert die Leitzeile.
public
TreePath
getLeadSelectionPath
()
Liefert den Leitpfad.
public
void
addPropertyChangeListener
(PropertyChangeListener listener)
Fügt den Listener hinzu.
public
void
removePropertyChangeListener
(PropertyChangeListener listener)
Entfernt den Listener.
public
void
addTreeSelectionListener
(
TreeSelectionListener
x)
Fügt den Listener hinzu.
public
void
removeTreeSelectionListener
(
TreeSelectionListener
x)
Entfernt den Listener.
Copyright © 2002
dpunkt.Verlag
, Heidelberg. Alle Rechte vorbehalten.