javax.swing.JTree.getMinSelectionRow()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(114)

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

JTree.getMinSelectionRow介绍

暂无

代码示例

代码示例来源:origin: icza/scelight

@Override
  public void valueChanged( final TreeSelectionEvent event ) {
    selectionChanged( tree.getMinSelectionRow() >= 0 );
  }
} );

代码示例来源:origin: stackoverflow.com

public void valueChanged(TreeSelectionEvent treeSelectionEvent) {
  JTree treeSource = (JTree) treeSelectionEvent.getSource();
  System.out.println("Min: " + treeSource.getMinSelectionRow());
  System.out.println("Max: " + treeSource.getMaxSelectionRow());
  System.out.println("Lead: " + treeSource.getLeadSelectionRow());

代码示例来源:origin: stackoverflow.com

public void valueChanged(TreeSelectionEvent treeSelectionEvent) {
  JTree treeSource = (JTree) treeSelectionEvent.getSource();
  System.out.println("Min: " + treeSource.getMinSelectionRow());
  System.out.println("Max: " + treeSource.getMaxSelectionRow());
  System.out.println("Lead: " + treeSource.getLeadSelectionRow());

代码示例来源:origin: stackoverflow.com

public void valueChanged(TreeSelectionEvent treeSelectionEvent) {
  JTree treeSource = (JTree) treeSelectionEvent.getSource();
  System.out.println("Min: " + treeSource.getMinSelectionRow());
  System.out.println("Max: " + treeSource.getMaxSelectionRow());
  System.out.println("Lead: " + treeSource.getLeadSelectionRow());

代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core

/**
 * Save tree expanded and selected state
 *
 * @param guiPackage {@link GuiPackage} to be used
 * @return {@link TreeState}
 */
public static TreeState from(GuiPackage guiPackage) {
  if (guiPackage == null) {
    return NOTHING;
  }
  MainFrame mainframe = guiPackage.getMainFrame();
  if (mainframe != null) {
    final JTree tree = mainframe.getTree();
    int savedSelected = tree.getMinSelectionRow();
    ArrayList<Integer> savedExpanded = new ArrayList<>();
    for (int rowN = 0; rowN < tree.getRowCount(); rowN++) {
      if (tree.isExpanded(rowN)) {
        savedExpanded.add(rowN);
      }
    }
    return new TreeStateImpl(savedSelected, savedExpanded);
  }
  return NOTHING;
}

代码示例来源:origin: cytoscape/application

for ( int i = mtree.getMinSelectionRow(); i <= mtree.getMaxSelectionRow(); i++ ) {
  NetworkTreeNode n = (NetworkTreeNode) mtree.getPathForRow(i).getLastPathComponent();
  if ( n != null && n.getUserObject() != null && mtree.isRowSelected(i) )

代码示例来源:origin: org.cytoscape/swing-application-impl

for (int i = tree.getMinSelectionRow(); i <= tree.getMaxSelectionRow(); i++) {
  NetworkTreeNode tn = (NetworkTreeNode) tree.getPathForRow(i).getLastPathComponent();

相关文章

JTree类方法