/** * Creates an instance and notifies the view and layout Functions to listen to * changes published by this instance. */ public BasicTransformer() { super(); viewTransformer.addChangeListener(this); layoutTransformer.addChangeListener(this); }
/** * Create an instance, setting values from the passed component and registering to listen for * layoutSize changes on the component. * * @param d the size used for the lens */ public HyperbolicTransformer(Dimension d) { this(d, new MutableAffineTransformer()); }
protected void setViewTransformer(MutableTransformer Function) { this.viewTransformer.removeChangeListener(this); this.viewTransformer = Function; this.viewTransformer.addChangeListener(this); }
public LensControls(LensTransformer lensTransformer) { this.lensShape = lensTransformer.getLens().getLensShape(); }
public void activate(boolean state) { if (state) { activate(); } else { deactivate(); } }
/** * @param d the size used for the lens * @param delegate the transformer to use */ public LensTransformer(Dimension d, MutableTransformer delegate) { this(new Lens(d), delegate); }
/** * called to change the radius of the lens * * @param lens * @param point */ private void setViewRadius(Lens lens, Point2D point) { double distanceFromCenter = lens.getDistanceFromCenter(point); lens.setRadius(distanceFromCenter + edgeOffset); }
public void itemStateChanged(ItemEvent e) { if(viewSupport != null) { viewSupport.deactivate(); } if(modelSupport != null) { modelSupport.deactivate(); } } });
/** * called to change the location of the lens * @param Function * @param point */ private void setViewCenter(MutableTransformer transformer, Point2D point) { if(transformer instanceof LensTransformer) { LensTransformer ht = (LensTransformer)transformer; ht.setViewCenter(point); } }
public LensPaintable(LensTransformer lensTransformer) { this.lensShape = lensTransformer.getLens().getLensShape(); }
public MutableTransformerDecorator(MutableTransformer delegate) { if (delegate == null) { delegate = new MutableAffineTransformer(); } this.delegate = delegate; }
protected void setLayoutTransformer(MutableTransformer Function) { this.layoutTransformer.removeChangeListener(this); this.layoutTransformer = Function; this.layoutTransformer.addChangeListener(this); }
/** * Creates an instance and notifies the view and layout Functions to listen to changes published * by this instance. */ public BasicTransformer() { super(); viewTransformer.addChangeListener(this); layoutTransformer.addChangeListener(this); }
public void itemStateChanged(ItemEvent e) { if(viewSupport != null) { viewSupport.deactivate(); } if(modelSupport != null) { modelSupport.deactivate(); } } });
/** * create an instance, setting values from the passed component * and registering to listen for size changes on the component * @param component */ public PerspectiveTransformer(PerspectiveTransform perspectiveTransform) { this(perspectiveTransform, new MutableAffineTransformer()); } /**
protected void setLayoutTransformer(MutableTransformer Function) { this.layoutTransformer.removeChangeListener(this); this.layoutTransformer = Function; this.layoutTransformer.addChangeListener(this); }
/** * Create an instance, setting values from the passed component * and registering to listen for size changes on the component. * * @param component the component used for rendering */ public MagnifyTransformer(Component component) { this(component, new MutableAffineTransformer()); }
protected void setViewTransformer(MutableTransformer Function) { this.viewTransformer.removeChangeListener(this); this.viewTransformer = Function; this.viewTransformer.addChangeListener(this); }
/** * Create an instance, setting values from the passed component and registering to listen for * layoutSize changes on the component. * * @param d the size used for the lens */ public MagnifyTransformer(Dimension d) { this(d, new MutableAffineTransformer()); }
/** * Create an instance with a possibly shared lens. * * @param lens */ public LensTransformer(Lens lens) { super(new MutableAffineTransformer()); this.lens = lens; }