Package prefuse.util.collections

Examples of prefuse.util.collections.CopyOnWriteArrayList


        if ( pc!=VARARGS && paramCount()+1 > pc ) {
            throw new IllegalStateException(
                "This function takes only "+pc+" parameters.");
        }
        if ( m_params == null )
            m_params = new CopyOnWriteArrayList();
        m_params.add(e);
    }
View Full Code Here


     * about paint events.
     * @param pl the {@link prefuse.util.display.PaintListener} to add
     */
    public void addPaintListener(PaintListener pl) {
        if ( m_painters == null )
            m_painters = new CopyOnWriteArrayList();
        m_painters.add(pl);
    }
View Full Code Here

     * occupied by the VisualItems in this Display change.
     * @param ibl the {@link prefuse.util.display.ItemBoundsListener} to add
     */
    public void addItemBoundsListener(ItemBoundsListener ibl) {
        if ( m_bounders == null )
            m_bounders = new CopyOnWriteArrayList();
        m_bounders.add(ibl);
    }
View Full Code Here

        if ( pc!=VARARGS && paramCount()+1 > pc ) {
            throw new IllegalStateException(
                "This function takes only "+pc+" parameters.");
        }
        if ( m_params == null )
            m_params = new CopyOnWriteArrayList();
        m_params.add(e);
    }
View Full Code Here

     * @param nrows the starting number of table rows
     * @param ncols the starting capacity for columns
     * @param tupleType the class of the Tuple instances to use
     */
    protected Table(int nrows, int ncols, Class tupleType) {
        m_listeners = new CopyOnWriteArrayList();
        m_columns = new ArrayList(ncols);
        m_names = new ArrayList(ncols);
        m_rows = new RowManager(this);
        m_entries = new HashMap(ncols+5);       
        m_tuples = new TupleManager(this, null, tupleType);
View Full Code Here

    /**
     * @see prefuse.data.util.ColumnProjection#addProjectionListener(prefuse.data.event.ProjectionListener)
     */
    public void addProjectionListener(ProjectionListener lstnr) {
        if ( m_listeners == null )
            m_listeners = new CopyOnWriteArrayList();
        if ( !m_listeners.contains(lstnr) )
            m_listeners.add(lstnr);
    }
View Full Code Here

        DataParser p = ParserFactory.getDefaultFactory().getParser(columnType);
        m_parser = ( p==null ? new ObjectParser() : p );
       
        setDefaultValue(defaultValue);
        m_readOnly = false;
        m_listeners = new CopyOnWriteArrayList();
    }
View Full Code Here

    /**
     * @see prefuse.data.tuple.TupleSet#addTupleSetListener(prefuse.data.event.TupleSetListener)
     */
    public void addTupleSetListener(TupleSetListener tsl) {
        if ( m_tupleListeners == null )
            m_tupleListeners = new CopyOnWriteArrayList();
        if ( !m_tupleListeners.contains(tsl) )
            m_tupleListeners.add(tsl);
    }
View Full Code Here

     */
    public synchronized static void submit(Entry e)
    {
        // perform lazily initialization as needed
        if ( s_queue == null )
            s_queue = new CopyOnWriteArrayList();
        if ( s_instance == null )
            s_instance = new DataSourceWorker();
       
        // queue it up
        s_queue.add(e);
View Full Code Here

        if ( fields == null ) {
            throw new IllegalArgumentException();
        }
       
        if ( m_colorFields == null )
            m_colorFields = new CopyOnWriteArrayList();
        else
            m_colorFields.clear();
       
        for ( int i=0; i<fields.length; ++i ) {
            m_colorFields.add(fields[i]);
View Full Code Here

TOP

Related Classes of prefuse.util.collections.CopyOnWriteArrayList

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.