|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.TransferHandler javax.swing.plaf.basic.BasicTreeUI.TreeTransferHandler
Nested Class Summary |
Nested classes inherited from class javax.swing.TransferHandler |
|
Field Summary | |
private JTree |
tree
|
Fields inherited from class javax.swing.TransferHandler |
COPY, COPY_OR_MOVE, MOVE, NONE |
Constructor Summary | |
(package private) |
BasicTreeUI.TreeTransferHandler()
|
Method Summary | |
int |
compare(Object o1,
Object o2)
Compares its two arguments for order. |
protected Transferable |
createTransferable(JComponent c)
Create a Transferable to use as the source for a data transfer. |
(package private) TreePath[] |
getDisplayOrderPaths(TreePath[] paths)
Selection paths are in selection order. |
(package private) String |
getDisplayString(TreePath path,
boolean selected,
boolean leaf)
|
int |
getSourceActions(JComponent c)
Returns the type of transfer actions supported by the source. |
Methods inherited from class javax.swing.TransferHandler |
canImport, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
Field Detail |
private JTree tree
Constructor Detail |
BasicTreeUI.TreeTransferHandler()
Method Detail |
protected Transferable createTransferable(JComponent c)
createTransferable
in class TransferHandler
c
- The component holding the data to be transfered. This
argument is provided to enable sharing of TransferHandlers by
multiple components.
public int compare(Object o1, Object o2)
Comparator
The implementor must ensure that sgn(compare(x, y)) == -sgn(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)
The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.
Finally, the implementer must ensure that compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z)) for all z.
It is generally the case, but not strictly required that (compare(x, y)==0) == (x.equals(y)). Generally speaking, any comparator that violates this condition should clearly indicate this fact. The recommended language is "Note: this comparator imposes orderings that are inconsistent with equals."
compare
in interface Comparator
o1
- the first object to be compared.o2
- the second object to be compared.
String getDisplayString(TreePath path, boolean selected, boolean leaf)
TreePath[] getDisplayOrderPaths(TreePath[] paths)
public int getSourceActions(JComponent c)
TransferHandler
COPY
only should be advertised in that case.
getSourceActions
in class TransferHandler
c
- the component holding the data to be transferred; this
argument is provided to enable sharing of TransferHandler
s
by multiple components.
COPY
if the transfer property can be found,
otherwise returns NONE
; a return value of
of NONE
disables any transfers out of the component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |