-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimplePicture.ctxt
More file actions
143 lines (143 loc) · 12.8 KB
/
SimplePicture.ctxt
File metadata and controls
143 lines (143 loc) · 12.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#BlueJ class context
comment0.params=
comment0.target=SimplePicture()
comment0.text=\r\n\ A\ Constructor\ that\ takes\ no\ arguments.\ \ It\ creates\ a\ picture\ with\r\n\ a\ width\ of\ 200\ and\ a\ height\ of\ 100\ that\ is\ all\ white.\r\n\ A\ no-argument\ constructor\ must\ be\ given\ in\ order\ for\ a\ class\ to\r\n\ be\ able\ to\ be\ subclassed.\ \ By\ default\ all\ subclasses\ will\ implicitly\r\n\ call\ this\ in\ their\ parent's\ no-argument\ constructor\ unless\ a\ \r\n\ different\ call\ to\ super()\ is\ explicitly\ made\ as\ the\ first\ line\ \r\n\ of\ code\ in\ a\ constructor.\r\n
comment1.params=fileName
comment1.target=SimplePicture(java.lang.String)
comment1.text=\r\n\ A\ Constructor\ that\ takes\ a\ file\ name\ and\ uses\ the\ file\ to\ create\r\n\ a\ picture\r\n\ @param\ fileName\ the\ file\ name\ to\ use\ in\ creating\ the\ picture\r\n
comment10.params=
comment10.target=java.awt.Graphics\ getGraphics()
comment10.text=\r\n\ Method\ to\ get\ a\ graphics\ object\ for\ this\ picture\ to\ use\ to\ draw\ on\r\n\ @return\ a\ graphics\ object\ to\ use\ for\ drawing\r\n
comment11.params=
comment11.target=java.awt.Graphics2D\ createGraphics()
comment11.text=\r\n\ Method\ to\ get\ a\ Graphics2D\ object\ for\ this\ picture\ which\ can\r\n\ be\ used\ to\ do\ 2D\ drawing\ on\ the\ picture\r\n
comment12.params=
comment12.target=java.lang.String\ getFileName()
comment12.text=\r\n\ Method\ to\ get\ the\ file\ name\ associated\ with\ the\ picture\r\n\ @return\ \ the\ file\ name\ associated\ with\ the\ picture\r\n
comment13.params=name
comment13.target=void\ setFileName(java.lang.String)
comment13.text=\r\n\ Method\ to\ set\ the\ file\ name\r\n\ @param\ name\ the\ full\ pathname\ of\ the\ file\r\n
comment14.params=
comment14.target=java.lang.String\ getTitle()
comment14.text=\r\n\ Method\ to\ get\ the\ title\ of\ the\ picture\r\n\ @return\ the\ title\ of\ the\ picture\r\n
comment15.params=title
comment15.target=void\ setTitle(java.lang.String)
comment15.text=\r\n\ Method\ to\ set\ the\ title\ for\ the\ picture\r\n\ @param\ title\ the\ title\ to\ use\ for\ the\ picture\r\n
comment16.params=
comment16.target=int\ getWidth()
comment16.text=\r\n\ Method\ to\ get\ the\ width\ of\ the\ picture\ in\ pixels\r\n\ @return\ the\ width\ of\ the\ picture\ in\ pixels\r\n
comment17.params=
comment17.target=int\ getHeight()
comment17.text=\r\n\ Method\ to\ get\ the\ height\ of\ the\ picture\ in\ pixels\r\n\ @return\ \ the\ height\ of\ the\ picture\ in\ pixels\r\n
comment18.params=
comment18.target=PictureFrame\ getPictureFrame()
comment18.text=\r\n\ Method\ to\ get\ the\ picture\ frame\ for\ the\ picture\r\n\ @return\ the\ picture\ frame\ associated\ with\ this\ picture\r\n\ (it\ may\ be\ null)\r\n
comment19.params=pictureFrame
comment19.target=void\ setPictureFrame(PictureFrame)
comment19.text=\r\n\ Method\ to\ set\ the\ picture\ frame\ for\ this\ picture\r\n\ @param\ pictureFrame\ the\ picture\ frame\ to\ use\ \r\n
comment2.params=width\ height
comment2.target=SimplePicture(int,\ int)
comment2.text=\r\n\ A\ constructor\ that\ takes\ the\ width\ and\ height\ desired\ for\ a\ picture\ and\r\n\ creates\ a\ buffered\ image\ of\ that\ size.\ \ This\ constructor\ doesn't\ \r\n\ show\ the\ picture.\ \ The\ pixels\ will\ all\ be\ white.\r\n\ @param\ width\ the\ desired\ width\r\n\ @param\ height\ the\ desired\ height\r\n
comment20.params=
comment20.target=java.awt.Image\ getImage()
comment20.text=\r\n\ Method\ to\ get\ an\ image\ from\ the\ picture\r\n\ @return\ \ the\ buffered\ image\ since\ it\ is\ an\ image\r\n
comment21.params=x\ y
comment21.target=int\ getBasicPixel(int,\ int)
comment21.text=\r\n\ Method\ to\ return\ the\ pixel\ value\ as\ an\ int\ for\ the\ given\ x\ and\ y\ location\r\n\ @param\ x\ the\ x\ coordinate\ of\ the\ pixel\r\n\ @param\ y\ the\ y\ coordinate\ of\ the\ pixel\r\n\ @return\ the\ pixel\ value\ as\ an\ integer\ (alpha,\ red,\ green,\ blue)\r\n
comment22.params=x\ y\ rgb
comment22.target=void\ setBasicPixel(int,\ int,\ int)
comment22.text=\ \r\n\ Method\ to\ set\ the\ value\ of\ a\ pixel\ in\ the\ picture\ from\ an\ int\r\n\ @param\ x\ the\ x\ coordinate\ of\ the\ pixel\r\n\ @param\ y\ the\ y\ coordinate\ of\ the\ pixel\r\n\ @param\ rgb\ the\ new\ rgb\ value\ of\ the\ pixel\ (alpha,\ red,\ green,\ blue)\r\n
comment23.params=x\ y
comment23.target=Pixel\ getPixel(int,\ int)
comment23.text=\r\n\ Method\ to\ get\ a\ pixel\ object\ for\ the\ given\ x\ and\ y\ location\r\n\ @param\ x\ \ the\ x\ location\ of\ the\ pixel\ in\ the\ picture\r\n\ @param\ y\ \ the\ y\ location\ of\ the\ pixel\ in\ the\ picture\r\n\ @return\ a\ Pixel\ object\ for\ this\ location\r\n
comment24.params=
comment24.target=Pixel[]\ getPixels()
comment24.text=\r\n\ Method\ to\ get\ a\ one-dimensional\ array\ of\ Pixels\ for\ this\ simple\ picture\r\n\ @return\ a\ one-dimensional\ array\ of\ Pixel\ objects\ starting\ with\ y\=0\r\n\ to\ y\=height-1\ and\ x\=0\ to\ x\=width-1.\r\n
comment25.params=
comment25.target=Pixel[][]\ getPixels2D()
comment25.text=\r\n\ Method\ to\ get\ a\ two-dimensional\ array\ of\ Pixels\ for\ this\ simple\ picture\r\n\ @return\ a\ two-dimensional\ array\ of\ Pixel\ objects\ in\ row-major\ order.\r\n
comment26.params=image
comment26.target=void\ load(java.awt.Image)
comment26.text=\r\n\ Method\ to\ load\ the\ buffered\ image\ with\ the\ passed\ image\r\n\ @param\ image\ \ the\ image\ to\ use\r\n
comment27.params=
comment27.target=void\ show()
comment27.text=\r\n\ Method\ to\ show\ the\ picture\ in\ a\ picture\ frame\r\n
comment28.params=
comment28.target=void\ hide()
comment28.text=\r\n\ Method\ to\ hide\ the\ picture\ display\r\n
comment29.params=flag
comment29.target=void\ setVisible(boolean)
comment29.text=\r\n\ Method\ to\ make\ this\ picture\ visible\ or\ not\r\n\ @param\ flag\ true\ if\ you\ want\ it\ visible\ else\ false\r\n
comment3.params=width\ height\ theColor
comment3.target=SimplePicture(int,\ int,\ java.awt.Color)
comment3.text=\r\n\ A\ constructor\ that\ takes\ the\ width\ and\ height\ desired\ for\ a\ picture\ and\r\n\ creates\ a\ buffered\ image\ of\ that\ size.\ \ It\ also\ takes\ the\r\n\ color\ to\ use\ for\ the\ background\ of\ the\ picture.\r\n\ @param\ width\ the\ desired\ width\r\n\ @param\ height\ the\ desired\ height\r\n\ @param\ theColor\ the\ background\ color\ for\ the\ picture\r\n
comment30.params=
comment30.target=void\ explore()
comment30.text=\r\n\ Method\ to\ open\ a\ picture\ explorer\ on\ a\ copy\ (in\ memory)\ of\ this\ \r\n\ simple\ picture\r\n
comment31.params=
comment31.target=void\ repaint()
comment31.text=\r\n\ Method\ to\ force\ the\ picture\ to\ repaint\ itself.\ \ This\ is\ very\r\n\ useful\ after\ you\ have\ changed\ the\ pixels\ in\ a\ picture\ and\r\n\ you\ want\ to\ see\ the\ change.\r\n
comment32.params=fileName
comment32.target=void\ loadOrFail(java.lang.String)
comment32.text=\r\n\ Method\ to\ load\ the\ picture\ from\ the\ passed\ file\ name\r\n\ @param\ fileName\ the\ file\ name\ to\ use\ to\ load\ the\ picture\ from\r\n\ @throws\ IOException\ if\ the\ picture\ isn't\ found\r\n
comment33.params=fileName
comment33.target=boolean\ load(java.lang.String)
comment33.text=\r\n\ Method\ to\ read\ the\ contents\ of\ the\ picture\ from\ a\ filename\ \ \r\n\ without\ throwing\ errors\r\n\ @param\ fileName\ the\ name\ of\ the\ file\ to\ write\ the\ picture\ to\r\n\ @return\ true\ if\ success\ else\ false\r\n
comment34.params=fileName
comment34.target=boolean\ loadImage(java.lang.String)
comment34.text=\r\n\ Method\ to\ load\ the\ picture\ from\ the\ passed\ file\ name\r\n\ this\ just\ calls\ load(fileName)\ and\ is\ for\ name\ compatibility\r\n\ @param\ fileName\ the\ file\ name\ to\ use\ to\ load\ the\ picture\ from\r\n\ @return\ true\ if\ success\ else\ false\r\n
comment35.params=message\ xPos\ yPos
comment35.target=void\ addMessage(java.lang.String,\ int,\ int)
comment35.text=\r\n\ Method\ to\ draw\ a\ message\ as\ a\ string\ on\ the\ buffered\ image\ \r\n\ @param\ message\ the\ message\ to\ draw\ on\ the\ buffered\ image\r\n\ @param\ xPos\ \ the\ x\ coordinate\ of\ the\ leftmost\ point\ of\ the\ string\ \r\n\ @param\ yPos\ \ the\ y\ coordinate\ of\ the\ bottom\ of\ the\ string\ \ \r\n
comment36.params=text\ xPos\ yPos
comment36.target=void\ drawString(java.lang.String,\ int,\ int)
comment36.text=\r\n\ Method\ to\ draw\ a\ string\ at\ the\ given\ location\ on\ the\ picture\r\n\ @param\ text\ the\ text\ to\ draw\r\n\ @param\ xPos\ the\ left\ x\ for\ the\ text\ \r\n\ @param\ yPos\ the\ top\ y\ for\ the\ text\r\n
comment37.params=xFactor\ yFactor
comment37.target=Picture\ scale(double,\ double)
comment37.text=\r\n\ Method\ to\ create\ a\ new\ picture\ by\ scaling\ the\ current\r\n\ picture\ by\ the\ given\ x\ and\ y\ factors\r\n\ @param\ xFactor\ the\ amount\ to\ scale\ in\ x\r\n\ @param\ yFactor\ the\ amount\ to\ scale\ in\ y\r\n\ @return\ the\ resulting\ picture\r\n
comment38.params=width
comment38.target=Picture\ getPictureWithWidth(int)
comment38.text=\r\n\ Method\ to\ create\ a\ new\ picture\ of\ the\ passed\ width.\ \r\n\ The\ aspect\ ratio\ of\ the\ width\ and\ height\ will\ stay\r\n\ the\ same.\r\n\ @param\ width\ the\ desired\ width\r\n\ @return\ the\ resulting\ picture\r\n
comment39.params=height
comment39.target=Picture\ getPictureWithHeight(int)
comment39.text=\r\n\ Method\ to\ create\ a\ new\ picture\ of\ the\ passed\ height.\ \r\n\ The\ aspect\ ratio\ of\ the\ width\ and\ height\ will\ stay\r\n\ the\ same.\r\n\ @param\ height\ the\ desired\ height\r\n\ @return\ the\ resulting\ picture\r\n
comment4.params=copyPicture
comment4.target=SimplePicture(SimplePicture)
comment4.text=\r\n\ A\ Constructor\ that\ takes\ a\ picture\ to\ copy\ information\ from\r\n\ @param\ copyPicture\ the\ picture\ to\ copy\ from\r\n
comment40.params=fileName
comment40.target=boolean\ loadPictureAndShowIt(java.lang.String)
comment40.text=\r\n\ Method\ to\ load\ a\ picture\ from\ a\ file\ name\ and\ show\ it\ in\ a\ picture\ frame\r\n\ @param\ fileName\ the\ file\ name\ to\ load\ the\ picture\ from\r\n\ @return\ true\ if\ success\ else\ false\r\n
comment41.params=fileName
comment41.target=void\ writeOrFail(java.lang.String)
comment41.text=\r\n\ Method\ to\ write\ the\ contents\ of\ the\ picture\ to\ a\ file\ with\ \r\n\ the\ passed\ name\r\n\ @param\ fileName\ the\ name\ of\ the\ file\ to\ write\ the\ picture\ to\r\n
comment42.params=fileName
comment42.target=boolean\ write(java.lang.String)
comment42.text=\r\n\ Method\ to\ write\ the\ contents\ of\ the\ picture\ to\ a\ file\ with\ \r\n\ the\ passed\ name\ without\ throwing\ errors\r\n\ @param\ fileName\ the\ name\ of\ the\ file\ to\ write\ the\ picture\ to\r\n\ @return\ true\ if\ success\ else\ false\r\n
comment43.params=fileName
comment43.target=java.lang.String\ getMediaPath(java.lang.String)
comment43.text=\r\n\ Method\ to\ get\ the\ directory\ for\ the\ media\r\n\ @param\ fileName\ the\ base\ file\ name\ to\ use\r\n\ @return\ the\ full\ path\ name\ by\ appending\r\n\ the\ file\ name\ to\ the\ media\ directory\r\n
comment44.params=trans
comment44.target=java.awt.geom.Rectangle2D\ getTransformEnclosingRect(java.awt.geom.AffineTransform)
comment44.text=\r\n\ Method\ to\ get\ the\ coordinates\ of\ the\ enclosing\ rectangle\ after\ this\r\n\ transformation\ is\ applied\ to\ the\ current\ picture\r\n\ @return\ the\ enclosing\ rectangle\r\n
comment45.params=trans
comment45.target=java.awt.geom.Rectangle2D\ getTranslationEnclosingRect(java.awt.geom.AffineTransform)
comment45.text=\r\n\ Method\ to\ get\ the\ coordinates\ of\ the\ enclosing\ rectangle\ after\ this\r\n\ transformation\ is\ applied\ to\ the\ current\ picture\r\n\ @return\ the\ enclosing\ rectangle\r\n
comment46.params=
comment46.target=java.lang.String\ toString()
comment46.text=\r\n\ Method\ to\ return\ a\ string\ with\ information\ about\ this\ picture\r\n\ @return\ a\ string\ with\ information\ about\ the\ picture\ \r\n
comment5.params=image
comment5.target=SimplePicture(java.awt.image.BufferedImage)
comment5.text=\r\n\ A\ constructor\ that\ takes\ a\ buffered\ image\r\n\ @param\ image\ the\ buffered\ image\r\n
comment6.params=
comment6.target=java.lang.String\ getExtension()
comment6.text=\r\n\ Method\ to\ get\ the\ extension\ for\ this\ picture\r\n\ @return\ the\ extension\ (jpg,\ bmp,\ giff,\ etc)\r\n
comment7.params=sourcePicture
comment7.target=void\ copyPicture(SimplePicture)
comment7.text=\r\n\ Method\ that\ will\ copy\ all\ of\ the\ passed\ source\ picture\ into\r\n\ the\ current\ picture\ object\ \r\n\ @param\ sourcePicture\ \ the\ picture\ object\ to\ copy\r\n
comment8.params=color
comment8.target=void\ setAllPixelsToAColor(java.awt.Color)
comment8.text=\r\n\ Method\ to\ set\ the\ color\ in\ the\ picture\ to\ the\ passed\ color\r\n\ @param\ color\ the\ color\ to\ set\ to\r\n
comment9.params=
comment9.target=java.awt.image.BufferedImage\ getBufferedImage()
comment9.text=\r\n\ Method\ to\ get\ the\ buffered\ image\r\n\ @return\ the\ buffered\ image\ \r\n
numComments=47