projects
/
old-projects.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added custom code
[old-projects.git]
/
ekit
/
com
/
hexidec
/
ekit
/
component
/
ExtendedHTMLEditorKit.java
diff --git
a/ekit/com/hexidec/ekit/component/ExtendedHTMLEditorKit.java
b/ekit/com/hexidec/ekit/component/ExtendedHTMLEditorKit.java
index
bb2b14a
..
07c1122
100644
(file)
--- a/
ekit/com/hexidec/ekit/component/ExtendedHTMLEditorKit.java
+++ b/
ekit/com/hexidec/ekit/component/ExtendedHTMLEditorKit.java
@@
-44,17
+44,24
@@
import javax.swing.text.Document;
public class ExtendedHTMLEditorKit extends HTMLEditorKit
{
public class ExtendedHTMLEditorKit extends HTMLEditorKit
{
+ private String BaseUrl = "";
+
/** Constructor
*/
public ExtendedHTMLEditorKit()
{
}
/** Constructor
*/
public ExtendedHTMLEditorKit()
{
}
+
+ public ExtendedHTMLEditorKit(String baseurl)
+ {
+ BaseUrl = baseurl;
+ }
/** Method for returning a ViewFactory which handles the image rendering.
*/
public ViewFactory getViewFactory()
{
/** Method for returning a ViewFactory which handles the image rendering.
*/
public ViewFactory getViewFactory()
{
- return new HTMLFactoryExtended();
+ return new HTMLFactoryExtended(
BaseUrl
);
}
/* WACKY GERMAN CODE */
}
/* WACKY GERMAN CODE */
@@
-76,10
+83,13
@@
public class ExtendedHTMLEditorKit extends HTMLEditorKit
*/
public static class HTMLFactoryExtended extends HTMLFactory implements ViewFactory
{
*/
public static class HTMLFactoryExtended extends HTMLFactory implements ViewFactory
{
+ private String BaseUrl;
+
/** Constructor
*/
/** Constructor
*/
- public HTMLFactoryExtended()
+ public HTMLFactoryExtended(
String baseurl
)
{
{
+ BaseUrl = baseurl;
}
/** Method to handle IMG tags and
}
/** Method to handle IMG tags and
@@
-93,7
+103,7
@@
public class ExtendedHTMLEditorKit extends HTMLEditorKit
HTML.Tag tagType = (HTML.Tag)obj;
if(tagType == HTML.Tag.IMG)
{
HTML.Tag tagType = (HTML.Tag)obj;
if(tagType == HTML.Tag.IMG)
{
- return new RelativeImageView(elem);
+ return new RelativeImageView(elem
,BaseUrl
);
}
}
return super.create(elem);
}
}
return super.create(elem);