Procházet zdrojové kódy

increase default delay

Eren Yilmaz před 6 roky
rodič
revize
c9cb31644a
1 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 3 2
      src/view/MainView.java

+ 3 - 2
src/view/MainView.java

@@ -60,6 +60,7 @@ import lib.TextLayoutHelper;
  *
  */
 public class MainView {    
+    private static final int DEFAULT_DELAY = 100;
     /**
      * The 'frame' of the main window.
      * The reason why there can only be one instance of this class.
@@ -156,7 +157,7 @@ public class MainView {
         frameCounter++;
         this.graph = graph;
         controller = new AnimationController();
-        controller.setTimeBetween( 50 );
+        controller.setTimeBetween( DEFAULT_DELAY );
         frame = new JFrame( "NodeShuffler" );
         frame.addWindowListener(new java.awt.event.WindowAdapter() {
             @Override
@@ -598,7 +599,7 @@ public class MainView {
         });
         delayText = new JLabel( "Delay (ms)" );
         delayText.setBounds( 260, 10, 80, 20 );
-        delay = new JTextField( "50" );
+        delay = new JTextField( String.valueOf(DEFAULT_DELAY) );
         delay.setBounds( 260, 30, 90, 20 );
         delay.getDocument().addDocumentListener( new DocumentListener() {