Package uk.ac.man.cs.mig.coode.owlviz.ui.options

Examples of uk.ac.man.cs.mig.coode.owlviz.ui.options.OWLVizOptions


*/
public class OWLKBAssertedGraphModel extends OWLKBAbstractGraphModel {

  public OWLKBAssertedGraphModel(OWLModel model) {
    super(model);
    final OWLVizOptions options = OWLVizOptions.getInstance();
    model.addKnowledgeBaseListener(new KnowledgeBaseAdapter() {
      public void clsCreated(KnowledgeBaseEvent event) {
        ArrayList list = new ArrayList(1);
        list.add(event.getCls());
        fireObjectsAddedEvent(list);
      }


      public void clsDeleted(KnowledgeBaseEvent event) {
        ArrayList list = new ArrayList(1);
        list.add(event.getCls());
        fireObjectsRemovedEvent(list);
      }
    });
    model.addClsListener(new ClsListener() {
      public void directInstanceAdded(ClsEvent event) {
        if(options.isDisplayIndividuals() == true) {
          fireChildAddedEvent(event.getCls(), event.getInstance());
        }
      }


      public void directInstanceRemoved(ClsEvent event) {
        if(options.isDisplayIndividuals() == true) {
          fireChildRemovedEvent(event.getCls(), event.getInstance());
        }
      }


View Full Code Here

TOP

Related Classes of uk.ac.man.cs.mig.coode.owlviz.ui.options.OWLVizOptions

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.