[Bluemusic-commits] SF.net SVN: bluemusic:[4188] blue/trunk/blue-ui-core/src/blue
Brought to you by:
kunstmusik
From: <kun...@us...> - 2010-03-28 02:55:17
|
Revision: 4188 http://bluemusic.svn.sourceforge.net/bluemusic/?rev=4188&view=rev Author: kunstmusik Date: 2010-03-28 02:55:08 +0000 (Sun, 28 Mar 2010) Log Message: ----------- removed unused classes Removed Paths: ------------- blue/trunk/blue-ui-core/src/blue/AudioFileDependencyDialog.java blue/trunk/blue-ui-core/src/blue/SplashScreen.java Deleted: blue/trunk/blue-ui-core/src/blue/AudioFileDependencyDialog.java =================================================================== --- blue/trunk/blue-ui-core/src/blue/AudioFileDependencyDialog.java 2010-03-27 03:08:56 UTC (rev 4187) +++ blue/trunk/blue-ui-core/src/blue/AudioFileDependencyDialog.java 2010-03-28 02:55:08 UTC (rev 4188) @@ -1,184 +0,0 @@ -/* - * blue - object composition environment for csound - * Copyright (c) 2000-2005 Steven Yi (ste...@gm...) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation; either version 2 of the License or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING.LIB. If not, write to - * the Free Software Foundation Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307 USA - */ -package blue; - -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JScrollPane; -import javax.swing.JTable; -import javax.swing.table.AbstractTableModel; - -import blue.utility.GUI; - -import com.l2fprod.common.swing.BaseDialog; - -public class AudioFileDependencyDialog extends BaseDialog { - - DependencyTableModel model = new DependencyTableModel(); - - JFileChooser fChooser = null; - - public AudioFileDependencyDialog() { - super((JFrame) null, "Audio File Dependencies", true); - this.getBanner().setTitle("Locate Missing Audio Files"); - - this.setModal(true); - - this.setDefaultCloseOperation(HIDE_ON_CLOSE); - - final JTable table = new JTable(model); - - table.addMouseListener(new MouseAdapter() { - - public void mouseClicked(MouseEvent e) { - int row = table.getSelectedRow(); - - if (row >= model.getRowCount()) { - return; - } - - if (e.getClickCount() == 2) { - if (fChooser == null) { - fChooser = new JFileChooser(); - fChooser.setDialogTitle("Choose Replacement File"); - } - - int retVal = fChooser.showOpenDialog(null); - - File f = fChooser.getSelectedFile(); - - if (retVal == JFileChooser.APPROVE_OPTION) { - model.setValueAt(f.getPath(), row, 1); - } - } - } - - }); - - JScrollPane jsp = new JScrollPane(table); - - this.getContentPane().add(jsp); - - this.setSize(400, 500); - - GUI.centerOnScreen(this); - } - - public void setFilesList(ArrayList filesList) { - model.setFilesList(filesList); - } - - public HashMap getFilesMap() { - return model.getFilesMap(); - } - - /** - * @param args - */ - public static void main(String[] args) { - GUI.setBlueLookAndFeel(); - AudioFileDependencyDialog aDialog = new AudioFileDependencyDialog(); - ArrayList<String> fList = new ArrayList<String>(); - - fList.add("test1"); - fList.add("test2"); - fList.add("test3"); - - aDialog.setFilesList(fList); - boolean value = aDialog.ask(); - System.exit(0); - } - - static class DependencyTableModel extends AbstractTableModel { - - ArrayList filesList = null; - - ArrayList<String> returnList = null; - - public void setFilesList(ArrayList filesList) { - this.filesList = filesList; - this.returnList = new ArrayList<String>(); - - for (int i = 0; i < filesList.size(); i++) { - returnList.add(""); - } - } - - public int getColumnCount() { - // TODO Auto-generated method stub - return 2; - } - - public int getRowCount() { - return (filesList == null) ? 0 : filesList.size(); - } - - public Object getValueAt(int rowIndex, int columnIndex) { - if (columnIndex == 0) { - return filesList.get(rowIndex); - } - - return returnList.get(rowIndex); - - } - - // public boolean isCellEditable(int rowIndex, int columnIndex) { - // return columnIndex == 1; - // } - - public void setValueAt(Object aValue, int rowIndex, int columnIndex) { - if (columnIndex != 1) { - return; - } - - returnList.set(rowIndex, (String)aValue); - fireTableCellUpdated(rowIndex, columnIndex); - } - - public String getColumnName(int column) { - if (column == 0) { - return "Original File"; - } - return "New File"; - } - - public HashMap getFilesMap() { - HashMap filesMap = new HashMap(); - - for (int i = 0; i < filesList.size(); i++) { - String key = (String) filesList.get(i); - String val = (String) returnList.get(i); - - if (!key.equals(val) && !val.equals("") && val != null) { - filesMap.put(key, val); - } - } - - return filesMap; - } - - } -} Deleted: blue/trunk/blue-ui-core/src/blue/SplashScreen.java =================================================================== --- blue/trunk/blue-ui-core/src/blue/SplashScreen.java 2010-03-27 03:08:56 UTC (rev 4187) +++ blue/trunk/blue-ui-core/src/blue/SplashScreen.java 2010-03-28 02:55:08 UTC (rev 4188) @@ -1,209 +0,0 @@ -/* - * blue - object composition environment for csound - * Copyright (c) 2001-2003 Steven Yi (ste...@gm...) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation; either version 2 of the License or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; see the file COPYING.LIB. If not, write to - * the Free Software Foundation Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307 USA - */ - -package blue; - -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.GridLayout; -import java.awt.Toolkit; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import javax.swing.BorderFactory; -import javax.swing.JComponent; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JWindow; -import javax.swing.SwingConstants; -import javax.swing.border.Border; - -/** - * Title: blue (Object Composition Environment) Description: Copyright: - * Copyright (c) steven yi Company: steven yi music - * - * @author steven yi - * @version 0.3 - */ - -public final class SplashScreen extends JWindow { - JPanel jPanel1 = new JPanel(); - - GridLayout gridLayout1 = new GridLayout(); - - JPanel mainPanel = new JPanel(); - - String infoText = "<html>... a music composition environment for Csound<br>" - + "Version: " - + BlueConstants.getVersion() - + "<br>" - + "Copyright (c) 2000-2006 Steven Yi<br>" - + "email: ste...@gm...<br>" - + "web: http://www.csounds.com/stevenyi/blue</html>"; - - JLabel mainLabel = new JLabel(infoText); - - JLabel title1 = new JLabel("blue"); - - boolean clickClose = false; - - public SplashScreen(JFrame parent) { - super(parent); - try { - jbInit(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public void remove() { - dispose(); - } - - public SplashScreen() { - try { - jbInit(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - private void jbInit() throws Exception { - title1.setForeground(Color.BLACK); - mainLabel.setForeground(Color.BLACK); - this.setBackground(Color.BLACK); - - this.addMouseListener(new MouseAdapter() { - public void mouseClicked(MouseEvent e) { - if (clickClose) { - dispose(); - } - } - }); - - mainPanel.setDoubleBuffered(true); - Border border2 = BorderFactory.createCompoundBorder(BorderFactory - .createLineBorder(new Color(198, 226, 255), 2), BorderFactory - .createEmptyBorder(20, 20, 20, 20)); - - mainPanel.setLayout(new BorderLayout()); - - title1.setHorizontalAlignment(SwingConstants.LEFT); - title1.setAlignmentX((float) 1.0); - title1.setFont(new java.awt.Font("Dialog", 0, 48)); - - this.getContentPane().add(mainPanel, BorderLayout.CENTER); - mainPanel.setBorder(border2); - - mainPanel.add(title1, BorderLayout.NORTH); - mainPanel.add(mainLabel, BorderLayout.SOUTH); - - // mainPanel.setPreferredSize(new Dimension(400, 175)); - pack(); - Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize(); - this.setLocation((screenDim.width - getSize().width) / 2, - (screenDim.height - getSize().height) / 2); - } - - public void show() { - super.show(); - new Thread(new ColorChanger(mainPanel, this)).start(); - } - - public static void main(String args[]) { - SplashScreen s = new SplashScreen(); - s.addWindowListener(new WindowAdapter() { - - public void windowClosed(WindowEvent e) { - System.exit(0); - } - - }); - s.show(); - } -} - -class ColorChanger implements Runnable { - Color fgColor = new Color(198, 226, 255); - - Color bgcolor = new Color(1, 40, 74); - - int r1 = 198; - - int g1 = 226; - - int b1 = 255; - - int r2 = 1; - - int g2 = 40; - - int b2 = 74; - - JComponent jc; - - SplashScreen sc; - - int time; - - public ColorChanger(JComponent jc, SplashScreen sc) { - this.jc = jc; - this.sc = sc; - } - - public void run() { - jc.setForeground(Color.black); - float x; - int loopLength = 40; - for (int i = 0; i < loopLength; i++) { - x = i; - x = x / loopLength; - - int fr = (int) (r1 * x); - int fg = (int) (g1 * x); - int fb = (int) (b1 * x); - - Component[] c = jc.getComponents(); - - Color fgColor = new Color(fr, fg, fb); - for (int j = 0; j < c.length; j++) { - c[j].setForeground(fgColor); - } - - int br = (int) (r2 * x); - int bg = (int) (g2 * x); - int bb = (int) (b2 * x); - - jc.setBackground(new Color(br, bg, bb)); - - jc.paintImmediately(jc.getBounds()); - try { - Thread.sleep(50); - } catch (Exception e) { - } - } - sc.clickClose = true; - } -} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |