Guest User

Untitled

a guest
May 12th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.48 KB | None | 0 0
  1. diff --git a/ij/gui/StackWindow.java b/ij/gui/StackWindow.java
  2. index 751c5fd..226d90c 100644
  3. --- a/ij/gui/StackWindow.java
  4. +++ b/ij/gui/StackWindow.java
  5. @@ -328,4 +328,7 @@ public class StackWindow extends ImageWindow implements Runnable, AdjustmentList
  6.         }
  7.      }
  8.  
  9. +    public ScrollbarWithLabel getCSelector() {
  10. +        return cSelector;
  11. +    }
  12.  }
  13. diff --git a/ij/plugin/Orthogonal_Views.java b/ij/plugin/Orthogonal_Views.java
  14. index c88f4f5..4fecca8 100644
  15. --- a/ij/plugin/Orthogonal_Views.java
  16. +++ b/ij/plugin/Orthogonal_Views.java
  17. @@ -136,9 +136,7 @@ public class Orthogonal_Views implements PlugIn, MouseListener, MouseMotionListe
  18.         win.addWindowListener (this);  
  19.         win.addMouseWheelListener(this);
  20.         win.addFocusListener(this);
  21. -       Component[] c = win.getComponents();
  22. -       //IJ.log(c[1].toString());
  23. -       ((ScrollbarWithLabel) c[1]).addAdjustmentListener (this);
  24. +       ((StackWindow) win).getCSelector().addAdjustmentListener(this);
  25.         ImagePlus.addImageListener(this);
  26.         Executer.addCommandListener(this);
  27.     }
  28. @@ -570,8 +568,7 @@ public class Orthogonal_Views implements PlugIn, MouseListener, MouseMotionListe
  29.         win.removeWindowListener(this);
  30.         win.removeMouseWheelListener(this);
  31.         win.removeFocusListener(this);
  32. -       Component[] c = win.getComponents();
  33. -       ((ScrollbarWithLabel) c[1]).removeAdjustmentListener (this);
  34. +       ((StackWindow) win).getCSelector().removeAdjustmentListener(this);
  35.         win.setResizable(true);
  36.         instance = null;
  37.         previousID = imp.getID();
Advertisement
Add Comment
Please, Sign In to add comment