All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface ice.htmlbrowser.BrowserAppletContext

public interface BrowserAppletContext
extends AppletContext
This interface provides applets with methods for accessing information about the fonts in the browser environment. This means that if a browser sets the font in some way, the embedded applet can use the same fonts, if it wants. Since this interface is not part of AWT, Applets should first query the ApplicationContext and then see if this interface is available. For example:
...
AppletContext ac = getAppletContext();
Font boldFont, bigBoldFont, smallBoldItalicFont;
if (ac instanceof BrowserAppletContext) {
BrowserAppletContext bac = (BrowserAppletContext)ac;
boldFont = bac.getProportionalFont(3, Font.BOLD );
bigBoldFont = bac.getProportionalFont(6, Font.BOLD);
smallBoldItalicFont = bac.getProportionalFont(2, Font.ITALIC+Font.BOLD);
}
...


Method Index

 o getFixedWidthFont()
return the browser's current fixed font for this page at the current size.
 o getFixedWidthFont(int, int)
return the browser's current fixed font for this page at the specified size and style.
 o getFontSize()
return the browser's notion of the current font size (0-6)
 o getFontStyle()
return the browser's notion of the current font style
 o getProportionalFont()
return the browser's current proportional font for this page at the current size.
 o getProportionalFont(int, int)
return the browser's current proportional font for this page at the specified size and style.

Methods

 o getProportionalFont
 public abstract Font getProportionalFont()
return the browser's current proportional font for this page at the current size.

 o getFixedWidthFont
 public abstract Font getFixedWidthFont()
return the browser's current fixed font for this page at the current size.

 o getProportionalFont
 public abstract Font getProportionalFont(int size,
                                          int style)
return the browser's current proportional font for this page at the specified size and style.

Parameters:
size - An integer specifying the font size (0-6) required. The values used for size are the same as those used by HTML.
style - A Font style parameter specifying which style is requested. Valid values are the static Font style values, namely:
Font.BOLD
Font.ITALIC
Font.PLAIN
These can be combined for mixed styles.
 o getFixedWidthFont
 public abstract Font getFixedWidthFont(int size,
                                        int style)
return the browser's current fixed font for this page at the specified size and style.

Parameters:
size - An integer specifying the font size (0-6) required. The values used for size are the same as those used by HTML.
style - A Font style parameter specifying which style is requested. Valid values are the static Font style values, namely:
Font.BOLD
Font.ITALIC
Font.PLAIN
These can be combined for mixed styles.
 o getFontSize
 public abstract int getFontSize()
return the browser's notion of the current font size (0-6)

 o getFontStyle
 public abstract int getFontStyle()
return the browser's notion of the current font style

Returns:
a style, one of the following, or a combination.
Font.BOLD
Font.ITALIC
Font.PLAIN

All Packages  Class Hierarchy  This Package  Previous  Next  Index