Java 8 DefaultTreeSelectionModel - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DefaultTreeSelectionModel class.

This code example shows how to use the following methods:setSelectionMode
                        .contains("showing=false"); 
  } 
 
  @RunsInEDT 
  private void setContiguousSelectionMode() { 
    TreeSelectionModel selectionModel = new DefaultTreeSelectionModel();
    selectionModel.setSelectionMode(CONTIGUOUS_TREE_SELECTION);
    setSelectionModel(tree, selectionModel);
  } 
 
  @Test
  public void should_format_JTree_without_TreeSelectionModel() { 
    setSelectionModel(tree, null);
    String formatted = formatter.format(tree);
    assertThat(formatted).contains("javax.swing.JTree")
                         .contains("name='tree'") 
                         .contains("selectionCount=0") 
                         .contains("selectionPaths=[]") 
                         .contains("selectionMode=DISCONTIGUOUS_TREE_SELECTION") 
                         .contains("enabled=true") 
6
CodeRank
This code example shows how to use the following methods:setSelectionMode
See Code Examples for Java 8 DefaultTreeSelectionModel Methods: