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

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

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

JTree.setName介绍

暂无

代码示例

代码示例来源:origin: arhs/sd-dss

/**
 * @param name
 * @param model
 * @param cellRenderer
 * @return
 */
public static JTree tree(final String name, final TreeModel model, final TreeCellRenderer cellRenderer) {
  final JTree tree = new JTree();
  tree.setName(name);
  tree.setModel(model);
  if (cellRenderer != null) {
    tree.setCellRenderer(cellRenderer);
  }
  return tree;
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/firebirdmanager

public JPanel createPanelTree()
{
  JPanel jpanel1 = new JPanel();
  FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)", "FILL:DEFAULT:GROW(1.0)");
  CellConstraints cc = new CellConstraints();
  jpanel1.setLayout(formlayout1);
  jtreeReceiver.setName("jtreeReceiver");
  JScrollPane jscrollpane1 = new JScrollPane();
  jscrollpane1.setViewportView(jtreeReceiver);
  jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
  jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
  jpanel1.add(jscrollpane1, cc.xy(1, 1));
  return jpanel1;
}

代码示例来源:origin: fr.ifremer/isis-fish

protected void createFisheryRegionTree() {
  $objectMap.put("fisheryRegionTree", fisheryRegionTree = new JTree());
  
  fisheryRegionTree.setName("fisheryRegionTree");
  fisheryRegionTree.setRootVisible(true);
  fisheryRegionTree.setSelectionRow(0);
  fisheryRegionTree.addTreeSelectionListener(JAXXUtil.getEventListener(TreeSelectionListener.class, "valueChanged", this, "doValueChanged__on__fisheryRegionTree"));
}

代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-config

protected void createDetectedCallBack() {
  $objectMap.put("detectedCallBack", detectedCallBack = new JTree());
  
  detectedCallBack.setName("detectedCallBack");
  detectedCallBack.setEditable(false);
  detectedCallBack.setRootVisible(false);
  detectedCallBack.setRowHeight(24);
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets-config

protected void createDetectedCallBack() {
  $objectMap.put("detectedCallBack", detectedCallBack = new JTree());
  
  detectedCallBack.setName("detectedCallBack");
  detectedCallBack.setEditable(false);
  detectedCallBack.setRootVisible(false);
  detectedCallBack.setRowHeight(24);
}

代码示例来源:origin: org.nuiton.jaxx/jaxx-config

protected void createDetectedCallBack() {
  $objectMap.put("detectedCallBack", detectedCallBack = new JTree());
  
  detectedCallBack.setName("detectedCallBack");
  detectedCallBack.setEditable(false);
  detectedCallBack.setRootVisible(false);
  detectedCallBack.setRowHeight(24);
}

代码示例来源:origin: fr.ifremer/isis-fish

protected void createFisheryRegionTree() {
  $objectMap.put("fisheryRegionTree", fisheryRegionTree = new JTree());
  
  fisheryRegionTree.setName("fisheryRegionTree");
  fisheryRegionTree.setRootVisible(true);
  fisheryRegionTree.setRowHeight(0);
  fisheryRegionTree.setSelectionRow(0);
  fisheryRegionTree.addTreeSelectionListener(JAXXUtil.getEventListener(TreeSelectionListener.class, "valueChanged", this, "doValueChanged__on__fisheryRegionTree"));
}

代码示例来源:origin: com.github.danielpacak.osgi.swingconsole/osgi.swingconsole

public BundleManifest() {
  treeModel = new BundleManifestTreeModel();
  tree = new JTree(treeModel);
  tree.setName("tree.bundle.manifest");
  tree.setEditable(false);
  setLayout(new BorderLayout());
  add(tree, BorderLayout.CENTER);
}

代码示例来源:origin: infinitest/infinitest

private static JTree createTree() {
  JTree resultsTree = new JTree();
  resultsTree.setName("TREEVIEW");
  resultsTree.setRootVisible(false);
  resultsTree.setEditable(false);
  resultsTree.setShowsRootHandles(true);
  resultsTree.setCellRenderer(new FailureCellRenderer());
  ToolTipManager tipManager = ToolTipManager.sharedInstance();
  tipManager.registerComponent(resultsTree);
  resultsTree.addKeyListener(new EnterPressListener());
  return resultsTree;
}

代码示例来源:origin: org.zaproxy/zap

treeSite = new JTree(this.siteTree);
treeSite.setShowsRootHandles(true);
treeSite.setName("nodeSelectTree");
treeSite.setToggleClickCount(1);
treeSite.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

代码示例来源:origin: org.qi4j.tool/org.qi4j.tool.envisage

structureTree.setExpandsSelectedPaths( true );
structureTree.setScrollsOnExpand( true );
structureTree.setName( STRUCTURE_VIEW );
structureTree.setCellRenderer( new TreeModelCellRenderer() );
typeTree.setExpandsSelectedPaths( true );
typeTree.setScrollsOnExpand( true );
typeTree.setName( TYPE_VIEW );
typeTree.setCellRenderer( new TreeModelCellRenderer() );

代码示例来源:origin: org.zaproxy/zap

treeSite = new JTree(new DefaultTreeModel(new DefaultMutableTreeNode()));
treeSite.setShowsRootHandles(true);
treeSite.setName("treeSite");
treeSite.setToggleClickCount(1);

代码示例来源:origin: org.zaproxy/zap

treeContext = new JTree(this.contextTree);
treeContext.setShowsRootHandles(true);
treeContext.setName("nodeContextTree");
treeContext.setToggleClickCount(1);
treeContext.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

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

public static IDEState emptyIDEState(){
  DefaultMutableTreeNode rootObjects = new DefaultMutableTreeNode("Objects");
  JTree treeObjects = new javax.swing.JTree(rootObjects);		
  treeObjects.setName("ObjectsTree");
  DnDJTree treeProjects = new DnDJTree();
  treeProjects.setExpandsSelectedPaths(true);
  treeProjects.setName("ProjectsTree");
  DefaultMutableTreeNode rootProjects =(DefaultMutableTreeNode)treeProjects.getModel().getRoot();
  GraphManager gm = GraphManager.initInstance(rootProjects, treeProjects);
  ObjectManager om = ObjectManager.initialise(rootObjects, treeObjects);
  Properties prop=new Properties();
  prop.put("IDK:extfolder",
      new ProjectProperty("IDK","extfolder", "Extension Module Folder",
          "ext",
      "Folder where the IDE will find its new modules"));
  Preferences pref=new Preferences();
  Editor ed=new Editor(om,gm,  pref);
  
  return new IDEState(ed, gm, om, prop);
}

代码示例来源:origin: org.zaproxy/zap

treeContext = new JTree(this.contextTree);
treeContext.setShowsRootHandles(true);
treeContext.setName(CONTEXT_TREE_COMPONENT_NAME);
treeContext.setToggleClickCount(1);
treeContext.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

代码示例来源:origin: elki-project/elki

/**
 * Creates the JList used in the popup to display the items in the combo box
 * model. This method is called when the UI class is created.
 * 
 * @return a <code>JList</code> used to display the combo box items
 */
protected JTree createTree() {
 JTree tree = new JTree(model);
 tree.setName("TreePopup.tree");
 tree.setFont(getFont());
 tree.setForeground(getForeground());
 tree.setBackground(getBackground());
 tree.setBorder(null);
 tree.setFocusable(true);
 tree.addMouseListener(handler);
 tree.addKeyListener(handler);
 tree.setCellRenderer(new Renderer());
 return tree;
}

代码示例来源:origin: org.zaproxy/zap

treeAlert.setName(ALERT_TREE_PANEL_NAME);
treeAlert.setShowsRootHandles(true);
treeAlert.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0));

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki

/**
 * Creates the JList used in the popup to display the items in the combo box
 * model. This method is called when the UI class is created.
 * 
 * @return a <code>JList</code> used to display the combo box items
 */
protected JTree createTree() {
 JTree tree = new JTree(model);
 tree.setName("TreePopup.tree");
 tree.setFont(getFont());
 tree.setForeground(getForeground());
 tree.setBackground(getBackground());
 tree.setBorder(null);
 tree.setFocusable(true);
 tree.addMouseListener(handler);
 tree.addKeyListener(handler);
 tree.setCellRenderer(new Renderer());
 return tree;
}

代码示例来源:origin: de.lmu.ifi.dbs.elki/elki-gui-minigui

/**
 * Creates the JList used in the popup to display the items in the combo box
 * model. This method is called when the UI class is created.
 * 
 * @return a <code>JList</code> used to display the combo box items
 */
protected JTree createTree() {
 JTree tree = new JTree(model);
 tree.setName("TreePopup.tree");
 tree.setFont(getFont());
 tree.setForeground(getForeground());
 tree.setBackground(getBackground());
 tree.setBorder(null);
 tree.setFocusable(true);
 tree.addMouseListener(handler);
 tree.addKeyListener(handler);
 tree.setCellRenderer(new Renderer());
 return tree;
}

代码示例来源:origin: sensepost/yeti

trDomainTree.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
trDomainTree.setComponentPopupMenu(pmNetworkActions);
trDomainTree.setName("trDomainTree"); // NOI18N
trDomainTree.addMouseListener(new java.awt.event.MouseAdapter() {
  public void mouseClicked(java.awt.event.MouseEvent evt) {

相关文章

JTree类方法