本文整理了Java中org.protege.editor.core.ui.view.View.getViewComponent()
方法的一些代码示例,展示了View.getViewComponent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。View.getViewComponent()
方法的具体详情如下:
包路径:org.protege.editor.core.ui.view.View
类名称:View
方法名:getViewComponent
[英]Gets the component that actually displays the view.
[中]获取实际显示视图的组件。
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
public AbstractOWLViewComponent getOWLViewComponent() {
return (AbstractOWLViewComponent) getView().getViewComponent();
}
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application
public void windowClosing(WindowEvent e) {
try {
view.dispose();
view.getViewComponent().dispose();
}
catch (Exception e1) {
logger.warn("BAD VIEW: (" + view.getViewComponent().getClass().getSimpleName() + ") - exception on dispose: " + e1.getMessage());
}
}
});
代码示例来源:origin: protegeproject/protege
public void windowClosing(WindowEvent e) {
try {
view.dispose();
view.getViewComponent().dispose();
}
catch (Exception e1) {
logger.warn("BAD VIEW: (" + view.getViewComponent().getClass().getSimpleName() + ") - exception on dispose: " + e1.getMessage());
}
}
});
代码示例来源:origin: protegeproject/protege
public AbstractOWLViewComponent getOWLViewComponent() {
return (AbstractOWLViewComponent) getView().getViewComponent();
}
}
代码示例来源:origin: org.protege/protege-editor-core-application
public void windowClosing(WindowEvent e) {
try {
view.dispose();
view.getViewComponent().dispose();
}
catch (Exception e1) {
logger.warn("BAD VIEW: (" + view.getViewComponent().getClass().getSimpleName() + ") - exception on dispose: " + e1.getMessage());
}
}
});
代码示例来源:origin: org.protege/protege-editor-owl
public AbstractOWLViewComponent getOWLViewComponent() {
return (AbstractOWLViewComponent) getView().getViewComponent();
}
}
代码示例来源:origin: edu.stanford.protege/protege-editor-owl
public AbstractOWLViewComponent getOWLViewComponent() {
return (AbstractOWLViewComponent) getView().getViewComponent();
}
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application
public void reset() {
for (View view : viewsPane.getViews()) {
if (view.getViewComponent() != null) {
if (view.getViewComponent() instanceof Resettable) {
((Resettable) view.getViewComponent()).reset();
}
}
}
getWorkspace().getViewManager().unregisterViews(this);
remove(viewsPane);
viewsPane.dispose();
ViewsPaneMemento memento = new ViewsPaneMemento(this);
memento.setForceReset(true);
viewsPane = new ViewsPane(getWorkspace(), memento);
add(viewsPane, BorderLayout.CENTER);
getWorkspace().getViewManager().registerViews(this);
}
代码示例来源:origin: protegeproject/protege
public void reset() {
for (View view : viewsPane.getViews()) {
if (view.getViewComponent() != null) {
if (view.getViewComponent() instanceof Resettable) {
((Resettable) view.getViewComponent()).reset();
}
}
}
getWorkspace().getViewManager().unregisterViews(this);
remove(viewsPane);
viewsPane.dispose();
ViewsPaneMemento memento = new ViewsPaneMemento(this);
memento.setForceReset(true);
viewsPane = new ViewsPane(getWorkspace(), memento);
add(viewsPane, BorderLayout.CENTER);
getWorkspace().getViewManager().registerViews(this);
}
代码示例来源:origin: org.protege/protege-editor-core-application
public void reset() {
for (View view : viewsPane.getViews()) {
if (view.getViewComponent() != null) {
if (view.getViewComponent() instanceof Resettable) {
((Resettable) view.getViewComponent()).reset();
}
}
}
getWorkspace().getViewManager().unregisterViews(this);
remove(viewsPane);
viewsPane.dispose();
ViewsPaneMemento memento = new ViewsPaneMemento(this);
memento.setForceReset(true);
viewsPane = new ViewsPane(getWorkspace(), memento);
add(viewsPane, BorderLayout.CENTER);
getWorkspace().getViewManager().registerViews(this);
}
代码示例来源:origin: protegeproject/protege
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 && vc instanceof SelectionDriver){
final AbstractOWLSelectionViewComponent owlEntityViewComponent = (AbstractOWLSelectionViewComponent)vc;
if (owlEntityViewComponent.canShowEntity(owlEntity)){
lastEntityDisplayCandidate = Optional.of(view);
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)){
lastEntityDisplayCandidate = Optional.of(view);
return true;
}
}
}
}
}
return false;
}
代码示例来源:origin: edu.stanford.protege/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 && vc instanceof SelectionDriver){
final AbstractOWLSelectionViewComponent owlEntityViewComponent = (AbstractOWLSelectionViewComponent)vc;
if (owlEntityViewComponent.canShowEntity(owlEntity)){
lastEntityDisplayCandidate = Optional.of(view);
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)){
lastEntityDisplayCandidate = Optional.of(view);
return true;
}
}
}
}
}
return false;
}
代码示例来源: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;
}
代码示例来源:origin: org.protege/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;
}
内容来源于网络,如有侵权,请联系作者删除!