document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2.  *   JAVA DRAWING APP
  3.  *   Author  : Johnivan Aldo S
  4.  *           : Yeremia Dhyan L
  5.  *   Version : 7 Januari 2021
  6.  *  
  7.  *   Kelas tool details untuk memasukkan variable warna dan ketebalan dari pilihan user ke dalam program
  8.  */
  9.  
  10. import java.awt.*;
  11.  
  12.  
  13. public class ToolDetails extends Tool
  14. {
  15.  
  16.     protected int strokeWidth;
  17.     protected Color color;
  18.  
  19.     public ToolDetails(Color brushColor, int stroke, int type)
  20.     {
  21.         super(type);
  22.         color = brushColor;
  23.         strokeWidth = stroke;
  24.     }
  25.  
  26.     public Color getColor()
  27.     {
  28.         return color;
  29.     }
  30.  
  31.     public void setColor(Color clr)
  32.     {
  33.         color = clr;
  34.     }
  35.  
  36.     public void setStrokeWidth(int dim)
  37.     {
  38.         strokeWidth = dim;
  39.     }
  40.  
  41.     public int getStrokeWidth()
  42.     {
  43.         return strokeWidth;
  44.     }
  45. }
  46.  
');