我正在使用经我自己的模式支持的Sun s例(JTreeTable
)稍加修改的文本。 这将是第三个例子(在上)。
除拖拉和退款外,一切照样工作。 我希望DnD更像“。 JTree
提供。 由于<代码>JTreeTable是一个延伸的<代码>JTable,该编码为<代码>JTable.DropLocation,用于确定退学地点,在将足迹投入<代码>JTreeTable(无路程,无儿童指数)的树冠时,没有提供足够的信息。 我已经解决了这一问题,为此创建了一个以<条码>、DropLocation的类别,其基础是<代码>JTable和JTree
的版本。 页: 1 上文提及的<代码>JTreeTable>提供的树冠类别,向用户展示这一新信息(现在,如果在树冠栏内,如果你预计会从<代码>上的话,该新节日是否将放置在选定的树冠之内、之前或之后)。 JTree。
There is one problem though. The mouse cursor is going crazy when the drop location is being rendered inside the tree column. It appears and then disappears a few milliseconds later or this happens so fast that the drag cursor is not even shown. This happens with the unmodified Sun s example too. I am completely in the dark as to why this is happening. Did find another person with the same problem at http://www.java.net/node/663106, but the solution provided there seems to set the component s drop location to null and cannot be retrieved using JTreeTable.getDropLocation()
method any more. I need this to convert it to my modified DropLocation
and then paint stuff based on it.
I am so close to a proper solution for my use case that I can taste it. This cursor blinking thing is the only obstacle in my way. Any ideas?
使用 Java1.6。
P.S.:I ve决定了一种习俗:JTreeTable
,而不是现有成分之一(如Netbeans Outline或JXTreeTable
),因为它们似乎都患有< 代码>JTable.DropLocation 问题,在选定的树苗之前或之后(仅位于内)不支持退学。 如果你知道一个能够提供这种功能的组成部分,那么我很乐于听到。