aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/intermediate/extensions
diff options
context:
space:
mode:
authorSimon Pepping <spepping@apache.org>2010-11-17 19:45:27 +0000
committerSimon Pepping <spepping@apache.org>2010-11-17 19:45:27 +0000
commitcfa853d5b2a728fa90c12cd1a44ca1a3eec1a12e (patch)
treefd4917a892fb3a096ebcac26112539eba4bdde25 /src/java/org/apache/fop/render/intermediate/extensions
parent43798aa8a3f263ca8ff0ba6de96a046a79f21011 (diff)
downloadxmlgraphics-fop-cfa853d5b2a728fa90c12cd1a44ca1a3eec1a12e.tar.gz
xmlgraphics-fop-cfa853d5b2a728fa90c12cd1a44ca1a3eec1a12e.zip
findbugs-reported bug squashing; 959 bugs left (findbugs 1.3.9)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1036179 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/intermediate/extensions')
-rw-r--r--src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java8
-rw-r--r--src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java8
-rw-r--r--src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java4
-rw-r--r--src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java8
-rw-r--r--src/java/org/apache/fop/render/intermediate/extensions/URIAction.java6
5 files changed, 17 insertions, 17 deletions
diff --git a/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java b/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java
index 340b2e068..8d8a30cf6 100644
--- a/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java
+++ b/src/java/org/apache/fop/render/intermediate/extensions/AbstractAction.java
@@ -33,7 +33,7 @@ public abstract class AbstractAction implements XMLizable {
* Sets an ID to make the action referencable.
* @param id the ID
*/
- public void setID(String id) {
+ public void setId(String id) {
this.id = id;
}
@@ -41,7 +41,7 @@ public abstract class AbstractAction implements XMLizable {
* Returns an optional ID for this action.
* @return the ID or null
*/
- public String getID() {
+ public String getId() {
return this.id;
}
@@ -65,7 +65,7 @@ public abstract class AbstractAction implements XMLizable {
* Indicates whether the action has an ID and is therefore referencable.
* @return true if the action has an ID
*/
- public boolean hasID() {
+ public boolean hasId() {
return this.id != null;
}
@@ -90,7 +90,7 @@ public abstract class AbstractAction implements XMLizable {
* Returns a string that is used to prefix a generated ID to make it unique.
* @return the prefix string
*/
- public String getIDPrefix() {
+ public String getIdPrefix() {
return null;
}
diff --git a/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java b/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java
index b980f1051..719d2225b 100644
--- a/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java
+++ b/src/java/org/apache/fop/render/intermediate/extensions/ActionSet.java
@@ -39,7 +39,7 @@ public class ActionSet {
*/
public synchronized String generateNewID(AbstractAction action) {
this.lastGeneratedID++;
- String prefix = action.getIDPrefix();
+ String prefix = action.getIdPrefix();
if (prefix == null) {
throw new IllegalArgumentException("Action class is not compatible");
}
@@ -62,12 +62,12 @@ public class ActionSet {
* @return the action instance that should be used in place of the given one
*/
public AbstractAction put(AbstractAction action) {
- if (!action.hasID()) {
- action.setID(generateNewID(action));
+ if (!action.hasId()) {
+ action.setId(generateNewID(action));
}
AbstractAction effAction = normalize(action);
if (effAction == action) {
- this.actionRegistry.put(action.getID(), action);
+ this.actionRegistry.put(action.getId(), action);
}
return effAction;
}
diff --git a/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java b/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java
index 5ca480f4a..1d5bc23fe 100644
--- a/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java
+++ b/src/java/org/apache/fop/render/intermediate/extensions/DocumentNavigationHandler.java
@@ -41,7 +41,7 @@ public class DocumentNavigationHandler extends DefaultHandler
implements DocumentNavigationExtensionConstants {
/** Logger instance */
- protected static Log log = LogFactory.getLog(DocumentNavigationHandler.class);
+ protected static final Log log = LogFactory.getLog(DocumentNavigationHandler.class);
private StringBuffer content = new StringBuffer();
private Stack objectStack = new Stack();
@@ -132,7 +132,7 @@ public class DocumentNavigationHandler extends DefaultHandler
boolean newWindow = "new".equals(showDestination);
URIAction action = new URIAction(gotoURI, newWindow);
if (id != null) {
- action.setID(id);
+ action.setId(id);
}
if (structurePointer != null) {
action.setStructurePointer(structurePointer);
diff --git a/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java b/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java
index a2b4f31b6..d905c7800 100644
--- a/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java
+++ b/src/java/org/apache/fop/render/intermediate/extensions/GoToXYAction.java
@@ -52,7 +52,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx
* or null, if the position isn't known, yet
*/
public GoToXYAction(String id, int pageIndex, Point targetLocation) {
- setID(id);
+ setId(id);
if (pageIndex < 0 && targetLocation != null) {
throw new IllegalArgumentException(
"Page index may not be null if target location is known!");
@@ -144,7 +144,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx
AttributesImpl atts = new AttributesImpl();
if (this.isCompleteExceptTargetLocation()) {
final Point reportedTargetLocation = this.getTargetLocation();
- atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID());
+ atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getId());
atts.addAttribute(null, "page-index", "page-index",
XMLUtil.CDATA, Integer.toString(pageIndex));
atts.addAttribute(null, "x", "x", XMLUtil.CDATA,
@@ -152,7 +152,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx
atts.addAttribute(null, "y", "y", XMLUtil.CDATA,
Integer.toString(reportedTargetLocation.y));
} else {
- atts.addAttribute(null, "idref", "idref", XMLUtil.CDATA, getID());
+ atts.addAttribute(null, "idref", "idref", XMLUtil.CDATA, getId());
}
handler.startElement(GOTO_XY.getNamespaceURI(),
GOTO_XY.getLocalName(), GOTO_XY.getQName(), atts);
@@ -162,7 +162,7 @@ public class GoToXYAction extends AbstractAction implements DocumentNavigationEx
/** {@inheritDoc} */
public String toString() {
- return "GoToXY: ID=" + getID()
+ return "GoToXY: ID=" + getId()
+ ", page=" + getPageIndex()
+ ", loc=" + getTargetLocation() + ", "
+ (isComplete() ? "complete" : "INCOMPLETE");
diff --git a/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java b/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java
index 22e7a270c..4251619ff 100644
--- a/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java
+++ b/src/java/org/apache/fop/render/intermediate/extensions/URIAction.java
@@ -82,15 +82,15 @@ public class URIAction extends AbstractAction implements DocumentNavigationExten
}
/** {@inheritDoc} */
- public String getIDPrefix() {
+ public String getIdPrefix() {
return "fop-" + GOTO_URI.getLocalName();
}
/** {@inheritDoc} */
public void toSAX(ContentHandler handler) throws SAXException {
AttributesImpl atts = new AttributesImpl();
- if (hasID()) {
- atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getID());
+ if (hasId()) {
+ atts.addAttribute(null, "id", "id", XMLUtil.CDATA, getId());
}
atts.addAttribute(null, "uri", "uri", XMLUtil.CDATA, getURI());
if (isNewWindow()) {