Revision: 1109
Author: heuermh
Date: Wed Mar 2 08:04:43 2011
Log: applying doc & style patch from Issue 204
http://code.google.com/p/piccolo2d/source/detail?r=1109
Modified:
/piccolo2d.java/branches/release-1.3/examples/src/main/java/edu/umd/cs/piccolo/tutorial/InterfaceFrame.java
=======================================
---
/piccolo2d.java/branches/release-1.3/examples/src/main/java/edu/umd/cs/piccolo/tutorial/InterfaceFrame.java
Mon Jan 18 16:07:38 2010
+++
/piccolo2d.java/branches/release-1.3/examples/src/main/java/edu/umd/cs/piccolo/tutorial/InterfaceFrame.java
Wed Mar 2 08:04:43 2011
@@ -61,11 +61,11 @@
// Create a node.
final PNode aNode = new PNode();
- // A node will not be visible until its bounds and brush are set.
+ // A node will not be visible until its bounds and paint are set.
aNode.setBounds(0, 0, 100, 80);
aNode.setPaint(Color.RED);
- // A node needs to be a descendent of the root to be displayed.
+ // A node needs to be a descendant of the root to be displayed.
final PLayer layer = getCanvas().getLayer();
layer.addChild(aNode);
@@ -76,7 +76,7 @@
aNode.addChild(anotherNode);
// The base bounds of a node are easy to change. Changing the
bounds
- // of a node will not affect it's children.
+ // of a node will not affect its children.
aNode.setBounds(-10, -10, 200, 110);
// Each node has a transform that can be used to modify the
position,
@@ -112,7 +112,7 @@
myCompositeFace.addChild(eye2);
myCompositeFace.addChild(mouth);
- // Don't want anyone grabbing out our eye's.
+ // Don't want anyone grabbing out our eyes.
myCompositeFace.setChildrenPickable(false);
// Position the face parts.
@@ -124,7 +124,7 @@
b.inset(-5, -5);
myCompositeFace.setBounds(b);
- // Opps its to small, so scale it up.
+ // Opps it's too small, so scale it up.
myCompositeFace.scale(1.5);
layer.addChild(myCompositeFace);
@@ -137,11 +137,8 @@
class ToggleShape extends PPath {
- /**
- *
- */
private static final long serialVersionUID = 1L;
- private boolean fIsPressed = false;
+ private boolean isPressed = false;
public ToggleShape() {
setPathToEllipse(0, 0, 100, 80);
@@ -149,20 +146,20 @@
addInputEventListener(new PBasicInputEventHandler() {
public void mousePressed(final PInputEvent event) {
super.mousePressed(event);
- fIsPressed = true;
+ isPressed = true;
repaint();
}
public void mouseReleased(final PInputEvent event) {
super.mouseReleased(event);
- fIsPressed = false;
+ isPressed = false;
repaint();
}
});
}
protected void paint(final PPaintContext paintContext) {
- if (fIsPressed) {
+ if (isPressed) {
final Graphics2D g2 = paintContext.getGraphics();
g2.setPaint(getPaint());
g2.fill(getBoundsReference());
--
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en