org.protege.editor.core.ui.view.View.getId()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(224)

本文整理了Java中org.protege.editor.core.ui.view.View.getId()方法的一些代码示例,展示了View.getId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.getId()方法的具体详情如下:
包路径:org.protege.editor.core.ui.view.View
类名称:View
方法名:getId

View.getId介绍

[英]Gets the ViewComponentPlugin Id. This is typically used to configure actions (toolbar buttons) for this view.
[中]获取ViewComponentPluginId。这通常用于为此视图配置操作(工具栏按钮)。

代码示例

代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application

public Map<String, String> getProperties(JComponent component) {
    if (component instanceof View == false) {
      logger.debug("Component is not a View - ignoring");
      return Collections.EMPTY_MAP;
    }
    View view = (View) component;
    Map<String, String> map = new HashMap<String, String>();
    map.put("pluginId", view.getId());
    return map;
  }
}

代码示例来源:origin: protegeproject/protege

public Map<String, String> getProperties(JComponent component) {
    if (!(component instanceof View)) {
      logger.debug("Component is not a View - ignoring");
      return Collections.emptyMap();
    }
    View view = (View) component;
    Map<String, String> map = new HashMap<>();
    map.put("pluginId", view.getId());
    return map;
  }
}

代码示例来源:origin: org.protege/protege-editor-core-application

public Map<String, String> getProperties(JComponent component) {
    if (component instanceof View == false) {
      logger.debug("Component is not a View - ignoring");
      return Collections.EMPTY_MAP;
    }
    View view = (View) component;
    Map<String, String> map = new HashMap<String, String>();
    map.put("pluginId", view.getId());
    return map;
  }
}

代码示例来源:origin: protegeproject/protege

private View getView(String id, Component c) {
  Collection<View> views = UIUtil.getComponentsExtending(c, View.class);
  for (View view : views) {
    if (view.getId().equals(id)) {
      return view;
    }
  }
  return null;
}

代码示例来源:origin: protegeproject/protege

public void bringViewToFront(String id) {
  for (View view : getViews()) {
    if (view.getId() != null && view.getId().equals(id)) {
      Util.bringToFront(view);
      // Carry on until all views with the specified
      // view id are in front
    }
  }
}

代码示例来源:origin: org.protege/protege-editor-core-application

public void bringViewToFront(String id) {
  for (View view : getViews()) {
    if (view.getId() != null && view.getId().equals(id)) {
      Util.bringToFront(view);
      // Carry on until all views with the specified
      // view id are in front
    }
  }
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application

private View getView(String id, Component c) {
  Collection<View> views = UIUtil.getComponentsExtending(c, View.class);
  for (View view : views) {
    if (view.getId().equals(id)) {
      return view;
    }
  }
  return null;
}

代码示例来源:origin: protegeproject/protege

public boolean containsView(String id) {
  for (View view : getViews()) {
    if (id.equals(view.getId())) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application

public boolean containsView(String id) {
  for (View view : getViews()) {
    if (id.equals(view.getId())) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: org.protege/protege-editor-core-application

public boolean containsView(String id) {
  for (View view : getViews()) {
    if (id.equals(view.getId())) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application

public void bringViewToFront(String id) {
  for (View view : getViews()) {
    if (view.getId() != null && view.getId().equals(id)) {
      Util.bringToFront(view);
      // Carry on until all views with the specified
      // view id are in front
    }
  }
}

代码示例来源:origin: org.protege/protege-editor-core-application

private View getView(String id, Component c) {
  Collection<View> views = UIUtil.getComponentsExtending(c, View.class);
  for (View view : views) {
    if (view.getId().equals(id)) {
      return view;
    }
  }
  return null;
}

代码示例来源:origin: protegeproject/protege

/**
 * This method needs to be overriden to provide a
 * <code>PluginExtensionMatcher</code>, which is used to filter
 * the plugin extensions to a desired subset.
 */
protected PluginExtensionMatcher getExtensionMatcher() {
  PluginParameterExtensionMatcher matcher = new PluginParameterExtensionMatcher();
  matcher.put(ViewActionPluginJPFImpl.VIEW_ID_PARAM, view.getId());
  return matcher;
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application

/**
 * This method needs to be overriden to provide a
 * <code>PluginExtensionMatcher</code>, which is used to filter
 * the plugin extensions to a desired subset.
 */
protected PluginExtensionMatcher getExtensionMatcher() {
  PluginParameterExtensionMatcher matcher = new PluginParameterExtensionMatcher();
  matcher.put(ViewActionPluginJPFImpl.VIEW_ID_PARAM, view.getId());
  return matcher;
}

代码示例来源:origin: org.protege/protege-editor-core-application

/**
 * This method needs to be overriden to provide a
 * <code>PluginExtensionMatcher</code>, which is used to filter
 * the plugin extensions to a desired subset.
 */
protected PluginExtensionMatcher getExtensionMatcher() {
  PluginParameterExtensionMatcher matcher = new PluginParameterExtensionMatcher();
  matcher.put(ViewActionPluginJPFImpl.VIEW_ID_PARAM, view.getId());
  return matcher;
}

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

private boolean canNavigate(String type){
  ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(getView().getId());
  return plugin != null && plugin.getNavigates().contains(ProtegeProperties.getInstance().getProperty(type));
}

代码示例来源:origin: org.protege/protege-editor-owl

private boolean canNavigate(String type){
  ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(getView().getId());
  return plugin != null && plugin.getNavigates().contains(ProtegeProperties.getInstance().getProperty(type));
}

代码示例来源:origin: protegeproject/protege

private boolean canNavigate(String type){
  ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(getView().getId());
  return plugin != null && plugin.getNavigates().contains(ProtegeProperties.getInstance().getProperty(type));
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

private boolean canNavigate(String type){
  ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(getView().getId());
  return plugin != null && plugin.getNavigates().contains(ProtegeProperties.getInstance().getProperty(type));
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

private boolean canDisplay(OWLEntity owlEntity) {
  String entityCat = new NavFinder().getNav(owlEntity);
  // search the contained views to see if there is one that can show the entity
  for (View view : getViewsPane().getViews()){
    ViewComponent vc = view.getViewComponent();
    if (vc != null){ // if the view is on a tab that has been initialised ask it directly
      if (vc instanceof AbstractOWLSelectionViewComponent){
        final AbstractOWLSelectionViewComponent owlEntityViewComponent = (AbstractOWLSelectionViewComponent)vc;
        if (owlEntityViewComponent.canShowEntity(owlEntity)){
          return true;
        }
      }
    }
    else { // otherwise, ask its plugin
      ViewComponentPlugin plugin = getWorkspace().getViewManager().getViewComponentPlugin(view.getId());
      if (plugin != null) {
        for (String nav : plugin.getNavigates()){
          if (entityCat.equals(nav)){
            return true;
          }
        }
      }
    }
  }
  return false;
}

相关文章