Examples of createComponent()


Examples of jetbrains.communicator.ide.StatusToolbar.createComponent()

    toolbarPanel.add(Box.createHorizontalStrut(10));
    toolbarPanel.add(new SeparatorComponent(JBColor.LIGHT_GRAY, SeparatorOrientation.VERTICAL));
    toolbarPanel.add(Box.createHorizontalStrut(3));
    toolbarPanel.add(DropDownButton.wrap(new OptionsButton()));
    toolbarPanel.add(statusToolbar.createComponent());

    toolbarPanel.add(new JPanel() {
      @Override
      public Dimension getPreferredSize() {
        return new Dimension(Short.MAX_VALUE, 10);
View Full Code Here

Examples of org.apache.felix.dm.DependencyManager.createComponent()

    public void testComponentThatDependsOnAOtheComponentShouldRegisterAsFailure() {
        setupEmptyBundles();
        DependencyManager dm = new DependencyManager(m_bundleContext);
        DependencyManager.getDependencyManagers().add(dm);
       
        Component component = dm.createComponent()
            .setImplementation(Object.class)
            .setInterface(Object.class.getName(), null)
            .add(dm.createServiceDependency().setService(Math.class).setRequired(true));
        dm.add(component);
       
View Full Code Here

Examples of org.apache.isis.viewer.wicket.ui.ComponentFactory.createComponent()

    private void addOrReplaceIconAndTitle(ObjectAdapter pendingOrCurrentAdapter) {
        final EntityModel entityModelForLink = new EntityModel(pendingOrCurrentAdapter);
        entityModelForLink.setContextAdapterIfAny(getScalarModel().getContextAdapterIfAny());
        entityModelForLink.setRenderingHint(getScalarModel().getRenderingHint());
        final ComponentFactory componentFactory = getComponentFactoryRegistry().findComponentFactory(ComponentType.ENTITY_ICON_AND_TITLE, entityModelForLink);
        final Component component = componentFactory.createComponent(entityModelForLink);
        addOrReplace(component);
    }


    @Override
View Full Code Here

Examples of org.apache.muse.ws.dm.muws.events.WefFactory.createComponent()

        WefFactory factory = createWefFactory();
        ManagementEvent event = factory.createEvent();
       
        event.addExtendedElement(payload);

        Component source = factory.createComponent();
        source.setName(WefConstants.SOURCE_COMP_QNAME);
       
        ComponentAddress address = factory.createComponentAddress(sourceEPR);
        source.setAddress(address);
       
View Full Code Here

Examples of org.apache.sling.replication.component.ReplicationComponentFactory.createComponent()

                "endpoints[2]=http://localhost:103/libs/sling/replication/services/importers/default",
                "endpoints.strategy=All"});
        ReplicationComponentFactory replicationComponentFactory = mock(ReplicationComponentFactory.class);
        ReplicationAgent replicationAgent = mock(ReplicationAgent.class);
        CoordinatingReplicationAgentFactory coordinatingReplicationAgentFactory = new CoordinatingReplicationAgentFactory();
        when(replicationComponentFactory.createComponent(ReplicationAgent.class, config, coordinatingReplicationAgentFactory)).
                thenReturn(replicationAgent);

        Field componentFactory = coordinatingReplicationAgentFactory.getClass().getDeclaredField("componentFactory");
        componentFactory.setAccessible(true);
        componentFactory.set(coordinatingReplicationAgentFactory, replicationComponentFactory);
View Full Code Here

Examples of org.apache.sling.replication.component.impl.DefaultReplicationComponentFactory.createComponent()

        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put("name", name);
        ReplicationComponentProvider provider = mock(ReplicationComponentProvider.class);
        ReplicationAgent agent = mock(ReplicationAgent.class);
        when(provider.getComponent(ReplicationAgent.class, name)).thenReturn(agent);
        ReplicationAgent component = defaultReplicationComponentFactory.createComponent(ReplicationAgent.class, properties, provider);
        assertNull(component); // agents cannot be referenced by service name using the factory
    }

    @Test
    public void testDefaultCreateComponentForTriggerByService() throws Exception {
View Full Code Here

Examples of org.apache.sling.replication.component.impl.DefaultReplicationComponentFactory.createComponent()

        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put("name", name);
        ReplicationComponentProvider provider = mock(ReplicationComponentProvider.class);
        ReplicationTrigger trigger = mock(ReplicationTrigger.class);
        when(provider.getComponent(ReplicationTrigger.class, name)).thenReturn(trigger);
        ReplicationTrigger component = defaultReplicationComponentFactory.createComponent(ReplicationTrigger.class, properties, provider);
        assertNotNull(component);
    }

    @Test
    public void testDefaultCreateComponentForTransportAuthenticationProviderByService() throws Exception {
View Full Code Here

Examples of org.apache.sling.replication.component.impl.DefaultReplicationComponentFactory.createComponent()

        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put("name", name);
        ReplicationComponentProvider provider = mock(ReplicationComponentProvider.class);
        TransportAuthenticationProvider authenticationProvider = mock(TransportAuthenticationProvider.class);
        when(provider.getComponent(TransportAuthenticationProvider.class, name)).thenReturn(authenticationProvider);
        TransportAuthenticationProvider component = defaultReplicationComponentFactory.createComponent(TransportAuthenticationProvider.class, properties, provider);
        assertNotNull(component);
    }

    @Test
    public void testDefaultCreateComponentForImporterByService() throws Exception {
View Full Code Here

Examples of org.apache.sling.replication.component.impl.DefaultReplicationComponentFactory.createComponent()

        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put("name", name);
        ReplicationComponentProvider provider = mock(ReplicationComponentProvider.class);
        ReplicationPackageImporter importer = mock(ReplicationPackageImporter.class);
        when(provider.getComponent(ReplicationPackageImporter.class, name)).thenReturn(importer);
        ReplicationPackageImporter component = defaultReplicationComponentFactory.createComponent(ReplicationPackageImporter.class, properties, provider);
        assertNotNull(component);
    }

    @Test
    public void testDefaultCreateComponentForExporterByService() throws Exception {
View Full Code Here

Examples of org.apache.sling.replication.component.impl.DefaultReplicationComponentFactory.createComponent()

        Map<String, Object> properties = new HashMap<String, Object>();
        properties.put("name", name);
        ReplicationComponentProvider provider = mock(ReplicationComponentProvider.class);
        ReplicationPackageExporter exporter = mock(ReplicationPackageExporter.class);
        when(provider.getComponent(ReplicationPackageExporter.class, name)).thenReturn(exporter);
        ReplicationPackageExporter component = defaultReplicationComponentFactory.createComponent(ReplicationPackageExporter.class, properties, provider);
        assertNotNull(component);
    }

    @Test
    public void testCreateAgent() throws Exception {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.