Combine.java 860 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package Algorithms.Animated.BK;
  2. import java.awt.Color;
  3. import java.awt.event.ComponentEvent;
  4. import java.awt.event.ComponentListener;
  5. import Algorithms.Animated.AlgorithmStage;
  6. import Model.LayeredGraphNode;
  7. import View.MainView;
  8. /**
  9. * The stage of the combination of the four extremal layouts.
  10. * @author kolja
  11. *
  12. */
  13. public class Combine implements AlgorithmStage {
  14. LayeredGraphNode graph;
  15. public Combine( LayeredGraphNode graph )
  16. {
  17. this.graph = graph;
  18. }
  19. @Override
  20. public StageStatus forwardStep() {
  21. MainView.frame.setSize( MainView.frame.getWidth() + 1, MainView.frame.getHeight() );
  22. MainView.frame.setSize( MainView.frame.getWidth() - 1, MainView.frame.getHeight() );
  23. graph.setColor( Color.BLACK, null );
  24. return null;
  25. }
  26. @Override
  27. public StageStatus backwardStep() {
  28. // TODO Auto-generated method stub
  29. return null;
  30. }
  31. }