public static final class JList.DropLocation extends TransferHandler.DropLocation
TransferHandler.DropLocation表示用于一个放置位置
JList 。
JList.getDropLocation()
| Modifier and Type | Method and Description |
|---|---|
int |
getIndex()
返回列表中放置数据的索引。
|
boolean |
isInsert()
返回此位置是否表示插入位置。
|
String |
toString()
返回此放置位置的字符串表示形式。
|
getDropPointpublic int getIndex()
DropMode.USE_SELECTION或DropMode.ON ,则返回值是列表中行的索引。
如果drop模式为DropMode.INSERT ,则返回值是DropMode.INSERT插入数据的索引。
如果放置模式是DropMode.ON_OR_INSERT ,的值isInsert()表示索引是否是行的索引,或插入索引。
-1表示下降发生在空白空间,无法计算索引。
public boolean isInsert()
public String toString()
toString在
TransferHandler.DropLocation类
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.