- public void setTitleText(String titleText) {
- this.titleText = titleText;
- }
-
- public String getTitleText() {
- return titleText;
- }
-
- public void setContentText(String contentText) {
- this.contentText = contentText;
- }
-
- public String getContentText() {
- return contentText;
- }
-
- public void paintComponent(Graphics g) {
- super.paintComponent(g);
-
- // Draw
- g.setColor(Color.black);
- if (debug)
- // Below the JLabel
- g.drawString(this.getContentText(), 5, 35);
- Graphics2D g2d = (Graphics2D) g;
- g2d.drawImage(this.personImage.getScaledInstance(getWidth() / 2, getHeight() / 2, Image.SCALE_SMOOTH), getWidth() / 4, getHeight() / 4, this);
- }
-
- private static Ellipse2D getCircleByCenter(Point2D center, double radius) {
- Ellipse2D.Double myCircle = new Ellipse2D.Double(center.getX() - radius, center.getY() - radius, 2 * radius, 2 * radius);
- return myCircle;