Package com.pugh.sockso.music

Examples of com.pugh.sockso.music.MusicItem


        if ( value.getClass().equals(MusicTreeNode.class) ) {
           
            // @TODO move icon fetching to MusicItem class

            final MusicTreeNode node = (MusicTreeNode) value;
            final MusicItem item = (MusicItem) node.getUserObject();
            final String type = item.getType();

            if ( type.equals(MusicItem.COLLECTION) ) {
                setIcon( new ImageIcon(r.getImage("icons/16x16/collection.png")) );
            }
View Full Code Here


        final TreePath path = evt.getPath();
       
        try {

            final MusicTreeNode node = (MusicTreeNode) path.getLastPathComponent();
            final MusicItem item = (MusicItem) node.getUserObject();

            if ( item.getType().equals(MusicItem.ARTIST) ) {
                fillArtistNode( node, item );
            }

            else if ( item.getType().equals(MusicItem.ALBUM) ) {
                fillAlbumNode( node, item );
            }

        }
View Full Code Here

    public void drop( DropTargetDropEvent evt ) {
       
        try {
           
            Transferable trans = evt.getTransferable();
            MusicItem item = (MusicItem) trans.getTransferData( MusicItem.MUSIC_ITEM_FLAVOR );

            // is it an internal move?
            if ( dummyIndex != -1 ) {
                model.removeElementAt( dummyIndex );
                model.insertElementAt( dragItem, dummyIndex );
View Full Code Here

            MusicItem.ARTIST,
            MusicItem.ALBUM,
            MusicItem.TRACK,
        };
        for ( String type : types ) {
            MusicItem item = new MusicItem( type, 1, "foo" );
            rend.getTreeCellRendererComponent( new JTree(), new MusicTreeNode(item), true,true,false,0,true );
        }
    }
View Full Code Here

TOP

Related Classes of com.pugh.sockso.music.MusicItem

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.