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

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

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

Outline.getSelectedRows介绍

暂无

代码示例

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

/**
 * 
 * @return whether any rows are selected in the profile.
 */
public boolean anyRowsSelected() {
  Outline outline = getResultsOutline();
  return outline.getSelectedRows().length > 0;
}

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

/**
 * 
 * @return whether any rows are selected in the profile.
 */
public boolean anyRowsSelected() {
  Outline outline = getResultsOutline();
  return outline.getSelectedRows().length > 0;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial

public int [] getSelection() {
  return getOutline().getSelectedRows();
}

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

/**
 * 
 * @return A list of the profile resource nodes selected in the outline.
 */
public List<ProfileResourceNode> getSelectedNodes() {
  List<ProfileResourceNode> results = new ArrayList<ProfileResourceNode>();
  Outline outline = getResultsOutline();
  int[] selectedRows = outline.getSelectedRows();
  for (int i = selectedRows.length; i > 0; i--) {
    int index = selectedRows[i - 1];
    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) outline
        .getValueAt(index, 0);
    ProfileResourceNode prn = (ProfileResourceNode) treeNode
        .getUserObject();
    results.add(prn);
  }
  return results;
}

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

/**
 * 
 * @return A list of the profile resource nodes selected in the outline.
 */
public List<ProfileResourceNode> getSelectedNodes() {
  List<ProfileResourceNode> results = new ArrayList<ProfileResourceNode>();
  Outline outline = getResultsOutline();
  int[] selectedRows = outline.getSelectedRows();
  for (int i = selectedRows.length; i > 0; i--) {
    int index = selectedRows[i - 1];
    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) outline
        .getValueAt(index, 0);
    ProfileResourceNode prn = (ProfileResourceNode) treeNode
        .getUserObject();
    results.add(prn);
  }
  return results;
}

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

int[] selRows = view.getOutline().getSelectedRows();
ArrayList<Node> al = new ArrayList<Node> (selRows.length);
for (int i = 0; i < selRows.length; i++) {

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

/**
 * Expands the selected nodes in the tree.
 * @param recursive whether to expand all children.
 */
public void expandSelectedNodes(boolean recursive) {
  Outline outline = getResultsOutline();
  int[] selectedRows = outline.getSelectedRows();
  for (int i = selectedRows.length; i > 0; i--) {
    int index = selectedRows[i - 1];
    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) outline
        .getValueAt(index, 0);
    expandNode(treeNode, recursive, 1);
  }
}

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

/**
 * Expands the selected nodes in the tree.
 * @param recursive whether to expand all children.
 */
public void expandSelectedNodes(boolean recursive) {
  Outline outline = getResultsOutline();
  int[] selectedRows = outline.getSelectedRows();
  for (int i = selectedRows.length; i > 0; i--) {
    int index = selectedRows[i - 1];
    DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) outline
        .getValueAt(index, 0);
    expandNode(treeNode, recursive, 1);
  }
}

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

public void jButtonRemoveFilesAndFolderActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButtonRemoveFilesAndFolderActionPerformed
  if (droidContext.getSelectedProfile().getResultsOutline().getSelectedRows().length == 0) {
    DialogUtils.showNothingIsSelectedForRemoveDialog(this);
  }
  RemoveFilesAndFoldersAction removeAction = new RemoveFilesAndFoldersAction(droidContext, profileManager);
  removeAction.remove();
}// GEN-LAST:event_jButtonRemoveFilesAndFolderActionPerformed

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

public void jButtonRemoveFilesAndFolderActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButtonRemoveFilesAndFolderActionPerformed
  if (droidContext.getSelectedProfile().getResultsOutline().getSelectedRows().length == 0) {
    DialogUtils.showNothingIsSelectedForRemoveDialog(this);
  }
  RemoveFilesAndFoldersAction removeAction = new RemoveFilesAndFoldersAction(droidContext, profileManager);
  removeAction.remove();
}// GEN-LAST:event_jButtonRemoveFilesAndFolderActionPerformed

代码示例来源: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

ProfileInstance profile = selectedProfile.getProfile();
int[] selectedRows = outline.getSelectedRows();

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

ProfileInstance profile = selectedProfile.getProfile();
int[] selectedRows = outline.getSelectedRows();

相关文章