< prev index next >
src/java.desktop/share/classes/sun/swing/AccumulativeRunnable.java
Print this page
@@ -47,14 +47,14 @@
* We might want to implement this {@code setText} in a way that only
* the last update is delivered.
* <p>
* Here is how one can do this using {@code AccumulativeRunnable}:
* <pre>
- * AccumulativeRunnable<String> doSetTextImpl =
- * new AccumulativeRunnable<String>() {
- * @Override
- * protected void run(List<String> args) {
+ * {@code AccumulativeRunnable<String> doSetTextImpl =
+ * new AccumulativeRunnable<String>()} {
+ * {@literal @Override}
+ * {@code protected void run(List<String> args)} {
* //set to the last string being passed
* setTextImpl(args.get(args.size() - 1));
* }
* }
* void setText(String text) {
@@ -64,20 +64,20 @@
* </pre>
*
* <p>
* Say we want to implement addDirtyRegion(Rectangle rect)
* which sends this region to the
- * handleDirtyRegions(List<Rect> regiouns) on the EDT.
+ * {@code handleDirtyRegions(List<Rect> regiouns)} on the EDT.
* addDirtyRegions better be accumulated before handling on the EDT.
*
* <p>
* Here is how it can be implemented using AccumulativeRunnable:
* <pre>
- * AccumulativeRunnable<Rectangle> doHandleDirtyRegions =
- * new AccumulativeRunnable<Rectangle>() {
- * @Override
- * protected void run(List<Rectangle> args) {
+ * {@code AccumulativeRunnable<Rectangle> doHandleDirtyRegions =}
+ * {@code new AccumulativeRunnable<Rectangle>()} {
+ * {@literal @Override}
+ * {@code protected void run(List<Rectangle> args)} {
* handleDirtyRegions(args);
* }
* };
* void addDirtyRegion(Rectangle rect) {
* doHandleDirtyRegions.add(rect);
@@ -111,11 +111,11 @@
public final void run() {
run(flush());
}
/**
- * appends arguments and sends this {@cod Runnable} for the
+ * appends arguments and sends this {@code Runnable} for the
* execution if needed.
* <p>
* This implementation uses {@see #submit} to send this
* {@code Runnable} for execution.
* @param args the arguments to accumulate
< prev index next >