本文整理了Java中org.netbeans.swing.outline.Outline.getSelectionModel()
方法的一些代码示例,展示了Outline.getSelectionModel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Outline.getSelectionModel()
方法的具体详情如下:
包路径:org.netbeans.swing.outline.Outline
类名称:Outline
方法名:getSelectionModel
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
void setSelection(int idx) {
getOutline().getSelectionModel().setValueIsAdjusting(false);
getOutline().scrollRectToVisible(getOutline().getCellRect(idx, 1, true));
getOutline().getSelectionModel().setSelectionInterval(idx, idx);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api
private void showPopup (final MouseEvent e) {
int row = view.getOutline().rowAtPoint(e.getPoint());
if (row != -1) {
boolean makeRowSelected = true;
int [] selectedrows = view.getOutline().getSelectedRows();
for (int i = 0; i < selectedrows.length; i++) {
if (row == selectedrows[i]) {
makeRowSelected = false;
break;
}
}
if (makeRowSelected) {
view.getOutline().getSelectionModel().setSelectionInterval(row, row);
}
}
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
// invoke later so the selection on the table will be set first
JPopupMenu menu = getPopup();
if (menu != null) {
menu.show(view.getOutline(), e.getX(), e.getY());
}
}
});
}
代码示例来源:origin: digital-preservation/droid
@Override
public void valueChanged(ListSelectionEvent event) {
if (!event.getValueIsAdjusting()) {
Outline outline = droidContext.getSelectedProfile().getResultsOutline();
ListSelectionModel m = outline.getSelectionModel();
if (outline.getSelectedRow() != -1 && m.getMinSelectionIndex() == m.getMaxSelectionIndex()) {
if (!getSelectedNode().isRoot() && getSelectedNode().getDepth() == 0) {
populateNode();
}
}
}
}
代码示例来源:origin: uk.gov.nationalarchives/droid-ui
@Override
public void valueChanged(ListSelectionEvent event) {
if (!event.getValueIsAdjusting()) {
Outline outline = droidContext.getSelectedProfile().getResultsOutline();
ListSelectionModel m = outline.getSelectionModel();
if (outline.getSelectedRow() != -1 && m.getMinSelectionIndex() == m.getMaxSelectionIndex()) {
if (!getSelectedNode().isRoot() && getSelectedNode().getDepth() == 0) {
populateNode();
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!