Usages of

org.deckfour.uitopia.api.model.ViewType.getPrimaryType()
public void registerResourceType(final ResourceType type) { viewClasses.put(type.getTypeClass(), new ArrayList<ViewType>(0)); Set<Pair<Integer, PluginParameterBinding>> visualizers = context.getPluginManager().find(Visualizer.class, JComponent.class, UIPluginContext.class, true, false, true, type.getTypeClass()); Set<Pair<Integer, PluginParameterBinding>> cancellableVisualizers = context.getPluginManager().find(Visualizer.class, JComponent.class, UIPluginContext.class, true, false, true, type.getTypeClass(), ProMCanceller.class); for (Pair<Integer, PluginParameterBinding> binding : visualizers) { viewClasses.get(type.getTypeClass()).add(new ProMViewType(this, type, binding)); } for (Pair<Integer, PluginParameterBinding> binding : cancellableVisualizers) { viewClasses.get(type.getTypeClass()).add(new ProMViewType(this, type, binding)); } Collections.sort(viewClasses.get(type.getTypeClass()), new Comparator<ViewType>() { public int compare(ViewType o1, ViewType o2) { if (o1 == o2 || o1.equals(o2)) { return 0; } boolean isO1ExactMatch = o1.getPrimaryType() == type.getTypeClass(); boolean isO2ExactMatch = o2.getPrimaryType() == type.getTypeClass(); if (isO1ExactMatch && !isO2ExactMatch) { return -1; } else if (!isO1ExactMatch && isO2ExactMatch) { return 1; } else { return 0; } } }); }
public void registerResourceType(final ResourceType type) { viewClasses.put(type.getTypeClass(), new ArrayList<ViewType>(0)); Set<Pair<Integer, PluginParameterBinding>> visualizers = context.getPluginManager().find(Visualizer.class, JComponent.class, UIPluginContext.class, true, false, true, type.getTypeClass()); Set<Pair<Integer, PluginParameterBinding>> cancellableVisualizers = context.getPluginManager().find( Visualizer.class, JComponent.class, UIPluginContext.class, true, false, true, type.getTypeClass(), ProMCanceller.class); for (Pair<Integer, PluginParameterBinding> binding : visualizers) { viewClasses.get(type.getTypeClass()).add(new ProMViewType(this, type, binding)); } for (Pair<Integer, PluginParameterBinding> binding : cancellableVisualizers) { viewClasses.get(type.getTypeClass()).add(new ProMViewType(this, type, binding)); } Collections.sort(viewClasses.get(type.getTypeClass()), new Comparator<ViewType>() { public int compare(ViewType o1, ViewType o2) { if ((o1 == o2) || o1.equals(o2)) { return 0; } boolean isO1ExactMatch = o1.getPrimaryType() == type.getTypeClass(); boolean isO2ExactMatch = o2.getPrimaryType() == type.getTypeClass(); if (isO1ExactMatch && !isO2ExactMatch) { return -1; } else if (!isO1ExactMatch && isO2ExactMatch) { return 1; } else { return 0; } } }); }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes