X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=ekit%2Fcom%2Fhexidec%2Fekit%2Fcomponent%2FRelativeImageView.java;h=6ef7b6cde6e38f7b19d82ffe18404b21cc902c74;hb=c47fa64d719ab7f5062a87fbf5cc55a7916c5c53;hp=95adcee45eec098415172c20cab7dc437085a8d9;hpb=ecd369f6391da62e76ab72ae88ecaeba30ba81c7;p=old-projects.git diff --git a/ekit/com/hexidec/ekit/component/RelativeImageView.java b/ekit/com/hexidec/ekit/component/RelativeImageView.java index 95adcee..6ef7b6c 100644 --- a/ekit/com/hexidec/ekit/component/RelativeImageView.java +++ b/ekit/com/hexidec/ekit/component/RelativeImageView.java @@ -100,15 +100,17 @@ public class RelativeImageView extends View implements ImageObserver, MouseListe private Component fComponent; private Point fGrowBase; // base of drag while growing image private boolean fGrowProportionally; // should grow be proportional? + private String BaseUrl; private boolean bLoading; // set to true while the receiver is locked, to indicate the reciever is loading the image. This is used in imageUpdate. /** Constructor * Creates a new view that represents an IMG element. * @param elem the element to create a view for */ - public RelativeImageView(Element elem) + public RelativeImageView(Element elem,String baseurl) { super(elem); + BaseUrl = baseurl; initialize(elem); StyleSheet sheet = getStyleSheet(); attr = sheet.getViewAttributes(this); @@ -131,7 +133,7 @@ public class RelativeImageView extends View implements ImageObserver, MouseListe fElement = elem; // request image from document's cache AttributeSet attr = elem.getAttributes(); - if(isURL()) + if(true || isURL()) { URL src = getSourceURL(); if(src != null) @@ -358,9 +360,10 @@ public class RelativeImageView extends View implements ImageObserver, MouseListe { return null; } - URL reference = ((HTMLDocument)getDocument()).getBase(); + //URL reference = ((HTMLDocument)getDocument()).getBase(); try { + URL reference = new URL(BaseUrl); URL u = new URL(reference,src); return u; }