| Class Name: | HotJavaSystemState |
| Extends: | Component |
| Implements: | Externalizable |
Purpose
The HotJava System State bean is an invisible JavaBeans component that allows customization of the HotJava HTML Component by exposing its system state.Key Properties
noneCreation
HotJavaSystemState()Commonly Used Methods
none
This document describes the HotJava HTML Component. It is intended for both "component assemblers" who will be instantiating and connecting the bean in builder applications as well as Java developers who will be programatically accessing the component. It assumes that you are already familiar with JavaBeans. If terms like property, event, method, introspection, or serialization are unfamiliar, you may want to refer to the JavaBeans documentation or take the JavaBeans tutorial.Table of Contents
The HotJava System State bean is an invisible JavaBeans component intended for use with the HotJava HTML Component.SecurityThe browser maintains a fair amount of "system state." This state represents things like system properties (like the HTTP proxy settings), the URL pool, the Cookie jar, etc. There should be at most one HotJava System State bean for the entire VM. This bean simply exposes this state, which is stored elsewhere. If this bean is not included, reasonable defaults will be supplied, but state cannot be accessed. If more than one is instantiated, the last to write a value will take precedence in each case.
Please note that it is extremely important to set the package.restrict.access and package.restrict.definition properties.Color
The HotJava Browser supports the sixteen color names listed below from the HTML 3.2 standard (listed on p. 514 of HTML The Definitive Guide, 2nd edition) and not the extended list. Of course, explicit hex values may also be used.Introspection
black maroon green navy silver red lime blue gray purple olive teal white fuschia yellow aqua
A BeanInfo class, HotJavaSystemStateBeanInfo, explicitly provides information for properties, events, and methods.
| CookieJar | cookies | [constrained][bound] | - a collection of all cookies added | (rw) |
| URLPool | URLPool | [bound] | - the list of visited URLs | (rw) |
| SystemProperties | SystemPropertyDefaults | - the system properties for developers to customize | (rw) | |
| SystemProperties | UserProperties | [bound] | - the system properties provided to the user | (rw) |
| instantiation | HotJavaSystemState()
clone() |
| accessing properites | getCookies()
setCookies() getURLPool() setURLPool() getSystemPropertyDefaults() setSystemPropertyDefaults() getUserProperties() setUserProperties() |
| editing properites | editUserProperties() |
| adding/removing listeners | addPropertyChangeListener()
removePropertyChangeListener() addVetoableChangeListener() removeVetoableChangeListener() |
As Listener
EventListener Interfaces: PropertyChangeListener
VetoableChangeListener
The HotJava System State bean does not act as a listener.
void addPropertyChangeListener(PropertyChangeListener l, String propertyName)
removePropertyChangeListener(),
addVetoableChangeListener(),
removeVetoableChangeListener().
void addVetoableChangeListener(VetoableChangeListener l, String propertyName)
removeVetoableChangeListener(),
addPropertyChangeListener(),
removePropertyChangeListener().
HotJavaSystemState clone()
HotJavaSystemState().
void editUserProperties()
HotJavaSystemState()
clone().
CookieJar getCookies()
See also the Cookie and
CookieJar classes.
See also:
setCookies().
SystemProperties getSystemPropertyDefaults()
System Properties,
setSystemPropertyDefaults(),
System.getProperty().
URLPool getURLPool()
setURLPool().
SystemProperties getUserProperties()
setUserProperties().
void removePropertyChangeListener(PropertyChangeListener l, String propertyName)
addPropertyChangeListener(),
addVetoableChangeListener(),
removeVetoableChangeListener().
void removeVetoableChangeListener(VetoableChangeListener l, String propertyName)
addVetoableChangeListener(),
addPropertyChangeListener(),
removePropertyChangeListener().
void setCookies(CookieJar jar)
See also the Cookie
and CookieJar classes.
See also:
getCookies().
void setSystemPropertyDefaults(SystemProperties p)
System Properties,
getSystemPropertyDefaults(),
System.getProperty().
void setURLPool(URLPool pool)
getURLPool().
void setUserProperties(SystemProperties p)
getUserProperties().
As Listener
EventListener Interfaces: PropertyChangeListener
VetoableChangeListenerEventObjects: PropertyChangeEvent
The HotJava System State bean does not act as a listener.
These system properties are exposed to the user to set. They control important aspects of the browser's functioning that a user might want to set for himself. All of the system properties listed below are also exposed in a property editor; this allows a developer to provide default values that the user can override.Exposed to Developers
- http.proxyHost
- Gives the hostname of the HTTP proxy, if there is one.
- http.proxyPort
- Gives the port number for the HTTP proxy.
- ftpProxySet
- If true, indicates that an FTP proxy has been set.
- ftpProxyHost
- Gives the hostname of the FTP proxy.
- ftpProxyPort
- Gives the port number of the FTP proxy.
- gopherProxySet
- If true, indicates that a gopher proxy has been set.
- gopherProxyHost
- Gives the hostname of the gopher proxy.
- gopherProxyPort
- Gives the port number of the gopher proxy.
- delayAppletLoading
- If true, applets will not be loaded immediately. Instead, an image will be displayed; clicking on the image will load the applet.
- delayImageLoading
- If true, images won't be loaded immediately.
- displayBackgroundImages
- Setting this false will disable the display of background images.
These system properties are exposed via a property editor only to developers. They are in addition to the user properties listed in the previous section.
- fonts.sizes
- Gives a list of thirteen font sizes. These control the sizes of the fonts that HotJava uses to display HTML text.
- hotjava.docfontsize
- A number between -2 and 2, this acts as an offset into fonts.sizes. This is typically used to control display font size, with -2 meaning "very small," and 2 meaning "very large."
- hotjava.docfont
- The name of the font used to render HTML text.
- printfonts.sizes
- Gives a list of thirteen font sizes: 6,7,8,9,10,12,14,16,18,20,22,24,26. These are likse fonts.sizes, but are used for printing HTML documents instead of displaying them.
- hotjava.printfontsize
- Like hotjava.docfontsize, except that it applies to printing.
- hotjava.printfont
- Like hotjava.docfont, except that it applies to printing. Initially TimesRoman.
- hotjava.docbg
- Gives a default value for a document's background color, if the document doesn't specify it.
- hotjava.curcolor
- Gives the color of the cursor.
- hotjava.selcolor
- Gives the color of selected text.
- hotjava.alttextcolor
- Gives the color for HTML "alt" attribute text strings.
- anchorStyle
- Should the links be underlined?
- http.agent
- Sent by the browser on the User-Agent HTTP header.
- urlpool.expires
- URLPool entries will expire after this many hours. This is what causes links to display as "visited."
- hotjava.enableCookies
- If true, the browser will accept HTTP cookies from remote sites.
- hotjava.security.getInterFrameApplets
- If set true, an applet in one frame will be able to access applets in another frame (but in the same codebase) via AppletContext.getApplets(). Most browsers disable this, and the default for HotJava is false.
- hotjava.security.giveRealFrame
- If set true, applets will be able to get a reference to the frame that encloses them, via Component.getParent(). The default behavior, when this property is false, is to return an invisible frame that is positioned to coincide with the real enclosing frame. If you set this property true, you should ensure that applets cannot attack your application by invoking methods on the enclosing frame (perhaps via reflection, or by accessing child components).
- trustProxy
- If true, we will trust IP addresses that we can't resolve directly by ourselves.
- package.restrict.access
- Gives a list of package name prefixes that untrusted applets will not be able to access. It is crucial that you include any packages that your application puts on the CLASSPATH in this property. For example, if your code is in packages starting with "com.foo," but you also include components in the package "com.bar," you should set this property to "com.foo, com.bar." If you fail to do this, untrusted applets will be able to access any public data members of methods in your classes. If applets are allowed to define classes in your packages, they'll also be able to see package-private members. Be sure you set this property, and be sure that you include the prefixes of all CLASSPATH classes!
- package.restrict.definition
- Gives a list of package name prefixes that untrusted applets will not be able to define classes. Normally, this will be a superset of package.restrict.access. It is extremely important that you set this property, for reasons outlined under package.restrict.access.
HotJava Browser Components
HotJava Authenticator Bean
HotJava Document Stack Bean
HotJava HTML Component