org.openide.nodes.AbstractNode.setName()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(41)

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

AbstractNode.setName介绍

[英]Set the system name. Fires a property change event. Also may change the display name according to #displayFormat.
[中]设置系统名称。激发属性更改事件。也可以根据#displayFormat更改显示名称。

代码示例

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

/** To allow inner classes to access the super.setName method.
*/
void setNameSilently(String name) {
  super.setName(name);
}

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

/** Set the node name.
* Also may attempt to change the name of the bean,
* according to {@link #setSynchronizeName}.
* @param s the new name
*/
@Override
public void setName(String s) {
  if (synchronizeName) {
    Method m = nameSetter;
    if (m != null) {
      try {
        m.invoke(bean, new Object[] { s });
      } catch (Exception e) {
        NodeOp.exception(e);
      }
    }
  }
  super.setName(s);
}

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

private LazyNode(AbstractNode an, Map<String,?> map) {
  super(an, new SwitchChildren(an));
  ((SwitchChildren)getChildren()).node = this;
  this.map = map;
  
  an.setName((String) map.get("name")); // NOI18N
  an.setDisplayName((String) map.get("displayName")); // NOI18N
  an.setShortDescription((String) map.get("shortDescription")); // NOI18N
  String iconBase = (String) map.get("iconResource"); // NOI18N
  if (iconBase != null) {
    an.setIconBaseWithExtension(iconBase);
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** To allow innerclasses to access the super.setName method.
*/
void setNameSilently (String name) {
  super.setName (name);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** To allow innerclasses to access the super.setName method.
*/
void setNameSilently (String name) {
  super.setName (name);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf-navigation

public NonDataNode( String pageName) {
  super(Children.LEAF);
  super.setName(pageName);
}

代码示例来源:origin: org.codehaus.mevenide/nb-repo-browser

public static Node createLoadingNode() {
  AbstractNode nd = new AbstractNode(Children.LEAF){
    @Override
    public Image getIcon(int arg0) {
      return Utilities.loadImage("org/codehaus/mevenide/repository/wait.gif");
    }
     };
  nd.setName("Loading"); //NOI18N
  nd.setDisplayName(NbBundle.getMessage(GroupListChildren.class, "Node_Loading"));
  return nd;
}
private List keys;

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf-navigation

@Override
  public void setName(String s) {
    super.setName(s);
    getInstance().setName(s);
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf-navigation

@Override
public void setName(String s) {            
  super.setName(s);
  edge.setName(s);
}

代码示例来源:origin: org.codehaus.mevenide/lifecycle-build-plan

public static Node createLoadingNode() {
  AbstractNode nd = new AbstractNode(Children.LEAF) {
    @Override
    public Image getIcon(int arg0) {
      return Utilities.loadImage("org/codehaus/mevenide/buildplan/nodes/wait.gif");
    }
  };
  nd.setName("Loading"); //NOI18N
  nd.setDisplayName(NbBundle.getMessage(NodeUtils.class, "Node_Loading"));
  return nd;
}

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

public static Node createWaitNode() {
  AbstractNode n = new AbstractNode(Children.LEAF);
  n.setName(NbBundle.getMessage(JBItemNode.class, "LBL_WaitNode_DisplayName")); //NOI18N
  n.setIconBaseWithExtension("org/netbeans/modules/j2ee/jboss4/resources/wait.gif"); // NOI18N
  return n;
}

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

private Node createWaitNode() {
    AbstractNode n = new AbstractNode(Children.LEAF);
    n.setName(NbBundle.getMessage(JBApplicationsChildren.class, "LBL_WaitNode_DisplayName")); //NOI18N
    n.setIconBaseWithExtension("org/netbeans/modules/j2ee/jboss4/resources/wait.gif"); // NOI18N
    return n;
  }
}

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

public static Node createInfoNode() {
  AbstractNode n = new AbstractNode(Children.LEAF);
  n.setName(NbBundle.getMessage(JBItemNode.class, "LBL_InfoNode_DisplayName")); //NOI18N
  n.setShortDescription(NbBundle.getMessage(JBItemNode.class, "LBL_InfoNode_ToolTip")); //NOI18N
  n.setIconBaseWithExtension("org/netbeans/core/resources/exception.gif"); // NOI18N
  return n;
}

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

private Node createWaitNode() {
    AbstractNode node = new AbstractNode(Children.LEAF);
    node.setName(NbBundle.getMessage(InstanceTargetXNode.class, "LBL_WaitNode_DisplayName"));
    node.setIconBaseWithExtension("org/netbeans/modules/j2ee/deployment/impl/ui/resources/wait.gif"); // NOI18N
    
    Children.Array children = new Children.Array();
    children.add(new Node[]{node});
    return new AbstractNode(children);
  }
}

代码示例来源:origin: org.codehaus.mevenide/nb-project

public static Node[] createNodes(Archetype arch, Children childs) {
  if (arch == LOADING_ARCHETYPE) {
    AbstractNode loading = new AbstractNode(Children.LEAF);
    loading.setName("loading"); //NOI18N
    loading.setDisplayName(NbBundle.getMessage(ChooseArchetypePanel.class, "LBL_Loading"));
    return new Node[] {loading};
  }
  AbstractNode nd = new AbstractNode(childs);
  String dn = arch.getName() == null ? arch.getArtifactId() : arch.getName();
  nd.setName(dn);
  nd.setDisplayName(dn);
  nd.setIconBaseWithExtension("org/codehaus/mevenide/netbeans/Maven2Icon.gif"); //NOI18N
  nd.setValue(PROP_ARCHETYPE, arch);
  return new Node[] { nd };
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-project-ant-ui

protected Node[] createNodes(Variable var) {
  Children ch = Children.LEAF;
  AbstractNode n = new AbstractNode(ch, Lookups.singleton(var)) {
    @Override
    public Image getIcon(int type) {
      return iconDelegate.getIcon(type);
    }
  };
  n.setName(var.getName());
  n.setDisplayName(var.getName() + "("+var.getValue().getPath()+")"); // NOI18N
  n.setShortDescription(var.getName() + "("+var.getValue().getPath()+")"); // NOI18N
  return new Node[] {n};
}

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

public ResourceBundleBrandingPanel(BrandingModel model) {
  super(getMessage("LBL_ResourceBundleTab"), model); //NOI18N
  
  initComponents();
  searchField.getDocument().addDocumentListener(searchListener);
  searchField.addFocusListener(searchListener);
  manager = new ExplorerManager();
  rootNode = null;
  waitRoot = getWaitRoot();
  waitRoot.setName(getMessage("LBL_ResourceBundlesList")); // NOI18N
  waitRoot.setDisplayName(getMessage("LBL_ResourceBundlesList")); // NOI18N
  manager.setRootContext(waitRoot);
  branding = getBranding();
  prj = branding.getProject();
}

代码示例来源:origin: dcaoyuan/nbscala

public J2SELogicalViewRootNode() {
  super(NodeFactorySupport.createCompositeChildren(project, "Projects/org-netbeans-modules-scala-project/Nodes"),
     Lookups.singleton(project));
  setIconBaseWithExtension("org/netbeans/modules/scala/project/ui/resources/scalaProject.png");
  super.setName( ProjectUtils.getInformation( project ).getDisplayName() );
  if (hasBrokenLinks()) {
    broken = true;
  }
  else if (hasInvalidJdkVersion ()) {
    illegalState = true;
  }
  compileOnSaveDisabled = isCompileOnSaveDisabled();
  brokenLinksAction = new BrokenLinksAction();
}

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

@SuppressWarnings("LeakingThisInConstructor")
public LogicalViewRootNode(String childrenFolderLayer, String actionsFolderLayer,
    String iconBase, String shortDesc, Class helpContext) {
  super(NodeFactorySupport.createCompositeChildren(project, childrenFolderLayer), 
      Lookups.fixed(project, project.getProjectDirectory()));
  this.shortDesc = shortDesc;
  this.actionsFolderLayer = actionsFolderLayer;
  this.helpContext = helpContext;
  setIconBaseWithExtension(iconBase); //NOI18N
  super.setName( ProjectUtils.getInformation( project ).getDisplayName() );
  addChangeListener(WeakListeners.change(this, AbstractLogicalViewProvider.this));
  testBroken();
}

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

public RubyLogicalViewRootNode() {
  super(NodeFactorySupport.createCompositeChildren(getProject(), "Projects/org-netbeans-modules-ruby-rubyproject/Nodes"), 
     Lookups.singleton(getProject()));
  setIconBaseWithExtension("org/netbeans/modules/ruby/rubyproject/ui/resources/jruby.png");
  super.setName(ProjectUtils.getInformation(getProject()).getDisplayName());
  this.rspecSupport = new RSpecSupport(getProject());
}

相关文章

最新文章

更多