Examples of CheckNode


Examples of org.jpedal.examples.simpleviewer.gui.CheckNode

       
        if(i<nodes.getLength()){
          String name = nodes.item(i).getNodeName();
          if(!name.startsWith("#")){
            //Node to add
            CheckNode newLeaf = new CheckNode(Messages.getMessage("PdfCustomGui."+name));
            newLeaf.setEnabled(true);
            //Set to reversedMessage for saving of preferences
            reverseMessage.put(Messages.getMessage("PdfCustomGui."+name), name);
            String propValue = properties.getValue(name);
            //Set if should be selected
            if(propValue.length()>0 && propValue.equals("true")){
              newLeaf.setSelected(true);
            }else{
              newLeaf.setSelected(false);
            }
           
            //If has child nodes
            if(nodes.item(i).hasChildNodes()){
              //Store this top value
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.CheckNode

              if(scrollComponents[k] instanceof JViewport){
                Component[] viewportComponents = ((JViewport)scrollComponents[k]).getComponents();
                for(int l=0; l!=viewportComponents.length; l++){
                  if(viewportComponents[l] instanceof JTree){
                    JTree tree = ((JTree)viewportComponents[l]);
                    CheckNode root = (CheckNode)tree.getModel().getRoot();
                    if(root.getChildCount()>0){
                      saveMenuPreferencesChildren(root, gui);
                    }
                  }
                }
              }
View Full Code Here

Examples of org.jpedal.examples.simpleviewer.gui.CheckNode

    }
  }

  private void saveMenuPreferencesChildren(CheckNode root, SwingGUI gui){
    for(int i=0; i!=root.getChildCount(); i++){
      CheckNode node = (CheckNode)root.getChildAt(i);
      String value = ((String)reverseMessage.get(node.getText()));
      if(node.isSelected()){
        properties.setValue(value, "true");
        gui.alterProperty(value, true);
      }else{
        properties.setValue(value, "false");
        gui.alterProperty(value, false);
      }

      if(node.getChildCount()>0){
        saveMenuPreferencesChildren(node, gui);
      }
    }
  }
View Full Code Here

Examples of ru.spbu.math.ontologycomparison.zhukova.visualisation.ui.tree.CheckNode

        this.title = title;
        this.roots = roots;
    }

    public IPair<TreeModel, SetHashTable<IOntologyConcept,CheckNode>> buildTree(boolean unmappedNoSynsetVisible, boolean unmappedWithSynsetVisible) {
        CheckNode root = new CheckNode(title, true, Color.BLACK);
        SetHashTable<IOntologyConcept, CheckNode> conceptToNodeMap = new SetHashTable<IOntologyConcept, CheckNode>();
        for (IOntologyConcept parent : this.roots) {
            CheckNode parentNode = new CheckNode(parent, isSelected(parent.hasMappedConcepts(), parent.hasSynsets(), unmappedNoSynsetVisible, unmappedWithSynsetVisible), getColor(parent.hasMappedConcepts(), parent.hasSynsets()));
            conceptToNodeMap.insert(parent, parentNode);
            addChildrenRecursively(parent, parentNode, conceptToNodeMap, unmappedNoSynsetVisible, unmappedWithSynsetVisible);
            root.add(parentNode);
        }
        final TreeModel tree = new DefaultTreeModel(root);
View Full Code Here

Examples of ru.spbu.math.ontologycomparison.zhukova.visualisation.ui.tree.CheckNode

        }
    }

    private void addChildrenRecursively(IOntologyConcept parent, CheckNode parentNode, SetHashTable<IOntologyConcept, CheckNode> conceptToNodeMap, boolean unmappedNoSynsetVisible, boolean unmappedWithSynsetVisible) {
        for (IOntologyConcept child : parent.getChildren()) {
            CheckNode childNode = new CheckNode(child, isSelected(child.hasMappedConcepts(), child.hasSynsets(), unmappedNoSynsetVisible, unmappedWithSynsetVisible), getColor(child.hasMappedConcepts(), child.hasSynsets()));
            conceptToNodeMap.insert(child, childNode);
            addChildrenRecursively(child, childNode, conceptToNodeMap, unmappedNoSynsetVisible, unmappedWithSynsetVisible);
            parentNode.add(childNode);
        }
    }
View Full Code Here

Examples of ru.spbu.math.ontologycomparison.zhukova.visualisation.ui.tree.CheckNode

    }

    public void visitRow(boolean select, int selectionMode, boolean hide) {
        TreePath treePath = tree.getPathForRow(row);
        if (treePath != null && graphPane != null) {
            CheckNode node = (CheckNode) treePath.getLastPathComponent();
            ArrayList<CheckNode> nodes = new ArrayList<CheckNode>();
            node.setSelected(select, selectionMode, nodes);
            IGraphModel graphModel = graphPane.getGraphModel();
            for (CheckNode checkNode : nodes) {
                Object object = checkNode.getUserObject();
                if (!(object instanceof IOntologyConcept)) {
                    continue;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.