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);
}
...
-
getFixedWidthFont()
- return the browser's current fixed font for this
page at the current size.
-
getFixedWidthFont(int, int)
- return the browser's current fixed font for this
page at the specified size and style.
-
getFontSize()
- return the browser's notion of the current font size (0-6)
-
getFontStyle()
- return the browser's notion of the current font style
-
getProportionalFont()
- return the browser's current proportional font for this
page at the current size.
-
getProportionalFont(int, int)
- return the browser's current proportional font for this
page at the specified size and style.
getProportionalFont
public abstract Font getProportionalFont()
- return the browser's current proportional font for this
page at the current size.
getFixedWidthFont
public abstract Font getFixedWidthFont()
- return the browser's current fixed font for this
page at the current size.
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.
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.
getFontSize
public abstract int getFontSize()
- return the browser's notion of the current font size (0-6)
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