forked from processing/processing-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass.xml
More file actions
executable file
·76 lines (59 loc) · 1.73 KB
/
class.xml
File metadata and controls
executable file
·76 lines (59 loc) · 1.73 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>class</name>
<category>Structure</category>
<subcategory></subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
// Declare and construct two objects (h1, h2) from the class HLine
HLine h1 = new HLine(20, 2.0);
HLine h2 = new HLine(50, 2.5);
void setup()
{
size(200, 200);
frameRate(30);
}
void draw() {
background(204);
h1.update();
h2.update();
}
class HLine {
float ypos, speed;
HLine (float y, float s) {
ypos = y;
speed = s;
}
void update() {
ypos += speed;
if (ypos > height) {
ypos = 0;
}
line(0, ypos, width, ypos);
}
}
]]></code>
</example>
<description><![CDATA[
Keyword used to indicate the declaration of a class. A class is a composite of fields (data) and methods (functions that are a part of the class) which may be instantiated as objects. The first letter of a class name is usually uppercase to separate it from other kinds of variables. A related tutorial on <a href="http://download.oracle.com/javase/tutorial/java/concepts/index.html" target="_blank">Object-Oriented Programming</a> is hosted on the Oracle website.
]]></description>
<syntax>
class <c>ClassName</c> {
<c>statements</c>
}
</syntax>
<parameter>
<label>ClassName</label>
<description><![CDATA[Any valid variable name]]></description>
</parameter>
<parameter>
<label>statements</label>
<description><![CDATA[any valid statements]]></description>
</parameter>
<returns></returns>
<related>Object</related>
<availability>1.0</availability>
<partof>PDE</partof>
</root>