Advertisement
AishaAli

Untitled

Nov 19th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 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. private static final long serialVersionUID = -156024908227796826L;
  26.  
  27. public ChopPolygonConnector() {
  28. }
  29.  
  30. protected Point chop(Figure target, Point from) {
  31. return ((PolygonFigure)target).chop(from);
  32. }
  33.  
  34.  
  35. public void adjustOffsets(Component comp, Point offsetPoint, CustomSelectionTool C_S_T) {
  36. if (comp != null) {
  37. Point compLocation = comp.getLocation();
  38. offsetPoint.translate(compLocation.x, compLocation.y);
  39. adjustOffsets(comp.getParent(), offsetPoint);
  40. }
  41. }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement