本文整理了Java中org.openide.nodes.Children.create()
方法的一些代码示例,展示了Children.create()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Children.create()
方法的具体详情如下:
包路径:org.openide.nodes.Children
类名称:Children
方法名:create
[英]Create a Children
object using the passed ChildFactory
object. The ChildFactory
will be asked to create a list of model objects that are the children; then for each object in the list, ChildFactory#createNodesForKey will be called to instantiate one or more Node
s for that object.
[中]使用传递的ChildFactory
对象创建Children
对象。ChildFactory
将被要求创建作为子对象的模型对象列表;然后,对于列表中的每个对象,将调用ChildFactory#createNodesForKey为该对象实例化一个或多个Node
s。
代码示例来源:origin: it.tidalwave.semantic/it-tidalwave-semantic-node
/***************************************************************************
*
*
**************************************************************************/
protected EntityNode (@Nonnull final EntityChildFactory entityChildFactory)
{
super(Children.create(entityChildFactory, true));
this.entity = null;
this.entityChildFactory = entityChildFactory;
pasteTypeFactory = null;
// refreshAttributes();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javacard-spi
/**
* Create a Children object which, if necessary, will contain a fake (invalid)
* card with the given system id.
*
* @param expectedCardSystemId The system ID for a card that is expected to
* exist
* @return A Children object suitable for use under a Node
*/
public Children createChildren(String expectedCardSystemId) {
return Children.create(new CF(expectedCardSystemId), true);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project
public ImportantFilesRootNode(PhpProject project, ImportantFilesChildFactory childFactory) {
super(Children.create(childFactory, true));
this.childFactory = childFactory;
ProjectPropertiesSupport.addWeakProjectPropertyChangeListener(project, this);
}
代码示例来源:origin: it.tidalwave.semantic/it-tidalwave-semantic-node
public NamespaceNode (@Nonnull final Repository repository,
@Nonnull final String nameSpace)
{
super(Children.create(new NamespaceChildFactory(repository, nameSpace), true));
this.nameSpace = nameSpace;
setName(nameSpace);
setDisplayName(nameSpace);
}
//
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-grails
private GrailsInstance(GrailsInstanceProvider provider, GrailsPlatform runtime) {
this.childFactory = new GrailsChildFactory(provider);
this.runtime = runtime;
this.node = new GrailsNode(Children.create(childFactory, false), getDisplayName());
}
代码示例来源:origin: it.tidalwave.netbeans/it-tidalwave-hierarchy-node
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
public HViewManagerNode (final @Nonnull HViewManager hViewManager)
{
super(hViewManager, Children.create(new HChildFactory(hViewManager), true),
new ProxyLookup(hViewManager.getLookup(), Lookups.fixed(hViewManager)));
}
}
代码示例来源:origin: nl.cloudfarming.client/isobus-tree
@Override
protected boolean createKeys(List<Node> toPopulate) {
if (!deviceElement.getDeviceObjectReferences().isEmpty()) {
String displayName = Bundle.isobus_project_taskdata_aggregatenode_name_device_object_references();
Children deviceObjectReferenceChildren = Children.create(new AggregateNodeChildFactory<>(deviceElement.getDeviceObjectReferences()), true);
toPopulate.add(new IsobusAggregateNode(deviceObjectReferenceChildren, DEVICE_OBJECT_REFERENCE_AGGRGATE_NODE_ICON, displayName));
}
return true;
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-tomcat5
WebModuleHolderNode(TomcatWebModuleChildrenFactory factory) {
super(Children.create(factory, true));
setDisplayName(NbBundle.getMessage(TomcatTargetNode.class, "LBL_WebApps")); // NOI18N
getCookieSet().add(new RefreshWebModuleChildren(factory));
}
代码示例来源:origin: it.tidalwave.netbeans/it-tidalwave-hierarchy-node
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
public HViewNode (final @Nonnull HView hView)
{
super(hView, Children.create(new HChildFactory(hView), true),
new ProxyLookup(hView.getLookup(), Lookups.fixed(hView)));
}
}
代码示例来源:origin: eu.agrosense.client/activityfield
public ActivityFieldsNode(AgroURI farmURI) {
super(Children.create(new ActivityFieldNodeFactory(farmURI), true));
this.farmURI = farmURI;
// FIXME: create new composite icon from blank folder and activityfield icons
setIconBaseWithExtension("eu/agrosense/client/activityfield/activityfields_folder.png");
setName(Bundle.activityfields_node_name());
}
代码示例来源:origin: eu.agrosense.client/fleet-machine
public FleetNode(AgroURI farmURI) {
super(Children.create(new FleetChildFactory(farmURI), true));
setIconBaseWithExtension("eu/agrosense/client/fleet/fleet.png");
setName(Bundle.fleet_node_name());
}
}
代码示例来源:origin: eu.agrosense.client/productionunit-nb
public CropProductionUnitsNode(AgroURI farmURI) {
super(Children.create(new CropProductionUnitNodeFactory(farmURI), true));
this.farmURI = farmURI;
setIconBaseWithExtension("eu/agrosense/client/productionunit/folder_green.png");
setName(Bundle.cropproductionunits_node_name());
}
代码示例来源:origin: nl.cloudfarming.client/isobus-tree
public ProductNode(IsobusProduct isobusProduct) {
super(Children.create(new ProductChildFactory(isobusProduct), true), Lookups.fixed(isobusProduct));
setName(Bundle.isobus_project_taskdata_node_name_product(isobusProduct.getProductDesigNator()));
setIconBaseWithExtension(PRODUCT_ICON);
}
代码示例来源:origin: nl.cloudfarming.client/isobus-tree
public LineStringNode(IsobusLineString lineString) {
super(Children.create(new AggregateNodeChildFactory<>(lineString.getPoints()), true));
setName(Bundle.isobus_project_taskdata_node_name_linestring(lineString.getName()));
setIconBaseWithExtension(LINESTRING_NODE_ICON);
}
}
代码示例来源:origin: nl.cloudfarming.client/isobus-tree
public DeviceNode(IsobusDevice isobusDevice) {
super(Children.create(new DeviceChildFactory(isobusDevice), true), Lookups.fixed(isobusDevice));
setName(Bundle.isobus_project_taskdata_node_name_device(isobusDevice.getDesignator()));
setIconBaseWithExtension(DEVICE_ICON);
}
代码示例来源:origin: nl.cloudfarming.client/isobus-tree
public PolygonNode(IsobusPolygon polygon) {
super(Children.create(new AggregateNodeChildFactory<>(polygon.getLineString()), true));
setName(Bundle.isobus_project_taskdata_node_name_polygon(polygon.getPolygonDesignator()));
setIconBaseWithExtension(POLYGON_NODE_ICON);
}
}
代码示例来源:origin: nl.cloudfarming.client/isobus-tree
public AllocationStampNode(AllocationTime allocationTime) {
super(Children.create(new AllocationStampChildFactory(allocationTime), true));
setName(Bundle.isobus_project_taskdata_node_name_allocationtime(allocationTime.getStartTime(), allocationTime.getEndTime()));
setIconBaseWithExtension(ALLOCATION_TIME_NODE_ICON);
}
代码示例来源:origin: nl.cloudfarming.client/isobus-tree
public FarmNode(IsobusFarm farm) {
super(Children.create(new FarmChildFactory(farm), true), Lookups.fixed(farm));
setName(Bundle.isobus_project_farm_node_name(farm.getName()));
setIconBaseWithExtension(ICON);
}
代码示例来源:origin: nl.cloudfarming.client/field-shape-type
public ShapeDataObjectNode(Node original, String name) {
super(Children.create(new ShapeChildFactory(), true), new ProxyLookup(original.getLookup(), Lookups.singleton(new SimpleLayer(name))));
this.origional = original;
setIconBaseWithExtension("nl/cloudfarming/client/shape/file_extension_shp.png");
setDisplayName(name);
}
代码示例来源:origin: nl.cloudfarming.client/messaging
/**
* Not used for this module
*/
@Override
protected void initExplorer() {
Node rootNode = new AbstractNode(Children.create(new MessageNodeFactory(), true));
ExplorerManager manager = new ExplorerManager();
manager.setRootContext(rootNode);
manager.getRootContext().setDisplayName("messages");
setExplorerManager(manager, new ActionMap());
}
内容来源于网络,如有侵权,请联系作者删除!