Package prefuse.data.expression

Examples of prefuse.data.expression.OrPredicate


        initModel();
    }
   
    private void initPredicate() {
        // set up predicate
        OrPredicate orP = new OrPredicate();
        orP.add(BooleanLiteral.TRUE);
        setPredicate(orP);
    }
View Full Code Here


   
    private class Listener implements ListSelectionListener {

        public void valueChanged(ListSelectionEvent e) {
            ListModel model = (ListModel)e.getSource();
            OrPredicate orP = (OrPredicate)m_query;
           
            if ( model.isSelectionEmpty() )
            {
                orP.clear();
            }
            else if ( m_includeAll && model.isSelectedIndex(0) )
            {
                orP.set(BooleanLiteral.TRUE);
            }
            else
            {
                int min   = model.getMinSelectionIndex();
                int max   = model.getMaxSelectionIndex();
                int count = 0;
                for ( int i=min; i<=max; ++i ) {
                    if ( model.isSelectedIndex(i) )
                        ++count;
                }
           
                if ( count == model.getSize() ) {
                    orP.set(BooleanLiteral.TRUE);
                } else if ( count == 1 ) {
                    orP.set(getComparison(model.getElementAt(min)));
                } else {
                    Predicate[] p = new Predicate[count];
                    for ( int i=min, j=0; i<=max; ++i ) {
                        if ( model.isSelectedIndex(i) )
                            p[j++] = getComparison(model.getElementAt(i));
                    }
                    orP.set(p);
                }
            }
        }
View Full Code Here

      jj_consume_token(OR);
      r = XorExpression();
      if ( l instanceof OrPredicate ) {
          ((OrPredicate)l).add((Predicate)r);
      } else {
          l = new OrPredicate((Predicate)l,(Predicate)r);
      }
    }
       {if (true) return l;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

     * Set the test predicate used to determine visibility.
     * @param p the test predicate to set
     */
    protected void setPredicate(Predicate p) {
        m_predicate = p;
        m_filter = new OrPredicate(p, VisiblePredicate.TRUE);
    }
View Full Code Here

TOP

Related Classes of prefuse.data.expression.OrPredicate

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.