[FOray-commit] SF.net SVN: foray: [8556] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-01-31 03:47:25
|
Revision: 8556
http://svn.sourceforge.net/foray/?rev=8556&view=rev
Author: victormote
Date: 2007-01-30 19:47:26 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Conform to axsl changes for converting an enumeration to a typesafe enum.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/Area.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 02:34:41 UTC (rev 8555)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/Area.java 2007-01-31 03:47:26 UTC (rev 8556)
@@ -1081,7 +1081,7 @@
* {@link LinkType#INTERNAL}. If this area is not part
* of a link, returns {@link LinkType#INVALID}.
*/
- public byte linkType() {
+ public LinkType linkType() {
final BasicLink link = this.traitGeneratedBy().getBasicLink(this);
if (link == null) {
return LinkType.INVALID;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2007-01-31 02:34:41 UTC (rev 8555)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/BasicLink.java 2007-01-31 03:47:26 UTC (rev 8556)
@@ -81,17 +81,14 @@
}
public boolean isValid() {
- switch (getLinkType()) {
- case LinkType.INTERNAL: {
+ final LinkType linkType = getLinkType();
+ if (linkType == LinkType.INTERNAL) {
return true;
}
- case LinkType.EXTERNAL: {
+ if (linkType == LinkType.EXTERNAL) {
return true;
}
- default: {
- return false;
- }
- }
+ return false;
}
public String getName() {
@@ -105,7 +102,7 @@
return this;
}
- public byte getLinkType() {
+ public LinkType getLinkType() {
if (! traitInternalDestination().equals("")) {
return LinkType.INTERNAL;
}
@@ -137,17 +134,14 @@
}
public String getDestination() {
- switch (this.getLinkType()) {
- case LinkType.INTERNAL: {
+ final LinkType linkType = getLinkType();
+ if (linkType == LinkType.INTERNAL) {
return this.traitInternalDestination();
}
- case LinkType.EXTERNAL: {
+ if (linkType == LinkType.EXTERNAL) {
return this.getCookedExternalDestination();
}
- default: {
- return null;
- }
- }
+ return null;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|