Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

Eren Yilmaz před 7 roky
rodič
revize
8878c1fc3b
2 změnil soubory, kde provedl 20 přidání a 0 odebrání
  1. 18 0
      src/view/MainView.java
  2. 2 0
      src/view/NodeView.java

+ 18 - 0
src/view/MainView.java

@@ -138,6 +138,7 @@ public class MainView {
 	    info.setText( debugInfo() );
 	    JScrollPane view = new JScrollPane( info );
         debugFrame.add( view );
+        debugFrame.setSize( frame.getWidth(), frame.getHeight() );
 	    debugFrame.setVisible( true );
 	}
 	
@@ -167,6 +168,7 @@ public class MainView {
 	    stepForward = new NiceButton( "stepForward" );
 	    stepForward.setLocation( 10, 10 );
 	    stepForward.setMnemonic( KeyEvent.VK_DOWN );
+	    stepForward.setToolTipText( "Forward step over (alt+down arrow key)" );
 	    stepForward.addActionListener( new ActionListener() {
 
             @Override
@@ -179,6 +181,7 @@ public class MainView {
 	    stepForwardInto = new NiceButton( "stepForwardInto" );
 	    stepForwardInto.setLocation( 60, 10 );
 	    stepForwardInto.setMnemonic( KeyEvent.VK_RIGHT );
+	    stepForwardInto.setToolTipText( "Forward step Into (alt+right arrow key)" );
 	    stepForwardInto.addActionListener( new ActionListener() {
 
             @Override
@@ -190,6 +193,8 @@ public class MainView {
         });
         stepForwardOut = new NiceButton( "stepForwardOut" );
         stepForwardOut.setLocation( 110, 10 );
+        stepForwardOut.setMnemonic( KeyEvent.VK_PAGE_DOWN );
+        stepForwardOut.setToolTipText( "Forward step out (alt+page down key)" );
         stepForwardOut.addActionListener( new ActionListener() {
 
             @Override
@@ -202,6 +207,7 @@ public class MainView {
         runForward = new NiceButton( "runForward" );
         runForward.setLocation( 160, 10 );
         runForward.setMnemonic( KeyEvent.VK_P );
+        runForward.setToolTipText( "Run forward annimation (alt+p)" );
         runForward.addActionListener( new ActionListener() {
 
             @Override
@@ -214,6 +220,7 @@ public class MainView {
         runBackward = new NiceButton( "runBackward" );
         runBackward.setLocation( 160, 60 );
         runBackward.setMnemonic( KeyEvent.VK_R );
+        runBackward.setToolTipText( "Run backward annimation (alt+r)" );
         runBackward.addActionListener( new ActionListener() {
 
             @Override
@@ -226,6 +233,7 @@ public class MainView {
         stepBackward = new NiceButton( "stepBackward" );
         stepBackward.setLocation( 10, 60 );
         stepBackward.setMnemonic( KeyEvent.VK_UP );
+        stepBackward.setToolTipText( "Backward step over (alt+up arrow key)" );
         stepBackward.addActionListener( new ActionListener() {
 
             @Override
@@ -238,6 +246,7 @@ public class MainView {
         stepBackwardInto = new NiceButton( "stepBackwardInto" );
         stepBackwardInto.setLocation( 60, 60 );
         stepBackwardInto.setMnemonic( KeyEvent.VK_LEFT );
+        stepBackwardInto.setToolTipText( "Backward step into (alt+left arrow key)" );
         stepBackwardInto.addActionListener( new ActionListener() {
 
             @Override
@@ -249,6 +258,8 @@ public class MainView {
         });
         stepBackwardOut = new NiceButton( "stepBackwardOut" );
         stepBackwardOut.setLocation( 110, 60 );
+        stepBackwardOut.setMnemonic( KeyEvent.VK_PAGE_UP );
+        stepBackwardOut.setToolTipText( "Backward step out (alt+page up key)" );
         stepBackwardOut.addActionListener( new ActionListener() {
 
             @Override
@@ -260,6 +271,8 @@ public class MainView {
         });
         pause = new NiceButton( "pause" );
         pause.setLocation( 210, 10 );
+        pause.setMnemonic( KeyEvent.VK_PAUSE );
+        pause.setToolTipText( "Animation stop (alt+pause key)" );
         pause.addActionListener( new ActionListener() {
 
             @Override
@@ -271,6 +284,7 @@ public class MainView {
         debug = new NiceButton( "debug" );
         debug.setLocation( 350, 10 );
         debug.setMnemonic( KeyEvent.VK_D );
+        debug.setToolTipText( "Show debug info (alt+d)" );
         debug.addActionListener( new ActionListener() {
 
             @Override
@@ -281,6 +295,8 @@ public class MainView {
         });
         randomGraph = new NiceButton( "random" );
         randomGraph.setLocation( 350, 60 );
+        randomGraph.setMnemonic( KeyEvent.VK_G );
+        randomGraph.setToolTipText( "Generate random graph (alt+g)" );
         randomGraph.addActionListener( new ActionListener() {
 
             @Override
@@ -616,6 +632,7 @@ public class MainView {
         load = new NiceButton( "load" );
         load.setLocation( 230, 60 );
         load.setMnemonic( KeyEvent.VK_L );
+        load.setToolTipText( "Load a graph (alt+l)" );
         load.addActionListener( new ActionListener() {
 
             @Override
@@ -637,6 +654,7 @@ public class MainView {
         save = new NiceButton( "save" );
         save.setLocation( 285, 60 );
         save.setMnemonic( KeyEvent.VK_S );
+        save.setToolTipText( "Save graph (alt+s)" );
         save.addActionListener( new ActionListener() {
 
             @Override

+ 2 - 0
src/view/NodeView.java

@@ -82,6 +82,8 @@ public class NodeView extends JPanel {
 		if( selected )
 		{
 			g.setColor( Color.BLACK );
+			if( model.getContainedNodes().size() > 0 )
+			    g.setColor( Color.GRAY );
 			g.fillRect( 0, 0, (int)model.getWidth( layout )-1, (int)model.getHeight( layout )-1 );
 		}
 		Border linebor = BorderFactory.createLineBorder(model.getColor( layout ), 5);