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

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

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

JTree.invalidate介绍

暂无

代码示例

代码示例来源:origin: nu.zoom/eon2

public void structureChanged(Name name) {
  refresh(name);
  tree.invalidate();
  repaint();
}

代码示例来源:origin: javax.help/javahelp

public void run() {
  TreeSelectionModel tsm = tree.getSelectionModel();
  tsm.clearSelection();
  topNode.removeAllChildren();
  ((DefaultTreeModel)tree.getModel()).reload(); 
  tree.invalidate();
  tree.repaint();
  }
});

代码示例来源:origin: javax.help/javahelp

private void reorder (Vector nodes) {
debug ("reorder nodes");
// remove all the children of topNode (they'll be added back later)
topNode.removeAllChildren();
// Create an array of the elements for sorting & copy the elements
// into the array.
DefaultMutableTreeNode[] array = new DefaultMutableTreeNode[nodes.size()];
nodes.copyInto(array);
// Sort the array (Quick Sort)
quickSort(array, 0, array.length - 1);
// Reload the topNode. Everthing is in order now.
for (int i=0; i < array.length ; i++) {
  topNode.add((DefaultMutableTreeNode)array[i]);
}
// Tell the tree to repaint itself
((DefaultTreeModel)tree.getModel()).reload(); 
tree.invalidate();
tree.repaint();
}

代码示例来源:origin: net.sf.ingenias/editor

public void actionPerformed(ActionEvent e) {
    Entity sel = (Entity) dmtn.getUserObject();
    ingenias.editor.editiondialog.GeneralEditionFrame jf = new ingenias.editor.editiondialog.GeneralEditionFrame(ids.editor, 
        ids.om,ids.gm, resources.getMainFrame(),
        "Edit " + sel.getId(), sel);
    jf.setLocation(DialogWindows.getCenter(jf.getSize(),resources.getMainFrame()));
    jf.pack();
    jf.setVisible(true);
    if (jf.getStatus()==jf.ACCEPTED){
      ids.om.reload();                                
      resources.getArbolObjetos().invalidate();								
      resources.getMainFrame().repaint();
      ids.setChanged(true);
      resources.setUnChanged();
    }
  }
});

相关文章

JTree类方法