Browse Source

Amended a couple javadocs and some trivial clean up


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1380169 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-2_0
Mehdi Houshmand 11 years ago
parent
commit
b3f537310f

+ 5
- 9
src/java/org/apache/fop/events/CompositeEventListener.java View File

@@ -19,6 +19,7 @@

package org.apache.fop.events;

import java.util.ArrayList;
import java.util.List;

/**
@@ -26,7 +27,7 @@ import java.util.List;
*/
public class CompositeEventListener implements EventListener {

private List listeners = new java.util.ArrayList();
private List<EventListener> listeners = new ArrayList<EventListener>();

/**
* Adds an event listener to the broadcaster. It is appended to the list of previously
@@ -46,22 +47,17 @@ public class CompositeEventListener implements EventListener {
this.listeners.remove(listener);
}

private synchronized int getListenerCount() {
return this.listeners.size();
}

/**
* Indicates whether any listeners have been registered with the broadcaster.
* @return true if listeners are present, false otherwise
*/
public boolean hasEventListeners() {
return (getListenerCount() > 0);
return !listeners.isEmpty();
}

/** {@inheritDoc} */
/** {@inheritDoc } */
public synchronized void processEvent(Event event) {
for (int i = 0, c = getListenerCount(); i < c; i++) {
EventListener listener = (EventListener)this.listeners.get(i);
for (EventListener listener : listeners) {
listener.processEvent(event);
}
}

+ 2
- 2
src/java/org/apache/fop/pdf/PDFEncoding.java View File

@@ -153,8 +153,8 @@ public class PDFEncoding extends PDFDictionary {
/**
* Creates an array containing the differences between two single-byte.
* font encodings.
* @param encoding_A The first single-byte encoding
* @param encoding_B The second single-byte encoding
* @param encodingA The first single-byte encoding
* @param encodingB The second single-byte encoding
* @return The PDFArray of differences between encodings
*/
public PDFArray buildDifferencesArray(SingleByteEncoding encodingA,

Loading…
Cancel
Save