Class Library: Web Site Data Structure Objects
Index. Enhances Java's Hashtable class, which stores a list of paired key-value objects and permits retrieval of the value object knowing its key, by adding the Vector variables ids (i.e, keys) and vals to maintain the order in which elements are added to the Index.
package | earthstones | |
import | java.util.*; | |
class declaration | public class Index extends Hashtable | |
variables | Vector ids = new Vector() | |
Vector vals = new Vector() | ||
constructors | Index() | Calls super(). |
Index(int num) | Calls super(num). | |
methods | These three methods override those of the parent class to update the variables ids and vals. | |
public void set(Object id, Object val) | ||
public Object remove(Object id) | ||
public void add(Object id, Object val) | ||
These methods reflect additional aspects of Index. | ||
public int size() | Returns number of ids currently defined. | |
public Object val(Object id) | Returns value associated with id. | |
public Object id(Object val) | Returns id associated with value. | |
public Vector idList() | Returns ids. | |
public Vector valList() | Returns vals. | |
public Enumeration idEnum() | Returns an Enumeration interface which can be used to iterate through the list of ids. | |
public Enumeration valEnum() | Returns an Enumeration interface which can be used to iterate through the list of vals. | |
public int idNumber(Object id) | Returns the (zero-based) id corresponding to the key value id. | |
public boolean isId(Object id) | Returns true if id is an Index key. | |
public boolean isVal(Object val) | Returns true if val is an Index value. | |
public boolean isFirstId(Object id) | Returns true if id is the first Index key. | |
public boolean isLastId(Object id) | Returns true if id is the last Index key. | |
public boolean isFirstVal(Object val) | Returns true if value is the first Index value. | |
public boolean isLastVal(Object val) | Returns true if value is the last Index value. |
NamedIndex. This class is central to EarthStone's description of website structure and is the parent class for its Site, Section, and Chapter classes. Each instance of NamedIndex is characterized by three crucial variables: an id specifies one of a set of objects at a particular level of hierarchical organization (e.g., a particular section of the website); a parent variable, itself an instance of NamedIndex, which identifies that level's parent data structure (e.g., to follow the previous example, the particular website of which this section is a part); and an instance index of class Index which lists the pairs (String childId, NamedIndex childIdx) which identify the set of lower-level elements along with the instance of NamedIndex that describes their properties (e.g., in our example, list of chapters along with their associated data structures). This linked, hierarchical chain of NamedIndex objects could go on indefinitely. Practically, EarthStones' data structure terminates it with the Page object which describes features of the page but does not include yet another index variable which would continue the progression to yet another level. Upon construction, a NamedIndex instance loads its data from an associated .web file.
package | earthstones | |
import | java.applet.*; | |
class declaration | public class NamedIndex extends Object | |
variables | protected Container webApp = null; | The main (host) applet. |
protected String id = null; | String identifying this object as one of a set of objects at this level of website organization (e.g., a particular website section). | |
protected String name = null; | The full name of the website object which may be presented to the viewer in an automatically generated list of objects at this level (e.g., list of sections). | |
protected String desc = null; | An optional extended description of the object. | |
protected NamedIndex parent = null; | This object's parent data structure (NamedIndex object). E.g., an instance of Site describing the particular website of which this section is a part. | |
protected Index index = null; | An index of (String id, NamedIndex idx) specifying the ids and data structures of the next lower level of organization (e.g., the chapters of this section). | |
protected boolean isLoaded = false; | A flag set when this object has been loaded. | |
constructors | Note: id as well as parent and webApp variables must be specified at time of construction. | |
NamedIndex(NamedIndex parent, Container app, String id, String name) | Sets variables parent, webApp, id, and name. | |
NamedIndex(NamedIndex parent, Container app, String id) | Sets variables parent, webApp, id, and name. | |
methods | public void init() | This method must be implemented in subclasses to load object's data from its associated .web file. |
These variables set and return object's variables. | ||
public void setName(String name) | ||
public void setDesc(String desc) | ||
public void setIndex(Index index) | ||
public NamedIndex parent() | ||
public Container webApp() | ||
public String id() | ||
public Index index() | ||
public boolean isLoaded() | ||
public void setIsLoaded(boolean val) | ||
The following methods are "load-safe": they check to insure that data are loaded before returning values. Because the variables parent and id are set at the time the object is instantiated, they are inherently load-safe. | ||
public String name() | ||
public String desc() | ||
public Index children() | ||
public NamedIndex child(String id) | ||
These two methods are called to insure that the object's data are loaded before returning a value. | ||
public void waitUntilLoaded(NamedIndex idx) | This method checks idx.isLoaded and, if it is false, calls idx.init() and waits for idx.isLoaded to be set; assumes that idx.init() will set idx.isLoaded to true when data have been loaded. | |
public void waitUntilLoaded() | Calls waitUntilLoaded(this). |
Site. Defines many variables characterizing the entire website as well as an index linking its sections to instances of the Section class.
package | earthstones | |
import | java.awt.*; java.applet.*; java.net.*; java.io.*; java.util.*; |
|
class declaration | public class Site extends NamedIndex | |
class constants | These first three constants are defined for EarthStones' convenience but are not used in setting any of Site's default values. | |
public static final Color EarthStonesRed = new Color(165, 70, 17); | ||
public static final Color EarthStonesBuff = new Color(183, 128, 53); | ||
public static final Color EarthStonesLightBuff = new Color(220, 172, 106); | ||
These constants are used by WebPanel's scaling routines. | ||
public static final int SCALE_NONE = 0; | ||
public static final int SCALE_SIZE = 1; | ||
public static final int SCALE_LOCATION = 2; | ||
public static final int SCALE_ALL = 3; | ||
These constants are used by the Site's pageHeight() method to set the height of the web page to that of the browser window when its toolbars are set as recommended in the Viewing Tips page. NOTE. IF ADDITIONAL BROWSERS/RESOLUTIONS ARE DEFINED IN Site.web, THESE DEFINITIONS MUST BE MODIFIED ACCORDINGLY. | ||
public static final int NN4[] = {564, 564, 575, 575, 570}; | ||
public static final int NN3[] = {580, 580, 598, 598, 563}; | ||
public static final int IE4[] = {554, 554, 560, 560, 560}; | ||
public static final int IE3[] = {550, 550, 565, 565, 570}; | ||
public static final int drop[][] = {IE3, IE4, NN3, NN4}; | Syntax is: drop[browser][resolution] | |
These constants are used by Site. | ||
private static final int SITE = 0; | ||
private static final int IMAGE = 1; | ||
variables | Variables unique to Site. Default values are supplied for all of these parameters. These defaults may be modified by setting parameters in the Site.web file. | |
protected Index images = null; | This Index stores the list of pairs (String id, Image img) to be selected for random display. Values are read from the file Images.web. | |
protected Index footers = null; | This index stores the pairs (String footerName, Index icons) where icons itself is an index which stores the pairs (String iconName,Icon anIcon). | |
protected String defaultBulletType | The <ul type=...> value which will be interpreted as the bullet character specified by the defaultBullet variable. | |
protected String defaultBullet = "images/disc.gif"; | The image file for the default bullet. | |
protected String discBullet = "images/disc.gif"; | The image file for the disc bullet. | |
protected String circleBullet = "images/circle.gif"; | The image file for the circle (hollow) bullet. | |
protected String squareBullet = "images/square.gif"; | The image file for the square bullet. | |
protected Color defaultLinkColor = Color.blue; | The default link color. | |
protected int defaultLinkStyle = WebFont.UNDERLINE; | The default link style. | |
protected Color defaultHintBgColor = Color.yellow; | The default hint background color. | |
protected int defaultHintWidth = 300; | The default hint width. | |
protected float bulletHeightFactor = 0.6f; | Used to calculate bullet height. | |
protected float bulletIndentFactor = 1.2f; | Used to calculate bullet indent. | |
protected float addaboveFactor = 0.4f; | Used to calculate addabove (fontheight x addaboveFactor); addbelow = fontheight - addabove. | |
protected Color defaultAccentColor = Color.red; | Default for page accents such as ruling lines on text boxes. | |
protected String siteLogo = "Logo.JPG"; | The image file for the website's logo. | |
protected String rulingLine = "Line.JPG"; | The image file for the ruling line displayed at the bottom of the banner and top of footer. | |
protected int randomImages = 0; | The number n of images stored as images(0)...images(n-1) available for random viewing. | |
protected String baseDirectory = ""; | Website's base directory (e.g., public_html); currently default is "". | |
protected String webServer = ""; | Website's WorldWideWeb server; default is "www.earthstones.net". | |
protected Vector platforms = null; | Supported computing platforms; default
values: "Win NT", "Win 95", "Win 3.1", "Mac PPC", "Mac 68K". |
|
Note. If changes are made in the supported values for the following two variables, the pageHeight constants set above must be modified accordingly. | ||
protected Vector browsers = null; | Supported browsers; default values: "IE 3", "IE 4", "NN 3", "NN 4". | |
protected Vector resolutions = null; | Support screen resolutions; default values: "1600x1200", "1024x768", "832x624", "800x600", "640x480". | |
protected boolean autoRes = true; | When set, all dimensions are automatically scaled for the viewer's screen resolution. | |
Note. If changes are made is the supported values for the resolutions variable above, the following 3 variables must be modified accordingly. | ||
protected Vector defaultGraphicWidths = null; | Default width for graphic panel at supported screen resolutions; default values: 655, 420, 341, 328, 263. | |
protected Vector baseFontSizes = null; | Default Java font sizes at supported screen resolutions; default values: 16, 15, 14, 14, 13. | |
protected Vector captionFontSizes = null; | Default Java caption font sizes at supported captionFontSizes = null; screen resolutions; default values: 13, 12, 11, 11, 10. | |
protected String baseHtmlFont = ""; | The default HTML font face. | |
protected String baseFont = ""; | The default Java font face. | |
protected int baseHtmlFontSize = 0; | The base HTML font size. | |
protected Index baseHtmlFontSizes = new Index(); | An Index which stores the pairs(String browser, Vector fontSizes) where browser is the id string for a supported browser and fontSizes is a vector array of fontSizes for each of the supported screen resolutions | |
private boolean autoLoad = true; | When set, site initialization variables in Site.web are automatically loaded in init(). Otherwise, built-in default values are used instead and no further site information is loaded or returned. | |
Variables used internally by Site. | ||
private boolean fileNotFound = false; | Set when autoLoad is set but file Site.web is not found. In this case, a warning message is written to the Java console and the default values for Site are used but no runtime error occurs. | |
constructors | Site(Container app, boolean auto) | 1) Calls super(null, app,
"theSite"). 2) Sets autoLoad to auto. 3) Calls init(). Note that init() is called automatically here to load Site data. |
methods | public void init() | If the autoLoad flag is set,
the init() method 1) calls loadTags() to read remaining applet tags; 2) calls loadImages() to read Images.web; 3) calls loadSite() to read Site.web (these values overwrite any already set by the applet tag; If the autoLoad flag is not set or if the Site.web file was not found, the init() method 1) calls setDefaults() to load default values for all parameters; 2) calls loadTags() to overwrite any values defined in the applet tag; 3) load a default (blank) image to images for id = 1000. In addition, the init() method 4) Initializes the WebApplet variables which are dependent upon screen resolution and computing platorm. 5) Sets the Site's isLoaded flag. |
private void setDefaults() | Sets the built-in default values not initialized elsewhere. | |
private void loadTags() | The platform, browser, debug, autoLoad, loadSplash, and id tags are loaded by WebApplet prior to creating an instance of Site. This method calls loadThisTag(aName, saveParams) once for each of the other tags identified by its parameter nane aName. Note. parameters added to this list must have any entry in the setProperties() method as well. | |
private void loadThisTag(String name, String[] saveParams) | Loads the applet tag's <param> tag for name = aName. The calling method must contain the variable declaration String[] saveParams = new String[1];. This method translates the syntax of the HTML <param> tag into the name=value syntax of Site.web and then calls the setProperties method which is used to interpret the Site.web entries as well. | |
private Point setProperties(int type,
String line, String[] otherParams) |
Reads each name=value string line and sets the corresponding Site variable. The type parameter passed here takes one of the constant values SITE or IMAGE. | |
public boolean loadSite() | This method reads the Site.web file. 1) Entries conforming to the name=value syntax are interpreted by calling setProperties(). 2) After encountering the entry sections (or sections=) subsequent entries are interpreted as the id's of the site's sections and a (String id, NamedIndex idx) pair is added to Site's index variable. |
|
public void printParam(String param, Object val) | Called by load() to list the parameters being read to the Java console when Web.debug is set. | |
public boolean loadImages() | Reads the Images.web file and adds the pair (String id, GImage img) to images for each entry. | |
The following important methods are termed "load-safe" methods because they guarantee that, when autoLoad is set, the requested data will be read from disk before the method returns. They implement the "on-demand" feature of EarthStones software. | ||
public Index sections() | Returns Index of the site's sections. | |
public Index chapters(String scId) | Returns Index of the chapters for section identified by scId. | |
public Index pages(String scId, String chId) | Returns Index of pages for chapter chId of section scId. | |
public Section section(String scId) | Returns Section data structure for section identified by scId. | |
public Chapter chapter(String scId, String chId) | Returns Chapter data structure for chapter chId of section scId. | |
public Page page(String scId, String chId, String pgId) | Returns Page data structure for page pgId of chapter chId of section scId. Note: Unlike the data structures for other website levels (which are instances of NamedIndex), Page is a subclass of Object (it has no indexed substructure). | |
public GImage image(String imgId) | Returns GImage object in images corresponding to imgId. | |
public Index footers() | Returns footers Index. | |
public Index images() | Returns images Index. | |
public int randomImages() | Returns randomImages variable. | |
The following wrapper methods are implicitly load-safe because they are set at the time Site is instantiated and the isLoaded variable is not set to true until these data are available. | ||
public Index baseHtmlFontSizes() | Returns baseHtmlFontSizes. | |
public int baseHtmlFontSize() | Returns baseHtmlFontSize. | |
public Vector captionHtmlFontSizes() | Returns captionHtmlFontSizes. | |
public Vector baseFontSizes() | Returns baseFontSizes. | |
public Vector defaultGraphicWidths() | Returns defaultGraphicWidths. | |
public Vector resolutions() | Returns resolutions. | |
public Vector platforms() | Returns platforms. | |
public Vector browsers() | Returns browsers. | |
public boolean autoRes() | Returns autoRes. | |
public String baseHtmlFont() | Returns baseHtmlFont. | |
public String baseFont() | Returns baseFont. | |
These methods provide services to components with access to Site. | ||
protected int pageHeight() | Returns pageHeight[br][rs] for the current browser br and screen resolution rs. | |
protected int getBaseHtmlFontSize(String pform, String res) | Returns the base HTML font size for platform pform and screen resolution res. | |
protected int getCaptionFontSize(String res) | Returns the caption font size for the screen resolution res. | |
protected int getBaseFontSize(String res) | Returns the base font size for the screen resolution res. | |
protected int getDefaultGraphicWidth(String res) | Returns the default graphic width for the screen resolution res. | |
protected float getResFactor(String res) | Returns the resolution factor for the screen resolution res. | |
These methods set and return (get) the various Site parameters. | ||
public void setBaseHtmlFontSizes(Index baseHtmlFontSizes) | Sets variable baseHtmlFontSizes. | |
public void setBaseHtmlFontSize(int baseHtmlFontSize) | Sets variable baseHtmlFontSize. | |
public void setRandomImages(int num) | Sets variable randomImages. | |
public void setImages(Index idx) | Sets variable images. | |
public void setFooters(Index idx) | Sets variable footers. | |
public void setBaseDirectory(String dir) | Sets variable baseDirectory. | |
public void setWebServer(String srv) | Sets variable webServer. | |
public void setBaseHtmlFont(String fnt) | Sets variable baseHtmlFont. | |
public void setBaseFont(String fnt) | Sets variable baseFont. | |
public void setResolutions (Vector resolutions) | Sets variable resolutions. | |
public void setPlatforms (Vector platforms) | Sets variable platforms. | |
public void setBrowsers (Vector browsers) | Sets variable browsers. | |
public void setAutoRes (boolean autoRes) | Sets variable autoRes. | |
public void setDefaultGraphicWidths (Vector widths) | Sets variable defaultGraphicWidths. | |
public void setCaptionFontSizes (Vector captionFonts) | Sets variable captionFontSizes. | |
public void setBaseFontSizes (Vector baseFontSizes) | Sets variable baseFontSizes. | |
public void setDefaultBulletType(String val) | Sets variable defaultBulletType. | |
public void setDefaultBullet(String val) | Sets variable defaultBullet. | |
public void setDiscBullet(String val) | Sets variable discBullet. | |
public void setCircleBullet(String val) | Sets variable circleBullet. | |
public void setSquareBullet(String val) | Sets variable squareBullet. | |
public void setDefaultLinkStyle(int val) | Sets variable defaultLinkStyle. | |
public void setBulletHeightFactor(float val) | Sets variable bulletHeightFactor. | |
public void setBulletIndentFactor(float val) | Sets variable bullentIndentFactor. | |
public void setAddaboveFactor(float val) | Sets variable addaboveFactor. | |
public void setDefaultLinkColor(Color val) | Sets variable defaultLinkColor. | |
public void setDefaultHintBgColor(Color val) | Sets variable defaultHintBgColor. | |
public void setDefaultHintWidth(int val) | Sets variable defaultHintWidth. | |
public void setDefaultAccentColor(Color val) | Sets variable defaultAccentColor. | |
public int defaultHintWidth() | Returns defaultHintWidth. | |
public String defaultBulletType() | Returns defaultBulletType. | |
public String defaultBullet() | Returns defaultBullet. | |
public String discBullet() | Returns discBullet. | |
public String circleBullet() | Returns circleBullet. | |
public String squareBullet() | Returns squareBullet. | |
public int defaultLinkStyle() | Returns defaultLinkStyle. | |
public float bulletHeightFactor() | Returns bulletHeightFactor. | |
public float bulletIndentFactor() | Returns bulletIndentFactor. | |
public float addaboveFactor() | Returns addaboveFactor. | |
public Color defaultLinkColor() | Returns defaultLinkColor. | |
public Color defaultHintBgColor() | Returns defaultHintBgColor. | |
public Color defaultAccentColor() | Returns defaultAccentColor. | |
public void setAutoLoad(boolean val) | Sets autoLoad variable. | |
public void setSiteLogo(String val) | Sets siteLogo variable. | |
public String siteLogo() | Returns siteLogo variable. | |
public String baseDirectory() | Returns baseDirectory variable. | |
public String webServer() | Return webServer variable. | |
public void setRulingLine(String val) | Sets rulingLine variable. | |
public String rulingLine() | Returns rulingLine. | |
These private methods are used by setDefaults(). | ||
private Vector vectorInit(Object[] obj) | Creates a new Vector and initializes its elements to those of the array object array Object[]. | |
private Vector vectorInit(int[] obj) | Creates a new Vector and initializes its elements to those of the array integer array int[]. | |
private Vector vectorInit(float[] obj) | Creates a new Vector and initializes its elements to those of the array float array float[]. |
Section. Defines variables describing each section together with an index linking its chapters to instances of the Chapter class.
package | earthstones | |
import | java.awt.*; java.applet.*; java.net.*; java.io.*; java.util.*; |
|
class declaration | public class Section extends NamedIndex | |
variables | protected boolean bannerShowHeader = false; | If set, chapter's show Header.JPG file in banner. |
protected String sectionBanner = "Banner.JPG"; | The image file for the section name displayed in the banner panel. | |
protected String chapterHeader = "Header.JPG"; | The image file for the chapter name displayed in the banner panel provided that bannerShowHeader is set to true. | |
constructors | Section(NamedIndex parent, Container app, String id) | |
methods | public void init() | Calls load(id) and prints warning message to Java console if load() method encounters errors. |
private boolean load(String scId) | Reads file Section.web and initializes this object's variables. | |
private Point setProperties(String line, String scId, String chId, String[] otherParams) |
Called by load(). | |
The following methods set Section variables. | ||
public void setBannerShowHeader(boolean bnr) | ||
public void setSectionBanner(String val) | ||
public void setChapterHeader(String val) | ||
These "load-safe" methods return Section data. | ||
public Index chapters() | Returns the chapters index for the current section. | |
public Chapter chapter(String chId) | Returns the data structure for the chapter specified by chId. | |
public boolean bannerShowHeader() | Returns the variable bannerShowHeader. | |
public String sectionBanner() | Returns the variable sectionBanner. | |
public String chapterHeader() | Returns the variable chapterHeader. |
Chapter. Defines variables characterizing each chapter along with an index linking its pages to instances of the Page class.
package | earthstones | |
import | java.awt.*; java.applet.*; java.net.*; java.io.*; java.util.*; |
|
class declaration | public class Chapter extends NamedIndex | |
variables | protected Vector footerIcons = null; | The list of icon names to be shown in the footer for this chaper. Note that all icons named here must have been previously defined by the footer and icon parameters of the Site.web file. |
constructors | Chapter(NamedIndex parent, Container app, String id) | |
methods | public void init() | 1) Calls load(parentId, id) and prints
warning message to Java console if load() method encounters errors. 2) Sets isLoaded variable for each page in this chapter. |
private boolean load(String scId) | Reads file Chapter.web and initializes this object's variables. | |
private Point setProperties(String line, String scId, String chId, String[] otherParams) |
Called by load(). | |
The following methods set Chapter variables. | ||
public void setFooterIcons(Vector icns) | ||
These "load-safe" methods return Chapter data. | ||
public Index pages() | Returns the pages index for the current chapter. | |
public Page page(String id) | Returns the data structure for the page specified by id. | |
public Vector footerIcons() | Returns the footerIcons variable. |
Page. Defines variables describing each web page.
package | earthstones | |
import | java.awt.*; java.applet.*; |
|
class declaration | public class Page extends Object | |
variables | The following variables are defined for NamedIndex objects but must be declared here since this class inherits from Object. | |
protected Container webApp = null; | The main (host) applet. | |
protected String id = null; | String identifying this page. | |
protected String name = null; | The full name of the page which may be presented to the viewer in an automatically page list. | |
protected NamedIndex parent = null; | This object's parent data structure i.e., a Chapter object. | |
protected boolean isLoaded = false; | A flag set when this page has been loaded. | |
These variables are unique to Page. | ||
protected int imageId = 1000; | Identifies the image to be displayed in the
graphic panel for this page. Values may be: 1) One of the values 0,...,randomImages-1, where the variable randomImages is set in the instance of Site. 2) 1000 to display a blank image. 3) -1 to display an image randomly selected from those indexed in images for which imageId is <= randomImages. |
|
protected int graphicWidth = -1000; | This value is reset to defaultGraphicWidth before being returned. | |
protected boolean textScroll = true; | When set, the (main) document panel has a vertical scroll bar. | |
protected String altSource = null; | When set, provides an alternative document source for "graphic" panel. | |
protected boolean altScroll = false; | When set, the alternative document panel has a vertical scroll bar. | |
constructors | Page(NamedIndex parent, Container app, String id, String name, int imageId, int width, boolean scroll, String source, boolean ascroll) | |
Page(NamedIndex parent, Container app, String id, String name, int imageId, int width, boolean scroll, String source) | ||
Page(NamedIndex parent, Container app, String id, String name, int imageId, int width, boolean scroll) | ||
Page(NamedIndex parent, Container app, String id, String name, int imageId, int width) | ||
Page(NamedIndex parent, Container app,
String id, String name, int imageId) |
||
Page(NamedIndex parent, Container app, String id, String name) | ||
Page(NamedIndex parent, Container app, String id) | ||
methods | public void init() | Currently this method does nothing. |
public void waitUntilLoaded() | Returns only when isLoaded is set in Chapter.init(). | |
public synchronized void show() | This crucial method is responsible for all
page loading except for hyperlinks. 1) Sets Web instance's thePage variable the this Page instance. 2) Calls the Web intance's update() method which sends a cascade of update() methods down through the hierarachy of user-interface elements. |
|
These methods set Page variables. | ||
public void setName(String name) | ||
public void setImageId(int imageId) | ||
public void setGraphicWidth(int width) | ||
public void setTextScroll(boolean scroll) | ||
public void setIsLoaded(boolean val) | ||
These "load-safe" methods return Page data. | ||
public boolean isLoaded() | Returns the variable isLoaded. | |
public NamedIndex parent() | Returns the variable parent. | |
public String id() | Returns the variable id. | |
public String altSource() | Returns the variable altSource. | |
public boolean altScroll() | Returns the variable altScroll. | |
public String name() | Returns the variable name. | |
public int imageId() | Returns the variable imageId. | |
public int graphicWidth() | If graphicWidth is equal to the default value (-1000), returns the defaultGraphicWidth; otherwise, returns graphicWidth scaled for the viewer's screen resolution. | |
public boolean textScroll() | Returns the variable textScroll. | |
public String textFile() | Returns a path to the text file associated with this page of the form scId/chId/pgId/Text.htm. | |
public GImage image() | If imageId is equal to -1, returns an image object randomly selected from the 0,...,randomImages-1 images listed in images; otherwise, returns the image object specified by imageId | |
public Section section() | Returns the section id for this page. | |
public Chapter chapter() | Returns the chapter id for this page. |