1 18 package org.apache.batik.bridge; 19 20 import java.awt.Cursor ; 21 import java.awt.Point ; 22 import java.awt.geom.AffineTransform ; 23 import java.awt.geom.Dimension2D ; 24 25 import org.apache.batik.gvt.event.EventDispatcher; 26 import org.apache.batik.gvt.text.Mark; 27 import org.apache.batik.util.ParsedURL; 28 import org.w3c.dom.Element ; 29 import org.w3c.dom.svg.SVGAElement; 30 31 39 public interface UserAgent { 40 41 45 EventDispatcher getEventDispatcher(); 46 47 50 Dimension2D getViewportSize(); 51 52 55 void displayError(Exception ex); 56 57 60 void displayMessage(String message); 61 62 65 void showAlert(String message); 66 67 70 String showPrompt(String message); 71 72 75 String showPrompt(String message, String defaultValue); 76 77 80 boolean showConfirm(String message); 81 82 85 float getPixelUnitToMillimeter(); 86 87 92 float getPixelToMM(); 93 94 97 float getMediumFontSize(); 98 99 102 float getLighterFontWeight(float f); 103 104 107 float getBolderFontWeight(float f); 108 109 112 String getDefaultFontFamily(); 113 114 117 String getLanguages(); 118 119 123 String getUserStyleSheetURI(); 124 125 129 void openLink(SVGAElement elt); 130 131 135 void setSVGCursor(Cursor cursor); 136 137 142 void setTextSelection(Mark start, Mark end); 143 144 147 void deselectAll(); 148 149 152 String getXMLParserClassName(); 153 154 158 boolean isXMLParserValidating(); 159 160 164 AffineTransform getTransform(); 165 166 170 void setTransform(AffineTransform at); 171 172 175 String getMedia(); 176 177 180 String getAlternateStyleSheet(); 181 182 186 Point getClientAreaLocationOnScreen(); 187 188 192 boolean hasFeature(String s); 193 194 198 boolean supportExtension(String s); 199 200 204 void registerExtension(BridgeExtension ext); 205 206 213 void handleElement(Element elt, Object data); 214 215 228 ScriptSecurity getScriptSecurity(String scriptType, 229 ParsedURL scriptURL, 230 ParsedURL docURL); 231 232 250 void checkLoadScript(String scriptType, 251 ParsedURL scriptURL, 252 ParsedURL docURL) throws SecurityException ; 253 254 265 ExternalResourceSecurity 266 getExternalResourceSecurity(ParsedURL resourceURL, 267 ParsedURL docURL); 268 269 285 void checkLoadExternalResource(ParsedURL resourceURL, 286 ParsedURL docURL) throws SecurityException ; 287 288 } 289 | Popular Tags |