generified

This commit is contained in:
Gregory.Shrago
2014-10-16 03:37:31 +04:00
parent ed2be53d72
commit 2f0a28b212
2 changed files with 2 additions and 2 deletions
@@ -128,7 +128,7 @@ public class JBViewport extends JViewport implements ZoomableViewport {
@Override
public Magnificator getMagnificator() {
JComponent view = (JComponent)getView();
return view != null ? (Magnificator)view.getClientProperty(Magnificator.CLIENT_PROPERTY_KEY) : null;
return view != null ? UIUtil.getClientProperty(view, Magnificator.CLIENT_PROPERTY_KEY) : null;
}
@Override
@@ -24,6 +24,6 @@ import com.intellij.openapi.util.Key;
import java.awt.*;
public interface Magnificator {
Key CLIENT_PROPERTY_KEY = Key.create("MagnifiableComponent");
Key<Magnificator> CLIENT_PROPERTY_KEY = Key.create("MagnifiableComponent");
Point magnify(double scale, Point at);
}