Package org.eclipse.gef.palette

Examples of org.eclipse.gef.palette.PaletteDrawer


* @author Leo Dos Santos
*/
public class IntHttpPaletteFactory implements IPaletteFactory {

  public PaletteDrawer createPaletteDrawer(AbstractConfigGraphDiagram diagram, String namespaceUri) {
    PaletteDrawer drawer = new PaletteDrawer("", IntegrationImages.BADGE_SI_HTTP); //$NON-NLS-1$
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(
        IntHttpSchemaConstants.ELEM_INBOUND_CHANNEL_ADAPTER,
        Messages.IntHttpPaletteFactory_INBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(InboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntHttpSchemaConstants.ELEM_INBOUND_GATEWAY,
        Messages.IntHttpPaletteFactory_INBOUND_GATEWAY_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            InboundGatewayModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_GATEWAY_SMALL, IntegrationImages.INBOUND_GATEWAY);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntHttpSchemaConstants.ELEM_OUTBOUND_CHANNEL_ADAPTER,
        Messages.IntHttpPaletteFactory_OUTBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(OutboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_ADAPTER_SMALL, IntegrationImages.OUTBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntHttpSchemaConstants.ELEM_OUTBOUND_GATEWAY,
        Messages.IntHttpPaletteFactory_OUTBOUND_GATEWAY_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            OutboundGatewayModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_GATEWAY_SMALL, IntegrationImages.OUTBOUND_GATEWAY);
    entries.add(entry);

    drawer.addAll(entries);
    return drawer;
  }
View Full Code Here


* @author Leo Dos Santos
*/
public class IntXmppPaletteFactory implements IPaletteFactory {

  public PaletteDrawer createPaletteDrawer(AbstractConfigGraphDiagram diagram, String namespaceUri) {
    PaletteDrawer drawer = new PaletteDrawer("", IntegrationImages.BADGE_SI_XMPP); //$NON-NLS-1$
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(
        IntXmppSchemaConstants.ELEM_HEADER_ENRICHER,
        Messages.getString("IntXmppPaletteFactory.HEADER_ENRICHER_COMPONENT_DESCRIPTION"), //$NON-NLS-1$
        new ModelElementCreationFactory(HeaderEnricherModelElement.class, diagram, namespaceUri),
        IntegrationImages.ENRICHER_SMALL, IntegrationImages.ENRICHER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(
        IntXmppSchemaConstants.ELEM_INBOUND_CHANNEL_ADAPTER,
        Messages.getString("IntXmppPaletteFactory.INBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION"), new ModelElementCreationFactory( //$NON-NLS-1$
            InboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(
        IntXmppSchemaConstants.ELEM_OUTBOUND_CHANNEL_ADAPTER,
        Messages.getString("IntXmppPaletteFactory.OUTBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION"), new ModelElementCreationFactory( //$NON-NLS-1$
            OutboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_ADAPTER_SMALL, IntegrationImages.OUTBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(
        IntXmppSchemaConstants.ELEM_PRESENCE_INBOUND_CHANNEL_ADAPTER,
        Messages.getString("IntXmppPaletteFactory.PRESENCE_INBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION"), new ModelElementCreationFactory( //$NON-NLS-1$
            PresenceInboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(
        IntXmppSchemaConstants.ELEM_PRESENCE_OUTBOUND_CHANNEL_ADAPTER,
        Messages.getString("IntXmppPaletteFactory.PRESENCE_OUTBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION"), new ModelElementCreationFactory( //$NON-NLS-1$
            PresenceOutboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_ADAPTER_SMALL, IntegrationImages.OUTBOUND_ADAPTER);
    entries.add(entry);

    drawer.addAll(entries);
    return drawer;
  }
View Full Code Here

  }

  @Override
  protected List<PaletteDrawer> createComponentDrawers() {
    List<PaletteDrawer> categories = new ArrayList<PaletteDrawer>();
    PaletteDrawer drawer = new PaletteDrawer(Messages
        .getString("BatchEditorPaletteFactory.COMPONENTS_PALETTE_TITLE")); //$NON-NLS-1$
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(BatchSchemaConstants.ELEM_JOB, Messages
        .getString("BatchEditorPaletteFactory.JOB_COMPONENT_DESCRIPTION"), new ModelElementCreationFactory( //$NON-NLS-1$
        JobModelElement.class, getDiagram()), ConfigGraphCommonImages.SEQUENCE_BEGIN_VERTICAL_SMALL,
        ConfigGraphCommonImages.SEQUENCE_BEGIN_VERTICAL);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(BatchSchemaConstants.ELEM_FLOW,
        Messages.getString("BatchEditorPaletteFactory.FLOW_COMPONENT_DESCRIPTION"), //$NON-NLS-1$
        new ModelElementCreationFactory(FlowModelElement.class, getDiagram()),
        ConfigGraphCommonImages.SEQUENCE_BEGIN_VERTICAL_SMALL, ConfigGraphCommonImages.SEQUENCE_BEGIN_VERTICAL);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(BatchSchemaConstants.ELEM_STEP,
        Messages.getString("BatchEditorPaletteFactory.STEP_COMPONENT_DESCRIPTION"), //$NON-NLS-1$
        new ModelElementCreationFactory(StepModelElement.class, getDiagram()), ConfigGraphCommonImages.ACTIVITY_SMALL,
        ConfigGraphCommonImages.ACTIVITY);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(BatchSchemaConstants.ELEM_SPLIT,
        Messages.getString("BatchEditorPaletteFactory.SPLIT_COMPONENT_DESCRIPTION"), //$NON-NLS-1$
        new ModelElementCreationFactory(SplitContainerElement.class, getDiagram()), BatchImages.SPLIT_SMALL,
        BatchImages.SPLIT);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(BatchSchemaConstants.ELEM_DECISION,
        Messages.getString("BatchEditorPaletteFactory.DECISION_COMPONENT_DESCRIPTION"), //$NON-NLS-1$
        new ModelElementCreationFactory(DecisionModelElement.class, getDiagram()), BatchImages.DECISION_SMALL,
        BatchImages.DECISION);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(BatchSchemaConstants.ELEM_END,
        Messages.getString("BatchEditorPaletteFactory.END_COMPONENT_DESCRIPTION"), //$NON-NLS-1$
        new ModelElementCreationFactory(EndModelElement.class, getDiagram()), BatchImages.END_SMALL,
        BatchImages.END);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(BatchSchemaConstants.ELEM_FAIL,
        Messages.getString("BatchEditorPaletteFactory.FAIL_COMPONENT_DESCRIPTION"), //$NON-NLS-1$
        new ModelElementCreationFactory(FailModelElement.class, getDiagram()), BatchImages.FAIL_SMALL,
        BatchImages.FAIL);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(BatchSchemaConstants.ELEM_NEXT,
        Messages.getString("BatchEditorPaletteFactory.NEXT_COMPONENT_DESCRIPTION"), //$NON-NLS-1$
        new ModelElementCreationFactory(NextModelElement.class, getDiagram()), BatchImages.NEXT_SMALL,
        BatchImages.NEXT);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(BatchSchemaConstants.ELEM_STOP,
        Messages.getString("BatchEditorPaletteFactory.STOP_COMPONENT_DESCRIPTION"), //$NON-NLS-1$
        new ModelElementCreationFactory(StopModelElement.class, getDiagram()), BatchImages.STOP_SMALL,
        BatchImages.STOP);
    entries.add(entry);

    drawer.addAll(entries);
    categories.add(drawer);
    return categories;
  }
View Full Code Here

* @author Leo Dos Santos
*/
public class IntWsPaletteFactory implements IPaletteFactory {

  public PaletteDrawer createPaletteDrawer(AbstractConfigGraphDiagram diagram, String namespaceUri) {
    PaletteDrawer drawer = new PaletteDrawer("", IntegrationImages.BADGE_SI_WS); //$NON-NLS-1$
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(
        IntWsSchemaConstants.ELEM_HEADER_ENRICHER, Messages.IntWsPaletteFactory_HEADER_ENRICHER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(HeaderEnricherModelElement.class, diagram, namespaceUri),
        IntegrationImages.ENRICHER_SMALL, IntegrationImages.ENRICHER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntWsSchemaConstants.ELEM_INBOUND_GATEWAY,
        Messages.IntWsPaletteFactory_INBOUND_GATEWAY_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(InboundGatewayModelElement.class,
            diagram, namespaceUri), IntegrationImages.INBOUND_GATEWAY_SMALL,
        IntegrationImages.INBOUND_GATEWAY);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntWsSchemaConstants.ELEM_OUTBOUND_GATEWAY,
        Messages.IntWsPaletteFactory_OUTBOUND_GATEWAY_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            OutboundGatewayModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_GATEWAY_SMALL, IntegrationImages.OUTBOUND_GATEWAY);
    entries.add(entry);

    drawer.addAll(entries);
    return drawer;
  }
View Full Code Here

* @author Leo Dos Santos
*/
public class IntJmsPaletteFactory implements IPaletteFactory {

  public PaletteDrawer createPaletteDrawer(AbstractConfigGraphDiagram diagram, String namespaceUri) {
    PaletteDrawer drawer = new PaletteDrawer("", IntegrationImages.BADGE_SI_JMS); //$NON-NLS-1$
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(IntJmsSchemaConstants.ELEM_CHANNEL,
        Messages.IntJmsPaletteFactory_CHANNEL_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(ChannelModelElement.class, diagram,
            namespaceUri), IntegrationImages.CHANNEL_SMALL, IntegrationImages.CHANNEL);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJmsSchemaConstants.ELEM_HEADER_ENRICHER,
        Messages.IntJmsPaletteFactory_HEADER_ENRICHER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(HeaderEnricherModelElement.class,
            diagram, namespaceUri), IntegrationImages.ENRICHER_SMALL, IntegrationImages.ENRICHER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJmsSchemaConstants.ELEM_INBOUND_CHANNEL_ADAPTER,
        Messages.IntJmsPaletteFactory_INBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            InboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJmsSchemaConstants.ELEM_INBOUND_GATEWAY,
        Messages.IntJmsPaletteFactory_INBOUND_GATEWAY_ADAPTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(InboundGatewayModelElement.class,
            diagram, namespaceUri), IntegrationImages.INBOUND_GATEWAY_SMALL,
        IntegrationImages.INBOUND_GATEWAY);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJmsSchemaConstants.ELEM_MESSAGE_DRIVEN_CHANNEL_ADAPTER,
        Messages.IntJmsPaletteFactory_MESSAGE_DRIVEN_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            MessageDrivenChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJmsSchemaConstants.ELEM_OUTBOUND_CHANNEL_ADAPTER,
        Messages.IntJmsPaletteFactory_OUTBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            OutboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_ADAPTER_SMALL, IntegrationImages.OUTBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJmsSchemaConstants.ELEM_OUTBOUND_GATEWAY,
        Messages.IntJmsPaletteFactory_OUTBOUND_GATEWAY_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            OutboundGatewayModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_GATEWAY_SMALL, IntegrationImages.OUTBOUND_GATEWAY);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJmsSchemaConstants.ELEM_PUBLISH_SUBSCRIBE_CHANNEL,
        Messages.IntJmsPaletteFactory_PUBLISH_SUBSCRIBE_CHANNEL_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            PublishSubscribeChannelModelElement.class, diagram, namespaceUri),
        IntegrationImages.PUBSUB_CHANNEL_SMALL, IntegrationImages.PUBSUB_CHANNEL);
    entries.add(entry);

    drawer.addAll(entries);
    return drawer;
  }
View Full Code Here

* @author Leo Dos Santos
*/
public class IntJdbcPaletteFactory implements IPaletteFactory {

  public PaletteDrawer createPaletteDrawer(AbstractConfigGraphDiagram diagram, String namespaceUri) {
    PaletteDrawer drawer = new PaletteDrawer("", IntegrationImages.BADGE_SI_JDBC); //$NON-NLS-1$
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(
        IntJdbcSchemaConstants.ELEM_INBOUND_CHANNEL_ADAPTER,
        Messages.IntJdbcPaletteFactory_INBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(InboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJdbcSchemaConstants.ELEM_OUTBOUND_CHANNEL_ADAPTER,
        Messages.IntJdbcPaletteFactory_OUTBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(OutboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_ADAPTER_SMALL, IntegrationImages.OUTBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJdbcSchemaConstants.ELEM_OUTBOUND_GATEWAY,
        Messages.IntJdbcPaletteFactory_OUTBOUND_GATEWAY_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            OutboundGatewayModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_GATEWAY_SMALL, IntegrationImages.OUTBOUND_GATEWAY);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJdbcSchemaConstants.ELEM_STORED_PROC_INBOUND_CHANNEL_ADAPTER,
        Messages.IntJdbcPaletteFactory_STORED_PROC_INBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            StoredProcInboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJdbcSchemaConstants.ELEM_STORED_PROC_OUTBOUND_CHANNEL_ADAPTER,
        Messages.IntJdbcPaletteFactory_STORED_PROC_OUTBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            StoredProcOutboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_ADAPTER_SMALL, IntegrationImages.OUTBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntJdbcSchemaConstants.ELEM_STORED_PROC_OUTBOUND_GATEWAY,
        Messages.IntJdbcPaletteFactory_STORED_PROC_OUTBOUND_GATEWAY_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            StoredProcOutboundGatewayModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_GATEWAY_SMALL, IntegrationImages.OUTBOUND_GATEWAY);
    entries.add(entry);

    drawer.addAll(entries);
    return drawer;
  }
View Full Code Here

* @author Leo Dos Santos
*/
public class IntIpPaletteFactory implements IPaletteFactory {

  public PaletteDrawer createPaletteDrawer(AbstractConfigGraphDiagram diagram, String namespaceUri) {
    PaletteDrawer drawer = new PaletteDrawer("", IntegrationImages.BADGE_SI_IP); //$NON-NLS-1$
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(
        IntIpSchemaConstants.ELEM_TCP_INBOUND_CHANNEL_ADAPTER,
        Messages.IntIpPaletteFactory_TCP_INBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(TcpInboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntIpSchemaConstants.ELEM_TCP_INBOUND_GATEWAY,
        Messages.IntIpPaletteFactory_TCP_INBOUND_GATEWAY_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(TcpInboundGatewayModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_GATEWAY_SMALL, IntegrationImages.INBOUND_GATEWAY);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntIpSchemaConstants.ELEM_TCP_OUTBOUND_CHANNEL_ADAPTER,
        Messages.IntIpPaletteFactory_TCP_OUTBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(TcpOutboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_ADAPTER_SMALL, IntegrationImages.OUTBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntIpSchemaConstants.ELEM_TCP_OUTBOUND_GATEWAY,
        Messages.IntIpPaletteFactory_TCP_OUTBOUND_GATEWAY_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(TcpOutboundGatewayModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_GATEWAY_SMALL, IntegrationImages.OUTBOUND_GATEWAY);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntIpSchemaConstants.ELEM_UDP_INBOUND_CHANNEL_ADAPTER,
        Messages.IntIpPaletteFactory_UDP_INBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(UdpInboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntIpSchemaConstants.ELEM_UDP_OUTBOUND_CHANNEL_ADAPTER,
        Messages.IntIpPaletteFactory_UDP_OUTBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(UdpOutboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_ADAPTER_SMALL, IntegrationImages.OUTBOUND_ADAPTER);
    entries.add(entry);

    drawer.addAll(entries);
    return drawer;
  }
View Full Code Here

* @author Leo Dos Santos
*/
public class IntSftpPaletteFactory implements IPaletteFactory {

  public PaletteDrawer createPaletteDrawer(AbstractConfigGraphDiagram diagram, String namespaceUri) {
    PaletteDrawer drawer = new PaletteDrawer("", IntegrationImages.BADGE_SI_SFTP); //$NON-NLS-1$
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(
        IntSftpSchemaConstants.ELEM_INBOUND_CHANNEL_ADAPTER,
        Messages.IntSftpPaletteFactory_INBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(InboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.INBOUND_ADAPTER_SMALL, IntegrationImages.INBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntSftpSchemaConstants.ELEM_OUTBOUND_CHANNEL_ADAPTER,
        Messages.IntSftpPaletteFactory_OUTBOUND_CHANNEL_ADAPTER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(OutboundChannelAdapterModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_ADAPTER_SMALL, IntegrationImages.OUTBOUND_ADAPTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntSftpSchemaConstants.ELEM_OUTBOUND_GATEWAY,
        Messages.IntSftpPaletteFactory_OUTBOUND_GATEWAY_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            OutboundGatewayModelElement.class, diagram, namespaceUri),
        IntegrationImages.OUTBOUND_GATEWAY_SMALL, IntegrationImages.OUTBOUND_GATEWAY);
    entries.add(entry);

    drawer.addAll(entries);
    return drawer;
  }
View Full Code Here

* @author Leo Dos Santos
*/
public class IntXmlPaletteFactory implements IPaletteFactory {

  public PaletteDrawer createPaletteDrawer(AbstractConfigGraphDiagram diagram, String namespaceUri) {
    PaletteDrawer drawer = new PaletteDrawer("", IntegrationImages.BADGE_SI_XML); //$NON-NLS-1$
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry entry = new CombinedTemplateCreationEntry(
        IntXmlSchemaConstants.ELEM_MARSHALLING_TRANSFORMER,
        Messages.IntXmlPaletteFactory_MARSHALLING_TRANSFORMER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(MarshallingTransformerModelElement.class, diagram, namespaceUri),
        IntegrationImages.TRANSFORMER_SMALL, IntegrationImages.TRANSFORMER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_UNMARSHALLING_TRANSFORMER,
        Messages.IntXmlPaletteFactory_UNMARSHALLING_TRANSFORMER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(UnmarshallingTransformerModelElement.class, diagram, namespaceUri),
        IntegrationImages.TRANSFORMER_SMALL, IntegrationImages.TRANSFORMER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_VALIDATING_FILTER,
        Messages.IntXmlPaletteFactory_VALIDATING_FILTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            ValidatingFilterModelElement.class, diagram, namespaceUri), IntegrationImages.FILTER_SMALL,
        IntegrationImages.FILTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_FILTER,
        Messages.IntXmlPaletteFactory_XPATH_FILTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(XpathFilterModelElement.class,
            diagram, namespaceUri), IntegrationImages.FILTER_SMALL, IntegrationImages.FILTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_HEADER_ENRICHER,
        Messages.IntXmlPaletteFactory_XPATH_HEADER_ENRICHER_COMPONENT_DESCRIPTION,
        new ModelElementCreationFactory(XpathHeaderEnricherModelElement.class, diagram, namespaceUri),
        IntegrationImages.ENRICHER_SMALL, IntegrationImages.ENRICHER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_ROUTER,
        Messages.IntXmlPaletteFactory_XPATH_ROUTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            XpathRouterModelElement.class, diagram, namespaceUri), IntegrationImages.ROUTER_SMALL,
        IntegrationImages.ROUTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_SPLITTER,
        Messages.IntXmlPaletteFactory_XPATH_SPLITTER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            XpathSplitterModelElement.class, diagram, namespaceUri), IntegrationImages.SPLITTER_SMALL,
        IntegrationImages.SPLITTER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XPATH_TRANSFORMER,
        Messages.IntXmlPaletteFactory_XPATH_TRANSFORMER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            XpathTransformerModelElement.class, diagram, namespaceUri),
        IntegrationImages.TRANSFORMER_SMALL, IntegrationImages.TRANSFORMER);
    entries.add(entry);

    entry = new CombinedTemplateCreationEntry(IntXmlSchemaConstants.ELEM_XSLT_TRANSFORMER,
        Messages.IntXmlPaletteFactory_XSLT_TRANSFORMER_COMPONENT_DESCRIPTION, new ModelElementCreationFactory(
            XslTransformerModelElement.class, diagram, namespaceUri), IntegrationImages.TRANSFORMER_SMALL,
        IntegrationImages.TRANSFORMER);
    entries.add(entry);

    drawer.addAll(entries);
    return drawer;
  }
View Full Code Here

          Object obj = config
              .createExecutableExtension(PageAdaptersExtensionPointConstants.ATTR_PALETTE_FACTORY);
          String label = config.getAttribute(PageAdaptersExtensionPointConstants.ATTR_LABEL);
          if (obj instanceof IPaletteFactory) {
            IPaletteFactory factory = (IPaletteFactory) obj;
            PaletteDrawer drawer = factory.createPaletteDrawer(getDiagram(), uri);
            if (drawer != null) {
              drawer.setLabel(label);
              drawer.setInitialState(PaletteDrawer.INITIAL_STATE_CLOSED);
              adapterDrawers.add(drawer);
            }
          }
        }
        catch (CoreException e) {
View Full Code Here

TOP

Related Classes of org.eclipse.gef.palette.PaletteDrawer

Copyright © 2018 www.massapicom. 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.