Advertisement
AishaAli

Untitled

Nov 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. /* * Copyright (c) 1996, 1997 Erich Gamma
  2. All Rights Reserved
  3. */
  4.  
  5. package CH.ifa.draw.contrib;
  6.  
  7. import java.awt.*;
  8. import CH.ifa.draw.framework.*;
  9. import CH.ifa.draw.standard.*;
  10. import CH.ifa.draw.util.Geom;
  11.  
  12. import javax.swing.*;
  13. import java.awt.*;
  14. import java.awt.event.*;
  15. import CH.ifa.draw.framework.*;
  16. import CH.ifa.draw.standard.*;
  17. import CH.ifa.draw.figures.*;
  18. import CH.ifa.draw.util.*;
  19.  
  20. public class ChopPolygonConnector extends ChopBoxConnector {
  21. public void adjustOffsets(Component comp, Point offsetPoint)
  22. {
  23. }
  24. //
  25.  
  26. private static final long serialVersionUID = -156024908227796826L;
  27.  
  28. public ChopPolygonConnector() {
  29. }
  30.  
  31. public ChopPolygonConnector(Figure owner) {
  32. super(owner);
  33. }
  34.  
  35. protected Point chop(Figure target, Point from) {
  36. return ((PolygonFigure)target).chop(from);
  37. }
  38.  
  39.  
  40. public void adjustOffsets(Component comp, Point offsetPoint, CustomSelectionTool C_S_T) {
  41. if (comp != null) {
  42. Point compLocation = comp.getLocation();
  43. offsetPoint.translate(compLocation.x, compLocation.y);
  44. adjustOffsets(comp.getParent(), offsetPoint);
  45. }
  46. }
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement