From 0d9cc299dcade9e42cb359db5a18cf73d2675be0 Mon Sep 17 00:00:00 2001 From: chrisleung Date: Sat, 15 Dec 2007 09:33:09 +0000 Subject: [PATCH] PowerReader now Java 1.5 Replaced ConfigUI with OptionsUI Fixed speech speed bar so that it's default position is that of the configuration manager --- nbproject/build-impl.xml | 47 +-- nbproject/genfiles.properties | 6 +- nbproject/project.properties | 6 +- nbproject/project.xml | 1 - src/powerreader/ConfigUI.java | 324 ------------------ src/powerreader/ConfigurationManager.java | 23 +- .../{ConfigUI.form => OptionsUI.form} | 107 +++--- src/powerreader/OptionsUI.java | 309 +++++++++++++++++ src/powerreader/Player.java | 5 - src/powerreader/PowerReaderUI.java | 13 +- 10 files changed, 389 insertions(+), 452 deletions(-) delete mode 100644 src/powerreader/ConfigUI.java rename src/powerreader/{ConfigUI.form => OptionsUI.form} (79%) create mode 100644 src/powerreader/OptionsUI.java diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 06a4492..8519dd8 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -44,36 +44,6 @@ is divided into following sections: - - - - - - - - - - - - - - - - - - - - - - - - - - Must set platform.home - Must set platform.bootcp - Must set platform.java - Must set platform.javac - Platform is not correctly set up @@ -153,7 +123,7 @@ is divided into following sections: - + @@ -167,7 +137,7 @@ is divided into following sections: - + @@ -195,9 +165,6 @@ is divided into following sections: - - - @@ -216,7 +183,7 @@ is divided into following sections: - + @@ -239,7 +206,7 @@ is divided into following sections: - + @@ -334,7 +301,7 @@ is divided into following sections: - ${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class} + java -cp "${run.classpath.with.dist.jar}" ${main.class} @@ -359,7 +326,7 @@ is divided into following sections: To run this application from the command line without Ant, try: - ${platform.java} -jar "${dist.jar.resolved}" + java -jar "${dist.jar.resolved}" @@ -422,7 +389,7 @@ is divided into following sections: --> - + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index b1bbadc..fdf1263 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=d2046c22 +build.xml.data.CRC32=05c7b6e7 build.xml.script.CRC32=4c0f6594 build.xml.stylesheet.CRC32=240b97a2 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=d2046c22 -nbproject/build-impl.xml.script.CRC32=f74b6fc7 +nbproject/build-impl.xml.data.CRC32=05c7b6e7 +nbproject/build-impl.xml.script.CRC32=35c3f5ad nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21 diff --git a/nbproject/project.properties b/nbproject/project.properties index 9cdac1e..b1e4a4b 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -40,8 +40,8 @@ javac.classpath=\ # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false -javac.source=1.6 -javac.target=1.6 +javac.source=1.5 +javac.target=1.5 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ @@ -60,7 +60,7 @@ javadoc.windowtitle= main.class=powerreader.Main manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF -platform.active=Java_HotSpot_TM__Client_VM_1.6.0_03-b05 +platform.active=default_platform run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} diff --git a/nbproject/project.xml b/nbproject/project.xml index 83550ba..a40d222 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -5,7 +5,6 @@ PowerReader 1.6.5 - diff --git a/src/powerreader/ConfigUI.java b/src/powerreader/ConfigUI.java deleted file mode 100644 index 5613a79..0000000 --- a/src/powerreader/ConfigUI.java +++ /dev/null @@ -1,324 +0,0 @@ -/* - * ConfigUI.java - * - * Created on December 4, 2007, 2:11 PM - */ - -package powerreader; - -import util.TextObject3d; - -/** - * - * @author Christopher Leung - */ -public class ConfigUI extends javax.swing.JFrame { - - /** Creates new form ConfigUI */ - public ConfigUI() { - initComponents(); - } - - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. - */ - // //GEN-BEGIN:initComponents - private void initComponents() { - m_combo_dictionaryLookup = new javax.swing.JComboBox(); - m_combo_imageLookup = new javax.swing.JComboBox(); - m_combo_fontFace = new javax.swing.JComboBox(); - m_combo_voicePersonality = new javax.swing.JComboBox(); - m_combo_leftClick = new javax.swing.JComboBox(); - m_combo_middleClick = new javax.swing.JComboBox(); - m_combo_rightClick = new javax.swing.JComboBox(); - m_okButton = new javax.swing.JButton(); - m_cancelButton = new javax.swing.JButton(); - m_checkBox_mouseWheel = new javax.swing.JCheckBox(); - m_label_dictionarySource = new javax.swing.JLabel(); - m_label_imageSource = new javax.swing.JLabel(); - m_label_fontFace = new javax.swing.JLabel(); - m_label_voicePersonality = new javax.swing.JLabel(); - m_label_leftClick = new javax.swing.JLabel(); - m_label_middleClick = new javax.swing.JLabel(); - m_label_rightClick = new javax.swing.JLabel(); - m_label_rightClick1 = new javax.swing.JLabel(); - m_slider_lineWidth = new javax.swing.JSlider(); - jLabel1 = new javax.swing.JLabel(); - jLabel2 = new javax.swing.JLabel(); - m_slider_textDepth = new javax.swing.JSlider(); - jLabel3 = new javax.swing.JLabel(); - jLabel4 = new javax.swing.JLabel(); - - setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); - setTitle("Power Reader Options"); - m_combo_dictionaryLookup.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Wiktionary", "WordNet Dictionary" })); - - m_combo_imageLookup.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Flickr", "Google Images", "Yahoo Images" })); - m_combo_imageLookup.setSelectedIndex(1); - - m_combo_fontFace.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Tahoma" })); - - m_combo_voicePersonality.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Kevin" })); - m_combo_voicePersonality.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - m_combo_voicePersonalityActionPerformed(evt); - } - }); - - m_combo_leftClick.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Focus on item", "Drag and scroll", "Read dictionary definition", "Do nothing" })); - - m_combo_middleClick.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Focus on item", "Drag and scroll", "Read dictionary definition", "Do nothing" })); - m_combo_middleClick.setSelectedIndex(2); - - m_combo_rightClick.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Focus on item", "Drag and scroll", "Read dictionary definition", "Do nothing" })); - m_combo_rightClick.setSelectedIndex(1); - - m_okButton.setText("OK"); - m_okButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - m_okButtonActionPerformed(evt); - } - }); - - m_cancelButton.setText("Cancel"); - m_cancelButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - m_cancelButtonActionPerformed(evt); - } - }); - - m_checkBox_mouseWheel.setSelected(true); - m_checkBox_mouseWheel.setText("Enable Mouse Wheel Zoom"); - m_checkBox_mouseWheel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); - m_checkBox_mouseWheel.setMargin(new java.awt.Insets(0, 0, 0, 0)); - - m_label_dictionarySource.setFont(new java.awt.Font("Tahoma", 1, 11)); - m_label_dictionarySource.setText("Dictionary Source"); - - m_label_imageSource.setFont(new java.awt.Font("Tahoma", 1, 11)); - m_label_imageSource.setText("Image Source"); - - m_label_fontFace.setFont(new java.awt.Font("Tahoma", 1, 11)); - m_label_fontFace.setText("Font Face"); - - m_label_voicePersonality.setFont(new java.awt.Font("Tahoma", 1, 11)); - m_label_voicePersonality.setText("Voice Personality"); - - m_label_leftClick.setFont(new java.awt.Font("Tahoma", 1, 11)); - m_label_leftClick.setText("Left Click"); - - m_label_middleClick.setFont(new java.awt.Font("Tahoma", 1, 11)); - m_label_middleClick.setText("Middle Click"); - - m_label_rightClick.setFont(new java.awt.Font("Tahoma", 1, 11)); - m_label_rightClick.setText("Right Click"); - - m_label_rightClick1.setFont(new java.awt.Font("Tahoma", 1, 11)); - m_label_rightClick1.setText("Line Width "); - m_label_rightClick1.setName("Line Width"); - - m_slider_lineWidth.setMajorTickSpacing(10); - m_slider_lineWidth.setMinimum(5); - m_slider_lineWidth.setMinorTickSpacing(20); - m_slider_lineWidth.setPaintLabels(true); - m_slider_lineWidth.setPaintTicks(true); - m_slider_lineWidth.setValue(20); - - jLabel1.setText("Note: Load a new file for"); - - jLabel2.setText("this change to take effect"); - - m_slider_textDepth.setMajorTickSpacing(1); - m_slider_textDepth.setMaximum(10); - m_slider_textDepth.setMinimum(1); - m_slider_textDepth.setPaintLabels(true); - m_slider_textDepth.setPaintTicks(true); - m_slider_textDepth.setValue(1); - m_slider_textDepth.addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent evt) { - m_slider_textDepthStateChanged(evt); - } - }); - - jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); - jLabel3.setText("Text Depth"); - - jLabel4.setText("Sets the 3D Text Depth"); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(m_label_fontFace) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE) - .addComponent(m_combo_fontFace, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(m_label_imageSource) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE) - .addComponent(m_combo_imageLookup, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(m_label_voicePersonality) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE) - .addComponent(m_combo_voicePersonality, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(m_label_dictionarySource) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE) - .addComponent(m_combo_dictionaryLookup, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(m_label_leftClick) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE) - .addComponent(m_combo_leftClick, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(layout.createSequentialGroup() - .addComponent(m_label_middleClick) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 77, Short.MAX_VALUE) - .addComponent(m_combo_middleClick, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(m_label_rightClick) - .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE) - .addComponent(m_label_rightClick1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE) - .addComponent(jLabel2) - .addComponent(jLabel3) - .addComponent(jLabel4)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(m_checkBox_mouseWheel, javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(m_combo_rightClick, 0, 182, Short.MAX_VALUE)) - .addComponent(m_slider_lineWidth, 0, 0, Short.MAX_VALUE) - .addComponent(m_slider_textDepth, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE))) - .addGroup(layout.createSequentialGroup() - .addComponent(m_okButton, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(m_cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(m_label_dictionarySource) - .addComponent(m_combo_dictionaryLookup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(m_combo_imageLookup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(m_label_imageSource)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(m_combo_fontFace, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(m_label_fontFace, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(m_combo_voicePersonality, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(m_label_voicePersonality)) - .addGap(25, 25, 25) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(m_label_leftClick) - .addComponent(m_combo_leftClick, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(m_label_middleClick) - .addComponent(m_combo_middleClick, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(m_combo_rightClick, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(m_label_rightClick)) - .addGap(14, 14, 14) - .addComponent(m_checkBox_mouseWheel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(m_label_rightClick1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(m_slider_lineWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(24, 24, 24) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(jLabel3) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(m_slider_textDepth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(m_okButton) - .addComponent(m_cancelButton)) - .addGap(24, 24, 24)) - ); - pack(); - }// //GEN-END:initComponents - - private void m_slider_textDepthStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_m_slider_textDepthStateChanged - ConfigurationManager.TEXT_DEPTH = m_slider_textDepth.getValue() / 2f; - ConfigurationManager.currentRoot.color(false); - }//GEN-LAST:event_m_slider_textDepthStateChanged - - private void m_okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_okButtonActionPerformed - if (m_slider_lineWidth.getValue() != (int)TextObject3d.getLineWidth()) { - // Set the new line width - TextObject3d.setLineWidth((float)m_slider_lineWidth.getValue()); - } - ConfigurationManager.setDictionary(m_combo_dictionaryLookup.getSelectedIndex()); - ConfigurationManager.setImageLookup(m_combo_imageLookup.getSelectedIndex()); - ConfigurationManager.setLeftClickAction(m_combo_leftClick.getSelectedIndex()); - ConfigurationManager.setMiddleClickAction(m_combo_middleClick.getSelectedIndex()); - ConfigurationManager.setRightClickAction(m_combo_rightClick.getSelectedIndex()); - this.setVisible(false); - }//GEN-LAST:event_m_okButtonActionPerformed - - private void m_cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_cancelButtonActionPerformed - this.setVisible(false); - }//GEN-LAST:event_m_cancelButtonActionPerformed - - private void m_combo_voicePersonalityActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_combo_voicePersonalityActionPerformed -// TODO add your handling code here: - }//GEN-LAST:event_m_combo_voicePersonalityActionPerformed - - /** - * @param args the command line arguments - */ - public static void main(String args[]) { - java.awt.EventQueue.invokeLater(new Runnable() { - public void run() { - new ConfigUI().setVisible(true); - } - }); - } - - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JLabel jLabel1; - private javax.swing.JLabel jLabel2; - private javax.swing.JLabel jLabel3; - private javax.swing.JLabel jLabel4; - private javax.swing.JButton m_cancelButton; - private javax.swing.JCheckBox m_checkBox_mouseWheel; - private javax.swing.JComboBox m_combo_dictionaryLookup; - private javax.swing.JComboBox m_combo_fontFace; - private javax.swing.JComboBox m_combo_imageLookup; - private javax.swing.JComboBox m_combo_leftClick; - private javax.swing.JComboBox m_combo_middleClick; - private javax.swing.JComboBox m_combo_rightClick; - private javax.swing.JComboBox m_combo_voicePersonality; - private javax.swing.JLabel m_label_dictionarySource; - private javax.swing.JLabel m_label_fontFace; - private javax.swing.JLabel m_label_imageSource; - private javax.swing.JLabel m_label_leftClick; - private javax.swing.JLabel m_label_middleClick; - private javax.swing.JLabel m_label_rightClick; - private javax.swing.JLabel m_label_rightClick1; - private javax.swing.JLabel m_label_voicePersonality; - private javax.swing.JButton m_okButton; - private javax.swing.JSlider m_slider_lineWidth; - private javax.swing.JSlider m_slider_textDepth; - // End of variables declaration//GEN-END:variables - -} diff --git a/src/powerreader/ConfigurationManager.java b/src/powerreader/ConfigurationManager.java index 3955304..19657ff 100644 --- a/src/powerreader/ConfigurationManager.java +++ b/src/powerreader/ConfigurationManager.java @@ -31,6 +31,12 @@ */ public class ConfigurationManager { + // Arbitrary factor by which we use to adjust the speech speed + public static int WPM_FACTOR = 120000; + public static int DEFAULT_SPEED = 800; + private static int SPEED_OFFSET = 100; + private int m_currentSpeed; + public static int DEFAULT_ZOOM = -25; public static Color DEFAULT_BG_COLOR = Color.ORANGE; public static Color DEFAULT_FG_COLOR = Color.BLUE; @@ -150,8 +156,11 @@ public ConfigurationManager() { // Fonts - // Voices + // Speech + m_currentSpeed = DEFAULT_SPEED; + // Duplicate of "setSpeed", which we can't call right now + Speech.setSpeed(WPM_FACTOR/(m_currentSpeed+SPEED_OFFSET)); } static public DictionaryLookup getDictionary() { @@ -252,12 +261,18 @@ static public int getDetailLevel() { static public void setDetailLevel(int level) { m_detailLevel = level; } - - static public void setImageScale(int scale) { + + static public void setImageScale(int scale) { m_imageScale = scale; } - + static int getImageScale() { return m_imageScale; } + + static void setSpeed(int factor) { + m_instance.m_currentSpeed = factor; + // Make sure speed is at "least" SPEED_OFFSET + Speech.setSpeed(WPM_FACTOR/(factor+SPEED_OFFSET)); + } } diff --git a/src/powerreader/ConfigUI.form b/src/powerreader/OptionsUI.form similarity index 79% rename from src/powerreader/ConfigUI.form rename to src/powerreader/OptionsUI.form index 09a95dc..73f3b2c 100644 --- a/src/powerreader/ConfigUI.form +++ b/src/powerreader/OptionsUI.form @@ -1,8 +1,8 @@ -
+ - + @@ -10,7 +10,7 @@ - + @@ -21,63 +21,43 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + + + + + + + + - - - - - - - - + + + + + + + + + + + + - - - - + + + + - + @@ -86,8 +66,8 @@ - + @@ -104,15 +84,15 @@ - + - + - + @@ -121,32 +101,32 @@ - + - + + - - + - + - + - + @@ -171,7 +151,6 @@ - @@ -217,7 +196,6 @@ - @@ -230,7 +208,6 @@ - diff --git a/src/powerreader/OptionsUI.java b/src/powerreader/OptionsUI.java new file mode 100644 index 0000000..d576d0f --- /dev/null +++ b/src/powerreader/OptionsUI.java @@ -0,0 +1,309 @@ +/* + * OptionsUI.java + * + * Created on December 15, 2007, 12:10 AM + */ + +package powerreader; + +import util.TextObject3d; + +/** + * + * @author Christopher Leung + */ +public class OptionsUI extends javax.swing.JDialog { + + /** Creates new form OptionsUI */ + public OptionsUI(java.awt.Frame parent, boolean modal) { + super(parent, modal); + initComponents(); + } + + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + // //GEN-BEGIN:initComponents + private void initComponents() { + m_combo_dictionaryLookup = new javax.swing.JComboBox(); + m_combo_imageLookup = new javax.swing.JComboBox(); + m_combo_fontFace = new javax.swing.JComboBox(); + m_combo_voicePersonality = new javax.swing.JComboBox(); + m_combo_leftClick = new javax.swing.JComboBox(); + m_combo_middleClick = new javax.swing.JComboBox(); + m_combo_rightClick = new javax.swing.JComboBox(); + m_okButton = new javax.swing.JButton(); + m_cancelButton = new javax.swing.JButton(); + m_checkBox_mouseWheel = new javax.swing.JCheckBox(); + m_label_dictionarySource = new javax.swing.JLabel(); + m_label_imageSource = new javax.swing.JLabel(); + m_label_fontFace = new javax.swing.JLabel(); + m_label_voicePersonality = new javax.swing.JLabel(); + m_label_leftClick = new javax.swing.JLabel(); + m_label_middleClick = new javax.swing.JLabel(); + m_label_rightClick = new javax.swing.JLabel(); + m_label_rightClick1 = new javax.swing.JLabel(); + m_slider_lineWidth = new javax.swing.JSlider(); + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + m_slider_textDepth = new javax.swing.JSlider(); + jLabel3 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Power Reader Options"); + m_combo_dictionaryLookup.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Wiktionary", "WordNet Dictionary" })); + + m_combo_imageLookup.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Flickr", "Google Images", "Yahoo Images" })); + + m_combo_fontFace.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Tahoma" })); + + m_combo_voicePersonality.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Kevin" })); + m_combo_voicePersonality.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + m_combo_voicePersonalityActionPerformed(evt); + } + }); + + m_combo_leftClick.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Focus on item", "Drag and scroll", "Read dictionary definition", "Do nothing" })); + + m_combo_middleClick.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Focus on item", "Drag and scroll", "Read dictionary definition", "Do nothing" })); + + m_combo_rightClick.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Focus on item", "Drag and scroll", "Read dictionary definition", "Do nothing" })); + + m_okButton.setText("OK"); + m_okButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + m_okButtonActionPerformed(evt); + } + }); + + m_cancelButton.setText("Cancel"); + m_cancelButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + m_cancelButtonActionPerformed(evt); + } + }); + + m_checkBox_mouseWheel.setSelected(true); + m_checkBox_mouseWheel.setText("Enable Mouse Wheel Zoom"); + m_checkBox_mouseWheel.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); + m_checkBox_mouseWheel.setMargin(new java.awt.Insets(0, 0, 0, 0)); + + m_label_dictionarySource.setFont(new java.awt.Font("Tahoma", 1, 11)); + m_label_dictionarySource.setText("Dictionary Source"); + + m_label_imageSource.setFont(new java.awt.Font("Tahoma", 1, 11)); + m_label_imageSource.setText("Image Source"); + + m_label_fontFace.setFont(new java.awt.Font("Tahoma", 1, 11)); + m_label_fontFace.setText("Font Face"); + + m_label_voicePersonality.setFont(new java.awt.Font("Tahoma", 1, 11)); + m_label_voicePersonality.setText("Voice Personality"); + + m_label_leftClick.setFont(new java.awt.Font("Tahoma", 1, 11)); + m_label_leftClick.setText("Left Click"); + + m_label_middleClick.setFont(new java.awt.Font("Tahoma", 1, 11)); + m_label_middleClick.setText("Middle Click"); + + m_label_rightClick.setFont(new java.awt.Font("Tahoma", 1, 11)); + m_label_rightClick.setText("Right Click"); + + m_label_rightClick1.setFont(new java.awt.Font("Tahoma", 1, 11)); + m_label_rightClick1.setText("Line Width "); + m_label_rightClick1.setName("Line Width"); + + m_slider_lineWidth.setMajorTickSpacing(10); + m_slider_lineWidth.setMinimum(5); + m_slider_lineWidth.setMinorTickSpacing(20); + m_slider_lineWidth.setPaintLabels(true); + m_slider_lineWidth.setPaintTicks(true); + m_slider_lineWidth.setValue(20); + + jLabel1.setText("Note: Load a new file for"); + + jLabel2.setText("this change to take effect"); + + m_slider_textDepth.setMajorTickSpacing(1); + m_slider_textDepth.setMaximum(10); + m_slider_textDepth.setMinimum(1); + m_slider_textDepth.setPaintLabels(true); + m_slider_textDepth.setPaintTicks(true); + m_slider_textDepth.setValue(1); + m_slider_textDepth.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + m_slider_textDepthStateChanged(evt); + } + }); + + jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); + jLabel3.setText("Text Depth"); + + jLabel4.setText("Sets the 3D Text Depth"); + + org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .addContainerGap() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) + .add(layout.createSequentialGroup() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 139, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(jLabel2) + .add(m_label_rightClick1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 139, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(jLabel3) + .add(jLabel4) + .add(m_label_rightClick) + .add(m_label_middleClick) + .add(m_label_leftClick) + .add(m_label_voicePersonality) + .add(m_label_fontFace) + .add(m_label_imageSource) + .add(m_label_dictionarySource)) + .add(16, 16, 16) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) + .add(m_combo_imageLookup, 0, 182, Short.MAX_VALUE) + .add(m_combo_dictionaryLookup, 0, 182, Short.MAX_VALUE) + .add(m_combo_fontFace, 0, 182, Short.MAX_VALUE) + .add(m_combo_voicePersonality, 0, 182, Short.MAX_VALUE) + .add(m_combo_leftClick, 0, 182, Short.MAX_VALUE) + .add(m_combo_middleClick, 0, 182, Short.MAX_VALUE) + .add(m_combo_rightClick, 0, 182, Short.MAX_VALUE) + .add(m_checkBox_mouseWheel) + .add(m_slider_lineWidth, 0, 0, Short.MAX_VALUE) + .add(org.jdesktop.layout.GroupLayout.TRAILING, m_slider_textDepth, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE))) + .add(layout.createSequentialGroup() + .add(m_okButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .add(m_cancelButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 166, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .addContainerGap() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(m_combo_dictionaryLookup, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(m_label_dictionarySource)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(m_combo_imageLookup, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(m_label_imageSource)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(m_combo_fontFace, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(m_label_fontFace, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(m_combo_voicePersonality, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(m_label_voicePersonality)) + .add(29, 29, 29) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(m_combo_leftClick, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(m_label_leftClick)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(m_combo_middleClick, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(m_label_middleClick)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(m_combo_rightClick, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(m_label_rightClick)) + .add(14, 14, 14) + .add(m_checkBox_mouseWheel) + .add(23, 23, 23) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(m_slider_lineWidth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .add(layout.createSequentialGroup() + .add(m_label_rightClick1) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) + .add(14, 14, 14) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .add(jLabel3) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jLabel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(m_slider_textDepth, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(19, 19, 19) + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) + .add(m_okButton) + .add(m_cancelButton)) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + pack(); + }// //GEN-END:initComponents + + private void m_slider_textDepthStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_m_slider_textDepthStateChanged + ConfigurationManager.TEXT_DEPTH = m_slider_textDepth.getValue() / 2f; + ConfigurationManager.currentRoot.color(false); + }//GEN-LAST:event_m_slider_textDepthStateChanged + + private void m_cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_cancelButtonActionPerformed + this.setVisible(false); + }//GEN-LAST:event_m_cancelButtonActionPerformed + + private void m_okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_okButtonActionPerformed + if (m_slider_lineWidth.getValue() != (int)TextObject3d.getLineWidth()) { + // Set the new line width + TextObject3d.setLineWidth((float)m_slider_lineWidth.getValue()); + } + ConfigurationManager.setDictionary(m_combo_dictionaryLookup.getSelectedIndex()); + ConfigurationManager.setImageLookup(m_combo_imageLookup.getSelectedIndex()); + ConfigurationManager.setLeftClickAction(m_combo_leftClick.getSelectedIndex()); + ConfigurationManager.setMiddleClickAction(m_combo_middleClick.getSelectedIndex()); + ConfigurationManager.setRightClickAction(m_combo_rightClick.getSelectedIndex()); + this.setVisible(false); + }//GEN-LAST:event_m_okButtonActionPerformed + + private void m_combo_voicePersonalityActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_combo_voicePersonalityActionPerformed +// TODO add your handling code here: + }//GEN-LAST:event_m_combo_voicePersonalityActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new OptionsUI(new javax.swing.JFrame(), true).setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JButton m_cancelButton; + private javax.swing.JCheckBox m_checkBox_mouseWheel; + private javax.swing.JComboBox m_combo_dictionaryLookup; + private javax.swing.JComboBox m_combo_fontFace; + private javax.swing.JComboBox m_combo_imageLookup; + private javax.swing.JComboBox m_combo_leftClick; + private javax.swing.JComboBox m_combo_middleClick; + private javax.swing.JComboBox m_combo_rightClick; + private javax.swing.JComboBox m_combo_voicePersonality; + private javax.swing.JLabel m_label_dictionarySource; + private javax.swing.JLabel m_label_fontFace; + private javax.swing.JLabel m_label_imageSource; + private javax.swing.JLabel m_label_leftClick; + private javax.swing.JLabel m_label_middleClick; + private javax.swing.JLabel m_label_rightClick; + private javax.swing.JLabel m_label_rightClick1; + private javax.swing.JLabel m_label_voicePersonality; + private javax.swing.JButton m_okButton; + private javax.swing.JSlider m_slider_lineWidth; + private javax.swing.JSlider m_slider_textDepth; + // End of variables declaration//GEN-END:variables + +} diff --git a/src/powerreader/Player.java b/src/powerreader/Player.java index 0d526b5..d076e60 100644 --- a/src/powerreader/Player.java +++ b/src/powerreader/Player.java @@ -33,7 +33,6 @@ * @author Christopher Leung */ public class Player extends Thread { - public static int WPM_FACTOR = 120000; private HierarchyObject m_root; private int m_focusLevel; @@ -94,10 +93,6 @@ static public void setHierarchyRoot(HierarchyObject root) { m_instance.m_objectsToSpeak = m_instance.m_root.getAllChildrenOfLevel(m_instance.m_focusLevel); } - static public void setSleepDelay(int factor) { - Speech.setSpeed(WPM_FACTOR/factor); - } - static public HierarchyObject getFocusOn() { return (HierarchyObject)(m_instance.m_objectsToSpeak.get(m_instance.m_focusIndex)); } diff --git a/src/powerreader/PowerReaderUI.java b/src/powerreader/PowerReaderUI.java index 66ac29c..c661885 100644 --- a/src/powerreader/PowerReaderUI.java +++ b/src/powerreader/PowerReaderUI.java @@ -16,9 +16,7 @@ import javax.vecmath.Color3f; import javax.vecmath.Vector3f; import java.awt.Component; -import java.io.File; import javax.swing.JFileChooser; -import javax.swing.WindowConstants; import javax.vecmath.Point3d; import speech.Speech; import util.HierarchyObject; @@ -42,7 +40,7 @@ public class PowerReaderUI extends javax.swing.JFrame { private Pick pick; // Config panel - private ConfigUI m_configPanel; + private OptionsUI m_optionsPanel; /** Creates new form PowerReaderUI */ public PowerReaderUI() { @@ -51,8 +49,7 @@ public PowerReaderUI() { // Link the configuration manager and the slider on this UI ConfigurationManager.setZoomSlider(m_slider_zoomLevel); // Initialize config panel - m_configPanel = new ConfigUI(); - m_configPanel.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); + m_optionsPanel = new OptionsUI(this,false); // Set default button colors m_button_bgColor.setBackground(ConfigurationManager.DEFAULT_BG_COLOR); @@ -62,6 +59,8 @@ public PowerReaderUI() { TextObject3d.setBaseColor(new Color3f(ConfigurationManager.DEFAULT_FG_COLOR)); TextObject3d.setHighlightColor(new Color3f(ConfigurationManager.DEFAULT_HL_COLOR)); + // Set the read speed slider based on Configuration settings + m_slider_readSpeed.setValue(m_slider_readSpeed.getMaximum()-ConfigurationManager.DEFAULT_SPEED); // Now initialize the 3D Canvas create3dCanvas(); } @@ -625,12 +624,12 @@ private void m_checkBox_speechEnabledActionPerformed(java.awt.event.ActionEvent }//GEN-LAST:event_m_checkBox_speechEnabledActionPerformed private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed - m_configPanel.setVisible(true); + m_optionsPanel.setVisible(true); }//GEN-LAST:event_jButton1ActionPerformed private void m_slider_readSpeedStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_m_slider_readSpeedStateChanged - Player.setSleepDelay(3100-m_slider_readSpeed.getValue()); + ConfigurationManager.setSpeed(m_slider_readSpeed.getMaximum()-m_slider_readSpeed.getValue()); }//GEN-LAST:event_m_slider_readSpeedStateChanged private void m_buton_stopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_buton_stopActionPerformed