foray-commit Mailing List for FOray (Page 281)
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(139) |
Apr
(98) |
May
(250) |
Jun
(394) |
Jul
(84) |
Aug
(13) |
Sep
(420) |
Oct
(186) |
Nov
(1) |
Dec
(3) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(108) |
Feb
(202) |
Mar
(291) |
Apr
(247) |
May
(374) |
Jun
(227) |
Jul
(231) |
Aug
(60) |
Sep
(31) |
Oct
(45) |
Nov
(18) |
Dec
|
| 2008 |
Jan
(38) |
Feb
(71) |
Mar
(142) |
Apr
|
May
(59) |
Jun
(6) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
(12) |
Feb
(4) |
Mar
(88) |
Apr
(121) |
May
(17) |
Jun
(30) |
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2010 |
Jan
(11) |
Feb
(76) |
Mar
(11) |
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
(44) |
Sep
(14) |
Oct
(7) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(168) |
| 2017 |
Jan
(77) |
Feb
(11) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
(88) |
Mar
(118) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(141) |
| 2021 |
Jan
(170) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(62) |
Nov
(189) |
Dec
(162) |
| 2022 |
Jan
(201) |
Feb
(118) |
Mar
(8) |
Apr
|
May
(2) |
Jun
(47) |
Jul
(19) |
Aug
(14) |
Sep
(3) |
Oct
|
Nov
(28) |
Dec
(235) |
| 2023 |
Jan
(112) |
Feb
(23) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(70) |
Sep
(92) |
Oct
(20) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(14) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(10) |
Feb
(29) |
Mar
|
Apr
(162) |
May
(245) |
Jun
(83) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(4) |
Dec
(23) |
| 2026 |
Jan
(119) |
Feb
(335) |
Mar
(103) |
Apr
(43) |
May
(154) |
Jun
(107) |
Jul
(187) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <vic...@us...> - 2006-09-07 19:02:07
|
Revision: 7940
http://svn.sourceforge.net/foray/?rev=7940&view=rev
Author: victormote
Date: 2006-09-07 12:01:57 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Style changes only.
Modified Paths:
--------------
trunk/foray/foray-render/src/java/org/foray/render/TempImage.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/GoToPageDialog.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/MessagesDialog.java
trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java
trunk/foray/foray-render/src/java/org/foray/render/ps/ASCII85OutputStream.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java
Modified: trunk/foray/foray-render/src/java/org/foray/render/TempImage.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/TempImage.java 2006-09-07 18:43:16 UTC (rev 7939)
+++ trunk/foray/foray-render/src/java/org/foray/render/TempImage.java 2006-09-07 19:01:57 UTC (rev 7940)
@@ -37,25 +37,25 @@
*/
public class TempImage implements Graphic {
- int m_height;
- int m_width;
- int m_bitsPerPixel;
- ColorSpace m_colorSpace;
- int m_bitmapSiye;
- byte[] m_bitmaps;
- byte[] m_mask;
+ int height;
+ int width;
+ int bitsPerPixel;
+ ColorSpace colorSpace;
+ int bitmapSiye;
+ byte[] bitmaps;
+ byte[] mask;
Color transparent = new Color(255, 255, 255);
URL url;
public TempImage(final URL url, final int width, final int height,
final byte[] result, final byte[] mask) throws GraphicException {
this.url = url;
- this.m_height = height;
- this.m_width = width;
- this.m_bitsPerPixel = 8;
- this.m_colorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
- this.m_bitmaps = result;
- this.m_mask = mask;
+ this.height = height;
+ this.width = width;
+ this.bitsPerPixel = 8;
+ this.colorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
+ this.bitmaps = result;
+ this.mask = mask;
}
/**
@@ -76,28 +76,28 @@
* {@inheritDoc}
*/
public int pixelWidth() throws GraphicException {
- return m_width;
+ return width;
}
/**
* {@inheritDoc}
*/
public int pixelHeight() throws GraphicException {
- return m_height;
+ return height;
}
/**
* {@inheritDoc}
*/
public ColorSpace getColorSpace() throws GraphicException {
- return m_colorSpace;
+ return colorSpace;
}
/**
* {@inheritDoc}
*/
public int getBitsPerPixel() throws GraphicException {
- return m_bitsPerPixel;
+ return bitsPerPixel;
}
/**
@@ -118,14 +118,14 @@
* {@inheritDoc}
*/
public byte[] getContent() throws GraphicException {
- return m_bitmaps;
+ return bitmaps;
}
/**
* {@inheritDoc}
*/
public int getContentSize() throws GraphicException {
- return m_width * m_height * 3;
+ return width * height * 3;
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/GoToPageDialog.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/GoToPageDialog.java 2006-09-07 18:43:16 UTC (rev 7939)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/GoToPageDialog.java 2006-09-07 19:01:57 UTC (rev 7940)
@@ -84,7 +84,7 @@
okButton.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
- okButton_actionPerformed(e);
+ okButtonActionPerformed(e);
}
});
@@ -92,7 +92,7 @@
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
- cancelButton_actionPerformed(e);
+ cancelButtonActionPerformed(e);
}
});
@@ -120,7 +120,7 @@
new Insets(0, 10, 10, 10), 0, 0));
}
- void okButton_actionPerformed(final ActionEvent e) {
+ void okButtonActionPerformed(final ActionEvent e) {
try {
pageNumber = Integer.parseInt(pgNbField.getText());
dispose();
@@ -130,7 +130,7 @@
}
- void cancelButton_actionPerformed(final ActionEvent e) {
+ void cancelButtonActionPerformed(final ActionEvent e) {
pageNumber = -1;
dispose();
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/MessagesDialog.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/MessagesDialog.java 2006-09-07 18:43:16 UTC (rev 7939)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/MessagesDialog.java 2006-09-07 19:01:57 UTC (rev 7940)
@@ -50,11 +50,11 @@
static Translator res;
- static String DETAIL_OPTION;
- static String YES_STRING;
- static String NO_STRING;
- static String CANCEL_STRING;
- static String OK_STRING;
+ static String detailOption;
+ static String yesString;
+ static String noString;
+ static String cancelString;
+ static String okString;
static String[] defaultDetailOption;
static String[] yesNoDetailOption;
@@ -83,36 +83,36 @@
}
private static void iniConstants() {
- DETAIL_OPTION = res.getString("Details");
- YES_STRING = res.getString("Yes");
- NO_STRING = res.getString("No");
- CANCEL_STRING = res.getString("Cancel");
- OK_STRING = res.getString("Ok");
+ detailOption = res.getString("Details");
+ yesString = res.getString("Yes");
+ noString = res.getString("No");
+ cancelString = res.getString("Cancel");
+ okString = res.getString("Ok");
defaultDetailOption = new String[] {
- OK_STRING, DETAIL_OPTION
+ okString, detailOption
};
yesNoDetailOption = new String[] {
- YES_STRING, NO_STRING, DETAIL_OPTION
+ yesString, noString, detailOption
};
yesNoCancelDetailOption = new String[] {
- YES_STRING, NO_STRING, CANCEL_STRING, DETAIL_OPTION
+ yesString, noString, cancelString, detailOption
};
okCancelDetailOption = new String[] {
- OK_STRING, CANCEL_STRING, DETAIL_OPTION
+ okString, cancelString, detailOption
};
defaultOption = new String[] {
- OK_STRING
+ okString
};
yesNoOption = new String[] {
- YES_STRING, NO_STRING
+ yesString, noString
};
yesNoCancelOption = new String[] {
- YES_STRING, NO_STRING, CANCEL_STRING
+ yesString, noString, cancelString
};
okCancelOption = new String[] {
- OK_STRING, CANCEL_STRING
+ okString, cancelString
};
}
@@ -154,16 +154,16 @@
return CLOSED_OPTION;
}
- if (selectedValue.equals(OK_STRING)) {
+ if (selectedValue.equals(okString)) {
return JOptionPane.OK_OPTION;
}
- if (selectedValue.equals(CANCEL_STRING)) {
+ if (selectedValue.equals(cancelString)) {
return JOptionPane.CANCEL_OPTION;
}
- if (selectedValue.equals(YES_STRING)) {
+ if (selectedValue.equals(yesString)) {
return JOptionPane.YES_OPTION;
}
- if (selectedValue.equals(NO_STRING)) {
+ if (selectedValue.equals(noString)) {
return JOptionPane.NO_OPTION;
}
@@ -217,20 +217,20 @@
return CLOSED_OPTION;
}
- if (((String)selectedValue).equals(DETAIL_OPTION)) {
+ if (((String)selectedValue).equals(detailOption)) {
return CLOSED_OPTION;
}
- if (selectedValue.equals(OK_STRING)) {
+ if (selectedValue.equals(okString)) {
return JOptionPane.OK_OPTION;
}
- if (selectedValue.equals(CANCEL_STRING)) {
+ if (selectedValue.equals(cancelString)) {
return JOptionPane.CANCEL_OPTION;
}
- if (selectedValue.equals(YES_STRING)) {
+ if (selectedValue.equals(yesString)) {
return JOptionPane.YES_OPTION;
}
- if (selectedValue.equals(NO_STRING)) {
+ if (selectedValue.equals(noString)) {
return JOptionPane.NO_OPTION;
}
@@ -263,7 +263,7 @@
// Zugriff
public void setValue(final Object aValue) {
- if (aValue != null && DETAIL_OPTION.equals(aValue)) {
+ if (aValue != null && detailOption.equals(aValue)) {
displayDetails(getDialog());
} else {
super.setValue(aValue);
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java 2006-09-07 18:43:16 UTC (rev 7939)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/viewer/PreviewDialog.java 2006-09-07 19:01:57 UTC (rev 7940)
@@ -199,7 +199,7 @@
scale.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
- scale_actionPerformed(e);
+ scaleActionPerformed(e);
}
});
@@ -559,7 +559,7 @@
showPage();
}
- void scale_actionPerformed(final ActionEvent e) {
+ void scaleActionPerformed(final ActionEvent e) {
setScale(new Double((String)scale.getSelectedItem()).doubleValue());
}
@@ -577,14 +577,14 @@
* it is done.
*/
public void progress(final String message) {
- SwingUtilities.invokeLater(new showProgress(message, false));
+ SwingUtilities.invokeLater(new ShowProgress(message, false));
}
/**
* This class is used to show status and error messages in
* a thread safe way.
*/
- class showProgress implements Runnable {
+ class ShowProgress implements Runnable {
/**
* The message to display
*/
@@ -601,7 +601,7 @@
* @param message message to display
* @param isErrorMessage show in status bar or in JOptionPane
*/
- public showProgress(final Object message,
+ public ShowProgress(final Object message,
final boolean isErrorMessage) {
this.message = message;
this.isErrorMessage = isErrorMessage;
@@ -618,7 +618,7 @@
}
public void showPage() {
- final showPageImage viewer = new showPageImage();
+ final ShowPageImage viewer = new ShowPageImage();
if (SwingUtilities.isEventDispatchThread()) {
viewer.run();
@@ -631,7 +631,7 @@
* This class is used to update the page image
* in a thread safe way.
*/
- class showPageImage implements Runnable {
+ class ShowPageImage implements Runnable {
/**
* The run method that does the actuall updating
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/ASCII85OutputStream.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/ASCII85OutputStream.java 2006-09-07 18:43:16 UTC (rev 7939)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/ASCII85OutputStream.java 2006-09-07 19:01:57 UTC (rev 7940)
@@ -47,13 +47,13 @@
private static final int EOL = 0x0A; //"\n"
private static final byte[] EOD = {0x7E, 0x3E}; //"~>"
- private static final long base85_4 = 85;
- private static final long base85_3 = ASCII85OutputStream.base85_4
- * ASCII85OutputStream.base85_4;
- private static final long base85_2 = ASCII85OutputStream.base85_3
- * ASCII85OutputStream.base85_4;
- private static final long base85_1 = ASCII85OutputStream.base85_2
- * ASCII85OutputStream.base85_4;
+ private static final long BASE_85_4 = 85;
+ private static final long BASE_85_3 = ASCII85OutputStream.BASE_85_4
+ * ASCII85OutputStream.BASE_85_4;
+ private static final long BASE_85_2 = ASCII85OutputStream.BASE_85_3
+ * ASCII85OutputStream.BASE_85_4;
+ private static final long BASE_85_1 = ASCII85OutputStream.BASE_85_2
+ * ASCII85OutputStream.BASE_85_4;
private static final boolean DEBUG = false;
@@ -145,25 +145,25 @@
if (word < 0) {
word = -word;
}
- final byte c1 = (byte)((word / ASCII85OutputStream.base85_1) & 0xFF);
- final byte c2 = (byte)(((word - (c1 * ASCII85OutputStream.base85_1))
- / ASCII85OutputStream.base85_2) & 0xFF);
+ final byte c1 = (byte)((word / ASCII85OutputStream.BASE_85_1) & 0xFF);
+ final byte c2 = (byte)(((word - (c1 * ASCII85OutputStream.BASE_85_1))
+ / ASCII85OutputStream.BASE_85_2) & 0xFF);
final byte c3 =
- (byte)(((word - (c1 * ASCII85OutputStream.base85_1)
- - (c2 * ASCII85OutputStream.base85_2))
- / ASCII85OutputStream.base85_3)
+ (byte)(((word - (c1 * ASCII85OutputStream.BASE_85_1)
+ - (c2 * ASCII85OutputStream.BASE_85_2))
+ / ASCII85OutputStream.BASE_85_3)
& 0xFF);
final byte c4 =
- (byte)(((word - (c1 * ASCII85OutputStream.base85_1)
- - (c2 * ASCII85OutputStream.base85_2)
- - (c3 * ASCII85OutputStream.base85_3))
- / ASCII85OutputStream.base85_4)
+ (byte)(((word - (c1 * ASCII85OutputStream.BASE_85_1)
+ - (c2 * ASCII85OutputStream.BASE_85_2)
+ - (c3 * ASCII85OutputStream.BASE_85_3))
+ / ASCII85OutputStream.BASE_85_4)
& 0xFF);
final byte c5 =
- (byte)(((word - (c1 * ASCII85OutputStream.base85_1)
- - (c2 * ASCII85OutputStream.base85_2)
- - (c3 * ASCII85OutputStream.base85_3)
- - (c4 * ASCII85OutputStream.base85_4)))
+ (byte)(((word - (c1 * ASCII85OutputStream.BASE_85_1)
+ - (c2 * ASCII85OutputStream.BASE_85_2)
+ - (c3 * ASCII85OutputStream.BASE_85_3)
+ - (c4 * ASCII85OutputStream.BASE_85_4)))
& 0xFF);
final byte[] ret = {
Modified: trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2006-09-07 18:43:16 UTC (rev 7939)
+++ trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2006-09-07 19:01:57 UTC (rev 7940)
@@ -70,7 +70,7 @@
* A {@link Renderer} implementation that writes the document as SVG.
*/
public class SVGRenderer extends Renderer {
- static final String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
+ static final String SVG_NS = SVGDOMImplementation.SVG_NAMESPACE_URI;
Document svgDocument;
Element svgRoot;
Element currentPageG = null;
@@ -247,7 +247,7 @@
+ (this.totalHeight - this.pageHeight) + ")");
final Element lastPageLink = this.svgDocument.createElementNS(
- SVGRenderer.svgNS, "a");
+ SVGRenderer.SVG_NS, "a");
if (this.lastLink != null) {
lastPageLink.setAttributeNS(null, "xlink:href",
"#svgView(viewBox(0, " + (this.totalHeight - this.pageHeight
@@ -266,7 +266,7 @@
rect.setAttributeNS(null, "style", "fill:blue;visibility:hidden");
lastPageLink.appendChild(rect);
- this.lastLink = this.svgDocument.createElementNS(SVGRenderer.svgNS,
+ this.lastLink = this.svgDocument.createElementNS(SVGRenderer.SVG_NS,
"a");
rect = SVGUtilities.createRect(this.svgDocument, this.pageWidth / 2, 0,
this.pageWidth / 2, this.pageHeight);
@@ -509,8 +509,8 @@
protected void renderSVGDocument(final Document doc, final float x,
final float y) {
final SVGSVGElement svg = ((SVGDocument)doc).getRootElement();
- final Element view = this.svgDocument.createElementNS(SVGRenderer.svgNS,
- "svg");
+ final Element view = this.svgDocument.createElementNS(
+ SVGRenderer.SVG_NS, "svg");
final Node newsvg = this.svgDocument.importNode(svg, true);
//view.setAttributeNS(null, "viewBox", "0 0 ");
view.setAttributeNS(null, "x", "" + x);
@@ -519,7 +519,7 @@
// this fixes a problem where the xmlns is repeated sometimes
final Element ele = (Element)newsvg;
ele.setAttributeNS(XMLSupport.XMLNS_NAMESPACE_URI, "xmlns",
- SVGRenderer.svgNS);
+ SVGRenderer.SVG_NS);
if(ele.hasAttributeNS(null, "xmlns")) {
ele.removeAttributeNS(null, "xmlns");
}
@@ -535,7 +535,7 @@
public void startOutput() throws IOException {
final DOMImplementation impl =
SVGDOMImplementation.getDOMImplementation();
- this.svgDocument = impl.createDocument(SVGRenderer.svgNS, "svg", null);
+ this.svgDocument = impl.createDocument(SVGRenderer.SVG_NS, "svg", null);
final ProcessingInstruction pi =
this.svgDocument.createProcessingInstruction(
"xml",
Modified: trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java 2006-09-07 18:43:16 UTC (rev 7939)
+++ trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java 2006-09-07 19:01:57 UTC (rev 7940)
@@ -41,14 +41,14 @@
* Some utilities for creating svg DOM documents and elements.
*/
public class SVGUtilities {
- static final String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
+ static final String SVG_NS = SVGDOMImplementation.SVG_NAMESPACE_URI;
public static final Document createSVGDocument(final float width,
final float height) {
final DOMImplementation impl =
SVGDOMImplementation.getDOMImplementation();
- final Document doc = impl.createDocument(SVGUtilities.svgNS, "svg",
+ final Document doc = impl.createDocument(SVGUtilities.SVG_NS, "svg",
null);
final Element svgRoot = doc.getDocumentElement();
@@ -95,7 +95,8 @@
*/
public static final Element createLine(final Document doc, final float x,
final float y, final float x2, final float y2) {
- final Element ellipse = doc.createElementNS(SVGUtilities.svgNS, "line");
+ final Element ellipse = doc.createElementNS(SVGUtilities.SVG_NS,
+ "line");
ellipse.setAttributeNS(null, "x1", "" + x);
ellipse.setAttributeNS(null, "x2", "" + x2);
ellipse.setAttributeNS(null, "y1", "" + y);
@@ -108,7 +109,7 @@
*/
public static final Element createEllipse(final Document doc,
final float cx, final float cy, final float rx, final float ry) {
- final Element ellipse = doc.createElementNS(SVGUtilities.svgNS,
+ final Element ellipse = doc.createElementNS(SVGUtilities.SVG_NS,
"ellipse");
ellipse.setAttributeNS(null, "cx", "" + cx);
ellipse.setAttributeNS(null, "rx", "" + rx);
@@ -122,7 +123,7 @@
*/
public static final Element createPath(final Document doc,
final String str) {
- final Element path = doc.createElementNS(SVGUtilities.svgNS, "path");
+ final Element path = doc.createElementNS(SVGUtilities.SVG_NS, "path");
path.setAttributeNS(null, "d", str);
return path;
}
@@ -132,7 +133,7 @@
*/
public static final Element createText(final Document doc, final float x,
final float y, final String str) {
- final Element textGraph = doc.createElementNS(SVGUtilities.svgNS,
+ final Element textGraph = doc.createElementNS(SVGUtilities.SVG_NS,
"text");
textGraph.setAttributeNS(null, "x", "" + x);
textGraph.setAttributeNS(null, "y", "" + y);
@@ -146,7 +147,7 @@
*/
public static final Element createRect(final Document doc, final float x,
final float y, final float width, final float height) {
- final Element border = doc.createElementNS(SVGUtilities.svgNS, "rect");
+ final Element border = doc.createElementNS(SVGUtilities.SVG_NS, "rect");
border.setAttributeNS(null, "x", "" + x);
border.setAttributeNS(null, "y", "" + y);
border.setAttributeNS(null, "width", "" + width);
@@ -158,7 +159,7 @@
* Create an SVG G.
*/
public static final Element createG(final Document doc) {
- final Element border = doc.createElementNS(SVGUtilities.svgNS, "g");
+ final Element border = doc.createElementNS(SVGUtilities.SVG_NS, "g");
return border;
}
@@ -167,7 +168,7 @@
*/
public static final Element createClip(final Document doc,
final Element els, final String id) {
- final Element border = doc.createElementNS(SVGUtilities.svgNS,
+ final Element border = doc.createElementNS(SVGUtilities.SVG_NS,
"clipPath");
border.setAttributeNS(null, "id", id);
border.appendChild(els);
@@ -176,7 +177,8 @@
public static final Element createImage(final Document doc,
final String ref, final float width, final float height) {
- final Element border = doc.createElementNS(SVGUtilities.svgNS, "image");
+ final Element border = doc.createElementNS(SVGUtilities.SVG_NS,
+ "image");
border.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href",
ref);
border.setAttributeNS(null, "width", "" + width);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-07 18:43:22
|
Revision: 7939
http://svn.sourceforge.net/foray/?rev=7939&view=rev
Author: victormote
Date: 2006-09-07 11:43:16 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Update references to axsl builds.
Modified Paths:
--------------
trunk/foray/scripts/foray.bat
Modified: trunk/foray/scripts/foray.bat
===================================================================
--- trunk/foray/scripts/foray.bat 2006-09-07 17:19:07 UTC (rev 7938)
+++ trunk/foray/scripts/foray.bat 2006-09-07 18:43:16 UTC (rev 7939)
@@ -3,14 +3,14 @@
set FORAY_CP=%FORAY_HOME%\build\foray-0.2b1.jar
rem Add separate AXSL build in if it exists
-set FORAY_CP=%FORAY_CP%;%AXSL_HOME%\build\ant\axsl-0.1a.jar
+set FORAY_CP=%FORAY_CP%;%AXSL_HOME%\build\ant\axsl-0.2a.jar
rem Add ICU4J in (not in lib yet)
set FORAY_CP=%FORAY_CP%;D:\rsrc\icu4j\3_4_3\icu4j_3_4_3.jar
rem Now add regular lib jar files
set FORAY_CP=%FORAY_CP%;%FORAY_HOME%\lib\avalon-framework-cvs-20020806.jar
-set FORAY_CP=%FORAY_CP%;%FORAY_HOME%\lib\axsl-0.1a.jar
+set FORAY_CP=%FORAY_CP%;%FORAY_HOME%\lib\axsl-0.1.jar
set FORAY_CP=%FORAY_CP%;%FORAY_HOME%\lib\batik.jar
set FORAY_CP=%FORAY_CP%;%FORAY_HOME%\lib\commons-logging.jar
set FORAY_CP=%FORAY_CP%;%FORAY_HOME%\lib\resolver.jar
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-07 17:19:12
|
Revision: 7938
http://svn.sourceforge.net/foray/?rev=7938&view=rev
Author: victormote
Date: 2006-09-07 10:19:07 -0700 (Thu, 07 Sep 2006)
Log Message:
-----------
Add releases aXSL version to lib.
Added Paths:
-----------
trunk/foray/lib/axsl-0.1.jar
Removed Paths:
-------------
trunk/foray/lib/axsl-0.1a.jar
Added: trunk/foray/lib/axsl-0.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/foray/lib/axsl-0.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/foray/lib/axsl-0.1a.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 19:52:57
|
Revision: 7937
http://svn.sourceforge.net/foray/?rev=7937&view=rev
Author: victormote
Date: 2006-09-06 12:52:54 -0700 (Wed, 06 Sep 2006)
Log Message:
-----------
Put the license information at the top of the project section.
Modified Paths:
--------------
trunk/foray/doc/web/00-rsrc/include/leftmenu.html
Modified: trunk/foray/doc/web/00-rsrc/include/leftmenu.html
===================================================================
--- trunk/foray/doc/web/00-rsrc/include/leftmenu.html 2006-09-06 19:48:39 UTC (rev 7936)
+++ trunk/foray/doc/web/00-rsrc/include/leftmenu.html 2006-09-06 19:52:54 UTC (rev 7937)
@@ -123,14 +123,14 @@
<tr>
<td class="Bullet1"> </td>
<td class="Menu1">
- <a class="Menu" href="/project/heritage.html">Heritage</a>
+ <a class="Menu" rel="external"
+ href="http://www.apache.org/licenses/LICENSE-2.0">License</a>
</td>
</tr>
<tr>
<td class="Bullet1"> </td>
<td class="Menu1">
- <a class="Menu" rel="external"
- href="http://www.apache.org/licenses/LICENSE-2.0">License</a>
+ <a class="Menu" href="/project/heritage.html">Heritage</a>
</td>
</tr>
<tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 19:48:43
|
Revision: 7936
http://svn.sourceforge.net/foray/?rev=7936&view=rev
Author: victormote
Date: 2006-09-06 12:48:39 -0700 (Wed, 06 Sep 2006)
Log Message:
-----------
Add link to license to the menu.
Modified Paths:
--------------
trunk/foray/doc/web/00-rsrc/include/leftmenu.html
Modified: trunk/foray/doc/web/00-rsrc/include/leftmenu.html
===================================================================
--- trunk/foray/doc/web/00-rsrc/include/leftmenu.html 2006-09-06 15:42:56 UTC (rev 7935)
+++ trunk/foray/doc/web/00-rsrc/include/leftmenu.html 2006-09-06 19:48:39 UTC (rev 7936)
@@ -129,6 +129,13 @@
<tr>
<td class="Bullet1"> </td>
<td class="Menu1">
+ <a class="Menu" rel="external"
+ href="http://www.apache.org/licenses/LICENSE-2.0">License</a>
+ </td>
+ </tr>
+ <tr>
+ <td class="Bullet1"> </td>
+ <td class="Menu1">
<a class="Menu" href="/project/goals.html">Goals</a>
</td>
</tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 15:43:16
|
Revision: 7935
http://svn.sourceforge.net/foray/?rev=7935&view=rev
Author: victormote
Date: 2006-09-06 08:42:56 -0700 (Wed, 06 Sep 2006)
Log Message:
-----------
Conform to axsl changes regarding standardized naming.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Region.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionEnd.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionStart.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ColumnGap.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontFamily.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VoiceFamily.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -194,8 +194,8 @@
}
final RegionBody regionBody = simplePageMaster.getRegionBody();
final RegionRABody area = new RegionRABody(regionBody, this,
- regionBody.getXPositionVP_CR(this),
- regionBody.getYPositionVP_CR(this));
+ regionBody.getXPositionVPContent(this),
+ regionBody.getYPositionVPContent(this));
this.body = area;
}
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/RegionRA.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -44,11 +44,11 @@
}
public int getYPosition() {
- return ((Region) traitGeneratedBy()).getYPositionVP_CR(this);
+ return ((Region) traitGeneratedBy()).getYPositionVPContent(this);
}
public int getXPosition() {
- return ((Region) traitGeneratedBy()).getXPositionVP_CR(this);
+ return ((Region) traitGeneratedBy()).getXPositionVPContent(this);
}
public int crBPD() {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/ObjectMakerFO.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -104,7 +104,8 @@
* @return The enumerated value of the object name.
*/
public static byte enumerateObjectName(final String objectName) {
- return (byte) Arrays.binarySearch(Constants.objectNameList, objectName);
+ return (byte) Arrays.binarySearch(Constants.OBJECT_NAME_LIST,
+ objectName);
}
public static FObj makeObject(final String objectName, final FObj parent,
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/PropertyMakerFO.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -155,7 +155,7 @@
public static short enumeratePropertyName(String propertyName) {
propertyName = Property.getBasePropertyName(propertyName);
final short enumerated = (short) Arrays.binarySearch(
- Constants.propertyNameList, propertyName);
+ Constants.PROPERTY_NAME_LIST, propertyName);
return enumerated;
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Region.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Region.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/Region.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -155,28 +155,28 @@
* @return The X coordinate of the upper left corner of the region's
* viewport's content rectangle, in millipoints.
*/
- public abstract int getXPositionVP_CR(FOContext context) ;
+ public abstract int getXPositionVPContent(FOContext context) ;
/**
* <p>Convenience method reporting the region's vertical position.</p>
* @return The Y coordinate of the upper left corner of the region's
* viewport's content rectangle, in millipoints.
*/
- public abstract int getYPositionVP_CR(FOContext context) ;
+ public abstract int getYPositionVPContent(FOContext context) ;
/**
* <p>Convenience method reporting the region's width.</p>
* @return The width of the region's viewport's content rectangle, in
* millipoints.
*/
- public abstract int getWidthVP_CR(FOContext context) ;
+ public abstract int getWidthVPContent(FOContext context) ;
/**
* <p>Convenience method reporting the region's height.</p>
* @return The height of the region's viewport's content rectangle, in
* millipoints.
*/
- public abstract int getHeightVP_CR(FOContext context) ;
+ public abstract int getHeightVPContent(FOContext context) ;
public Namespace getNamespace() {
return this.getFOTreeBuilder().getFONamespace();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionAfter.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -69,7 +69,7 @@
/**
* {@inheritDoc}
*/
- public int getXPositionVP_CR(final FOContext context) {
+ public int getXPositionVPContent(final FOContext context) {
int xPosition = getPageMaster().getXPositionRA_CR();
if (traitPrecedence() == false) {
xPosition += getPageMaster().getStartExtent();
@@ -80,7 +80,7 @@
/**
* {@inheritDoc}
*/
- public int getYPositionVP_CR(final FOContext context) {
+ public int getYPositionVPContent(final FOContext context) {
return getPageMaster().getYPositionRA_CR()
- getPageMaster().getHeightRA_CR()
+ traitExtent();
@@ -89,7 +89,7 @@
/**
* {@inheritDoc}
*/
- public int getWidthVP_CR(final FOContext context) {
+ public int getWidthVPContent(final FOContext context) {
int width = getPageMaster().getWidthRA_CR();
if (traitPrecedence() == false) {
width -= getPageMaster().getStartExtent()
@@ -101,7 +101,7 @@
/**
* {@inheritDoc}
*/
- public int getHeightVP_CR(final FOContext context) {
+ public int getHeightVPContent(final FOContext context) {
return traitExtent();
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBefore.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -69,7 +69,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getXPositionVP_CR(final FOContext context) {
+ public int getXPositionVPContent(final FOContext context) {
final int pageWidth = getPageMaster().traitPageWidth();
int xPosition = getPageMaster().getMarginLeft(context, pageWidth);
if (traitPrecedence() == false) {
@@ -81,7 +81,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getYPositionVP_CR(final FOContext context) {
+ public int getYPositionVPContent(final FOContext context) {
final int pageWidth = getPageMaster().traitPageWidth();
return getPageMaster().traitPageHeight()
- getPageMaster().getMarginTop(context, pageWidth);
@@ -90,7 +90,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getWidthVP_CR(final FOContext context) {
+ public int getWidthVPContent(final FOContext context) {
final int pageWidth = getPageMaster().traitPageWidth();
int width = getPageMaster().traitPageWidth()
- getPageMaster().getMarginLeft(context, pageWidth)
@@ -105,7 +105,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getHeightVP_CR(final FOContext context) {
+ public int getHeightVPContent(final FOContext context) {
return traitExtent();
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionBody.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -69,7 +69,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getXPositionVP_CR(final FOContext context) {
+ public int getXPositionVPContent(final FOContext context) {
final int pageWidth = getPageMaster().traitPageWidth();
final int pageMarginLeft = getPageMaster().getMarginLeft(context,
pageWidth);
@@ -80,7 +80,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getYPositionVP_CR(final FOContext context) {
+ public int getYPositionVPContent(final FOContext context) {
final int pageWidth = getPageMaster().traitPageWidth();
final int pageHeight = getPageMaster().traitPageHeight();
final int pageMarginTop = getPageMaster().getMarginTop(context,
@@ -92,7 +92,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getWidthVP_CR(final FOContext context) {
+ public int getWidthVPContent(final FOContext context) {
final int pageWidth = getPageMaster().traitPageWidth();
return getPageMaster().traitPageWidth()
- getPageMaster().getMarginLeft(context, pageWidth)
@@ -104,7 +104,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getHeightVP_CR(final FOContext context) {
+ public int getHeightVPContent(final FOContext context) {
final int pageWidth = getPageMaster().traitPageWidth();
return getPageMaster().traitPageHeight()
- getPageMaster().getMarginTop(context, pageWidth)
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionEnd.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionEnd.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionEnd.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -68,7 +68,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getXPositionVP_CR(final FOContext context) {
+ public int getXPositionVPContent(final FOContext context) {
return getPageMaster().getXPositionRA_CR()
+ getPageMaster().getWidthRA_CR()
- traitExtent();
@@ -77,7 +77,7 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getYPositionVP_CR(final FOContext context) {
+ public int getYPositionVPContent(final FOContext context) {
int yPosition = getPageMaster().getYPositionRA_CR();
if (getPageMaster().getBeforePrecedence()) {
yPosition -= getPageMaster().getBeforeExtent();
@@ -88,14 +88,14 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getWidthVP_CR(final FOContext context) {
+ public int getWidthVPContent(final FOContext context) {
return traitExtent();
}
/**
* Inherited documentation: @inheritDoc
*/
- public int getHeightVP_CR(final FOContext context) {
+ public int getHeightVPContent(final FOContext context) {
int height = getPageMaster().getHeightRA_CR();
if (getPageMaster().getBeforePrecedence()) {
height -= getPageMaster().getBeforeExtent();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionStart.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionStart.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/RegionStart.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -69,14 +69,14 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getXPositionVP_CR(final FOContext context) {
+ public int getXPositionVPContent(final FOContext context) {
return getPageMaster().getXPositionRA_CR();
}
/**
* Inherited documentation: @inheritDoc
*/
- public int getYPositionVP_CR(final FOContext context) {
+ public int getYPositionVPContent(final FOContext context) {
int yPosition = getPageMaster().getYPositionRA_CR();
if (getPageMaster().getBeforePrecedence()) {
yPosition -= getPageMaster().getBeforeExtent();
@@ -87,14 +87,14 @@
/**
* Inherited documentation: @inheritDoc
*/
- public int getWidthVP_CR(final FOContext context) {
+ public int getWidthVPContent(final FOContext context) {
return traitExtent();
}
/**
* Inherited documentation: @inheritDoc
*/
- public int getHeightVP_CR(final FOContext context) {
+ public int getHeightVPContent(final FOContext context) {
int height = getPageMaster().getHeightRA_CR();
if (getPageMaster().getBeforePrecedence()) {
height -= getPageMaster().getBeforeExtent();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ColumnGap.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ColumnGap.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/ColumnGap.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -90,7 +90,7 @@
int base = 0;
if (fobj instanceof RegionBody) {
final RegionBody rb = (RegionBody) fobj;
- base = rb.getWidthVP_CR(context);
+ base = rb.getWidthVPContent(context);
}
final DtPercentage percentageDT = (DtPercentage) this.value;
final float percentage = percentageDT.getValue();
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontFamily.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontFamily.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/FontFamily.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -89,7 +89,7 @@
case Constants.FOVAL_FANTASY:
case Constants.FOVAL_MONOSPACE: {
final String[] returnArray
- = {Constants.propertyKeywordValues[keyword]};
+ = {Constants.PROPERTY_KEYWORD_VALUES[keyword]};
return returnArray;
}
}
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VoiceFamily.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VoiceFamily.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/VoiceFamily.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -78,7 +78,7 @@
case Constants.FOVAL_FEMALE:
case Constants.FOVAL_CHILD: {
final String[] returnArray
- = {Constants.propertyKeywordValues[keyword]};
+ = {Constants.PROPERTY_KEYWORD_VALUES[keyword]};
return returnArray;
}
}
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2006-09-06 15:42:56 UTC (rev 7935)
@@ -221,7 +221,7 @@
* If not set, the default value is PDF_VERSION_1_6.
*/
public void setVersion(final int newVersion) throws PDFException {
- if (newVersion >= 0 && newVersion < validVersions.length) {
+ if (newVersion >= 0 && newVersion < VALID_VERSIONS.length) {
this.pdfVersion = newVersion;
return;
}
@@ -314,7 +314,7 @@
this.position = 0;
final StringBuffer buffer = new StringBuffer();
// The PDF identifier comment.
- buffer.append("%PDF-" + versionStrings[pdfVersion] + PDFObject.EOL);
+ buffer.append("%PDF-" + VERSION_STRINGS[pdfVersion] + PDFObject.EOL);
// A binary comment as recommended by the PDF spec (3.4.1)
buffer.append("%" + (char) 0xAA + (char) 0xAB + (char) 0xAC
+ (char) 0xAD + PDFObject.EOL);
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2006-09-06 14:43:32 UTC (rev 7934)
+++ trunk/foray/scripts/checkstyle-config.xml 2006-09-06 15:42:56 UTC (rev 7935)
@@ -39,7 +39,7 @@
SUPER_CTOR_CALL"/>
</module>
<module name="TabCharacter">
- <property name="severity" value="error"/>
+ <property name="severity" value="warning"/>
</module>
<module name="FinalLocalVariable">
<property name="tokens" value="VARIABLE_DEF,PARAMETER_DEF"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 14:43:39
|
Revision: 7934
http://svn.sourceforge.net/foray/?rev=7934&view=rev
Author: victormote
Date: 2006-09-06 07:43:32 -0700 (Wed, 06 Sep 2006)
Log Message:
-----------
Conform to axsl change: Rename method for consistency and brevity.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-09-06 02:29:40 UTC (rev 7933)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/LineArea.java 2006-09-06 14:43:32 UTC (rev 7934)
@@ -96,7 +96,7 @@
}
}
- public void optimizeLine() {
+ public void optimize() {
if (this.optimized) {
return;
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-09-06 02:29:40 UTC (rev 7933)
+++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-09-06 14:43:32 UTC (rev 7934)
@@ -481,7 +481,7 @@
* @param area area to render
*/
public void render(final LineArea area) {
- area.optimizeLine();
+ area.optimize();
renderChildren(area);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 03:10:51
|
Revision: 7932
http://svn.sourceforge.net/foray/?rev=7932&view=rev
Author: victormote
Date: 2006-09-05 19:28:00 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to axsl change, which moved some logic previously in layout to the AreaTree.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2006-09-06 01:28:04 UTC (rev 7931)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/TableCellRA.java 2006-09-06 02:28:00 UTC (rev 7932)
@@ -194,4 +194,49 @@
return (TableRowContainer) this.getParent();
}
+ /**
+ * {@inheritDoc}
+ */
+ public void optimize() {
+ adjustDisplayAlign();
+ }
+
+ /**
+ * Use the "display-align" trait to position the cell contents vertically
+ * within the cell.
+ */
+ private void adjustDisplayAlign() {
+ /* Compute the difference between my height and the row height. */
+ final int delta = this.getTableRow().getProgressionDimension()
+ - this.getProgressionDimension();
+ if (delta <= 0) {
+ return;
+ }
+ short displayAlign = this.traitGeneratedBy().traitDisplayAlign(
+ this);
+ if (displayAlign == Constants.FOVAL_AUTO) {
+ /* TODO: This is not right. */
+ displayAlign = this.traitGeneratedBy().traitAlignmentBaseline(
+ this);
+ }
+ switch (displayAlign) {
+ case Constants.FOVAL_CENTER:
+ /* Increase cell padding before and after. */
+ this.setCenteringPaddingTop(delta / 2);
+ this.setCenteringPaddingBottom(delta - delta / 2);
+ break;
+ case Constants.FOVAL_AFTER:
+ /* Increase cell padding before. */
+ this.setCenteringPaddingTop(delta);
+ break;
+ case Constants.FOVAL_BEFORE:
+ /* Increase cell padding after. */
+ this.setCenteringPaddingBottom(delta);
+ default:
+ /* No adjustment needed. */
+ break;
+ }
+
+ }
+
}
Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java
===================================================================
--- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-09-06 01:28:04 UTC (rev 7931)
+++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableCellPL.java 2006-09-06 02:28:00 UTC (rev 7932)
@@ -83,31 +83,6 @@
areaContainer.incrementProgressionDimension(delta);
return;
}
- if (delta <= 0) {
- return;
- }
- // Vertical cell alignment
- short verticalAlign = getReal().traitDisplayAlign(context);
- if (verticalAlign == Constants.FOVAL_AUTO) {
- // Depends on all cells starting in row
- verticalAlign = getReal().traitAlignmentBaseline(context);
- }
- switch (verticalAlign) {
- case Constants.FOVAL_CENTER:
- // Increase cell padding before and after and change
- areaContainer.setCenteringPaddingTop(delta / 2);
- areaContainer.setCenteringPaddingBottom(delta - delta / 2);
- break;
- case Constants.FOVAL_AFTER:
- // Increase cell padding before and change
- areaContainer.setCenteringPaddingTop(delta);
- break;
- case Constants.FOVAL_BEFORE:
- // cellArea.increaseHeight(delta);
- areaContainer.setCenteringPaddingBottom(delta);
- default: // OK
- break;
- }
}
TableCell getReal() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 02:29:43
|
Revision: 7933
http://svn.sourceforge.net/foray/?rev=7933&view=rev
Author: victormote
Date: 2006-09-05 19:29:40 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Use the new optimize method to vertically align the table cell.
Modified Paths:
--------------
trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
Modified: trunk/foray/foray-render/src/java/org/foray/render/Renderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-09-06 02:28:00 UTC (rev 7932)
+++ trunk/foray/foray-render/src/java/org/foray/render/Renderer.java 2006-09-06 02:29:40 UTC (rev 7933)
@@ -459,6 +459,7 @@
* @param area the area container to render
*/
public void render(final TableCellArea area) {
+ area.optimize();
markBorder(area);
markBackground(area);
renderChildren(area);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 01:28:09
|
Revision: 7931
http://svn.sourceforge.net/foray/?rev=7931&view=rev
Author: victormote
Date: 2006-09-05 18:28:04 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Clean up redundant property.
Modified Paths:
--------------
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2006-09-06 01:11:32 UTC (rev 7930)
+++ trunk/foray/scripts/checkstyle-config.xml 2006-09-06 01:28:04 UTC (rev 7931)
@@ -92,9 +92,7 @@
<module name="RedundantModifier"/>
<!--Check for standard ordering of type declarations.-->
- <module name="DeclarationOrder">
- <property name="severity" value="error"/>
- </module>
+ <module name="DeclarationOrder"/>
<!--Require "this" identifier for all instance variables.-->
<module name="RequireThis">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 01:11:44
|
Revision: 7930
http://svn.sourceforge.net/foray/?rev=7930&view=rev
Author: victormote
Date: 2006-09-05 18:11:32 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Use "this" modifier for all instance or class variables.
Modified Paths:
--------------
trunk/foray/foray-render/src/java/org/foray/render/ps/ASCII85OutputStream.java
trunk/foray/foray-render/src/java/org/foray/render/ps/PSFont.java
trunk/foray/foray-render/src/java/org/foray/render/ps/PSGraphics2D.java
trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/ps/RunLengthEncodeOutputStream.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTStream.java
trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/ASCII85OutputStream.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/ASCII85OutputStream.java 2006-09-06 00:28:17 UTC (rev 7929)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/ASCII85OutputStream.java 2006-09-06 01:11:32 UTC (rev 7930)
@@ -42,15 +42,18 @@
implements Finalizable {
private static final int ZERO = 0x7A; //"z"
- private static final byte[] ZERO_ARRAY = {(byte)ZERO};
+ private static final byte[] ZERO_ARRAY = {(byte) ASCII85OutputStream.ZERO};
private static final int START = 0x21; //"!"
private static final int EOL = 0x0A; //"\n"
private static final byte[] EOD = {0x7E, 0x3E}; //"~>"
private static final long base85_4 = 85;
- private static final long base85_3 = base85_4 * base85_4;
- private static final long base85_2 = base85_3 * base85_4;
- private static final long base85_1 = base85_2 * base85_4;
+ private static final long base85_3 = ASCII85OutputStream.base85_4
+ * ASCII85OutputStream.base85_4;
+ private static final long base85_2 = ASCII85OutputStream.base85_3
+ * ASCII85OutputStream.base85_4;
+ private static final long base85_1 = ASCII85OutputStream.base85_2
+ * ASCII85OutputStream.base85_4;
private static final boolean DEBUG = false;
@@ -66,21 +69,21 @@
public void write(final int b) throws IOException {
- if (pos == 0) {
- buffer += (b << 24) & 0xff000000L;
- } else if (pos == 1) {
- buffer += (b << 16) & 0xff0000L;
- } else if (pos == 2) {
- buffer += (b << 8) & 0xff00L;
+ if (this.pos == 0) {
+ this.buffer += (b << 24) & 0xff000000L;
+ } else if (this.pos == 1) {
+ this.buffer += (b << 16) & 0xff0000L;
+ } else if (this.pos == 2) {
+ this.buffer += (b << 8) & 0xff00L;
} else {
- buffer += b & 0xffL;
+ this.buffer += b & 0xffL;
}
- pos++;
+ this.pos++;
- if (pos > 3) {
- checkedWrite(convertWord(buffer));
- buffer = 0;
- pos = 0;
+ if (this.pos > 3) {
+ checkedWrite(convertWord(this.buffer));
+ this.buffer = 0;
+ this.pos = 0;
}
}
@@ -103,22 +106,24 @@
private void checkedWrite(final byte[] buf, final int len,
final boolean nosplit) throws IOException {
- if (posinline + len > 80) {
- final int firstpart = (nosplit ? 0 : len - (posinline + len - 80));
+ if (this.posinline + len > 80) {
+ final int firstpart = (nosplit ? 0 : len - (this.posinline + len
+ - 80));
if (firstpart > 0) {
out.write(buf, 0, firstpart);
}
- out.write(EOL); bw++;
+ out.write(ASCII85OutputStream.EOL);
+ this.bw++;
final int rest = len - firstpart;
if (rest > 0) {
out.write(buf, firstpart, rest);
}
- posinline = rest;
+ this.posinline = rest;
} else {
out.write(buf, 0, len);
- posinline += len;
+ this.posinline += len;
}
- bw += len;
+ this.bw += len;
}
@@ -135,32 +140,41 @@
word = word & 0xffffffff;
if (word == 0) {
- return ZERO_ARRAY;
+ return ASCII85OutputStream.ZERO_ARRAY;
}
if (word < 0) {
word = -word;
}
- final byte c1 = (byte)((word / base85_1) & 0xFF);
- final byte c2 = (byte)(((word - (c1 * base85_1)) / base85_2) & 0xFF);
+ final byte c1 = (byte)((word / ASCII85OutputStream.base85_1) & 0xFF);
+ final byte c2 = (byte)(((word - (c1 * ASCII85OutputStream.base85_1))
+ / ASCII85OutputStream.base85_2) & 0xFF);
final byte c3 =
- (byte)(((word - (c1 * base85_1) - (c2 * base85_2)) / base85_3)
+ (byte)(((word - (c1 * ASCII85OutputStream.base85_1)
+ - (c2 * ASCII85OutputStream.base85_2))
+ / ASCII85OutputStream.base85_3)
& 0xFF);
final byte c4 =
- (byte)(((word - (c1 * base85_1) - (c2 * base85_2)
- - (c3 * base85_3)) / base85_4)
+ (byte)(((word - (c1 * ASCII85OutputStream.base85_1)
+ - (c2 * ASCII85OutputStream.base85_2)
+ - (c3 * ASCII85OutputStream.base85_3))
+ / ASCII85OutputStream.base85_4)
& 0xFF);
final byte c5 =
- (byte)(((word - (c1 * base85_1) - (c2 * base85_2)
- - (c3 * base85_3) - (c4 * base85_4)))
+ (byte)(((word - (c1 * ASCII85OutputStream.base85_1)
+ - (c2 * ASCII85OutputStream.base85_2)
+ - (c3 * ASCII85OutputStream.base85_3)
+ - (c4 * ASCII85OutputStream.base85_4)))
& 0xFF);
final byte[] ret = {
- (byte)(c1 + START), (byte)(c2 + START),
- (byte)(c3 + START), (byte)(c4 + START),
- (byte)(c5 + START)
+ (byte)(c1 + ASCII85OutputStream.START),
+ (byte)(c2 + ASCII85OutputStream.START),
+ (byte)(c3 + ASCII85OutputStream.START),
+ (byte)(c4 + ASCII85OutputStream.START),
+ (byte)(c5 + ASCII85OutputStream.START)
};
- if (DEBUG) {
+ if (ASCII85OutputStream.DEBUG) {
for (int i = 0; i < ret.length; i++) {
if (ret[i] < 33 || ret[i] > 117) {
throw new IOException("ASCII85 Filter: Illegal char value "
@@ -176,8 +190,8 @@
// with n leftover bytes, we append 0 bytes to make a full group of 4
// then convert like normal (except not applying the special zero rule)
// and write out the first n+1 bytes from the result
- if (pos > 0) {
- final int rest = pos;
+ if (this.pos > 0) {
+ final int rest = this.pos;
/*
byte[] lastdata = new byte[4];
int i = 0;
@@ -197,8 +211,8 @@
byte[] conv;
// special rule for handling zeros at the end
- if (buffer != 0) {
- conv = convertWord(buffer);
+ if (this.buffer != 0) {
+ conv = convertWord(this.buffer);
} else {
conv = new byte[5];
for (int j = 0; j < 5; j++) {
@@ -209,7 +223,7 @@
checkedWrite(conv, rest + 1);
}
// finally write the two character end of data marker
- checkedWrite(EOD, true);
+ checkedWrite(ASCII85OutputStream.EOD, true);
flush();
if (out instanceof Finalizable) {
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/PSFont.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/PSFont.java 2006-09-06 00:28:17 UTC (rev 7929)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSFont.java 2006-09-06 01:11:32 UTC (rev 7930)
@@ -67,7 +67,7 @@
* @return Returns the fsFont.
*/
public FontUse getFontUse() {
- return fontUse;
+ return this.fontUse;
}
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/PSGraphics2D.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/PSGraphics2D.java 2006-09-06 00:28:17 UTC (rev 7929)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSGraphics2D.java 2006-09-06 01:11:32 UTC (rev 7930)
@@ -90,7 +90,7 @@
{
final BufferedImage bi = new BufferedImage(1, 1,
BufferedImage.TYPE_INT_ARGB);
- fmg = bi.createGraphics();
+ this.fmg = bi.createGraphics();
}
/**
@@ -101,7 +101,7 @@
public PSGraphics2D(final boolean textAsShapes, final PSRenderer ren,
final String font, final int size, final int xpos, final int ypos) {
super(textAsShapes);
- psRenderer = ren;
+ this.psRenderer = ren;
}
public PSGraphics2D(final boolean textAsShapes) {
@@ -213,15 +213,15 @@
final AffineTransform at = getTransform();
final double[] matrix = new double[6];
at.getMatrix(matrix);
- psRenderer.write("gsave");
+ this.psRenderer.write("gsave");
final Shape imclip = getClip();
writeClip(imclip);
- psRenderer.write("1000 -1000 scale");
+ this.psRenderer.write("1000 -1000 scale");
// psRenderer.write("" + matrix[0] + " " + matrix[1] +
// " " + matrix[2] + " " + matrix[3] + " " +
// matrix[4] + " " + matrix[5] + " cm\n");
- psRenderer.renderBitmap(graphic, x, -y, width, height);
- psRenderer.write("grestore");
+ this.psRenderer.renderBitmap(graphic, x, -y, width, height);
+ this.psRenderer.write("grestore");
} catch (final Exception e) {
e.printStackTrace();
}
@@ -299,7 +299,7 @@
* @see java.awt.Component#getGraphics
*/
public void dispose() {
- psRenderer = null;
+ this.psRenderer = null;
}
/**
@@ -318,24 +318,24 @@
* @see AbstractGraphics2D#setComposite
*/
public void draw(final Shape s) {
- psRenderer.write("gsave");
+ this.psRenderer.write("gsave");
final Shape imclip = getClip();
writeClip(imclip);
final Color c = getColor();
- psRenderer.write(c.getRed() + " " + c.getGreen() + " " + c.getBlue()
- + " setrgbcolor");
+ this.psRenderer.write(c.getRed() + " " + c.getGreen() + " "
+ + c.getBlue() + " setrgbcolor");
applyPaint(getPaint(), false);
applyStroke(getStroke());
- psRenderer.write("newpath");
+ this.psRenderer.write("newpath");
final PathIterator iter = s.getPathIterator(getTransform());
while (!iter.isDone()) {
final double vals[] = new double[6];
final int type = iter.currentSegment(vals);
switch (type) {
case PathIterator.SEG_CUBICTO:
- psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ PSReal.doubleOut(1000 * vals[1]) + " "
+ PSReal.doubleOut(1000 * vals[2]) + " "
+ PSReal.doubleOut(1000 * vals[3]) + " "
@@ -344,12 +344,12 @@
+ " curveto");
break;
case PathIterator.SEG_LINETO:
- psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ PSReal.doubleOut(1000 * vals[1])
+ " lineto");
break;
case PathIterator.SEG_MOVETO:
- psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ PSReal.doubleOut(1000 * vals[1])
+ " M");
break;
@@ -360,7 +360,7 @@
// (1000 * PDFNumber.doubleOut(vals[3])) + " y\n");
break;
case PathIterator.SEG_CLOSE:
- psRenderer.write("closepath");
+ this.psRenderer.write("closepath");
break;
default:
break;
@@ -368,18 +368,18 @@
iter.next();
}
doDrawing(false, true, false);
- psRenderer.write("grestore");
+ this.psRenderer.write("grestore");
}
protected void writeClip(final Shape s) {
final PathIterator iter = s.getPathIterator(getTransform());
- psRenderer.write("newpath");
+ this.psRenderer.write("newpath");
while (!iter.isDone()) {
final double vals[] = new double[6];
final int type = iter.currentSegment(vals);
switch (type) {
case PathIterator.SEG_CUBICTO:
- psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ PSReal.doubleOut(1000 * vals[1]) + " "
+ PSReal.doubleOut(1000 * vals[2]) + " "
+ PSReal.doubleOut(1000 * vals[3]) + " "
@@ -388,12 +388,12 @@
+ " curveto");
break;
case PathIterator.SEG_LINETO:
- psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ PSReal.doubleOut(1000 * vals[1])
+ " lineto");
break;
case PathIterator.SEG_MOVETO:
- psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ PSReal.doubleOut(1000 * vals[1])
+ " M");
break;
@@ -404,7 +404,7 @@
// 1000 * PDFNumber.doubleOut(vals[3]) + " y\n");
break;
case PathIterator.SEG_CLOSE:
- psRenderer.write("closepath");
+ this.psRenderer.write("closepath");
break;
default:
break;
@@ -412,7 +412,7 @@
iter.next();
}
// clip area
- psRenderer.write("clippath");
+ this.psRenderer.write("clippath");
}
protected void applyPaint(final Paint paint, final boolean fill) {
@@ -461,48 +461,48 @@
final float[] da = bs.getDashArray();
if (da != null) {
- psRenderer.write("[");
+ this.psRenderer.write("[");
for (int count = 0; count < da.length; count++) {
- psRenderer.write("" + (1000 * (int)da[count]));
+ this.psRenderer.write("" + (1000 * (int)da[count]));
if (count < da.length - 1) {
- psRenderer.write(" ");
+ this.psRenderer.write(" ");
}
}
- psRenderer.write("] ");
+ this.psRenderer.write("] ");
final float offset = bs.getDashPhase();
- psRenderer.write((1000 * (int)offset) + " setdash");
+ this.psRenderer.write((1000 * (int)offset) + " setdash");
}
final int ec = bs.getEndCap();
switch (ec) {
case BasicStroke.CAP_BUTT:
- psRenderer.write(0 + " setlinecap");
+ this.psRenderer.write(0 + " setlinecap");
break;
case BasicStroke.CAP_ROUND:
- psRenderer.write(1 + " setlinecap");
+ this.psRenderer.write(1 + " setlinecap");
break;
case BasicStroke.CAP_SQUARE:
- psRenderer.write(2 + " setlinecap");
+ this.psRenderer.write(2 + " setlinecap");
break;
}
final int lj = bs.getLineJoin();
switch (lj) {
case BasicStroke.JOIN_MITER:
- psRenderer.write(0 + " setlinejoin");
+ this.psRenderer.write(0 + " setlinejoin");
break;
case BasicStroke.JOIN_ROUND:
- psRenderer.write(1 + " setlinejoin");
+ this.psRenderer.write(1 + " setlinejoin");
break;
case BasicStroke.JOIN_BEVEL:
- psRenderer.write(2 + " setlinejoin");
+ this.psRenderer.write(2 + " setlinejoin");
break;
}
final float lw = bs.getLineWidth();
- psRenderer.write(PSReal.doubleOut(1000 * lw)
+ this.psRenderer.write(PSReal.doubleOut(1000 * lw)
+ " setlinewidth");
final float ml = bs.getMiterLimit();
- psRenderer.write(PSReal.doubleOut(1000 * ml)
+ this.psRenderer.write(PSReal.doubleOut(1000 * ml)
+ " setmiterlimit");
}
}
@@ -591,19 +591,19 @@
* @see AbstractGraphics2D#setClip(java.awt.Shape)
*/
public void drawString(final String s, final float x, final float y) {
- psRenderer.write("BT");
+ this.psRenderer.write("BT");
final Shape imclip = getClip();
writeClip(imclip);
final Color c = getColor();
- psRenderer.write(c.getRed() + " " + c.getGreen() + " " + c.getBlue()
- + " setrgbcolor");
+ this.psRenderer.write(c.getRed() + " " + c.getGreen() + " "
+ + c.getBlue() + " setrgbcolor");
final AffineTransform trans = getTransform();
trans.translate(x, y);
final double[] vals = new double[6];
trans.getMatrix(vals);
- psRenderer.write(PSReal.doubleOut(vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(vals[0]) + " "
+ PSReal.doubleOut(vals[1]) + " "
+ PSReal.doubleOut(vals[2]) + " "
+ PSReal.doubleOut(vals[3]) + " "
@@ -611,7 +611,7 @@
+ PSReal.doubleOut(vals[5]) + " "
+ PSReal.doubleOut(vals[6]) + " Tm [" + s + "]");
- psRenderer.write("ET");
+ this.psRenderer.write("ET");
}
/**
@@ -639,12 +639,13 @@
*/
public void drawString(final AttributedCharacterIterator iterator,
final float x, final float y) {
- psRenderer.getLogger().error("drawString(AttributedCharacterIterator)");
- psRenderer.write("BT");
+ this.psRenderer.getLogger().error(
+ "drawString(AttributedCharacterIterator)");
+ this.psRenderer.write("BT");
final Shape imclip = getClip();
writeClip(imclip);
- psRenderer.write(PSColor.toPS(getColor(), true, "\n"));
- psRenderer.write(PSColor.toPS(getBackground(), true, "\n"));
+ this.psRenderer.write(PSColor.toPS(getColor(), true, "\n"));
+ this.psRenderer.write(PSColor.toPS(getBackground(), true, "\n"));
final AffineTransform trans = getTransform();
trans.translate(x, y);
@@ -654,7 +655,7 @@
for (char ch = iterator.first(); ch != CharacterIterator.DONE;
ch = iterator.next()) {
- psRenderer.write(PSReal.doubleOut(vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(vals[0]) + " "
+ PSReal.doubleOut(vals[1]) + " "
+ PSReal.doubleOut(vals[2]) + " "
+ PSReal.doubleOut(vals[3]) + " "
@@ -664,7 +665,7 @@
+ "]");
}
- psRenderer.write("ET");
+ this.psRenderer.write("ET");
}
/**
@@ -682,23 +683,23 @@
* @see AbstractGraphics2D#setClip(java.awt.Shape)
*/
public void fill(final Shape s) {
- psRenderer.write("gsave");
+ this.psRenderer.write("gsave");
final Shape imclip = getClip();
writeClip(imclip);
final Color c = getColor();
- psRenderer.write(c.getRed() + " " + c.getGreen() + " " + c.getBlue()
- + " setrgbcolor");
+ this.psRenderer.write(c.getRed() + " " + c.getGreen() + " "
+ + c.getBlue() + " setrgbcolor");
applyPaint(getPaint(), true);
- psRenderer.write("newpath");
+ this.psRenderer.write("newpath");
final PathIterator iter = s.getPathIterator(getTransform());
while (!iter.isDone()) {
final double vals[] = new double[6];
final int type = iter.currentSegment(vals);
switch (type) {
case PathIterator.SEG_CUBICTO:
- psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ PSReal.doubleOut(1000 * vals[1]) + " "
+ PSReal.doubleOut(1000 * vals[2]) + " "
+ PSReal.doubleOut(1000 * vals[3]) + " "
@@ -707,12 +708,12 @@
+ " curveto");
break;
case PathIterator.SEG_LINETO:
- psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ PSReal.doubleOut(1000 * vals[1])
+ " lineto");
break;
case PathIterator.SEG_MOVETO:
- psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ this.psRenderer.write(PSReal.doubleOut(1000 * vals[0]) + " "
+ PSReal.doubleOut(1000 * vals[1])
+ " M");
break;
@@ -723,7 +724,7 @@
// 1000 * PDFNumber.doubleOut(vals[3]) + " y\n");
break;
case PathIterator.SEG_CLOSE:
- psRenderer.write("closepath");
+ this.psRenderer.write("closepath");
break;
default:
break;
@@ -732,7 +733,7 @@
}
doDrawing(true, false,
iter.getWindingRule() == PathIterator.WIND_EVEN_ODD);
- psRenderer.write("grestore");
+ this.psRenderer.write("grestore");
}
protected void doDrawing(final boolean fill, final boolean stroke,
@@ -740,20 +741,20 @@
if (fill) {
if (stroke) {
if (!nonzero) {
- psRenderer.write("stroke");
+ this.psRenderer.write("stroke");
} else {
- psRenderer.write("stroke");
+ this.psRenderer.write("stroke");
}
} else {
if (!nonzero) {
- psRenderer.write("fill");
+ this.psRenderer.write("fill");
} else {
- psRenderer.write("fill");
+ this.psRenderer.write("fill");
}
}
} else {
// if(stroke)
- psRenderer.write("stroke");
+ this.psRenderer.write("stroke");
}
}
@@ -775,7 +776,7 @@
* @see java.awt.Graphics#getFontMetrics()
*/
public FontMetrics getFontMetrics(final Font f) {
- return fmg.getFontMetrics(f);
+ return this.fmg.getFontMetrics(f);
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2006-09-06 00:28:17 UTC (rev 7929)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2006-09-06 01:11:32 UTC (rev 7930)
@@ -185,12 +185,12 @@
*/
protected void write(final String cmd) {
try {
- out.write(cmd);
+ this.out.write(cmd);
} catch (final IOException e) {
- if (!ioTrouble) {
+ if (! this.ioTrouble) {
e.printStackTrace();
}
- ioTrouble = true;
+ this.ioTrouble = true;
}
}
@@ -199,12 +199,12 @@
*/
protected void writeRaw(final String cmd) {
try {
- out.writeRaw(cmd);
+ this.out.writeRaw(cmd);
} catch (final IOException e) {
- if (!ioTrouble) {
+ if (! this.ioTrouble) {
e.printStackTrace();
}
- ioTrouble = true;
+ this.ioTrouble = true;
}
}
@@ -503,8 +503,8 @@
write(sx * at.getScaleX() + " " + sy * at.getScaleY() + " scale");
final PSGraphics2D graphics = new PSGraphics2D(false, this,
- currentPSFont.getName(),
- currentFontSize, x, y);
+ this.currentPSFont.getName(),
+ this.currentFontSize, x, y);
graphics.setGraphicContext(new GraphicContext());
try {
root.paint(graphics);
@@ -577,7 +577,7 @@
public void renderEPS(final EPSGraphic img, final int x, final int y,
final int w, final int h) {
try {
- out.writeByteArr(epsToPostScript(img, x, y, w, h));
+ this.out.writeByteArr(epsToPostScript(img, x, y, w, h));
} catch (final Exception e) {
e.printStackTrace();
getLogger().error("PSRenderer.renderImageArea(): Error rendering "
@@ -728,10 +728,10 @@
out.flush();
}
} catch (final IOException e) {
- if (!ioTrouble) {
+ if (! this.ioTrouble) {
e.printStackTrace();
}
- ioTrouble = true;
+ this.ioTrouble = true;
}
write("");
@@ -843,11 +843,12 @@
if (psFont == null) {
return;
}
- if ((currentPSFont != psFont) || (currentFontSize != size)) {
+ if ((this.currentPSFont != psFont)
+ || (this.currentFontSize != size)) {
final String sizeString = String.valueOf(Math.round(size / 1000));
write(psFont.getName() + " " + sizeString + " F");
- currentPSFont = psFont;
- currentFontSize = size;
+ this.currentPSFont = psFont;
+ this.currentFontSize = size;
}
}
@@ -1045,10 +1046,10 @@
}
private void writeSetup() {
- if (setupWritten) {
+ if (this.setupWritten) {
return;
}
- setupWritten = true;
+ this.setupWritten = true;
write("%%BeginSetup");
writeProcs();
writeFontDict();
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/RunLengthEncodeOutputStream.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/RunLengthEncodeOutputStream.java 2006-09-06 00:28:17 UTC (rev 7929)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/RunLengthEncodeOutputStream.java 2006-09-06 01:11:32 UTC (rev 7930)
@@ -74,77 +74,82 @@
* output stream has been closed.
*/
public void write(final byte b) throws IOException {
- runBuffer[runCount] = b;
+ this.runBuffer[this.runCount] = b;
- switch (runCount) {
+ switch (this.runCount) {
case 0:
- runCount = 0;
- isSequence = NOT_IDENTIFY_SEQUENCE;
- runCount++;
+ this.runCount = 0;
+ this.isSequence = NOT_IDENTIFY_SEQUENCE;
+ this.runCount++;
break;
case 1:
- if (runBuffer[runCount] != runBuffer[runCount - 1]) {
- isSequence = NOT_IN_SEQUENCE;
+ if (this.runBuffer[this.runCount]
+ != this.runBuffer[this.runCount - 1]) {
+ this.isSequence = NOT_IN_SEQUENCE;
}
- runCount++;
+ this.runCount++;
break;
case 2:
- if (runBuffer[runCount] != runBuffer[runCount - 1]) {
- isSequence = NOT_IN_SEQUENCE;
+ if (this.runBuffer[this.runCount]
+ != this.runBuffer[this.runCount - 1]) {
+ this.isSequence = NOT_IN_SEQUENCE;
} else {
- if (isSequence == NOT_IN_SEQUENCE) {
- isSequence = START_SEQUENCE;
+ if (this.isSequence == NOT_IN_SEQUENCE) {
+ this.isSequence = START_SEQUENCE;
} else {
isSequence = IN_SEQUENCE;
}
}
- runCount++;
+ this.runCount++;
break;
case MAX_SEQUENCE_COUNT:
- if (isSequence == IN_SEQUENCE) {
+ if (this.isSequence == IN_SEQUENCE) {
out.write(BYTE_MAX - (MAX_SEQUENCE_COUNT - 1));
- out.write(runBuffer[runCount - 1]);
- runBuffer[0] = runBuffer[runCount];
- runCount = 1;
+ out.write(this.runBuffer[this.runCount - 1]);
+ this.runBuffer[0] = this.runBuffer[this.runCount];
+ this.runCount = 1;
} else {
out.write(MAX_SEQUENCE_COUNT);
- out.write(runBuffer, 0, runCount + 1);
- runCount = 0;
+ out.write(this.runBuffer, 0, this.runCount + 1);
+ this.runCount = 0;
}
- isSequence = NOT_IDENTIFY_SEQUENCE;
+ this.isSequence = NOT_IDENTIFY_SEQUENCE;
break;
default:
- switch (isSequence) {
+ switch (this.isSequence) {
case IN_SEQUENCE:
- if (runBuffer[runCount] != runBuffer[runCount - 1]) {
- out.write(BYTE_MAX - (runCount - 1));
- out.write(runBuffer[runCount - 1]);
- runBuffer[0] = runBuffer[runCount];
- runCount = 1;
- isSequence = NOT_IDENTIFY_SEQUENCE;
+ if (this.runBuffer[this.runCount]
+ != this.runBuffer[this.runCount - 1]) {
+ out.write(BYTE_MAX - (this.runCount - 1));
+ out.write(this.runBuffer[this.runCount - 1]);
+ this.runBuffer[0] = this.runBuffer[this.runCount];
+ this.runCount = 1;
+ this.isSequence = NOT_IDENTIFY_SEQUENCE;
break;
}
- runCount++;
+ this.runCount++;
break;
case NOT_IN_SEQUENCE:
- if (runBuffer[runCount] == runBuffer[runCount - 1]) {
- isSequence = START_SEQUENCE;
+ if (this.runBuffer[this.runCount]
+ == this.runBuffer[this.runCount - 1]) {
+ this.isSequence = START_SEQUENCE;
}
- runCount++;
+ this.runCount++;
break;
case START_SEQUENCE:
- if (runBuffer[runCount] == runBuffer[runCount - 1]) {
- out.write(runCount - 3);
- out.write(runBuffer, 0, runCount - 2);
- runBuffer[0] = runBuffer[runCount];
- runBuffer[1] = runBuffer[runCount];
- runBuffer[2] = runBuffer[runCount];
- runCount = 3;
- isSequence = IN_SEQUENCE;
+ if (this.runBuffer[this.runCount]
+ == this.runBuffer[this.runCount - 1]) {
+ out.write(this.runCount - 3);
+ out.write(this.runBuffer, 0, this.runCount - 2);
+ this.runBuffer[0] = this.runBuffer[this.runCount];
+ this.runBuffer[1] = this.runBuffer[this.runCount];
+ this.runBuffer[2] = this.runBuffer[this.runCount];
+ this.runCount = 3;
+ this.isSequence = IN_SEQUENCE;
break;
}
- isSequence = NOT_IN_SEQUENCE;
- runCount++;
+ this.isSequence = NOT_IN_SEQUENCE;
+ this.runCount++;
break;
}
}
@@ -191,14 +196,14 @@
*/
public void finalizeStream()
throws IOException {
- switch (isSequence) {
+ switch (this.isSequence) {
case IN_SEQUENCE:
- out.write(BYTE_MAX - (runCount - 1));
- out.write(runBuffer[runCount - 1]);
+ out.write(BYTE_MAX - (this.runCount - 1));
+ out.write(this.runBuffer[this.runCount - 1]);
break;
default:
- out.write(runCount - 1);
- out.write(runBuffer, 0, runCount);
+ out.write(this.runCount - 1);
+ out.write(this.runBuffer, 0, this.runCount);
}
out.write(END_OF_DATA);
Modified: trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2006-09-06 00:28:17 UTC (rev 7929)
+++ trunk/foray/foray-render/src/java/org/foray/render/svg/SVGRenderer.java 2006-09-06 01:11:32 UTC (rev 7930)
@@ -93,15 +93,16 @@
protected void drawLine(final int x1, final int y1, final int x2,
final int y2, final int th, final int ruleStyle,
final Color strokeColor) {
- final Element line = SVGUtilities.createLine(svgDocument, x1 / 1000f,
- pageHeight - (y1 / 1000f), x2 / 1000f,
- pageHeight - (y2 / 1000f));
+ final Element line = SVGUtilities.createLine(this.svgDocument,
+ x1 / 1000f,
+ this.pageHeight - (y1 / 1000f), x2 / 1000f,
+ this.pageHeight - (y2 / 1000f));
line.setAttributeNS(null, "style", "stroke-width:"
+ (Math.abs(th) / 1000f) + ";stroke:rgb("
+ strokeColor.getRed() + ","
+ strokeColor.getGreen() + ","
+ strokeColor.getBlue() + ")");
- currentPageG.appendChild(line);
+ this.currentPageG.appendChild(line);
}
/**
@@ -126,11 +127,12 @@
*/
protected void addRect(final int x, final int y, final int w, final int h,
final float r, final float g, final float b) {
- final Element rect = SVGUtilities.createRect(svgDocument, x / 1000f,
- pageHeight - (y / 1000f), w / 1000f, h / 1000f);
+ final Element rect = SVGUtilities.createRect(this.svgDocument,
+ x / 1000f,
+ this.pageHeight - (y / 1000f), w / 1000f, h / 1000f);
rect.setAttributeNS(null, "style", "stroke:rgb(" + ((int)(255 * r))
+ "," + ((int)(255 * g)) + "," + ((int)(255 * b)) + ")");
- currentPageG.appendChild(rect);
+ this.currentPageG.appendChild(rect);
}
/**
@@ -150,13 +152,14 @@
protected void addRect(final int x, final int y, final int w, final int h,
final float r, final float g, final float b, final float fr,
final float fg, final float fb) {
- final Element rect = SVGUtilities.createRect(svgDocument, x / 1000f,
- pageHeight - (y / 1000f), w / 1000f, h / 1000f);
+ final Element rect = SVGUtilities.createRect(this.svgDocument,
+ x / 1000f,
+ this.pageHeight - (y / 1000f), w / 1000f, h / 1000f);
rect.setAttributeNS(null, "style", "stroke:rgb(" + ((int)(255 * r))
+ "," + ((int)(255 * g)) + "," + ((int)(255 * b))
+ ");fill:rgb(" + ((int)(255 * fr)) + "," + ((int)(255 * fg))
+ "," + ((int)(255 * fb)) + ")");
- currentPageG.appendChild(rect);
+ this.currentPageG.appendChild(rect);
}
/**
@@ -171,19 +174,21 @@
protected void addRect(final int x, final int y, final int w, final int h,
final boolean drawAsOutline) {
final int startx = (x + 500) / 1000;
- final int starty = pageHeight - ((y + 500) / 1000);
+ final int starty = this.pageHeight - ((y + 500) / 1000);
final int endx = (x + w + 500) / 1000;
- final int endy = pageHeight - ((y + h + 500) / 1000);
+ final int endy = this.pageHeight - ((y + h + 500) / 1000);
if (drawAsOutline) {
- final Element rect = SVGUtilities.createRect(svgDocument, startx,
+ final Element rect = SVGUtilities.createRect(this.svgDocument,
+ startx,
starty, endx - startx, endy - starty);
rect.setAttributeNS(null, "style", "fill:none");
- currentPageG.appendChild(rect);
+ this.currentPageG.appendChild(rect);
} else {
- final Element rect = SVGUtilities.createRect(svgDocument, startx,
+ final Element rect = SVGUtilities.createRect(this.svgDocument,
+ startx,
starty, endx - startx, starty - endy);
rect.setAttributeNS(null, "style", "stroke:none");
- currentPageG.appendChild(rect);
+ this.currentPageG.appendChild(rect);
}
}
@@ -196,70 +201,77 @@
}
protected void drawFrame() {
- final int width = pageWidth;
- final int height = pageHeight;
- final Element rect = SVGUtilities.createRect(svgDocument, 0, 0, width,
- height);
+ final int width = this.pageWidth;
+ final int height = this.pageHeight;
+ final Element rect = SVGUtilities.createRect(this.svgDocument, 0, 0,
+ width, height);
rect.setAttributeNS(null, "style", "fill:none;stroke:black");
- currentPageG.appendChild(rect);
+ this.currentPageG.appendChild(rect);
}
public void render(final PageArea page) throws IOException {
- pageNumber++;
- final int lastWidth = pageWidth;
- final int lastHeight = pageHeight;
+ this.pageNumber++;
+ final int lastWidth = this.pageWidth;
+ final int lastHeight = this.pageHeight;
- pageWidth = (int) Math.ceil(toPoints(page.getWidth()));
- pageHeight = (int) Math.ceil(toPoints(page.getHeight()));
+ this.pageWidth = (int) Math.ceil(toPoints(page.getWidth()));
+ this.pageHeight = (int) Math.ceil(toPoints(page.getHeight()));
- if(lastLink != null && currentPageG != null) {
- lastLink.setAttributeNS(null, "xlink:href", "#svgView(viewBox(0, "
- + (totalHeight) + ", " + pageWidth + ", " + pageHeight
+ if (this.lastLink != null
+ && this.currentPageG != null) {
+ this.lastLink.setAttributeNS(null, "xlink:href",
+ "#svgView(viewBox(0, "
+ + (this.totalHeight) + ", " + this.pageWidth + ", "
+ + this.pageHeight
+ "))");
- currentPageG.appendChild(lastLink);
+ this.currentPageG.appendChild(this.lastLink);
}
- totalHeight += pageHeight;
- if(totalWidth < pageWidth) {
- totalWidth = pageWidth;
+ this.totalHeight += this.pageHeight;
+ if (this.totalWidth < this.pageWidth) {
+ this.totalWidth = this.pageWidth;
}
- currentPageG = SVGUtilities.createG(svgDocument);
- currentPageG.setAttributeNS(null, "id", /*title + */"Page-"
- + pageNumber);
- currentPageG.setAttributeNS(null, "style",
+ this.currentPageG = SVGUtilities.createG(this.svgDocument);
+ this.currentPageG.setAttributeNS(null, "id", /*title + */"Page-"
+ + this.pageNumber);
+ this.currentPageG.setAttributeNS(null, "style",
"font-family:sanserif;font-size:12");
- svgRoot.appendChild(currentPageG);
+ this.svgRoot.appendChild(this.currentPageG);
drawFrame();
renderRegions(page);
- currentPageG.setAttributeNS(null, "transform", "translate(0,"
- + (totalHeight - pageHeight) + ")");
+ this.currentPageG.setAttributeNS(null, "transform", "translate(0,"
+ + (this.totalHeight - this.pageHeight) + ")");
- final Element lastPageLink = svgDocument.createElementNS(svgNS, "a");
- if(lastLink != null) {
+ final Element lastPageLink = this.svgDocument.createElementNS(
+ SVGRenderer.svgNS, "a");
+ if (this.lastLink != null) {
lastPageLink.setAttributeNS(null, "xlink:href",
- "#svgView(viewBox(0, " + (totalHeight - pageHeight
+ "#svgView(viewBox(0, " + (this.totalHeight - this.pageHeight
- lastHeight) + ", " + lastWidth + ", "
+ lastHeight + "))");
} else {
lastPageLink.setAttributeNS(null, "xlink:href",
- "#svgView(viewBox(0, " + (totalHeight - pageHeight)
- + ", " + pageWidth + ", " + pageHeight + "))");
+ "#svgView(viewBox(0, "
+ + (this.totalHeight - this.pageHeight)
+ + ", " + this.pageWidth + ", " + this.pageHeight + "))");
}
- currentPageG.appendChild(lastPageLink);
- Element rect = SVGUtilities.createRect(svgDocument, 0, 0, pageWidth / 2,
- pageHeight);
+ this.currentPageG.appendChild(lastPageLink);
+ Element rect = SVGUtilities.createRect(this.svgDocument, 0, 0,
+ this.pageWidth / 2,
+ this.pageHeight);
rect.setAttributeNS(null, "style", "fill:blue;visibility:hidden");
lastPageLink.appendChild(rect);
- lastLink = svgDocument.createElementNS(svgNS, "a");
- rect = SVGUtilities.createRect(svgDocument, pageWidth / 2, 0,
- pageWidth / 2, pageHeight);
+ this.lastLink = this.svgDocument.createElementNS(SVGRenderer.svgNS,
+ "a");
+ rect = SVGUtilities.createRect(this.svgDocument, this.pageWidth / 2, 0,
+ this.pageWidth / 2, this.pageHeight);
rect.setAttributeNS(null, "style", "fill:blue;visibility:hidden");
- lastLink.appendChild(rect);
+ this.lastLink.appendChild(rect);
/*
* if (page.hasLinks()) {
@@ -348,7 +360,7 @@
try {
final SVGDocument svg = ((SVGGraphic) img).getSVGDocument();
renderSVGDocument(svg, toPoints(x),
- pageHeight - toPoints(y));
+ this.pageHeight - toPoints(y));
} catch (final GraphicException e) {}
// } else {
@@ -489,7 +501,7 @@
public void render(final SVGArea area) {
final float x = toPoints(area.rrOriginX());
- final float y = pageHeight - toPoints(area.rrOriginY());
+ final float y = this.pageHeight - toPoints(area.rrOriginY());
final Document doc = area.getSVGDocument();
renderSVGDocument(doc, x, y);
}
@@ -497,21 +509,23 @@
protected void renderSVGDocument(final Document doc, final float x,
final float y) {
final SVGSVGElement svg = ((SVGDocument)doc).getRootElement();
- final Element view = svgDocument.createElementNS(svgNS, "svg");
- final Node newsvg = svgDocument.importNode(svg, true);
+ final Element view = this.svgDocument.createElementNS(SVGRenderer.svgNS,
+ "svg");
+ final Node newsvg = this.svgDocument.importNode(svg, true);
//view.setAttributeNS(null, "viewBox", "0 0 ");
view.setAttributeNS(null, "x", "" + x);
view.setAttributeNS(null, "y", "" + y);
// this fixes a problem where the xmlns is repeated sometimes
final Element ele = (Element)newsvg;
- ele.setAttributeNS(XMLSupport.XMLNS_NAMESPACE_URI, "xmlns", svgNS);
+ ele.setAttributeNS(XMLSupport.XMLNS_NAMESPACE_URI, "xmlns",
+ SVGRenderer.svgNS);
if(ele.hasAttributeNS(null, "xmlns")) {
ele.removeAttributeNS(null, "xmlns");
}
view.appendChild(newsvg);
- currentPageG.appendChild(view);
+ this.currentPageG.appendChild(view);
}
public void render(final ForeignObjectArea area) {
@@ -521,22 +535,22 @@
public void startOutput() throws IOException {
final DOMImplementation impl =
SVGDOMImplementation.getDOMImplementation();
- svgDocument = impl.createDocument(svgNS, "svg", null);
+ this.svgDocument = impl.createDocument(SVGRenderer.svgNS, "svg", null);
final ProcessingInstruction pi =
- svgDocument.createProcessingInstruction(
+ this.svgDocument.createProcessingInstruction(
"xml",
" version=\"1.0\" encoding=\"ISO-8859-1\"");
- svgRoot = svgDocument.getDocumentElement();
- svgDocument.insertBefore(pi, svgRoot);
+ this.svgRoot = this.svgDocument.getDocumentElement();
+ this.svgDocument.insertBefore(pi, this.svgRoot);
}
public void stopOutput() throws IOException {
- svgRoot.setAttributeNS(null, "width", "" + totalWidth);
- svgRoot.setAttributeNS(null, "height", "" + totalHeight);
+ this.svgRoot.setAttributeNS(null, "width", "" + this.totalWidth);
+ this.svgRoot.setAttributeNS(null, "height", "" + this.totalHeight);
// svgRoot.setAttributeNS(null, "viewBox", "0 0 " + pageWidth + " "
// + pageHeight);
final SVGTranscoder svgT = new SVGTranscoder();
- final TranscoderInput input = new TranscoderInput(svgDocument);
+ final TranscoderInput input = new TranscoderInput(this.svgDocument);
final OutputStreamWriter osw = new OutputStreamWriter(
this.getOutputStream());
final TranscoderOutput output = new TranscoderOutput(osw);
@@ -548,15 +562,15 @@
}
this.getOutputStream().flush();
- svgDocument = null;
- svgRoot = null;
- currentPageG = null;
- lastLink = null;
+ this.svgDocument = null;
+ this.svgRoot = null;
+ this.currentPageG = null;
+ this.lastLink = null;
- totalWidth = 0;
- totalHeight = 0;
+ this.totalWidth = 0;
+ this.totalHeight = 0;
- pageNumber = 0;
+ this.pageNumber = 0;
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java 2006-09-06 00:28:17 UTC (rev 7929)
+++ trunk/foray/foray-render/src/java/org/foray/render/svg/SVGUtilities.java 2006-09-06 01:11:32 UTC (rev 7930)
@@ -48,7 +48,8 @@
final float height) {
final DOMImplementation impl =
SVGDOMImplementation.getDOMImplementation();
- final Document doc = impl.createDocument(svgNS, "svg", null);
+ final Document doc = impl.createDocument(SVGUtilities.svgNS, "svg",
+ null);
final Element svgRoot = doc.getDocumentElement();
svgRoot.setAttributeNS(null, "width", "" + width);
@@ -94,7 +95,7 @@
*/
public static final Element createLine(final Document doc, final float x,
final float y, final float x2, final float y2) {
- final Element ellipse = doc.createElementNS(svgNS, "line");
+ final Element ellipse = doc.createElementNS(SVGUtilities.svgNS, "line");
ellipse.setAttributeNS(null, "x1", "" + x);
ellipse.setAttributeNS(null, "x2", "" + x2);
ellipse.setAttributeNS(null, "y1", "" + y);
@@ -107,7 +108,8 @@
*/
public static final Element createEllipse(final Document doc,
final float cx, final float cy, final float rx, final float ry) {
- final Element ellipse = doc.createElementNS(svgNS, "ellipse");
+ final Element ellipse = doc.createElementNS(SVGUtilities.svgNS,
+ "ellipse");
ellipse.setAttributeNS(null, "cx", "" + cx);
ellipse.setAttributeNS(null, "rx", "" + rx);
ellipse.setAttributeNS(null, "cy", "" + cy);
@@ -120,7 +122,7 @@
*/
public static final Element createPath(final Document doc,
final String str) {
- final Element path = doc.createElementNS(svgNS, "path");
+ final Element path = doc.createElementNS(SVGUtilities.svgNS, "path");
path.setAttributeNS(null, "d", str);
return path;
}
@@ -130,7 +132,8 @@
*/
public static final Element createText(final Document doc, final float x,
final float y, final String str) {
- final Element textGraph = doc.createElementNS(svgNS, "text");
+ final Element textGraph = doc.createElementNS(SVGUtilities.svgNS,
+ "text");
textGraph.setAttributeNS(null, "x", "" + x);
textGraph.setAttributeNS(null, "y", "" + y);
final Text text = doc.createTextNode(str);
@@ -143,7 +146,7 @@
*/
public static final Element createRect(final Document doc, final float x,
final float y, final float width, final float height) {
- final Element border = doc.createElementNS(svgNS, "rect");
+ final Element border = doc.createElementNS(SVGUtilities.svgNS, "rect");
border.setAttributeNS(null, "x", "" + x);
border.setAttributeNS(null, "y", "" + y);
border.setAttributeNS(null, "width", "" + width);
@@ -155,7 +158,7 @@
* Create an SVG G.
*/
public static final Element createG(final Document doc) {
- final Element border = doc.createElementNS(svgNS, "g");
+ final Element border = doc.createElementNS(SVGUtilities.svgNS, "g");
return border;
}
@@ -164,7 +167,8 @@
*/
public static final Element createClip(final Document doc,
final Element els, final String id) {
- final Element border = doc.createElementNS(svgNS, "clipPath");
+ final Element border = doc.createElementNS(SVGUtilities.svgNS,
+ "clipPath");
border.setAttributeNS(null, "id", id);
border.appendChild(els);
return border;
@@ -172,7 +176,7 @@
public static final Element createImage(final Document doc,
final String ref, final float width, final float height) {
- final Element border = doc.createElementNS(svgNS, "image");
+ final Element border = doc.createElementNS(SVGUtilities.svgNS, "image");
border.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href",
ref);
border.setAttributeNS(null, "width", "" + width);
Modified: trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2006-09-06 00:28:17 UTC (rev 7929)
+++ trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2006-09-06 01:11:32 UTC (rev 7930)
@@ -77,8 +77,8 @@
private StringBuffer decoData[];
private float textCPI = 16.67f;
private float textLPI = 8;
- private int maxX = (int)(8.5f * textCPI + 1);
- private int maxY = (int)(11f * textLPI + 1);
+ private int maxX = (int)(8.5f * this.textCPI + 1);
+ private int maxY = (int)(11f * this.textLPI + 1);
private float xFactor;
private float yFactor;
@@ -98,11 +98,11 @@
}
void addStr(int row, int col, String str, final boolean ischar) {
- if (debug) {
+ if (this.debug) {
getLogger().info("TXTRenderer.addStr(" + row + ", " + col
+ ", \"" + str + "\", " + ischar + ")");
}
- if (suppressGraphics &&!ischar) {
+ if (this.suppressGraphics &&!ischar) {
return;
}
StringBuffer sb;
@@ -110,20 +110,20 @@
row = 0;
}
if (ischar) {
- sb = charData[row];
+ sb = this.charData[row];
} else {
- sb = decoData[row];
+ sb = this.decoData[row];
}
if (sb == null) {
sb = new StringBuffer();
}
- if ((col + str.length()) > maxX) {
- col = maxX - str.length();
+ if ((col + str.length()) > this.maxX) {
+ col = this.maxX - str.length();
}
if (col < 0) {
col = 0;
- if (str.length() > maxX) {
- str = str.substring(0, maxX);
+ if (str.length() > this.maxX) {
+ str = str.substring(0, this.maxX);
}
}
// Pad to col
@@ -142,9 +142,9 @@
}
if (ischar) {
- charData[row] = sb;
+ this.charData[row] = sb;
} else {
- decoData[row] = sb;
+ this.decoData[row] = sb;
}
}
@@ -233,8 +233,9 @@
h *= -1;
}
- final int row = (int)((pageHeight - (y / 100)) * 100 * yFactor);
- final int col = (int)(x * xFactor);
+ final int row = (int)((this.pageHeight - (y / 100)) * 100
+ * this.yFactor);
+ final int col = (int)(x * this.xFactor);
final int lineshade = (int)(100 - ((0.3f * stroke.getRed()
+ 0.59f * stroke.getGreen() + 0.11f * stroke.getBlue())
@@ -256,8 +257,8 @@
if (fillchar != ' ') {
final StringBuffer linefill = new StringBuffer();
- final int sw = (int)(w * xFactor);
- final int sh = (int)(h * yFactor);
+ final int sw = (int)(w * this.xFactor);
+ final int sh = (int)(h * this.yFactor);
if (sw == 0 || sh == 0) {
if (fillshade >= 50) {
if (h > w) {
@@ -297,11 +298,11 @@
hlinechar = '.';
}
final StringBuffer linefill = new StringBuffer();
- final int sw = (int)(w * xFactor);
+ final int sw = (int)(w * this.xFactor);
for (int countr = 0; countr < sw; countr++) {
linefill.append(hlinechar);
}
- final int sh = (int)(h * yFactor);
+ final int sh = (int)(h * this.yFactor);
if (w > h) {
for (int countr = 1; countr < (sh - 1); countr++) {
@@ -348,20 +349,22 @@
getLogger().debug("TXTRenderer.printBMP(" + img + ", " + x
+ ", " + y + ", " + w + ", " + h + ")");
addRect(x, y, w, h, new Color(1f, 1f, 1f), new Color(0f, 0f, 0f));
- final int nameh = (int)(h * yFactor / 2);
+ final int nameh = (int)(h * this.yFactor / 2);
if (nameh > 0) {
- final int namew = (int)(w * xFactor);
+ final int namew = (int)(w * this.xFactor);
if (namew > 4) {
final String iname = img.getURL().toString();
if (iname.length() >= namew) {
- addStr((int)((pageHeight - (y / 100)) * 100 * yFactor)
- + nameh, (int)(x * xFactor),
- iname.substring(iname.length() - namew),
- true);
+ addStr((int)((this.pageHeight - (y / 100)) * 100
+ * this.yFactor)
+ + nameh, (int)(x * this.xFactor),
+ iname.substring(iname.length() - namew),
+ true);
} else {
- addStr((int)((pageHeight - (y / 100)) * 100 * yFactor)
- + nameh, (int)(x * xFactor
+ addStr((int)((this.pageHeight - (y / 100)) * 100
+ * this.yFactor)
+ + nameh, (int)(x * this.xFactor
+ (namew - iname.length())
/ 2), iname, true);
}
@@ -502,7 +505,7 @@
public void startOutput() throws IOException {
getLogger().info("rendering areas to TEXT");
- currentStream = new TXTStream(this.getOutputStream());
+ this.currentStream = new TXTStream(this.getOutputStream());
String encoding;
if (this.getOptions() != null) {
encoding = this.getOptions().optionTXTEncoding();
@@ -511,14 +514,14 @@
} catch (final UnsupportedEncodingException uee) {
getLogger().warn("Encoding '" + encoding
+ "' is not supported, so defaulted to "
- + DEFAULT_ENCODING);
- encoding = DEFAULT_ENCODING;
+ + TXTRenderer.DEFAULT_ENCODING);
+ encoding = TXTRenderer.DEFAULT_ENCODING;
}
} else {
- encoding = DEFAULT_ENCODING;
+ encoding = TXTRenderer.DEFAULT_ENCODING;
}
- currentStream.setEncoding(encoding);
- firstPage=true;
+ this.currentStream.setEncoding(encoding);
+ this.firstPage=true;
}
public void stopOutput() throws IOException {
@@ -527,10 +530,10 @@
}
public void render(final PageArea page) {
- if (firstPage) {
- firstPage = false;
+ if (this.firstPage) {
+ this.firstPage = false;
} else {
- currentStream.add(pageEnding);
+ this.currentStream.add(this.pageEnding);
}
this.getLogger().debug("TXTRenderer.renderPage() page.getHeight() = "
+ page.getHeight());
@@ -589,7 +592,7 @@
this.currentStream.add(this.lineEnding);
}
}
- currentStream.add(lineEnding);
+ this.currentStream.add(this.lineEnding);
}
public void resetTextCursor() {
Modified: trunk/foray/foray-render/src/java/org/foray/render/txt/TXTStream.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/txt/TXTStream.java 2006-09-06 00:28:17 UTC (rev 7929)
+++ trunk/foray/foray-render/src/java/org/foray/render/txt/TXTStream.java 2006-09-06 01:11:32 UTC (rev 7930)
@@ -36,24 +36,24 @@
private String encoding;
public TXTStream(final OutputStream os) {
- out = os;
+ this.out = os;
}
public void add(final String str) {
- if (!doOutput) {
+ if (! this.doOutput) {
return;
}
try {
- final byte buff[] = str.getBytes(encoding);
- out.write(buff);
+ final byte buff[] = str.getBytes(this.encoding);
+ this.out.write(buff);
} catch (final IOException e) {
throw new RuntimeException(e.toString());
}
}
public void setDoOutput(final boolean doout) {
- doOutput = doout;
+ this.doOutput = doout;
}
public void setEncoding(final String encoding) {
Modified: trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
===================================================================
--- trunk/foray/foray-ren...
[truncated message content] |
|
From: <vic...@us...> - 2006-09-06 00:28:23
|
Revision: 7929
http://svn.sourceforge.net/foray/?rev=7929&view=rev
Author: victormote
Date: 2006-09-05 17:28:17 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Use "this" modifier for all instance or class variables.
Modified Paths:
--------------
trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2006-09-06 00:13:44 UTC (rev 7928)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/LineBreaker.java 2006-09-06 00:28:17 UTC (rev 7929)
@@ -88,7 +88,8 @@
* application is responsible to provide these values, but they are stored
* here for reference.
*/
- protected LineOutput[] outputLines = new LineOutput[LINE_COUNT_INCREMENT];
+ protected LineOutput[] outputLines
+ = new LineOutput[LineBreaker.LINE_COUNT_INCREMENT];
/**
* Index into {@link #outputLines} indicating which one was last requested
@@ -130,12 +131,12 @@
*/
public void addLineContent(final LineContent contentItem)
throws TextException {
- if (eagerMode) {
+ if (this.eagerMode) {
throw new TextException("Line-Breaking running in \"eager\" mode"
+ "can't switch to \"patient\".");
}
- patientMode = true;
- content.add(contentItem);
+ this.patientMode = true;
+ this.content.add(contentItem);
}
/**
@@ -158,7 +159,7 @@
final int start, final int end, final LineOutput output)
throws TextException {
validateEagerContent(contentItem, output);
- content.add(contentItem);
+ this.content.add(contentItem);
this.currentOutput = output;
this.currentLineContent = contentItem;
return addLineContent(contentItem, start, end, output);
@@ -171,7 +172,7 @@
*/
private void validateEagerContent(final LineContent contentItem,
final LineOutput output) throws TextException {
- if (patientMode) {
+ if (this.patientMode) {
throw new TextException("Line-Breaking running in \"patient\" mode"
+ "can't switch to \"eager\".");
}
@@ -181,7 +182,7 @@
if (output == null) {
throw new TextException("Null LineOutput.");
}
- eagerMode = true;
+ this.eagerMode = true;
}
protected abstract int addLineContent(LineContent contentItem, int start,
@@ -366,17 +367,18 @@
this.lineReceivingContent ++;
}
updateLineLengths();
- return this.outputLines[lineReceivingContent];
+ return this.outputLines[this.lineReceivingContent];
}
private void updateLineLengths() throws TextException {
- if (eagerMode) {
+ if (this.eagerMode) {
return;
}
- while (lineReceivingContent > this.lastLineRequested) {
+ while (this.lineReceivingContent > this.lastLineRequested) {
this.lastLineRequested ++;
checkArraySize();
- this.outputLines[lineReceivingContent] = this.control.getNextLine();
+ this.outputLines[this.lineReceivingContent]
+ = this.control.getNextLine();
}
}
@@ -389,7 +391,8 @@
return;
}
// Make a new array.
- final int newSize = this.outputLines.length + LINE_COUNT_INCREMENT;
+ final int newSize = this.outputLines.length
+ + LineBreaker.LINE_COUNT_INCREMENT;
final LineOutput[] newArray = new LineOutput[newSize];
// Copy the old to the new.
System.arraycopy(this.outputLines, 0, newArray, 0,
Modified: trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java
===================================================================
--- trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2006-09-06 00:13:44 UTC (rev 7928)
+++ trunk/foray/foray-text/src/java/org/foray/text/line/solitary/SolitaryLineBreaker.java 2006-09-06 00:28:17 UTC (rev 7929)
@@ -73,7 +73,7 @@
* One of {@link #NOTHING}, {@link #CONNECTOR}, or {@link #TEXT},
* indicating the class of the previous character.
*/
- private byte previousCharacter = NOTHING;
+ private byte previousCharacter = SolitaryLineBreaker.NOTHING;
/**
* The accumulated width, in millipoints, of whitespace before the current
@@ -107,17 +107,17 @@
protected int processLineText(final LineText lineText, final int start,
final int end) throws TextException {
this.currentLineText = lineText;
- this.currentChars = currentLineText.inlineText();
+ this.currentChars = this.currentLineText.inlineText();
final String language = lineText.inlineLanguage();
- finalWidth = 0;
- wordWidth = 0;
- wordStart = 0;
- spaceWidth = 0;
+ this.finalWidth = 0;
+ this.wordWidth = 0;
+ this.wordStart = 0;
+ this.spaceWidth = 0;
if (this.currentOutput.hasAnyContent()) {
- canEatLeadingSpaces = false;
+ this.canEatLeadingSpaces = false;
} else {
- canEatLeadingSpaces = true;
+ this.canEatLeadingSpaces = true;
}
final int whitespaceWidth = getCharWidth(lineText, ' ');
@@ -144,7 +144,7 @@
charCount++;
}
if (forcesLineBreak(codePoint)) {
- createLineContent(start, i, finalWidth, false);
+ createLineContent(start, i, this.finalWidth, false);
return i + 1;
}
if (allowsLineBreak(codePoint)) {
@@ -153,12 +153,12 @@
}
// If it got this far, it is TEXT.
- canEatLeadingSpaces = false;
+ this.canEatLeadingSpaces = false;
final int charWidth = charWidth(lineText, codePoint,
whitespaceWidth);
processTextChar(language, thisCharStarts, charWidth);
- if ((finalWidth + spaceWidth + wordWidth)
+ if ((this.finalWidth + this.spaceWidth + this.wordWidth)
<= currentLineWidthRemaining()) {
// Content fits on the current line. We are done with this char.
continue;
@@ -170,37 +170,39 @@
}
if (lineText.inlineHyphenate()) {
final int ret = tryHyphenation();
- if (ret != wordStart) {
- finalWidth += spaceWidth;
- finalWidth += wordWidth;
- finalWidth += getHyphenWidth(lineText);
- createLineContent(start, ret - 1, finalWidth, true);
+ if (ret != this.wordStart) {
+ this.finalWidth += this.spaceWidth;
+ this.finalWidth += this.wordWidth;
+ this.finalWidth += getHyphenWidth(lineText);
+ createLineContent(start, ret - 1, this.finalWidth, true);
return ret;
}
}
- if (wordStart == start && ! this.currentOutput.hasAnyContent()) {
+ if (this.wordStart == start
+ && ! this.currentOutput.hasAnyContent()) {
// This is the first word on this line.
overflowMessage();
- finalWidth += spaceWidth;
- finalWidth += wordWidth;
- finalWidth -= charWidth;
- createLineContent(start, i - charCount, finalWidth, false);
+ this.finalWidth += this.spaceWidth;
+ this.finalWidth += this.wordWidth;
+ this.finalWidth -= charWidth;
+ createLineContent(start, i - charCount, this.finalWidth, false);
/* Return the index at the start of this character*/
return i - charCount + 1;
}
// Break the line at the end of the previous word.
- createLineContent(start, wordStart - 1, finalWidth, false);
- return wordStart;
+ createLineContent(start, this.wordStart - 1, this.finalWidth,
+ false);
+ return this.wordStart;
}
/* We have now read through each character. */
/* If this ends with white space, place remaining contents on this
* line. */
- if (previousCharacter == CONNECTOR) {
+ if (this.previousCharacter == SolitaryLineBreaker.CONNECTOR) {
return remainingContentOnThisLine(startIndex, endIndex);
}
/* Otherwise the word may continue into the next text. See if the
* entire word fits. */
- if (finalWidth + spaceWidth + wordWidth
+ if (this.finalWidth + this.spaceWidth + this.wordWidth
+ sizeFirstWordNextText(lineText, startIndex, endIndex)
<= currentLineWidthRemaining()) {
return remainingContentOnThisLine(startIndex, endIndex);
@@ -211,8 +213,8 @@
/* If nothing else works, the content doesn't fit on this line.
* Break the line at the end of the previous word. */
- createLineContent(start, wordStart - 1, finalWidth, false);
- return wordStart;
+ createLineContent(start, this.wordStart - 1, this.finalWidth, false);
+ return this.wordStart;
}
/**
@@ -224,9 +226,9 @@
*/
private int remainingContentOnThisLine(final int startIndex,
final int endIndex) throws TextException {
- finalWidth += spaceWidth;
- finalWidth += wordWidth;
- createLineContent(startIndex, endIndex, finalWidth, false);
+ this.finalWidth += this.spaceWidth;
+ this.finalWidth += this.wordWidth;
+ createLineContent(startIndex, endIndex, this.finalWidth, false);
return endIndex + 1;
}
@@ -269,29 +271,29 @@
*/
private void processTextChar(final String language, final int i,
final int charWidth) {
- if (previousCharacter == CONNECTOR) {
+ if (this.previousCharacter == SolitaryLineBreaker.CONNECTOR) {
// Current is TEXT, previous is WHITESPACE.
- wordWidth = charWidth;
- wordStart = i;
- } else if (previousCharacter == TEXT) {
+ this.wordWidth = charWidth;
+ this.wordStart = i;
+ } else if (this.previousCharacter == SolitaryLineBreaker.TEXT) {
if (canBreakMidWord(language)) {
- finalWidth += spaceWidth;
- spaceWidth = 0;
+ this.finalWidth += this.spaceWidth;
+ this.spaceWidth = 0;
// add the current word
- if (i > wordStart) {
- finalWidth += wordWidth;
+ if (i > this.wordStart) {
+ this.finalWidth += this.wordWidth;
}
- spaceWidth = 0;
- wordStart = i;
- wordWidth = charWidth;
+ this.spaceWidth = 0;
+ this.wordStart = i;
+ this.wordWidth = charWidth;
} else {
- wordWidth += charWidth;
+ this.wordWidth += charWidth;
}
} else { // nothing previous
- wordStart = i;
- wordWidth = charWidth;
+ this.wordStart = i;
+ this.wordWidth = charWidth;
}
- previousCharacter = TEXT;
+ this.previousCharacter = SolitaryLineBreaker.TEXT;
}
/**
@@ -303,24 +305,24 @@
*/
private void processLineBreakPossibility(final LineText lineText,
final int codePoint) {
- if (previousCharacter == TEXT) {
+ if (this.previousCharacter == SolitaryLineBreaker.TEXT) {
// Current is WHITESPACE and previous TEXT.
/*
* The current word made it, so add any accumulated space
* before the current word.
*/
- finalWidth += spaceWidth;
+ this.finalWidth += this.spaceWidth;
// Reset space width.
- spaceWidth = 0;
+ this.spaceWidth = 0;
// Add the current word.
- finalWidth += wordWidth;
+ this.finalWidth += this.wordWidth;
// Reset word width.
- wordWidth = 0;
+ this.wordWidth = 0;
}
- if (! canEatLeadingSpaces) {
- spaceWidth += getCharWidth(lineText, codePoint);
+ if (! this.canEatLeadingSpaces) {
+ this.spaceWidth += getCharWidth(lineText, codePoint);
}
- previousCharacter = CONNECTOR;
+ this.previousCharacter = SolitaryLineBreaker.CONNECTOR;
}
/**
@@ -365,11 +367,11 @@
final String country = this.currentLineText.inlineCountry();
// Count the number of chars at the beginning that should be ignored.
final int actualWordStart = server.wordStarts(this.currentChars,
- wordStart, language, country);
+ this.wordStart, language, country);
if (actualWordStart < 0) {
return this.wordStart;
}
- final int nonWordChars = actualWordStart - wordStart;
+ final int nonWordChars = actualWordStart - this.wordStart;
// Extract the word that should be evaluated by the hyphenation system.
final int wordSize = server.wordSize(this.currentChars, actualWordStart,
language, country);
@@ -390,12 +392,12 @@
this.currentLineText, wordToHyphenate, hyph);
// If none fit, then the word cannot be hyphenated.
if (index < 0) {
- return wordStart;
+ return this.wordStart;
}
// Compute the number of characters that should be included.
final int charsToInclude = hyph.getPoints()[index];
// Add it and the non-word characters to the count to be returned.
- return wordStart + nonWordChars + charsToInclude;
+ return this.wordStart + nonWordChars + charsToInclude;
}
/**
@@ -403,8 +405,9 @@
*/
private int selectDiscretionaryHyphenationPoint(final LineText lineText,
final String word, final Hyphenation hyph) throws TextException {
- final int remainingWidth = this.currentLineWidthRemaining() - finalWidth
- - spaceWidth - getHyphenWidth(this.currentLineText);
+ final int remainingWidth = this.currentLineWidthRemaining()
+ - this.finalWidth
+ - this.spaceWidth - getHyphenWidth(this.currentLineText);
final int[] hyphenationPoints = hyph.getPoints();
final byte[] hyphenationWeights = hyph.getWeights();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 00:13:54
|
Revision: 7928
http://svn.sourceforge.net/foray/?rev=7928&view=rev
Author: victormote
Date: 2006-09-05 17:13:44 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Fix runtime problem caused by reordering of variables.
Modified Paths:
--------------
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingCE.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpert.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpertSubset.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingFOrayLatinExtra.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingISOLatin1.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacExpert.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacRoman.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacStandard.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingPDFDoc.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingStandard.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingSymbol.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingWinAnsi.java
trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphList.java
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingCE.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingCE.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingCE.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -917,7 +917,7 @@
};
public EncodingCE() {
- super("CEEncoding", GlyphList.standardSourceGlyphLists,
+ super("CEEncoding", GlyphList.standardSourceGlyphLists(),
EncodingCE.codePoints,
EncodingCE.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpert.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpert.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpert.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -715,7 +715,7 @@
};
public EncodingExpert() {
- super("ExpertEncoding", GlyphList.standardSourceGlyphLists,
+ super("ExpertEncoding", GlyphList.standardSourceGlyphLists(),
EncodingExpert.codePoints,
EncodingExpert.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpertSubset.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpertSubset.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingExpertSubset.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -400,7 +400,7 @@
};
public EncodingExpertSubset() {
- super("ExpertSubsetEncoding", GlyphList.standardSourceGlyphLists,
+ super("ExpertSubsetEncoding", GlyphList.standardSourceGlyphLists(),
EncodingExpertSubset.codePoints,
EncodingExpertSubset.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingFOrayLatinExtra.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingFOrayLatinExtra.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingFOrayLatinExtra.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -250,7 +250,7 @@
};
public EncodingFOrayLatinExtra() {
- super("FOrayLatinExtraEncoding", GlyphList.standardSourceGlyphLists,
+ super("FOrayLatinExtraEncoding", GlyphList.standardSourceGlyphLists(),
EncodingFOrayLatinExtra.codePoints,
EncodingFOrayLatinExtra.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingISOLatin1.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingISOLatin1.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingISOLatin1.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -855,7 +855,7 @@
};
public EncodingISOLatin1() {
- super("ISOLatin1Encoding", GlyphList.standardSourceGlyphLists,
+ super("ISOLatin1Encoding", GlyphList.standardSourceGlyphLists(),
EncodingISOLatin1.codePoints,
EncodingISOLatin1.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacExpert.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacExpert.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacExpert.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -715,7 +715,7 @@
};
public EncodingMacExpert() {
- super("MacExpertEncoding", GlyphList.standardSourceGlyphLists,
+ super("MacExpertEncoding", GlyphList.standardSourceGlyphLists(),
EncodingMacExpert.codePoints,
EncodingMacExpert.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacRoman.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacRoman.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacRoman.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -883,7 +883,7 @@
};
public EncodingMacRoman() {
- super("MacRomanEncoding", GlyphList.standardSourceGlyphLists,
+ super("MacRomanEncoding", GlyphList.standardSourceGlyphLists(),
EncodingMacRoman.codePoints,
EncodingMacRoman.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacStandard.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacStandard.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingMacStandard.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -1094,7 +1094,7 @@
};
public EncodingMacStandard() {
- super(STANDARD_MACINTOSH_ORDERING, GlyphList.standardSourceGlyphLists,
+ super(STANDARD_MACINTOSH_ORDERING, GlyphList.standardSourceGlyphLists(),
EncodingMacStandard.codePoints,
EncodingMacStandard.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingPDFDoc.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingPDFDoc.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingPDFDoc.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -971,7 +971,7 @@
};
public EncodingPDFDoc() {
- super("PDFDocEncoding", GlyphList.standardSourceGlyphLists,
+ super("PDFDocEncoding", GlyphList.standardSourceGlyphLists(),
EncodingPDFDoc.codePoints,
EncodingPDFDoc.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingStandard.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingStandard.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingStandard.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -654,7 +654,7 @@
};
public EncodingStandard() {
- super("StandardEncoding", GlyphList.standardSourceGlyphLists,
+ super("StandardEncoding", GlyphList.standardSourceGlyphLists(),
EncodingStandard.codePoints,
EncodingStandard.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingSymbol.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingSymbol.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingSymbol.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -819,7 +819,7 @@
};
public EncodingSymbol() {
- super("SymbolEncoding", GlyphList.standardSourceGlyphLists,
+ super("SymbolEncoding", GlyphList.standardSourceGlyphLists(),
EncodingSymbol.codePoints,
EncodingSymbol.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingWinAnsi.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingWinAnsi.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/EncodingWinAnsi.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -919,7 +919,7 @@
};
public EncodingWinAnsi() {
- super("WinAnsiEncoding", GlyphList.standardSourceGlyphLists,
+ super("WinAnsiEncoding", GlyphList.standardSourceGlyphLists(),
EncodingWinAnsi.codePoints,
EncodingWinAnsi.codePointIndexes);
}
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphList.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphList.java 2006-09-06 00:07:11 UTC (rev 7927)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/encode/GlyphList.java 2006-09-06 00:13:44 UTC (rev 7928)
@@ -38,15 +38,15 @@
*/
public class GlyphList {
- public static final GlyphList[] standardSourceGlyphLists = {
- GlyphList.getGlyphList("AGL")
- };
-
/** Map of GlyphList instances that have already been registered. The key
* is a String with the GlyphList name, and the value is the GlyphList
* instance. */
private static HashMap glyphListMap = new HashMap();
+ private static final GlyphList[] standardSourceGlyphLists = {
+ GlyphList.getGlyphList("AGL")
+ };
+
/** A unique, descriptive name for this GlyphList. */
private String name;
@@ -249,4 +249,11 @@
return Encoding.INVALID_UNICODE_CHAR;
}
+ /**
+ * @return Returns the standardSourceGlyphLists.
+ */
+ public static GlyphList[] standardSourceGlyphLists() {
+ return standardSourceGlyphLists;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 00:07:15
|
Revision: 7927
http://svn.sourceforge.net/foray/?rev=7927&view=rev
Author: victormote
Date: 2006-09-05 17:07:11 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Add new requirement to checkstyle regarding document ordering.
Modified Paths:
--------------
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2006-09-06 00:06:35 UTC (rev 7926)
+++ trunk/foray/scripts/checkstyle-config.xml 2006-09-06 00:07:11 UTC (rev 7927)
@@ -93,7 +93,7 @@
<!--Check for standard ordering of type declarations.-->
<module name="DeclarationOrder">
- <property name="severity" value="ignore"/>
+ <property name="severity" value="error"/>
</module>
<!--Require "this" identifier for all instance variables.-->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-06 00:06:44
|
Revision: 7926
http://svn.sourceforge.net/foray/?rev=7926&view=rev
Author: victormote
Date: 2006-09-05 17:06:35 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
trunk/foray/foray-app/src/java/org/foray/app/Starter.java
trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java
trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamXMLReader.java
trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/AbstractObjectReader.java
Modified: trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-09-05 23:55:49 UTC (rev 7925)
+++ trunk/foray/foray-app/src/java/org/foray/app/AWTStarter.java 2006-09-06 00:06:35 UTC (rev 7926)
@@ -58,12 +58,12 @@
*/
public class AWTStarter extends CommandLineStarter {
+ private static final String TRANSLATION_PATH =
+ "/org/foray/render/awt/viewer/resources/";
+
PreviewDialog frame;
AWTRenderer renderer;
- protected FOraySession session;
- protected FOrayDocument document;
- public static final String TRANSLATION_PATH =
- "/org/foray/render/awt/viewer/resources/";
+ private FOrayDocument document;
private Translator resource;
private UserMessage userMessage;
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-09-05 23:55:49 UTC (rev 7925)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineOptions.java 2006-09-06 00:06:35 UTC (rev 7926)
@@ -71,13 +71,13 @@
private File outfile = null;
/** The input mode. */
- int inputmode = INPUT_NOT_SET;
+ private int inputmode = INPUT_NOT_SET;
/** The output mode. */
- int outputmode = INPUT_NOT_SET;
+ private int outputmode = INPUT_NOT_SET;
/** Language for user information */
- String language = null;
+ private String language = null;
private SessionConfig sessionConfig;
private OutputConfig rendererOptions;
Modified: trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2006-09-05 23:55:49 UTC (rev 7925)
+++ trunk/foray/foray-app/src/java/org/foray/app/CommandLineStarter.java 2006-09-06 00:06:35 UTC (rev 7926)
@@ -83,7 +83,8 @@
* in the order submitted.
*/
FOrayDocument document = null;
- if (this.commandLineOptions.inputmode == CommandLineOptions.INPUT_FO) {
+ if (this.commandLineOptions.getInputMode()
+ == CommandLineOptions.INPUT_FO) {
document = new FOrayDocument(session, inputSource, null);
} else {
document = new FOrayDocument(session,
@@ -98,7 +99,7 @@
* as well.
*/
final int outputType = commandLineOptions.getOutputType();
- final OutputConfig outputOptions = this.outputConfig;
+ final OutputConfig outputOptions = this.getOutputConfig();
final OutputTarget outputTarget = OutputTargetFactory.makeOutputTarget(
outputType, outputOptions, session.getLogger());
Modified: trunk/foray/foray-app/src/java/org/foray/app/Starter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/Starter.java 2006-09-05 23:55:49 UTC (rev 7925)
+++ trunk/foray/foray-app/src/java/org/foray/app/Starter.java 2006-09-06 00:06:35 UTC (rev 7926)
@@ -42,13 +42,11 @@
Options options;
InputSource inputSource;
private Log logger;
- protected SessionConfig sessionConfig;
- protected OutputConfig outputConfig;
+ private OutputConfig outputConfig;
public Starter(final Log logger, final SessionConfig sessionConfig,
final OutputConfig renderConfig) throws FOrayException {
this.logger = logger;
- this.sessionConfig = sessionConfig;
this.outputConfig = renderConfig;
options = new Options(logger, sessionConfig, renderConfig);
}
@@ -63,4 +61,11 @@
return this.logger;
}
+ /**
+ * @return Returns the outputConfig.
+ */
+ public OutputConfig getOutputConfig() {
+ return this.outputConfig;
+ }
+
}
Modified: trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java 2006-09-05 23:55:49 UTC (rev 7925)
+++ trunk/foray/foray-app/src/java/org/foray/app/ant/FOrayAntTask.java 2006-09-06 00:06:35 UTC (rev 7926)
@@ -68,7 +68,7 @@
int messageType = Project.MSG_VERBOSE;
boolean logFiles = true;
private boolean force = false;
- Log logger;
+ private Log logger;
/**
* Sets the user configuration file.
Modified: trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2006-09-05 23:55:49 UTC (rev 7925)
+++ trunk/foray/foray-app/src/java/org/foray/app/test/TestConverter.java 2006-09-06 00:06:35 UTC (rev 7926)
@@ -73,6 +73,10 @@
HashMap differ = new HashMap();
private Log log;
+ public TestConverter() {
+ setupLogging();
+ }
+
/**
* This main method can be used to run the test converter from
* the command line.
@@ -123,10 +127,6 @@
tc.runTests(testFile, output, null);
}
- public TestConverter() {
- setupLogging();
- }
-
private void setupLogging() {
log = Logging.makeQuietLogger();
}
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2006-09-05 23:55:49 UTC (rev 7925)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/DemoAWTViewer.java 2006-09-06 00:06:35 UTC (rev 7926)
@@ -53,13 +53,13 @@
*/
public class DemoAWTViewer extends EmbedDemo {
+ public static final String TRANSLATION_PATH =
+ "/org/foray/render/awt/viewer/resources/";
+
public DemoAWTViewer() {
super();
}
- public static final String TRANSLATION_PATH =
- "/org/foray/render/awt/viewer/resources/";
-
protected PreviewDialog createPreviewDialog(
final AWTRenderer renderer,
final Translator res) {
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamXMLReader.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamXMLReader.java 2006-09-05 23:55:49 UTC (rev 7925)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/model/ProjectTeamXMLReader.java 2006-09-06 00:06:35 UTC (rev 7926)
@@ -62,18 +62,18 @@
throw new NullPointerException("Parameter projectTeam must not be "
+ "null");
}
- if (handler == null) {
+ if (this.getHandler() == null) {
throw new IllegalStateException("ContentHandler not set");
}
//Start the document
- handler.startDocument();
+ this.getHandler().startDocument();
//Generate SAX events for the ProjectTeam
generateFor(projectTeam);
//End the document
- handler.endDocument();
+ this.getHandler().endDocument();
}
@@ -88,18 +88,18 @@
throw new NullPointerException("Parameter projectTeam must not be "
+ "null");
}
- if (handler == null) {
+ if (this.getHandler() == null) {
throw new IllegalStateException("ContentHandler not set");
}
- handler.startElement("projectteam");
- handler.element("projectname", projectTeam.getProjectName());
+ this.getHandler().startElement("projectteam");
+ this.getHandler().element("projectname", projectTeam.getProjectName());
final Iterator i = projectTeam.getMembers().iterator();
while (i.hasNext()) {
final ProjectMember member = (ProjectMember)i.next();
generateFor(member);
}
- handler.endElement("projectteam");
+ this.getHandler().endElement("projectteam");
}
/**
@@ -113,15 +113,15 @@
throw new NullPointerException("Parameter projectMember must not "
+ "be null");
}
- if (handler == null) {
+ if (this.getHandler() == null) {
throw new IllegalStateException("ContentHandler not set");
}
- handler.startElement("member");
- handler.element("name", projectMember.getName());
- handler.element("function", projectMember.getFunction());
- handler.element("email", projectMember.getEmail());
- handler.endElement("member");
+ this.getHandler().startElement("member");
+ this.getHandler().element("name", projectMember.getName());
+ this.getHandler().element("function", projectMember.getFunction());
+ this.getHandler().element("email", projectMember.getEmail());
+ this.getHandler().endElement("member");
}
}
Modified: trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/AbstractObjectReader.java
===================================================================
--- trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/AbstractObjectReader.java 2006-09-05 23:55:49 UTC (rev 7925)
+++ trunk/foray/foray-app/src/java/org/foray/demo/embed/tools/AbstractObjectReader.java 2006-09-06 00:06:35 UTC (rev 7926)
@@ -51,9 +51,10 @@
private ContentHandler orgHandler;
/** Proxy for easy SAX event generation */
- protected EasyContentHandlerProxy handler;
+ private EasyContentHandlerProxy handler;
+
/** Error handler */
- protected ErrorHandler errorHandler;
+ private ErrorHandler errorHandler;
/**
@@ -179,4 +180,11 @@
public abstract void parse(InputSource input)
throws IOException, SAXException;
+ /**
+ * @return Returns the handler.
+ */
+ public EasyContentHandlerProxy getHandler() {
+ return this.handler;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:55:56
|
Revision: 7925
http://svn.sourceforge.net/foray/?rev=7925&view=rev
Author: victormote
Date: 2006-09-05 16:55:49 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-09-05 23:54:49 UTC (rev 7924)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-09-05 23:55:49 UTC (rev 7925)
@@ -57,8 +57,8 @@
private RegionRA start;
private RegionRA end;
- protected int pageNumber = 0;
- protected String formattedPageNumber;
+ private int pageNumber = 0;
+ private String formattedPageNumber;
private ArrayList markers = null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:54:53
|
Revision: 7924
http://svn.sourceforge.net/foray/?rev=7924&view=rev
Author: victormote
Date: 2006-09-05 16:54:49 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-common/src/java/org/foray/common/ColorSpaceCMYK.java
trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java
Modified: trunk/foray/foray-common/src/java/org/foray/common/ColorSpaceCMYK.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/ColorSpaceCMYK.java 2006-09-05 23:51:06 UTC (rev 7923)
+++ trunk/foray/foray-common/src/java/org/foray/common/ColorSpaceCMYK.java 2006-09-05 23:54:49 UTC (rev 7924)
@@ -31,10 +31,11 @@
* A {@link ColorSpace} implementation for CMYK.
*/
public class ColorSpaceCMYK extends ColorSpace {
- static final long serialVersionUID = 34959014422981446L;
protected static final float BLACK_FACTOR = 2.0f; // could be 3.0 as well.
+ static final long serialVersionUID = 34959014422981446L;
+
private static ColorSpaceCMYK THE_INSTANCE;
public ColorSpaceCMYK() {
Modified: trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-05 23:51:06 UTC (rev 7923)
+++ trunk/foray/foray-common/src/java/org/foray/common/RandomReader.java 2006-09-05 23:54:49 UTC (rev 7924)
@@ -467,24 +467,22 @@
* end of the file.
*/
class ByteSearcher {
- private final byte[] bytesToFind;
- private final long startRange;
- private final long endRange;
- private final boolean readBackward;
- /*
- * The size, in bytes, to be read in. Set up here as a variable in
- * case we want someday to try to optimize it.
- */
+ /** The size, in bytes, to be read in. Set up here as a variable in
+ * case we want someday to try to optimize it. */
private static final int idealReadSize = 1024;
- /*
- * The size, in bytes, of the working array. Set it to 2 x readSize,
+
+ /** The size, in bytes, of the working array. Set it to 2 x readSize,
* so that we can see two readSize chunks at a time. Otherwise, it
* will be complicated to handle situations where the text straddles
- * two readSize chunks.
- */
+ * two readSize chunks. */
private static final int viewboxSize = idealReadSize * 2;
+ private final byte[] bytesToFind;
+ private final long startRange;
+ private final long endRange;
+ private final boolean readBackward;
+
private byte[] viewbox = new byte[viewboxSize];
/**
Modified: trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java
===================================================================
--- trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java 2006-09-05 23:51:06 UTC (rev 7923)
+++ trunk/foray/foray-common/src/java/org/foray/common/sax/DocumentReader.java 2006-09-05 23:54:49 UTC (rev 7924)
@@ -51,13 +51,21 @@
public class DocumentReader implements XMLReader {
- // //////////////////////////////////////////////////////////////////
- // Configuration.
- // //////////////////////////////////////////////////////////////////
+ /** Configuration variable. */
private boolean _namespaces = true;
+
+ /** Configuration variable. */
private boolean _namespace_prefixes = true;
+ private EntityResolver _entityResolver = null;
+ private DTDHandler _dtdHandler = null;
+ private ContentHandler _contentHandler = null;
+ private ErrorHandler _errorHandler = null;
+
+ // //////////////////////////////////////////////////////////////////
+ // Configuration.
+ // //////////////////////////////////////////////////////////////////
/**
* Look up the value of a feature.
*
@@ -241,12 +249,6 @@
// //////////////////////////////////////////////////////////////////
// Event handlers.
// //////////////////////////////////////////////////////////////////
- private EntityResolver _entityResolver = null;
- private DTDHandler _dtdHandler = null;
- private ContentHandler _contentHandler = null;
- private ErrorHandler _errorHandler = null;
-
-
/**
* Allow an application to register an entity resolver.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:51:09
|
Revision: 7923
http://svn.sourceforge.net/foray/?rev=7923&view=rev
Author: victormote
Date: 2006-09-05 16:51:06 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2006-09-05 23:49:41 UTC (rev 7922)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayDocument.java 2006-09-05 23:51:06 UTC (rev 7923)
@@ -99,12 +99,6 @@
private FOrayTarget currentTarget;
- /** Array of bytes listing unsupported FO objects. */
- protected byte[] unsupportedObjects;
-
- /** Array of shorts listing unsupported FO properties. */
- protected short[] unsupportedProperties;
-
/** The SAX parser. */
private XMLReader parser;
Modified: trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java
===================================================================
--- trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-09-05 23:49:41 UTC (rev 7922)
+++ trunk/foray/foray-core/src/java/org/foray/core/FOrayTarget.java 2006-09-05 23:51:06 UTC (rev 7923)
@@ -72,7 +72,7 @@
private Runtime runtime = Runtime.getRuntime();
/** Keep track of the number of pages rendered. */
- int pageCount = 0;
+ private int pageCount = 0;
/** Keep track of heap memory allocated, for statistical purposes. */
private long initialMemory;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:49:50
|
Revision: 7922
http://svn.sourceforge.net/foray/?rev=7922&view=rev
Author: victormote
Date: 2006-09-05 16:49:41 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
trunk/foray/foray-font/src/java/org/foray/font/Subset.java
trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFFont.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableNAME.java
trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2006-09-05 23:37:00 UTC (rev 7921)
+++ trunk/foray/foray-font/src/java/org/foray/font/FOrayFontServer.java 2006-09-05 23:49:41 UTC (rev 7922)
@@ -89,9 +89,9 @@
private boolean setupCompleted = false;
- protected boolean usingFreeStandingFonts = true;
+ private boolean usingFreeStandingFonts = true;
- protected boolean usingSystemFonts = false;
+ private boolean usingSystemFonts = false;
private boolean hasFatalConfigurationError = false;
Modified: trunk/foray/foray-font/src/java/org/foray/font/Subset.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/Subset.java 2006-09-05 23:37:00 UTC (rev 7921)
+++ trunk/foray/foray-font/src/java/org/foray/font/Subset.java 2006-09-05 23:49:41 UTC (rev 7922)
@@ -78,7 +78,7 @@
* The number of subset glyphs used so far. It should be incremented after
* creating new subset glyphs.
*/
- int qtyGlyphs = 0;
+ private int qtyGlyphs = 0;
/**
* Constructor.
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java 2006-09-05 23:37:00 UTC (rev 7921)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/MetricsFileAFM.java 2006-09-05 23:49:41 UTC (rev 7922)
@@ -279,7 +279,7 @@
private String charSetString;
/** The "UniqueID" field parsed from a Comment line, if any. */
- protected String uniqueID;
+ private String uniqueID;
/* End Items Parsed from the AFM File */
@@ -310,16 +310,16 @@
* This array is created as the metrics file is parsed, and is then used
* later to create {@link #internalEncoding}.</p>
*/
- protected char[] internalCodePoints;
+ private char[] internalCodePoints;
/**
* Array parallel to {@link #internalCodePoints} and containing the
* encoded indexes that correspond to the elements therein.
*/
- protected char[] internalCodePointIndexes;
+ private char[] internalCodePointIndexes;
/** The number of internalCodePoint elements parsed so far. */
- protected int internalCodePointCount = 0;
+ private int internalCodePointCount = 0;
/**
* This font's internalEncoding, as parsed from its metrics file.
@@ -329,9 +329,9 @@
* first character is at index 5, an index that is not included in the
* EncodingScheme listed, "AdobeStandardEncoding".</p>
*/
- protected EncodingVector internalEncoding;
+ private EncodingVector internalEncoding;
- protected CharSet charSet;
+ private CharSet charSet;
public MetricsFileAFM(final MetricsFileReader reader) {
super(reader);
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java 2006-09-05 23:37:00 UTC (rev 7921)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFFileCollection.java 2006-09-05 23:49:41 UTC (rev 7922)
@@ -40,7 +40,7 @@
/** Collection of TTFTableDirectory entries. There should be one entry for
* each logical font in the TTC file. */
- TTFTableDirectory[] tableDirectories;
+ private TTFTableDirectory[] tableDirectories;
public TTFFileCollection(final FontFileReader reader) {
super(reader);
@@ -68,7 +68,7 @@
final TTFTableDirEntry tableDirEntry
= tableDir.getTableDirectoryEntry("name");
final TTFTableNAME nameTable = new TTFTableNAME(tableDirEntry);
- fontNames[i] = nameTable.fullName;
+ fontNames[i] = nameTable.getFullName();
}
return fontNames;
}
@@ -84,7 +84,7 @@
= tableDir.getTableDirectoryEntry("name");
reader.seek(tableDirEntry.getOffset());
final TTFTableNAME nameTable = new TTFTableNAME(tableDirEntry);
- if (nameTable.fullName.equals(fontName)) {
+ if (nameTable.getFullName().equals(fontName)) {
return tableDir.getTTFFont();
}
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFFont.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFFont.java 2006-09-05 23:37:00 UTC (rev 7921)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFFont.java 2006-09-05 23:49:41 UTC (rev 7922)
@@ -80,6 +80,13 @@
}
/**
+ * Constructor suitable for creating an Font that is in the process of being
+ * built.
+ */
+ protected TTFFont() {
+ }
+
+ /**
* This method should never need to be used by anything except
* {@link TTFTableDirectory#getTTFFont()}, which ensures that there is a
* one-to-one relationship between TTFFont and TTFTableDirectory.
@@ -96,13 +103,6 @@
}
/**
- * Constructor suitable for creating an Font that is in the process of being
- * built.
- */
- protected TTFFont() {
- }
-
- /**
* Position inputstream to position indicated
* in the dirtab offset
*/
@@ -169,11 +169,11 @@
}
public void printStuff(final Log logger) {
- logger.info("Font name: " + nameTable.postscriptName);
- logger.info("Full name: " + nameTable.fullName);
- logger.info("Family name: " + nameTable.familyName);
- logger.info("Subfamily name: " + nameTable.subFamilyName);
- logger.info("Notice: " + nameTable.copyrightNotice);
+ logger.info("Font name: " + nameTable.getPostscriptName());
+ logger.info("Full name: " + nameTable.getFullName());
+ logger.info("Family name: " + nameTable.getFamilyName());
+ logger.info("Subfamily name: " + nameTable.getSubFamilyName());
+ logger.info("Notice: " + nameTable.getCopyrightNotice());
logger.info("xHeight: " + getXHeight());
logger.info("capheight: " + getCapHeight());
@@ -188,25 +188,25 @@
}
public String getPostscriptName() {
- if (nameTable.postscriptName != null) {
- return nameTable.postscriptName;
+ if (nameTable.getPostscriptName() != null) {
+ return nameTable.getPostscriptName();
}
// Note that the PostScript name usually is something like
// "Perpetua-Bold", but the TrueType spec says that in the ttf file
// it should be "Perpetua,Bold".
- if ("Regular".equals(nameTable.subFamilyName)
- || "Roman".equals(nameTable.subFamilyName)) {
- return nameTable.familyName;
+ if ("Regular".equals(nameTable.getSubFamilyName())
+ || "Roman".equals(nameTable.getSubFamilyName())) {
+ return nameTable.getFamilyName();
}
- return nameTable.familyName + "," + nameTable.subFamilyName;
+ return nameTable.getFamilyName() + "," + nameTable.getSubFamilyName();
}
public String getFamilyName() {
- return nameTable.familyName;
+ return nameTable.getFamilyName();
}
public String getFontName() {
- return nameTable.fullName;
+ return nameTable.getFullName();
}
public int getCapHeight() {
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-05 23:37:00 UTC (rev 7921)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFSubSetFile.java 2006-09-05 23:49:41 UTC (rev 7922)
@@ -46,6 +46,8 @@
*/
public class TTFSubSetFile {
+ private static final String ttfMessage = "TrueType warning: ";
+
/** The TTFFont that is being subsetted. */
private TTFFont ttfFont = null;
@@ -57,8 +59,6 @@
/** For convenience only. */
private FontFileReader in = null;
- private static final String ttfMessage = "TrueType warning: ";
-
/**
* List of the String names of each table in the font subset ("head",
* "hhea", etc.), stored in the order in which it should appear in the
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableNAME.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableNAME.java 2006-09-05 23:37:00 UTC (rev 7921)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/TTFTableNAME.java 2006-09-05 23:49:41 UTC (rev 7922)
@@ -68,9 +68,15 @@
public static final String EMPTY_STRING = "";
- int offsetToStrings;
- int numNameRecords;
+ private int offsetToStrings;
+ private int numNameRecords;
+ private String copyrightNotice = "";
+ private String familyName = "";
+ private String subFamilyName = "";
+ private String fullName = "";
+ private String postscriptName = "";
+
/*
* The following 4 arrays are intended to be parallel and the represent the
* 4 components of the "key" to the name table.
@@ -80,12 +86,6 @@
private int[] languageArray;
private int[] nameArray;
- String copyrightNotice = "";
- String familyName = "";
- String subFamilyName = "";
- String fullName = "";
- String postscriptName = "";
-
TTFTableNAME (final TTFFont ttfFile) throws IOException {
super(ttfFile);
parseTable();
@@ -343,4 +343,39 @@
return "name";
}
+ /**
+ * @return Returns the postscriptName.
+ */
+ public String getPostscriptName() {
+ return this.postscriptName;
+ }
+
+ /**
+ * @return Returns the copyrightNotice.
+ */
+ public String getCopyrightNotice() {
+ return this.copyrightNotice;
+ }
+
+ /**
+ * @return Returns the familyName.
+ */
+ public String getFamilyName() {
+ return this.familyName;
+ }
+
+ /**
+ * @return Returns the fullName.
+ */
+ public String getFullName() {
+ return this.fullName;
+ }
+
+ /**
+ * @return Returns the subFamilyName.
+ */
+ public String getSubFamilyName() {
+ return this.subFamilyName;
+ }
+
}
Modified: trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java 2006-09-05 23:37:00 UTC (rev 7921)
+++ trunk/foray/foray-font/src/java/org/foray/font/format/Type1File.java 2006-09-05 23:49:41 UTC (rev 7922)
@@ -52,6 +52,9 @@
protected static final byte NUM_DATA_SEGMENTS = 3;
+ /** The size of byte array that should be read from the file at one time. */
+ static final int chunkSize = 1024;
+
/**
* Stores the offsets in the data file to each of the segments. Note that
* the value stored here is the offset to the data portion of the segment,
@@ -72,21 +75,18 @@
private boolean detailParsed = false;
/** Tracks which of the three segments (0-2) is currently being parsed. */
- byte segmentBeingParsed = -1;
+ private byte segmentBeingParsed = -1;
- /** The size of byte array that should be read from the file at one time. */
- static final int chunkSize = 1024;
-
/** The offset to the last byte of the last chunk that was read. */
- long chunkEndOffset;
+ private long chunkEndOffset;
- protected PSDictionary fontDictionary = null;
- protected int[] fontBBox = null;
- protected int stemV = 0;
+ private PSDictionary fontDictionary = null;
+ private int[] fontBBox = null;
+ private int stemV = 0;
- PSInterpreter interpreter;
+ private PSInterpreter interpreter;
- EncryptFilter encryptFilter = new EncryptFilter(
+ private EncryptFilter encryptFilter = new EncryptFilter(
EncryptFilter.EEXEC_INITIAL_KEY,
EncryptFilter.EEXEC_RANDOM_BYTES);
@@ -362,4 +362,11 @@
return psObject.toString();
}
+ /**
+ * @return Returns the encryptFilter.
+ */
+ public EncryptFilter getEncryptFilter() {
+ return this.encryptFilter;
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:37:13
|
Revision: 7921
http://svn.sourceforge.net/foray/?rev=7921&view=rev
Author: victormote
Date: 2006-09-05 16:37:00 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundImage.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java
trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOText.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -47,12 +47,12 @@
*/
public class FOText extends FONode implements FOLineText, org.axsl.foR.FOText {
+ public static final char DISCARD_CHAR = 0xFFFF;
+
private static final int IS_WORD_CHAR_FALSE = 0;
private static final int IS_WORD_CHAR_TRUE = 1;
private static final int IS_WORD_CHAR_MAYBE = 2;
- public static final char DISCARD_CHAR = 0xFFFF;
-
/* Following is a list of constants that can be used to describe the
* filtering status of this object's text.
* The order of filtering is as follows:
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOTreeBuilder.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -87,8 +87,8 @@
private GraphicServer graphicServer;
private TextServer textServer;
private FontConsumer fontConsumer;
- URL[] graphicSearchPath;
- boolean cachingGraphics;
+ private URL[] graphicSearchPath;
+ private boolean cachingGraphics;
public FOTreeBuilder(final FOrayFOTreeServer server, final Log logger) {
this.server = server;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FObj.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -55,9 +55,9 @@
protected ArrayList children = new ArrayList();
private PropertyList propertyList;
- protected String systemId;
- protected int line;
- protected int column;
+ private String systemId;
+ private int line;
+ private int column;
protected FObj(final FObj parent, final PropertyList propertyList,
final String systemId, final int line, final int column) {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/FOrayFOTreeServer.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -59,7 +59,7 @@
* Map whose key is a String of the namespace URI, and whose value is
* a Namespace instance that knows how to parse items in that namespace.
*/
- protected HashMap namespaceMap = new HashMap();
+ private HashMap namespaceMap = new HashMap();
private NamespaceFO namespaceFO;
private NamespaceExtensions namespaceExtensions;
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/ExternalGraphic.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -52,15 +52,15 @@
* repeatedly, e.g. in a page header or footer. */
protected Graphic graphic;
+ /** Pixel density to be used as a fallback value for intrinsic size
+ * computations. */
+ protected int pixelsPerInch = 96;
+
/** Set to true if we have already attempted to set #graphic with a
* resolved value. If makeGraphicAttempted is true and #graphic is null,
* then the Graphic could not be resolved. */
private boolean makeGraphicAttempted = false;
- /** Pixel density to be used as a fallback value for intrinsic size
- * computations. */
- protected int pixelsPerInch = 96;
-
public ExternalGraphic(final FObj parent, final PropertyList propertyList,
final String systemId, final int line, final int column) {
super(parent, propertyList, systemId, line, column);
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundImage.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundImage.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BackgroundImage.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -42,14 +42,14 @@
*/
public class BackgroundImage extends Property {
- /** Cache the graphic in case it is requested more than once. */
- private Graphic graphic = null;
-
public static final short[] validKeywords = {
Constants.FOVAL_NONE,
Constants.FOVAL_INHERIT,
};
+ /** Cache the graphic in case it is requested more than once. */
+ private Graphic graphic = null;
+
public BackgroundImage(final PropertyList propertyList,
final short enumeration, final String propertyFullName,
final String attributeValue)
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/prop/BorderWidth.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -45,6 +45,10 @@
*/
public class BorderWidth extends Property {
+ public static final int BORDER_WIDTH_THIN = 500; // .5 points
+ public static final int BORDER_WIDTH_MEDIUM = 1000; // 1 point
+ public static final int BORDER_WIDTH_THICK = 2000; // 2 points
+
protected static final short[] validKeywords = {
Constants.FOVAL_THIN,
Constants.FOVAL_MEDIUM,
@@ -52,10 +56,6 @@
Constants.FOVAL_INHERIT,
};
- public static final int BORDER_WIDTH_THIN = 500; // .5 points
- public static final int BORDER_WIDTH_MEDIUM = 1000; // 1 point
- public static final int BORDER_WIDTH_THICK = 2000; // 2 points
-
public BorderWidth(final PropertyList propertyList, final short enumeration,
final String propertyFullName, final String attributeValue)
throws PropertyException {
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/foray/ObjectMakerExtensions.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -37,6 +37,8 @@
*/
public class ObjectMakerExtensions {
+ public static final byte CONTINUED_LABEL = 1;
+
/**
* Keep this list sorted alphabetically, so that we can use a binary
* search on it.
@@ -46,8 +48,6 @@
"continued-label",
};
- public static final byte CONTINUED_LABEL = 1;
-
/**
* Converts an object name to its integral equivalent.
* @param objectName The object name to be enumerated.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyParser.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -59,6 +59,18 @@
private Stack stkFunction; // Stack of functions being evaluated
/**
+ * Private constructor. Called by the static parse() method.
+ * @param propertyList The PropertyList instance providing the context in
+ * which the parser should evaluate <code>expression</code>.
+ * @param expression The XML attribute which will be parsed.
+ */
+ private PropertyParser(final PropertyList propertyList,
+ final String expression) {
+ super(expression);
+ this.propertyList = propertyList;
+ }
+
+ /**
* Public entrypoint to the Property expression parser.
* @param expr The specified value (attribute on the xml element).
* @param propertyList The PropertyList instance providing the context in
@@ -72,20 +84,7 @@
return parser.parseProperty();
}
-
/**
- * Private constructor. Called by the static parse() method.
- * @param propertyList The PropertyList instance providing the context in
- * which the parser should evaluate <code>expression</code>.
- * @param expression The XML attribute which will be parsed.
- */
- private PropertyParser(final PropertyList propertyList,
- final String expression) {
- super(expression);
- this.propertyList = propertyList;
- }
-
- /**
* Parse the property expression described in the instance variables.
* Note: If the property expression String is empty, a StringProperty
* object holding an empty String is returned.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/parse/PropertyTokenizer.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -52,9 +52,33 @@
static final int TOK_FLOAT = TOK_COLORSPEC + 1;
static final int TOK_INTEGER = TOK_FLOAT + 1;
+ private static final int CS = 1;
+
+ /* "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; */
+ private static final int nameStartChars = 1;
+ private static final int C = 2;
+ private static final int D = 4;
+ private static final int digits = 4; //"0123456789";
+ private static final int H = 8;
+ private static final int hexchars = 8; //digits + "abcdefABCDEF";
+ private static final int C_CS = C + CS;
+
+
+ private static final int charMap[] = {
+ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, //0x00
+ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, //0x10
+ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,C,C,0, //0x20
+ C+D+H,C+D+H,C+D+H,C+D+H, C+D+H,C+D+H,C+D+H,C+D+H,
+ C+D+H,C+D+H,0,0, 0,0,0,0, //0x30
+ 0,CS+H,CS+H,CS+H, CS+H,CS+H,CS+H,CS, CS,CS,CS,CS, CS,CS,CS,CS, //0x40
+ CS,CS,CS,CS, CS,CS,CS,CS, CS,CS,CS,0, 0,0,0,CS, //0x50
+ 0,CS+H,CS+H,CS+H, CS+H,CS+H,CS+H,CS, CS,CS,CS,CS, CS,CS,CS,CS, //0x60
+ CS,CS,CS,CS, CS,CS,CS,CS, CS,CS,CS,0, 0,0,0,0 //0x70
+ };
+
+ protected int currentUnitLength = 0;
int currentToken = TOK_EOF;
String currentTokenValue = null;
- protected int currentUnitLength = 0;
private int currentTokenStartIndex = 0;
private /* final */ String expr;
@@ -296,30 +320,6 @@
return false;
}
- private static final int CS = 1;
-
- /* "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; */
- private static final int nameStartChars = 1;
- private static final int C = 2;
- private static final int D = 4;
- private static final int digits = 4; //"0123456789";
- private static final int H = 8;
- private static final int hexchars = 8; //digits + "abcdefABCDEF";
- private static final int C_CS = C + CS;
-
-
- private static final int charMap[] = {
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, //0x00
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, //0x10
- 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,C,C,0, //0x20
- C+D+H,C+D+H,C+D+H,C+D+H, C+D+H,C+D+H,C+D+H,C+D+H,
- C+D+H,C+D+H,0,0, 0,0,0,0, //0x30
- 0,CS+H,CS+H,CS+H, CS+H,CS+H,CS+H,CS, CS,CS,CS,CS, CS,CS,CS,CS, //0x40
- CS,CS,CS,CS, CS,CS,CS,CS, CS,CS,CS,0, 0,0,0,CS, //0x50
- 0,CS+H,CS+H,CS+H, CS+H,CS+H,CS+H,CS, CS,CS,CS,CS, CS,CS,CS,CS, //0x60
- CS,CS,CS,CS, CS,CS,CS,CS, CS,CS,CS,0, 0,0,0,0 //0x70
- };
-
/**
* Return a boolean value indicating whether the argument is a
* decimal digit (0-9).
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/svg/ObjectMakerSVG.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -38,6 +38,57 @@
*/
public class ObjectMakerSVG {
+ public static final byte A = 1;
+ public static final byte ALTGLYPH = 2;
+ public static final byte ANIMATE = 3;
+ public static final byte ANIMATECOLOR = 4;
+ public static final byte ANIMATEMOTION = 5;
+ public static final byte ANIMATETRANSFORM = 6;
+ public static final byte CIRCLE = 7;
+ public static final byte CLIPPATH = 8;
+ public static final byte CURSOR = 9;
+ public static final byte DEFS = 10;
+ public static final byte DESC = 11;
+ public static final byte ELLIPSE = 12;
+ public static final byte FEFLOOD = 13;
+ public static final byte FEGAUSSIANBLUR = 14;
+ public static final byte FEMERGE = 15;
+ public static final byte FEMERGENODE = 16;
+ public static final byte FEOFFSET = 17;
+ public static final byte FILTER = 18;
+ public static final byte FONT = 19;
+ public static final byte FONT_FACE = 20;
+ public static final byte FONT_FACE_SRC = 21;
+ public static final byte FONT_FACE_URI = 22;
+ public static final byte G = 23;
+ public static final byte GLYPH = 24;
+ public static final byte HKERN = 25;
+ public static final byte IMAGE = 26;
+ public static final byte LINE = 27;
+ public static final byte LINEARGRADIENT = 28;
+ public static final byte MARKER = 29;
+ public static final byte MASK = 30;
+ public static final byte MISSING_GLYPH = 31;
+ public static final byte PATH = 32;
+ public static final byte PATTERN = 33;
+ public static final byte POLYGON = 34;
+ public static final byte POLYLINE = 35;
+ public static final byte RADIALGRADIENT = 36;
+ public static final byte RECT = 37;
+ public static final byte SET = 38;
+ public static final byte STOP = 39;
+ public static final byte STYLE = 40;
+ public static final byte SVG = 41;
+ public static final byte SWITCH = 42;
+ public static final byte SYMBOL = 43;
+ public static final byte TEXT = 44;
+ public static final byte TEXTPATH = 45;
+ public static final byte TITLE = 46;
+ public static final byte TREF = 47;
+ public static final byte TSPAN = 48;
+ public static final byte USE = 49;
+ public static final byte VKERN = 50;
+
/**
* Keep this list sorted alphabetically, so that we can use a binary
* search on it.
@@ -96,58 +147,6 @@
"vkern",
};
- public static final byte A = 1;
- public static final byte ALTGLYPH = 2;
- public static final byte ANIMATE = 3;
- public static final byte ANIMATECOLOR = 4;
- public static final byte ANIMATEMOTION = 5;
- public static final byte ANIMATETRANSFORM = 6;
- public static final byte CIRCLE = 7;
- public static final byte CLIPPATH = 8;
- public static final byte CURSOR = 9;
- public static final byte DEFS = 10;
- public static final byte DESC = 11;
- public static final byte ELLIPSE = 12;
- public static final byte FEFLOOD = 13;
- public static final byte FEGAUSSIANBLUR = 14;
- public static final byte FEMERGE = 15;
- public static final byte FEMERGENODE = 16;
- public static final byte FEOFFSET = 17;
- public static final byte FILTER = 18;
- public static final byte FONT = 19;
- public static final byte FONT_FACE = 20;
- public static final byte FONT_FACE_SRC = 21;
- public static final byte FONT_FACE_URI = 22;
- public static final byte G = 23;
- public static final byte GLYPH = 24;
- public static final byte HKERN = 25;
- public static final byte IMAGE = 26;
- public static final byte LINE = 27;
- public static final byte LINEARGRADIENT = 28;
- public static final byte MARKER = 29;
- public static final byte MASK = 30;
- public static final byte MISSING_GLYPH = 31;
- public static final byte PATH = 32;
- public static final byte PATTERN = 33;
- public static final byte POLYGON = 34;
- public static final byte POLYLINE = 35;
- public static final byte RADIALGRADIENT = 36;
- public static final byte RECT = 37;
- public static final byte SET = 38;
- public static final byte STOP = 39;
- public static final byte STYLE = 40;
- public static final byte SVG = 41;
- public static final byte SWITCH = 42;
- public static final byte SYMBOL = 43;
- public static final byte TEXT = 44;
- public static final byte TEXTPATH = 45;
- public static final byte TITLE = 46;
- public static final byte TREF = 47;
- public static final byte TSPAN = 48;
- public static final byte USE = 49;
- public static final byte VKERN = 50;
-
-
/**
* Converts an object name to its integral equivalent.
* @param objectName The object name to be enumerated.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtColor.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -42,6 +42,9 @@
*/
public class DtColor extends Datatype implements ExprColor {
+ public static final Color COLOR_RGB_TRANSPARENT = new Color(255, 255, 255,
+ 0);
+
/**
* Alphabetical list of named colors supported by XSL-FO.
* The list is kept in alphabetical order to facilitate binary searches.
@@ -233,9 +236,6 @@
new Color(154, 205, 50) // yellowgreen
*/
- public static final Color COLOR_RGB_TRANSPARENT = new Color(255, 255, 255,
- 0);
-
/**
* List of DtColor instances created. The purpose of this list is to
* prevent identical colors from being created more than once.
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/value/DtWritingMode.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -42,6 +42,8 @@
public class DtWritingMode extends Datatype implements
org.axsl.foR.WritingMode {
+ private static HashMap writingModes = new HashMap();
+
private byte ipdOdd;
private byte ipdEven;
private byte bpd;
@@ -49,8 +51,6 @@
private byte shiftEven;
private boolean paired;
- private static HashMap writingModes = new HashMap();
-
/**
* Constructor.
*/
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java 2006-09-05 23:23:26 UTC (rev 7920)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/xml/PropertyMakerXML.java 2006-09-05 23:37:00 UTC (rev 7921)
@@ -36,6 +36,9 @@
*/
public class PropertyMakerXML {
+ public static final short OFFSET_FROM_PROPERTY_NAME_LIST = 500;
+ public static final short LANG = 501;
+
/**
* Keep this list sorted alphabetically, so that we can use a binary
* search on it.
@@ -45,9 +48,6 @@
"lang",
};
- public static final short OFFSET_FROM_PROPERTY_NAME_LIST = 500;
- public static final short LANG = 501;
-
/**
* Converts a property name to its integral equivalent.
* @param propertyName The property name to be enumerated.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:23:30
|
Revision: 7920
http://svn.sourceforge.net/foray/?rev=7920&view=rev
Author: victormote
Date: 2006-09-05 16:23:26 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/PatternParser.java
trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/TernaryTree.java
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-09-05 23:21:51 UTC (rev 7919)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/HyphenationServer.java 2006-09-05 23:23:26 UTC (rev 7920)
@@ -58,14 +58,14 @@
* deserialized or parsed. The key is the language or language and country
* connected by an underscore (e.g. en_US).
*/
- HashMap hyphenTrees = new HashMap();
+ private HashMap hyphenTrees = new HashMap();
/**
* Collection of language and language_country combinations for which we
* already know we can't instantiate a HyphenationTree. This is used to
* log only one error message per language.
*/
- ArrayList hyphenTreesNotFound = new ArrayList();
+ private ArrayList hyphenTreesNotFound = new ArrayList();
private boolean errorDump = false;
private String hyphenationDir;
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/PatternParser.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/PatternParser.java 2006-09-05 23:21:51 UTC (rev 7919)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/PatternParser.java 2006-09-05 23:23:26 UTC (rev 7920)
@@ -51,6 +51,11 @@
*/
public class PatternParser extends DefaultHandler implements PatternConsumer {
+ static final int ELEM_CLASSES = 1;
+ static final int ELEM_EXCEPTIONS = 2;
+ static final int ELEM_PATTERNS = 3;
+ static final int ELEM_HYPHEN = 4;
+
XMLReader parser;
int currElement;
PatternConsumer consumer;
@@ -60,11 +65,6 @@
String errMsg;
Log logger;
- static final int ELEM_CLASSES = 1;
- static final int ELEM_EXCEPTIONS = 2;
- static final int ELEM_PATTERNS = 3;
- static final int ELEM_HYPHEN = 4;
-
public PatternParser(final Log logger) throws HyphenationException {
this.logger = logger;
token = new StringBuffer();
Modified: trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/TernaryTree.java
===================================================================
--- trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/TernaryTree.java 2006-09-05 23:21:51 UTC (rev 7919)
+++ trunk/foray/foray-hyphen-r/src/java/org/foray/hyphenR/TernaryTree.java 2006-09-05 23:23:26 UTC (rev 7920)
@@ -75,6 +75,9 @@
*/
public class TernaryTree implements Cloneable, Serializable {
+
+ protected static final int BLOCK_SIZE = 2048; // allocation size for arrays
+
static final long serialVersionUID = 240904407206584695L;
/**
@@ -122,8 +125,6 @@
protected char freenode;
protected int length; // number of items in tree
- protected static final int BLOCK_SIZE = 2048; // allocation size for arrays
-
TernaryTree() {
init();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:21:54
|
Revision: 7919
http://svn.sourceforge.net/foray/?rev=7919&view=rev
Author: victormote
Date: 2006-09-05 16:21:51 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
Modified: trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java
===================================================================
--- trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2006-09-05 23:20:57 UTC (rev 7918)
+++ trunk/foray/foray-layout/src/java/org/foray/layout/LayoutStrategy.java 2006-09-05 23:21:51 UTC (rev 7919)
@@ -56,7 +56,7 @@
*/
public abstract class LayoutStrategy implements LineBreakHandler, Layout {
- Log logger;
+ protected Log logger;
/**
* The AreaTree instance that this layout system is processing.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:21:03
|
Revision: 7918
http://svn.sourceforge.net/foray/?rev=7918&view=rev
Author: victormote
Date: 2006-09-05 16:20:57 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-mif/src/java/org/foray/mif/MIFDocument.java
Modified: trunk/foray/foray-mif/src/java/org/foray/mif/MIFDocument.java
===================================================================
--- trunk/foray/foray-mif/src/java/org/foray/mif/MIFDocument.java 2006-09-05 23:14:35 UTC (rev 7917)
+++ trunk/foray/foray-mif/src/java/org/foray/mif/MIFDocument.java 2006-09-05 23:20:57 UTC (rev 7918)
@@ -44,14 +44,22 @@
private static final String TAB = "\t";
/** the version of MIF supported */
- protected static final String mifVersion = "5.5";
- protected BookComponent bookComponent;
+// private static final String mifVersion = "5.5";
+ private BookComponent bookComponent;
/* this is a ref to the current flow which could be a textflow or a table */
private Flow curFlow; //
private ID curIDCounter = new ID();
private Log logger;
+ /**
+ * creates an empty MIF document
+ */
+ public MIFDocument(final Log logger) {
+ this.logger = logger;
+ bookComponent = new BookComponent();
+ }
+
public static final String MIFEncode(final String val) {
final int len = val.length();
final StringBuffer buf = new StringBuffer(len * 2);
@@ -128,10 +136,11 @@
*/
class ParagraphFormat extends FontFormat {
+ int startIndent;
+ int endIndent;
+
public ParagraphFormat() {}
- int startIndent;
- int endIndent;
}
/**
@@ -222,7 +231,7 @@
private int ID;
private int x, y, w, h;
- ArrayList content = new ArrayList();
+ private ArrayList content = new ArrayList();
public Frame(final int x, final int y, final int w, final int h) {
this.ID = curIDCounter.getnewID();
@@ -699,6 +708,20 @@
*/
class Tbl extends Flow {
+ private int ID;
+ private ArrayList tblColumns = new ArrayList();
+ private ArrayList tblBody, tblHead, tblFoot;
+ /* is a reference to one of tblHead,tblBody or tblFoot */
+ private ArrayList current;
+
+ public Tbl() {
+ this.ID = curIDCounter.getnewID();
+ tblBody = new ArrayList();
+ tblHead = new ArrayList();
+ tblFoot = new ArrayList();
+
+ }
+
/**
* A MIF Table Column.
*/
@@ -725,6 +748,12 @@
*/
class Row {
+ private ArrayList cells;
+
+ public Row() {
+ cells = new ArrayList();
+ }
+
/**
* A MIF Table Cell.
*/
@@ -752,16 +781,10 @@
}
}
- private ArrayList cells;
-
public void addCell(final int rowSpan, final int colSpan) {
cells.add(new Cell(rowSpan, colSpan));
}
- public Row() {
- cells = new ArrayList();
- }
-
public Cell curCell() {
return (Cell)this.cells.get(cells.size() - 1);
}
@@ -777,11 +800,6 @@
}
}
- private int ID;
- private ArrayList tblColumns = new ArrayList();
- private ArrayList tblBody, tblHead, tblFoot;
- /* is a reference to one of tblHead,tblBody or tblFoot */
- private ArrayList current;
public void addColumn(final int colWidth) {
tblColumns.add(new TblColumn(colWidth));
@@ -809,14 +827,6 @@
colSpan);
}
- public Tbl() {
- this.ID = curIDCounter.getnewID();
- tblBody = new ArrayList();
- tblHead = new ArrayList();
- tblFoot = new ArrayList();
-
- }
-
public int getID() {
return this.ID;
@@ -1018,14 +1028,6 @@
}
- /**
- * creates an empty MIF document
- */
- public MIFDocument(final Log logger) {
- this.logger = logger;
- bookComponent = new BookComponent();
- }
-
public void createPage() {
bookComponent.pages.add(new Page());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:14:44
|
Revision: 7917
http://svn.sourceforge.net/foray/?rev=7917&view=rev
Author: victormote
Date: 2006-09-05 16:14:35 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Standardize document ordering, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java
trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
Modified: trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2006-09-05 23:07:25 UTC (rev 7916)
+++ trunk/foray/foray-output/src/java/org/foray/output/MIFConverter.java 2006-09-05 23:14:35 UTC (rev 7917)
@@ -53,19 +53,9 @@
private int pageWidth;
/**
- * the current vertical position in millipoints from bottom
- */
- protected int currentYPosition = 0;
-
- /**
- * the current horizontal position in millipoints from left
- */
- protected int currentXPosition = 0;
-
- /**
* the MIF Document being created
*/
- protected MIFDocument mifDoc;
+ private MIFDocument mifDoc;
/* is a table currently open? */
Modified: trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java
===================================================================
--- trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java 2006-09-05 23:07:25 UTC (rev 7916)
+++ trunk/foray/foray-output/src/java/org/foray/output/OutputTarget.java 2006-09-05 23:14:35 UTC (rev 7917)
@@ -35,16 +35,16 @@
*/
public abstract class OutputTarget implements org.axsl.output.OutputTarget {
- OutputStream outputStream;
+ private OutputStream outputStream;
private String applicationName;
private String applicationNameShort;
private String applicationVersion;
private String developerURLShort;
- boolean strokeSVGText;
- Log logger;
- FontConsumer fontConsumer;
+ private boolean strokeSVGText;
+ private Log logger;
+ private FontConsumer fontConsumer;
- protected OutputConfig options;
+ private OutputConfig options;
/**
*
@@ -163,4 +163,11 @@
this.fontConsumer = fontConsumer;
}
+ /**
+ * @return Returns the options.
+ */
+ public OutputConfig getOptions() {
+ return this.options;
+ }
+
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2006-09-05 23:07:25 UTC (rev 7916)
+++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2006-09-05 23:14:35 UTC (rev 7917)
@@ -97,18 +97,19 @@
}
private void addEncryption() {
- if (this.options == null) {
+ if (this.getOptions() == null) {
return;
}
// Process encryption options, if any exist
boolean encrypt = false;
- final String oPassword = this.options.optionPDFOwnerPassword();
- final String uPassword = this.options.optionPDFUserPassword();
- final boolean allowPrint = this.options.optionPDFUserPrint();
- final boolean allowCopyContent = this.options.optionPDFUserCopy();
- final boolean allowEditContent = this.options.optionPDFUserModify();
+ final String oPassword = this.getOptions().optionPDFOwnerPassword();
+ final String uPassword = this.getOptions().optionPDFUserPassword();
+ final boolean allowPrint = this.getOptions().optionPDFUserPrint();
+ final boolean allowCopyContent = this.getOptions().optionPDFUserCopy();
+ final boolean allowEditContent =
+ this.getOptions().optionPDFUserModify();
final boolean allowEditAnnotations =
- this.options.optionPDFUserAnnotate();
+ this.getOptions().optionPDFUserAnnotate();
if (oPassword != null) {
encrypt = true;
@@ -133,7 +134,7 @@
* {@inheritDoc}
*/
public void startOutput() throws IOException {
- final String pdfVersion = this.options.optionPDFVersion();
+ final String pdfVersion = this.getOptions().optionPDFVersion();
if (pdfVersion != null) {
final int pdfVersionConstant = PDFUtility.integralVersion(
pdfVersion);
@@ -150,7 +151,7 @@
this.pdfDoc.setCreationDate(now);
// setup Encryption
addEncryption();
- final List filters = this.options.optionPDFFilters();
+ final List filters = this.getOptions().optionPDFFilters();
for (int i = 0; i < filters.size(); i++) {
final String filter = (String)filters.get(i);
pdfDoc.addDefaultFilter(filter);
Modified: trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2006-09-05 23:07:25 UTC (rev 7916)
+++ trunk/foray/foray-render/src/java/org/foray/render/txt/TXTRenderer.java 2006-09-05 23:14:35 UTC (rev 7917)
@@ -504,8 +504,8 @@
getLogger().info("rendering areas to TEXT");
currentStream = new TXTStream(this.getOutputStream());
String encoding;
- if (options != null) {
- encoding = options.optionTXTEncoding();
+ if (this.getOptions() != null) {
+ encoding = this.getOptions().optionTXTEncoding();
try {
" ".getBytes(encoding);
} catch (final UnsupportedEncodingException uee) {
Modified: trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2006-09-05 23:07:25 UTC (rev 7916)
+++ trunk/foray/foray-render/src/java/org/foray/render/xml/XMLRenderer.java 2006-09-05 23:14:35 UTC (rev 7917)
@@ -535,10 +535,10 @@
}
private boolean isCoarseXml() {
- if (options == null) {
+ if (this.getOptions() == null) {
return false;
}
- return options.optionATSparse();
+ return this.getOptions().optionATSparse();
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <vic...@us...> - 2006-09-05 23:07:34
|
Revision: 7916
http://svn.sourceforge.net/foray/?rev=7916&view=rev
Author: victormote
Date: 2006-09-05 16:07:25 -0700 (Tue, 05 Sep 2006)
Log Message:
-----------
Conform to standard class-ordering scheme, as reported by checkstyle.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCMap.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFDocumentGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCMap.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCMap.java 2006-09-05 22:56:23 UTC (rev 7915)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFCMap.java 2006-09-05 23:07:25 UTC (rev 7916)
@@ -104,24 +104,24 @@
public static final String Identity_V = "Identity-V";
/**
- * /CMapName attribute, one of the predefined constants
+ * horizontal writing direction
*/
- protected String name;
+ public static final byte WMODE_HORIZONTAL = 0;
/**
- * /CIDSystemInfo attribute
+ * vertical writing direction
*/
- protected PDFCIDSystemInfo sysInfo;
+ public static final byte WMODE_VERTICAL = 1;
/**
- * horizontal writing direction
+ * /CMapName attribute, one of the predefined constants
*/
- public static final byte WMODE_HORIZONTAL = 0;
+ protected String name;
/**
- * vertical writing direction
+ * /CIDSystemInfo attribute
*/
- public static final byte WMODE_VERTICAL = 1;
+ protected PDFCIDSystemInfo sysInfo;
/**
* font's writing direction
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2006-09-05 22:56:23 UTC (rev 7915)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2006-09-05 23:07:25 UTC (rev 7916)
@@ -74,12 +74,12 @@
* bytes. */
public static final String ENCODING = "ISO-8859-1";
+ private static final Integer locationPlaceholder = new Integer(0);
+
/** The version of PDF that this document should create when it is
* written. */
private int pdfVersion = PDF_VERSION_1_6;
- private static final Integer locationPlaceholder = new Integer(0);
-
/**
* the current character position
*/
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java 2006-09-05 22:56:23 UTC (rev 7915)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFEncryption.java 2006-09-05 23:07:25 UTC (rev 7916)
@@ -90,16 +90,6 @@
}
- static final char [] pad = {
- 0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41,
- 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08,
- 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80,
- 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A };
- static final char[] digits = {'0','1','2','3','4','5','6','7',
- '8','9','A','B','C','D','E','F'};
-
- /** Value of PRINT permission
- */
public static final int PERMISSION_PRINT = 4;
/** Value of content editting permission
*/
@@ -111,6 +101,16 @@
*/
public static final int PERMISSION_EDIT_ANNOTATIONS = 32;
+ static final char [] pad = {
+ 0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41,
+ 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08,
+ 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80,
+ 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A };
+ static final char[] digits = {'0','1','2','3','4','5','6','7',
+ '8','9','A','B','C','D','E','F'};
+
+ /** Value of PRINT permission
+ */
// Encryption tools
MessageDigest digest = null;
Cipher cipher = null;
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java 2006-09-05 22:56:23 UTC (rev 7915)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFFont.java 2006-09-05 23:07:25 UTC (rev 7916)
@@ -61,10 +61,10 @@
/* The order is important here. */
new String[] {"Type0", "Type1", "MMType1", "Type3", "TrueType" };
+ protected FontUse fsFont;
+
private byte fontSubType = -1;
- protected FontUse fsFont;
-
/**
* Local cache (for performance) of the font system's helper class for PDF
* output.
@@ -81,12 +81,12 @@
* a PDFStream containing a CMap in a Type0 font.
* If <code>null</code> then not written out in the PDF.
*/
- protected PDFEncoding pdfEncoding;
+ private PDFEncoding pdfEncoding;
/**
* descriptor of font metrics
*/
- protected PDFFontDescriptor descriptor = null;
+ private PDFFontDescriptor descriptor = null;
/**
* Create the /Font object
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFDocumentGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFDocumentGraphics2D.java 2006-09-05 22:56:23 UTC (rev 7915)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFDocumentGraphics2D.java 2006-09-05 23:07:25 UTC (rev 7916)
@@ -91,6 +91,13 @@
}
+ /**
+ * This constructor supports the create method
+ */
+ public PDFDocumentGraphics2D(final PDFDocumentGraphics2D g) {
+ super(g);
+ }
+
public PDFDocument getPDFDocument() {
return this.pdfDoc;
}
@@ -149,13 +156,6 @@
}
/**
- * This constructor supports the create method
- */
- public PDFDocumentGraphics2D(final PDFDocumentGraphics2D g) {
- super(g);
- }
-
- /**
* Creates a new <code>Graphics</code> object that is
* a copy of this <code>Graphics</code> object.
* @return a new graphics context that is a copy of
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2006-09-05 22:56:23 UTC (rev 7915)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFGraphics2D.java 2006-09-05 23:07:25 UTC (rev 7916)
@@ -98,27 +98,15 @@
* @see org.apache.batik.ext.awt.g2d.AbstractGraphics2D
*/
public class PDFGraphics2D extends AbstractGraphics2D {
- boolean standalone = false;
/**
* the PDF Document being created
*/
protected PDFDocument pdfDoc;
- /**
- * the current annotation list to add annotations to
- */
- PDFAnnotList currentAnnotList = null;
+ protected boolean standalone = false;
- protected org.axsl.fontR.FontUse overrideFont = null;
- protected float overrideFontSize;
-
/**
- * the current stream to add PDF commands to
- */
- StringWriter currentStream = new StringWriter();
-
- /**
* the current (internal) font
*/
protected org.axsl.fontR.FontUse currentFont;
@@ -129,15 +117,33 @@
protected float currentFontSize;
/**
+ * the current stream to add PDF commands to
+ */
+ protected StringWriter currentStream = new StringWriter();
+
+ /**
* the current colour for use in svg
*/
- PDFColor currentColour = new PDFColor(new Color(0, 0, 0));
+ protected PDFColor currentColour = new PDFColor(new Color(0, 0, 0));
+ /**
+ * the current annotation list to add annotations to
+ */
+ protected PDFAnnotList currentAnnotList = null;
+
+ private org.axsl.fontR.FontUse overrideFont = null;
+ private float overrideFontSize;
+
private PDFXObject xObject;
private FontConsumer fontConsumer;
/**
+ * Used to create proper font metrics
+ */
+ private Graphics2D fmg;
+
+ /**
* Create a new PDFGraphics2D with the given pdf document info.
* This is used to create a Graphics object for use inside an already
* existing document.
@@ -160,7 +166,18 @@
transformCoordinates(contentRectangle, svgDocument);
}
+ public PDFGraphics2D(final boolean textAsShapes) {
+ super(textAsShapes);
+ }
+
/**
+ * This constructor supports the create method
+ */
+ public PDFGraphics2D(final PDFGraphics2D g) {
+ super(g);
+ }
+
+ /**
* @param svgDocument
*/
private void transformCoordinates(final Rectangle2D.Float contentRectangle,
@@ -186,10 +203,6 @@
}
}
- public PDFGraphics2D(final boolean textAsShapes) {
- super(textAsShapes);
- }
-
public String getString() {
return currentStream.toString();
}
@@ -205,13 +218,6 @@
}
/**
- * This constructor supports the create method
- */
- public PDFGraphics2D(final PDFGraphics2D g) {
- super(g);
- }
-
- /**
* Creates a new <code>Graphics</code> object that is
* a copy of this <code>Graphics</code> object.
* @return a new graphics context that is a copy of
@@ -1080,11 +1086,6 @@
return new PDFGraphicsConfiguration();
}
- /**
- * Used to create proper font metrics
- */
- private Graphics2D fmg;
-
private void initGraphicalEnvironment() {
try {
final BufferedImage bi = new BufferedImage(1, 1,
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2006-09-05 22:56:23 UTC (rev 7915)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/svg/batik/PDFTextPainter.java 2006-09-05 23:07:25 UTC (rev 7916)
@@ -59,6 +59,13 @@
*/
public class PDFTextPainter implements TextPainter {
+ /**
+ * Use the stroking text painter to get the bounds and shape.
+ * Also used as a fallback to draw the string with strokes.
+ */
+ private static final TextPainter PROXY_PAINTER =
+ StrokingTextPainter.getInstance();
+
/** A logger for user messages. */
Log logger;
@@ -72,14 +79,6 @@
String fontFamily = null;
/**
- * Use the stroking text painter to get the bounds and shape.
- * Also used as a fallback to draw the string with strokes.
- */
- protected static final TextPainter PROXY_PAINTER =
- StrokingTextPainter.getInstance();
-
-
- /**
* Constructor.
* @param logger A Log instance for logging user messages.
* @param consumer The FontConsumer that should be used for font resolution.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|