Package org.jamesii.core

Examples of org.jamesii.core.Registry


  /**
   * Instantiates a new selection hook singleton.
   */
  private SelectionHookSingleton() {
    Registry registry = SimSystem.getRegistry();
    selectionHook = new SelectionHook(registry.getFactorySelectionHook());
    registry.installFactorySelectionHook(selectionHook);
  }
View Full Code Here


   * Helper method that checks the JAMES II registry for look and feel plugins
   * and loads them if available
   */
  private synchronized void checkRegistry() {
    // also load look and feels available through registry if registry is loaded
    Registry registry = SimSystem.getRegistry();
    if (registry != null && !registryChecked) {
      try {
        List<LookAndFeelFactory> factories =
            registry.getFactories(LookAndFeelFactory.class);
        if (factories == null) {
          factories = new ArrayList<>();
        }

        for (LookAndFeelFactory f : factories) {
View Full Code Here

    addResourceProvider(ImageResourceProvider.getInstance());
    addResourceProvider(IconResourceProvider.getInstance());
    addResourceProvider(InputStreamResourceProvider.getInstance());
    addResourceProvider(TextfileResourceProvider.getInstance());

    Registry registry = SimSystem.getRegistry();

    if (registry != null) {
      List<ResourceProviderFactory> providerFactories = null;
      try {
        providerFactories =
View Full Code Here

   *          The type for which a value mapper is needed.
   * @return An instance of a value mapper that handles the given type or
   *         {@code null} if none is found.
   */
  static ICAValueMapper getValueMapperFor(Class<?> c) {
    Registry registry = SimSystem.getRegistry();
    List<CAValueMapperFactory> factories =
        registry.getFactories(CAValueMapperFactory.class);
    for (CAValueMapperFactory f : factories) {
      if (f.supports(c)) {
        return f.createValueMapper(null);
      }
    }
View Full Code Here

   *          The type for which an editor is needed.
   * @return An instance of an editor fitting the given type or {@code null} if
   *         none is found.
   */
  public static ICAValueMapperEditor getValueMapperEditorFor(Class<?> c) {
    Registry registry = SimSystem.getRegistry();
    List<CAValueMapperEditorFactory> factories =
        registry.getFactories(CAValueMapperEditorFactory.class);
    for (CAValueMapperEditorFactory f : factories) {
      if (f.supports(c)) {
        return f.createValueMapperEditor(c);
      }
    }
View Full Code Here

   * @return a list of available highlighters for given input object
   */
  public static List<IHighlighter> getAvailableHighlightersFor(
      Object objectToSupport) {
    List<IHighlighter> highlighters = new ArrayList<>();
    Registry registry = SimSystem.getRegistry();

    if (registry != null) {
      List<HighlightingFactory> highlightingFactories =
          SimSystem.getRegistry().getFactories(HighlightingFactory.class);

View Full Code Here

  /**
   * helper function that initializes the list of available perspectives
   */
  private synchronized void initPerspectives() {
    // search for plugins implementing PerspectiveFactory
    Registry registry = SimSystem.getRegistry();

    if (registry != null) {
      List<PerspectiveFactory> perspFactories = null;
      perspFactories =
          SimSystem.getRegistry().getFactories(PerspectiveFactory.class);
View Full Code Here

  /**
   * Helper method that initializes the icon set to use
   */
  private void initIconSet() {
    Registry registry = SimSystem.getRegistry();
    if (registry != null) {
      List<IconSetFactory> iconSetFactories =
          SimSystem.getRegistry().getFactories(IconSetFactory.class);

      if (iconSetFactories == null) {
View Full Code Here

TOP

Related Classes of org.jamesii.core.Registry

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.