Last active
March 10, 2019 12:23
-
-
Save ezhov-da/0f330cd74724b224a97d834edad7dc4b to your computer and use it in GitHub Desktop.
java groovy форма
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[code:]JAVA[:code] | |
package ru.ezhov.test.ui; | |
import java.awt.BorderLayout; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.GridLayout; | |
import java.awt.Point; | |
import java.awt.RenderingHints; | |
import java.awt.RenderingHints.Key; | |
import java.awt.event.MouseAdapter; | |
import java.awt.event.MouseEvent; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.stream.Stream; | |
import javax.swing.JPanel; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; | |
import javax.swing.JSlider; | |
import javax.swing.SwingUtilities; | |
import javax.swing.UIManager; | |
import javax.swing.event.ChangeEvent; | |
public class FrameLine | |
{ | |
public static void main(String[] args) | |
{ | |
SwingUtilities.invokeLater(() -> | |
{ | |
try | |
{ | |
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); | |
} catch (Throwable ex) | |
{ | |
// | |
} | |
JFrame frame = new JFrame("_________"); | |
PanelFigure panel = new PanelFigure(); | |
frame.add(panel, BorderLayout.CENTER); | |
frame.add(new PanelSp(panel), BorderLayout.SOUTH); | |
frame.setSize(600, 600); | |
frame.setLocationRelativeTo(null); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
frame.setVisible(true); | |
}); | |
} | |
} | |
class PanelSp extends JPanel | |
{ | |
private static String LINE_COUNT = "Кол-во линий %s:"; | |
private static String ONE = "Радиус круга в центре %s:"; | |
private static String TWO = "Радиус круга в на центровом круге %s:"; | |
private static String THREE = "Радиус большого круга %s:"; | |
private static String FOUR = "Радиус круга вершины %s:"; | |
private JLabel labelLineCount = new JLabel(); | |
private JSlider sliderLineCount = new JSlider(JSlider.HORIZONTAL, 1, 360, 1); | |
private JLabel labelMall = new JLabel(); | |
private JSlider sliderSmall = new JSlider(JSlider.HORIZONTAL, 0, 1000, 1); | |
private JLabel labelVerySmall = new JLabel(); | |
private JSlider verySmall = new JSlider(JSlider.HORIZONTAL, 0, 1000, 1); | |
private JLabel labelVeryBig = new JLabel(); | |
private JSlider big = new JSlider(JSlider.HORIZONTAL, 0, 1000, 1); | |
private JLabel labelPick = new JLabel(); | |
private JSlider pick = new JSlider(JSlider.HORIZONTAL, 0, 1000, 1); | |
private PanelFigure panelFigure; | |
public PanelSp(PanelFigure panelFigure) | |
{ | |
super(new GridLayout(5, 2)); | |
this.panelFigure = panelFigure; | |
add(labelLineCount); | |
sliderLineCount.setValue(panelFigure.getCountLine()); | |
add(sliderLineCount); | |
sliderLineCount.addChangeListener((ChangeEvent e) -> | |
{ | |
panelFigure.setCountLine(sliderLineCount.getValue()); | |
panelFigure.repaint(); | |
labelLineCount.setText(String.format(LINE_COUNT, sliderLineCount.getValue())); | |
}); | |
labelLineCount.setText(String.format(LINE_COUNT, sliderLineCount.getValue())); | |
//====================================================================== | |
add(labelMall); | |
sliderSmall.setValue(panelFigure.getSizeSmallCircle()); | |
add(sliderSmall); | |
sliderSmall.addChangeListener((ChangeEvent e) -> | |
{ | |
panelFigure.setSizeSmallCircle(sliderSmall.getValue()); | |
panelFigure.repaint(); | |
labelMall.setText(String.format(ONE, sliderSmall.getValue())); | |
}); | |
labelMall.setText(String.format(ONE, sliderSmall.getValue())); | |
//====================================================================== | |
add(labelVerySmall); | |
verySmall.setValue(panelFigure.getSizeVerySmallCircle()); | |
add(verySmall); | |
verySmall.addChangeListener((ChangeEvent e) -> | |
{ | |
panelFigure.setSizeVerySmallCircle(verySmall.getValue()); | |
panelFigure.repaint(); | |
labelVerySmall.setText(String.format(TWO, verySmall.getValue())); | |
}); | |
labelVerySmall.setText(String.format(TWO, verySmall.getValue())); | |
//====================================================================== | |
add(labelVeryBig); | |
big.setValue(panelFigure.getSizeBigCircle()); | |
add(big); | |
big.addChangeListener((ChangeEvent e) -> | |
{ | |
panelFigure.setSizeBigCircle(big.getValue()); | |
panelFigure.repaint(); | |
labelVeryBig.setText(String.format(THREE, big.getValue())); | |
}); | |
labelVeryBig.setText(String.format(THREE, big.getValue())); | |
//====================================================================== | |
add(labelPick); | |
pick.setValue(panelFigure.getPick()); | |
add(pick); | |
pick.addChangeListener((ChangeEvent e) -> | |
{ | |
panelFigure.setPick(pick.getValue()); | |
panelFigure.repaint(); | |
labelPick.setText(String.format(FOUR, pick.getValue())); | |
}); | |
labelPick.setText(String.format(FOUR, pick.getValue())); | |
initSliders(sliderLineCount, sliderSmall, verySmall, pick, big); | |
} | |
private void initSliders(JSlider... sliders) | |
{ | |
Stream.of(sliders).forEach(sl -> | |
{ | |
sl.setPaintLabels(true); | |
sl.setPaintTicks(true); | |
sl.setPaintTrack(true); | |
sl.setLabelTable(sl.createStandardLabels(100)); | |
}); | |
} | |
} | |
class PanelFigure extends JPanel | |
{ | |
private int countLine = 8; | |
private int sizeSmallCircle = 300; | |
private int sizeVerySmallCircle = 10; | |
private int sizeBigCircle = 500; | |
private int pick = 15; | |
private List<Line> listLines; | |
private boolean inside; | |
private Point nowMouse; | |
public PanelFigure() | |
{ | |
MA ma = new MA(); | |
addMouseListener(ma); | |
addMouseMotionListener(ma); | |
listLines = new ArrayList<>(); | |
} | |
@Override | |
protected void paintComponent(Graphics g) | |
{ | |
super.paintComponent(g); | |
Graphics2D graphics2D = (Graphics2D) g; | |
Map<Key, Object> map = new HashMap<>(); | |
map.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); | |
map.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); | |
map.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); | |
map.put(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); | |
RenderingHints rh = new RenderingHints(map); | |
graphics2D.setRenderingHints(rh); | |
Point center = drawСircle(graphics2D, sizeSmallCircle); | |
listLines.removeAll(listLines); | |
int step = 360 / countLine; | |
int stepNow = 0; | |
for (int i = 0; i < countLine; i++) | |
{ | |
graphics2D.setColor(Color.BLUE); | |
Point start = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeSmallCircle, center, stepNow), true); | |
graphics2D.setColor(Color.BLACK); | |
Point end = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeBigCircle, center, stepNow), false); | |
listLines.add(new Line(start, end)); | |
if (inside) | |
{ | |
listLines.get(i).setPoints(start, nowMouse); | |
graphics2D.setColor(Color.RED); | |
drawСircleCoordinate(graphics2D, pick, nowMouse, true); | |
graphics2D.setColor(Color.BLACK); | |
} else | |
{ | |
listLines.get(i).setPoints(start, end); | |
} | |
stepNow += step; | |
} | |
paintLines(graphics2D); | |
//drawСircle(graphics2D, sizeBigCircle); | |
} | |
private Point drawСircle(Graphics2D graphics2D, int size) | |
{ | |
Dimension dimension = getSize(); | |
Point center = new Point(dimension.width / 2, dimension.height / 2); | |
Point circle = new Point(center.x - (size / 2), center.y - (size / 2)); | |
graphics2D.drawOval(circle.x, circle.y, size, size); | |
return center; | |
} | |
private Point drawСircleCoordinate(Graphics2D graphics2D, int size, Point center, boolean isDraw) | |
{ | |
Point circle = new Point(center.x - (size / 2), center.y - (size / 2)); | |
if (isDraw) | |
{ | |
graphics2D.drawOval(circle.x, circle.y, size, size); | |
} | |
return center; | |
} | |
private Point calculateCenterCircleSmall(int sizeCircle, Point center, double angle) | |
{ | |
//x0,y0 - центр, a - угол, r - радиус. | |
int radius = sizeCircle / 2; | |
int x = (int) (center.x + radius * Math.cos(angle)); | |
int y = (int) (center.y + radius * Math.sin(angle)); | |
return new Point(x, y); | |
} | |
private void paintLines(Graphics2D graphics2D) | |
{ | |
listLines.forEach(l -> graphics2D.drawLine(l.getPointStart().x, l.getPointStart().y, l.getPointEnd().x, l.getPointEnd().y)); | |
} | |
private class MA extends MouseAdapter | |
{ | |
@Override | |
public void mouseEntered(MouseEvent e) | |
{ | |
inside = true; | |
PanelFigure.this.repaint(); | |
} | |
@Override | |
public void mouseMoved(MouseEvent e) | |
{ | |
nowMouse = e.getPoint(); | |
PanelFigure.this.repaint(); | |
} | |
@Override | |
public void mouseExited(MouseEvent e) | |
{ | |
inside = false; | |
PanelFigure.this.repaint(); | |
} | |
} | |
public int getSizeSmallCircle() | |
{ | |
return sizeSmallCircle; | |
} | |
public void setSizeSmallCircle(int sizeSmallCircle) | |
{ | |
this.sizeSmallCircle = sizeSmallCircle; | |
} | |
public int getSizeVerySmallCircle() | |
{ | |
return sizeVerySmallCircle; | |
} | |
public void setSizeVerySmallCircle(int sizeVerySmallCircle) | |
{ | |
this.sizeVerySmallCircle = sizeVerySmallCircle; | |
} | |
public int getSizeBigCircle() | |
{ | |
return sizeBigCircle; | |
} | |
public void setSizeBigCircle(int sizeBigCircle) | |
{ | |
this.sizeBigCircle = sizeBigCircle; | |
} | |
public int getPick() | |
{ | |
return pick; | |
} | |
public void setPick(int pick) | |
{ | |
this.pick = pick; | |
} | |
public int getCountLine() | |
{ | |
return countLine; | |
} | |
public void setCountLine(int countLine) | |
{ | |
this.countLine = countLine; | |
} | |
} | |
class Line | |
{ | |
private Point pointStart; | |
private Point pointEnd; | |
public Line(Point pointStart, Point pointEnd) | |
{ | |
this.pointStart = pointStart; | |
this.pointEnd = pointEnd; | |
} | |
public Point getPointStart() | |
{ | |
return pointStart; | |
} | |
public void setPointStart(Point pointStart) | |
{ | |
this.pointStart = pointStart; | |
} | |
public Point getPointEnd() | |
{ | |
return pointEnd; | |
} | |
public void setPointEnd(Point pointEnd) | |
{ | |
this.pointEnd = pointEnd; | |
} | |
public void setPoints(Point pointStart, Point pointEnd) | |
{ | |
this.pointStart = pointStart; | |
this.pointEnd = pointEnd; | |
} | |
} | |
[/code] | |
[code:]groovy[:code] | |
package ru.ezhov | |
import groovy.swing.SwingBuilder | |
import java.awt.BorderLayout; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.GridLayout; | |
import java.awt.Point; | |
import java.awt.RenderingHints; | |
import java.awt.RenderingHints.Key; | |
import java.awt.event.MouseAdapter; | |
import java.awt.event.MouseEvent; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import javax.swing.JPanel; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; | |
import javax.swing.JSlider; | |
import javax.swing.SwingUtilities; | |
import javax.swing.UIManager; | |
import javax.swing.event.ChangeEvent; | |
public class FrameLine | |
{ | |
static void main(String[] args) | |
{ | |
new SwingBuilder().edt{ | |
try | |
{ | |
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); | |
} catch (Throwable ex) | |
{ | |
// | |
} | |
JFrame frame = new JFrame("_________"); | |
PanelFigure panel = new PanelFigure(); | |
frame.add(panel, BorderLayout.CENTER); | |
//frame.add(new PanelSp(panel), BorderLayout.SOUTH); | |
frame.setSize(600, 600); | |
frame.setLocationRelativeTo(null); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
frame.setVisible(true); | |
}; | |
} | |
} | |
//class PanelSp extends JPanel | |
//{ | |
// private static String ONE = "Радиус круга в центре %s:"; | |
// private static String TWO = "Радиус круга в на центровом круге %s:"; | |
// private static String THREE = "Радиус большого круга %s:"; | |
// private static String FOUR = "Радиус круга вершины %s:"; | |
// private JLabel labelMall = new JLabel(); | |
// private JSlider sliderSmall = new JSlider(JSlider.HORIZONTAL, 0, 1000, 1); | |
// private JLabel labelVerySmall = new JLabel(); | |
// private JSlider verySmall = new JSlider(JSlider.HORIZONTAL, 0, 1000, 1); | |
// private JLabel labelVeryBig = new JLabel(); | |
// private JSlider big = new JSlider(JSlider.HORIZONTAL, 0, 1000, 1); | |
// private JLabel labelPick = new JLabel(); | |
// private JSlider pick = new JSlider(JSlider.HORIZONTAL, 0, 1000, 1); | |
// private PanelFigure panelFigure; | |
// | |
// public PanelSp(PanelFigure panelFigure) | |
// { | |
// super(new GridLayout(4, 2)); | |
// this.panelFigure = panelFigure; | |
// //====================================================================== | |
// add(labelMall); | |
// sliderSmall.setValue(panelFigure.getSizeSmallCircle()); | |
// add(sliderSmall); | |
// sliderSmall.addChangeListener(new ChangeListener() | |
// { | |
// panelFigure.setSizeSmallCircle(sliderSmall.getValue()); | |
// panelFigure.repaint(); | |
// labelMall.setText(String.format(ONE, sliderSmall.getValue())); | |
// }); | |
// labelMall.setText(String.format(ONE, sliderSmall.getValue())); | |
// //====================================================================== | |
// add(labelVerySmall); | |
// verySmall.setValue(panelFigure.getSizeVerySmallCircle()); | |
// add(verySmall); | |
// verySmall.addChangeListener | |
// { | |
// panelFigure.setSizeVerySmallCircle(verySmall.getValue()); | |
// panelFigure.repaint(); | |
// labelVerySmall.setText(String.format(TWO, verySmall.getValue())); | |
// }; | |
// labelVerySmall.setText(String.format(TWO, verySmall.getValue())); | |
// //====================================================================== | |
// add(labelVeryBig); | |
// big.setValue(panelFigure.getSizeBigCircle()); | |
// add(big); | |
// big.addChangeListener | |
// { | |
// panelFigure.setSizeBigCircle(big.getValue()); | |
// panelFigure.repaint(); | |
// labelVeryBig.setText(String.format(THREE, big.getValue())); | |
// }; | |
// labelVeryBig.setText(String.format(THREE, big.getValue())); | |
// //====================================================================== | |
// add(labelPick); | |
// pick.setValue(panelFigure.getPick()); | |
// add(pick); | |
// pick.addChangeListener | |
// { | |
// panelFigure.setPick(pick.getValue()); | |
// panelFigure.repaint(); | |
// labelPick.setText(String.format(FOUR, pick.getValue())); | |
// }; | |
// labelPick.setText(String.format(FOUR, pick.getValue())); | |
// | |
// initSliders([liderSmall, verySmall, pick, big]); | |
// } | |
private void initSliders(listSlideBar) | |
{ | |
listSlideBar.each | |
{ | |
sl.setPaintLabels(true); | |
sl.setPaintTicks(true); | |
sl.setPaintTrack(true); | |
sl.setLabelTable(sl.createStandardLabels(100)); | |
}; | |
} | |
} | |
class PanelFigure extends JPanel | |
{ | |
private def listLines; | |
private boolean inside; | |
private Point nowMouse; | |
int sizeSmallCircle = 300; | |
int sizeVerySmallCircle = 10; | |
int sizeBigCircle = 500; | |
int pick = 15; | |
public PanelFigure() | |
{ | |
MA ma = new MA(); | |
addMouseListener(ma); | |
addMouseMotionListener(ma); | |
listLines = new ArrayList<>(); | |
} | |
@Override | |
protected void paintComponent(Graphics g) | |
{ | |
super.paintComponent(g); | |
Graphics2D graphics2D = (Graphics2D) g; | |
Map<Key, Object> map = new HashMap<>(); | |
map.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); | |
map.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); | |
map.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); | |
map.put(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); | |
RenderingHints rh = new RenderingHints(map); | |
graphics2D.setRenderingHints(rh); | |
Point center = drawСircle(graphics2D, sizeSmallCircle); | |
graphics2D.setColor(Color.BLUE); | |
Point start1 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeSmallCircle, center, 0D), true); | |
Point start2 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeSmallCircle, center, 45D), true); | |
Point start3 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeSmallCircle, center, 90D), true); | |
Point start4 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeSmallCircle, center, 135D), true); | |
Point start5 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeSmallCircle, center, 180D), true); | |
Point start6 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeSmallCircle, center, 225D), true); | |
graphics2D.setColor(Color.BLACK); | |
Point end1 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeBigCircle, center, 0D), false); | |
Point end2 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeBigCircle, center, 45D), false); | |
Point end3 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeBigCircle, center, 90D), false); | |
Point end4 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeBigCircle, center, 135D), false); | |
Point end5 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeBigCircle, center, 180D), false); | |
Point end6 = drawСircleCoordinate(graphics2D, sizeVerySmallCircle, calculateCenterCircleSmall(sizeBigCircle, center, 225D), false); | |
if (listLines.isEmpty()) | |
{ | |
listLines.add(new Line(pointStart: start1, pointEnd: end1)); | |
listLines.add(new Line(start2, end2)); | |
listLines.add(new Line(start3, end3)); | |
listLines.add(new Line(start4, end4)); | |
listLines.add(new Line(start5, end5)); | |
listLines.add(new Line(start6, end6)); | |
} else | |
{ | |
if (inside) | |
{ | |
listLines.get(0).setPoints(start1, nowMouse); | |
listLines.get(1).setPoints(start2, nowMouse); | |
listLines.get(2).setPoints(start3, nowMouse); | |
listLines.get(3).setPoints(start4, nowMouse); | |
listLines.get(4).setPoints(start5, nowMouse); | |
listLines.get(5).setPoints(start6, nowMouse); | |
graphics2D.setColor(Color.RED); | |
drawСircleCoordinate(graphics2D, pick, nowMouse, true); | |
graphics2D.setColor(Color.BLACK); | |
} else | |
{ | |
listLines.get(0).setPoints(start1, end1); | |
listLines.get(1).setPoints(start2, end2); | |
listLines.get(2).setPoints(start3, end3); | |
listLines.get(3).setPoints(start4, end4); | |
listLines.get(4).setPoints(start5, end5); | |
listLines.get(5).setPoints(start6, end6); | |
} | |
} | |
paintLines(graphics2D); | |
//drawСircle(graphics2D, sizeBigCircle); | |
} | |
private Point drawСircle(Graphics2D graphics2D, int size) | |
{ | |
Dimension dimension = getSize(); | |
Point center = new Point(dimension.width / 2, dimension.height / 2); | |
Point circle = new Point(center.x - (size / 2), center.y - (size / 2)); | |
graphics2D.drawOval(circle.x, circle.y, size, size); | |
return center; | |
} | |
private Point drawСircleCoordinate(Graphics2D graphics2D, int size, Point center, boolean isDraw) | |
{ | |
Point circle = new Point(center.x - (size / 2), center.y - (size / 2)); | |
if (isDraw) | |
{ | |
graphics2D.drawOval(circle.x, circle.y, size, size); | |
} | |
return center; | |
} | |
private Point calculateCenterCircleSmall(int sizeCircle, Point center, double angle) | |
{ | |
//x0,y0 - центр, a - угол, r - радиус. | |
int radius = sizeCircle / 2; | |
int x = (int) (center.x + radius * Math.cos(angle)); | |
int y = (int) (center.y + radius * Math.sin(angle)); | |
return new Point(x, y); | |
} | |
private void paintLines(Graphics2D graphics2D) | |
{ | |
listLines.each{graphics2D.drawLine(l.getPointStart().x, l.getPointStart().y, l.getPointEnd().x, l.getPointEnd().y)}; | |
} | |
private class MA extends MouseAdapter | |
{ | |
@Override | |
public void mouseEntered(MouseEvent e) | |
{ | |
inside = true; | |
PanelFigure.this.repaint(); | |
} | |
@Override | |
public void mouseMoved(MouseEvent e) | |
{ | |
nowMouse = e.getPoint(); | |
PanelFigure.this.repaint(); | |
} | |
@Override | |
public void mouseExited(MouseEvent e) | |
{ | |
inside = false; | |
PanelFigure.this.repaint(); | |
} | |
} | |
public int getSizeSmallCircle() | |
{ | |
return sizeSmallCircle; | |
} | |
public void setSizeSmallCircle(int sizeSmallCircle) | |
{ | |
this.sizeSmallCircle = sizeSmallCircle; | |
} | |
public int getSizeVerySmallCircle() | |
{ | |
return sizeVerySmallCircle; | |
} | |
public void setSizeVerySmallCircle(int sizeVerySmallCircle) | |
{ | |
this.sizeVerySmallCircle = sizeVerySmallCircle; | |
} | |
public int getSizeBigCircle() | |
{ | |
return sizeBigCircle; | |
} | |
public void setSizeBigCircle(int sizeBigCircle) | |
{ | |
this.sizeBigCircle = sizeBigCircle; | |
} | |
public int getPick() | |
{ | |
return pick; | |
} | |
public void setPick(int pick) | |
{ | |
this.pick = pick; | |
} | |
} | |
class Line | |
{ | |
Point pointStart; | |
Point pointEnd; | |
public Point getPointStart() | |
{ | |
return pointStart; | |
} | |
public void setPointStart(Point pointStart) | |
{ | |
this.pointStart = pointStart; | |
} | |
public Point getPointEnd() | |
{ | |
return pointEnd; | |
} | |
public void setPointEnd(Point pointEnd) | |
{ | |
this.pointEnd = pointEnd; | |
} | |
public void setPoints(Point pointStart, Point pointEnd) | |
{ | |
this.pointStart = pointStart; | |
this.pointEnd = pointEnd; | |
} | |
} | |
[/code] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment