org.netbeans.swing.outline.Outline.rowAtPoint()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(111)

本文整理了Java中org.netbeans.swing.outline.Outline.rowAtPoint()方法的一些代码示例,展示了Outline.rowAtPoint()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Outline.rowAtPoint()方法的具体详情如下:
包路径:org.netbeans.swing.outline.Outline
类名称:Outline
方法名:rowAtPoint

Outline.rowAtPoint介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-explorer

@Override
  public void run() {
    if (lastMouseMovedEvent != null) {
      int r = outline.rowAtPoint(lastMouseMovedEvent.getPoint());
      if (r == row) {
        ToolTipManager.sharedInstance().mouseMoved(lastMouseMovedEvent);
      }
    }
  }
});

代码示例来源:origin: org.netbeans.api/org-openide-explorer

/** Get a node on given point or null if there none*/
private Node getNodeForDrop(Point p) {
  int row = view.getOutline().rowAtPoint(p);
  return view.getNodeFromRow(row);
}

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

int rowIndex = resultsOutline.rowAtPoint(mousePoint);
if (rowIndex > -1 && !resultsOutline.isRowSelected(rowIndex)) {
  resultsOutline.setRowSelectionInterval(rowIndex, rowIndex);
Point mousePoint = e.getPoint();
int colIndex = resultsOutline.columnAtPoint(mousePoint);
int rowIndex = resultsOutline.rowAtPoint(mousePoint);
int colModelIndex = resultsOutline.convertColumnIndexToModel(resultsOutline.columnAtPoint(mousePoint));

代码示例来源:origin: digital-preservation/droid

int rowIndex = resultsOutline.rowAtPoint(mousePoint);
if (rowIndex > -1 && !resultsOutline.isRowSelected(rowIndex)) {
  resultsOutline.setRowSelectionInterval(rowIndex, rowIndex);
Point mousePoint = e.getPoint();
int colIndex = resultsOutline.columnAtPoint(mousePoint);
int rowIndex = resultsOutline.rowAtPoint(mousePoint);
int colModelIndex = resultsOutline.convertColumnIndexToModel(resultsOutline.columnAtPoint(mousePoint));

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api

@Override
public void mouseClicked(MouseEvent e) {
  if (SwingUtilities.isLeftMouseButton(e) && MouseUtils.isDoubleClick(e)) {
    int row = view.getOutline().rowAtPoint(e.getPoint());
    if (row == -1) return;
    T n = convertNode(getNodeAt(view.getOutline().convertRowIndexToModel(row)));
    if (n != null) {
      Action action = n.getNodeAction();
      if (action != null && action.isEnabled()) {
        action.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "")); // NOI18N
        e.consume();
      }
    }
  }
}

代码示例来源: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: uk.gov.nationalarchives/droid-ui

final int rowIndex = resultsOutline.rowAtPoint(mousePoint);
final int colModelIndex = resultsOutline.convertColumnIndexToModel(
    resultsOutline.columnAtPoint(mousePoint));
      resultsOutline.getValueAt(resultsOutline.rowAtPoint(e.getPoint()),
        resultsOutline.columnAtPoint(e.getPoint()));
    if (value.getSource() != null && value.getSource() > 1) {

代码示例来源:origin: digital-preservation/droid

final int rowIndex = resultsOutline.rowAtPoint(mousePoint);
final int colModelIndex = resultsOutline.convertColumnIndexToModel(
    resultsOutline.columnAtPoint(mousePoint));
      resultsOutline.getValueAt(resultsOutline.rowAtPoint(e.getPoint()),
        resultsOutline.columnAtPoint(e.getPoint()));
    if (value.getSource() != null && value.getSource() > 1) {

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

/**
   * @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)
   */
  @Override
  public void mouseClicked(MouseEvent e) {
    Point mousePoint = e.getPoint();
    int colIndex = resultsOutline.columnAtPoint(mousePoint);
    int rowIndex = resultsOutline.rowAtPoint(mousePoint);
    int colModelIndex = resultsOutline.convertColumnIndexToModel(resultsOutline.columnAtPoint(mousePoint));
    if (colModelIndex == OutlineColumn.IDENTIFICATION_COUNT.ordinal() + 1) {
      DirectoryComparableLong count = (DirectoryComparableLong) resultsOutline
        .getValueAt(rowIndex, colIndex);
      if (count != null && count.getSource() != null && count.getSource() > 1) {
        int rowModelIndex = resultsOutline.convertRowIndexToModel(rowIndex);
        DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) mdl.getValueAt(rowModelIndex, 0);
        ProfileResourceNode node = (ProfileResourceNode) treeNode.getUserObject();
        multiIdentificationDialog.showDialog(node);
      }
    }
  }
}

代码示例来源:origin: digital-preservation/droid

/**
   * @see java.awt.event.MouseAdapter#mouseClicked(java.awt.event.MouseEvent)
   */
  @Override
  public void mouseClicked(MouseEvent e) {
    Point mousePoint = e.getPoint();
    int colIndex = resultsOutline.columnAtPoint(mousePoint);
    int rowIndex = resultsOutline.rowAtPoint(mousePoint);
    int colModelIndex = resultsOutline.convertColumnIndexToModel(resultsOutline.columnAtPoint(mousePoint));
    if (colModelIndex == OutlineColumn.IDENTIFICATION_COUNT.ordinal() + 1) {
      DirectoryComparableLong count = (DirectoryComparableLong) resultsOutline
        .getValueAt(rowIndex, colIndex);
      if (count != null && count.getSource() != null && count.getSource() > 1) {
        int rowModelIndex = resultsOutline.convertRowIndexToModel(rowIndex);
        DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) mdl.getValueAt(rowModelIndex, 0);
        ProfileResourceNode node = (ProfileResourceNode) treeNode.getUserObject();
        multiIdentificationDialog.showDialog(node);
      }
    }
  }
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

int row = view.getOutline().rowAtPoint(p);
int column = view.getOutline().columnAtPoint(p);
log("doDragOver row == " + row + " column == " + column); // NOI18N

相关文章