class Heavyweight
GUI utility class that provides a way to display HTML content on-screen in an HTML equivalent of a heavyweight container.
Instances of this class are often used to display menu lists, select lists, spyglass, and focus-rectangles.
An instance of this class cannot be serialized, it is merely a run-time construct similar to an alert or input box.
Since:
3.0
| Field Summary |
|---|
| static int | 32000
|
| Constructor Summary |
|---|
| void | instance initializer |
| Method Summary |
|---|
| static jsx3.gui.Heavyweight | Returns the instance of the heavyweight object with the given ID; to get the on-screen HTML instance call: jsx3.gui.Heavyweight.GO([id]).getRendered() |
| jsx3.gui.Heavyweight | adds a POSITION RULE ruleset (a simple structure/hash) to the array of position rules; Note that POSITION RULE objects are used by the show() method to determine the best possible location for a heavyweight item |
| jsx3.gui.Heavyweight | adds a POSITION RULE ruleset (X value) (a simple structure/hash) to the array of position rules; Note that POSITION RULE objects are used by the show() method to determine the best possible location for a heavyweight item |
| jsx3.gui.Heavyweight | adds a POSITION RULE ruleset (Y value) (a simple structure/hash) to the array of position rules; Note that POSITION RULE objects are used by the show() method to determine the best possible location for a heavyweight item |
| void | can be called if show() has been called; resets the ratio (width/total) of the VIEW to be that of [object].getRatio()
|
| void | can be called if show() has been called; allows an existing HW window to re-apply its rules (used for complex layouts requiring a multi-pass) |
| void | destroy's the on-screen VIEW for the HW container AND removes any reference to the instance from the hash; Destroy() affects the MODEL and the VIEW
|
| HTMLElement | Returns an object reference to the Browser Element parent to be used; if none specified, the browser BODY will be used |
| String | Returns the HTML content to display inside the HW instance on-screen |
| int | Returns the CSS height property (in pixels); if this value is set, it is assumed that the Heavyweight container will not have its height lessened to fit on-screen. |
| String | Returns the unique id for this heavyweight instance |
| String | Returns the overflow property for CONTENTS of the HW container; it is assumed that anytime a perfect fit cannot occur that the content will have its overflow property set to 'auto' unless specified otherwise |
| void | Returns a JavaScript object with properties: X,Y (Left and Top); relating to the 4 primary (N, S, E, W), 4 secondary (NE, SE, SW, NW), and origin (O) compass positions for O |
| String | Returns a POSITION RULE object at the given index; Note that POSITION RULE objects are JavaScript objects that implement the following 3 properties: _pixel (the on-screen point around which to pivot/place), _offset (amount to nudge the placement), _point (compass direction) |
| Object<String, Array> | Returns a JavaScript object array (hash). |
| Number | Returns the ratio (a decimal between .01 and .99) to multiply the "Rise + Run" by. |
| HTMLElement | Returns handle/reference to the Heavyweight Object's on-screen counterpart—basically a handle to a DHTML SPAN; |
| static String | |
| int | Returns the CSS width property (in pixels); if this value is set, it is assumed that the Heavyweight container will not have its width lessened to fit on-screen. |
| int | Returns the z-index property; assumes jsx3.gui.Heavyweight.DEFAULTZINDEX if none supplied |
| void | destorys the on-screen VIEW for the HW container; Hide() only affects the VIEW; this is not the same as setting visibility to "hidden", which doesn't actually destroy the VIEW
|
| jsx3.gui.Heavyweight | Sets an object reference to the Browser Element parent to be used; if none specified, the browser BODY will be used. |
| jsx3.gui.Heavyweight | Sets the HTML content to display inside the HW instance on-screen; returns ref to self |
| jsx3.gui.Heavyweight | Sets the CSS height property (in pixels); if this value is set, it is assumed that the Heavyweight container will not have its height lessened to fit on-screen. |
| jsx3.gui.Heavyweight | Sets the overflow property for CONTENTS of the HW container; it is assumed that anytime a perfect fit cannot occur that the content will have its overflow property set to 'auto' unless specified otherwise
returns reference to self to facilitate method chaining; |
| jsx3.gui.Heavyweight | Sets the ratio (a decimal between .01 and .99) to multiply the "Rise + Run" by. |
| jsx3.gui.Heavyweight | if the HW instance has an on-screen VIEW, this method can be used to toggle its visibility; it has no effect on the MODEL; it is most commonly used when "[object].show(false);" is called, allowing the developer to manually adjust layout before actually showing the HW instance. |
| void | Sets the CSS width property (in pixels); if this value is set, it is assumed that the Heavyweight container will not have its width lessened to fit on-screen. |
| void | Sets the CSS z-index for the object; if null, is passed, jsx3.gui.Heavyweight.DEFAULTZINDEX will be used as the default value |
| void | Sets the text/HTML for the control to be displayed on-screen; returns reference to self to facilitate method chaining; |
| String | converts the object to a string representation more useful than the default implementation provided by the native JS engine |
| Methods Inherited From jsx3.lang.Object |
|---|
| clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf |
instance initializer
Parameters:
strId – id to identify this HW instance among all others; this id will be used by both jsx3.gui.Heavyweight (to index it in the hash) and by the browser as the HTML tag's "id" attribute. If no ID is passed, a unique ID will be assigned by the system and is available by calling, [object].getId();
objOwner –
Returns the instance of the heavyweight object with the given ID; to get the on-screen HTML instance call: jsx3.gui.Heavyweight.GO([id]).getRendered()
Parameters:
strId – unique ID for the heavyweight instance
Returns:
adds a POSITION RULE ruleset (a simple structure/hash) to the array of position rules; Note that POSITION RULE objects are used by the show() method to determine the best possible location for a heavyweight item
Parameters:
intPixel – left position (in pixels) for the anchorpoint the heavyweight instance will try to layout in context of
strPoint – Defines one of the valid 9 compass points: 4 primary: (N, S, E, W); 4 secondary: (NE, SE, SW, NW); and origin: (O). Note that it
is from this point (on the Heavyweight instance) that the heavyweight item will try to position itself
intOff – offset (in pixels) by which to nudge the vertical placement of the HW instance before displaying (useful for submenus, for example, where their left has a -10px offset to overlay the parent menu item)
strAxis – character (string) representing whether the rule is for the X or Y axis. Rememeber to capitalize!
Returns:
this object (this)
adds a POSITION RULE ruleset (X value) (a simple structure/hash) to the array of position rules; Note that POSITION RULE objects are used by the show() method to determine the best possible location for a heavyweight item
Parameters:
objAnchor – Either an event, or an on-screen HTML element
strAnchorPoint – REQUIRED if @objAnchor is an HTML element; when used, defines one of the valid 9 compass points: 4 primary: (N, S, E, W); 4 secondary: (NE, SE, SW, NW); and origin: (O). Note that it
is from this point (on @objAnchor) that the heavyweight item will try to position itself
strPoint – Defines one of the valid 9 compass points: 4 primary: (N, S, E, W); 4 secondary: (NE, SE, SW, NW); and origin: (O). Note that it
is from this point (on the Heavyweight instance) that the heavyweight item will try to position itself
intOff – offset (in pixels) by which to nudge the horizontal placement of the HW instance before displaying (useful for submenus, for example, where their left has a -10px offset to overlay the parent menu item)
Returns:
this object (this)
adds a POSITION RULE ruleset (Y value) (a simple structure/hash) to the array of position rules; Note that POSITION RULE objects are used by the show() method to determine the best possible location for a heavyweight item
Parameters:
objAnchor – Either an event or an on-screen HTML element
strAnchorPoint – REQUIRED if @objAnchor is an HTML element; when used, defines one of the valid 9 compass points: 4 primary: (N, S, E, W); 4 secondary: (NE, SE, SW, NW); and origin: (O). Note that it
is from this point (on @objAnchor) that the heavyweight item will try to position itself
strPoint – Defines one of the valid 9 compass points: 4 primary: (N, S, E, W); 4 secondary: (NE, SE, SW, NW); and origin: (O). Note that it
is from this point (on the Heavyweight instance) that the heavyweight item will try to position itself
intOff – offset (in pixels) by which to nudge the vertical placement of the HW instance before displaying (useful for submenus, for example, where their left has a -10px offset to overlay the parent menu item)
Returns:
this object (this)
void applyRatio()
can be called if show() has been called; resets the ratio (width/total) of the VIEW to be that of [object].getRatio()
void applyRules(strAxis
: String, intSize
: ?)
can be called if show() has been called; allows an existing HW window to re-apply its rules (used for complex layouts requiring a multi-pass)
Parameters:
strAxis – character (string) representing whether the rule is for the X or Y axis. Rememeber to capitalize!
intSize –
void destroy()
destroy's the on-screen VIEW for the HW container AND removes any reference to the instance from the hash; Destroy() affects the MODEL and the VIEW
Returns an object reference to the Browser Element parent to be used; if none specified, the browser BODY will be used
Returns:
Returns the HTML content to display inside the HW instance on-screen
Returns:
Returns the CSS height property (in pixels); if this value is set, it is assumed that the Heavyweight container will not have its height lessened to fit on-screen.
Returns:
height (in pixels)
Returns the unique id for this heavyweight instance
Returns:
Returns the overflow property for CONTENTS of the HW container; it is assumed that anytime a perfect fit cannot occur that the content will have its overflow property set to 'auto' unless specified otherwise
Returns:
[jsx3.gui.Block.OVERFLOWSCROLL, jsx3.gui.Block.OVERFLOWHIDDEN, jsx3.gui.Block.OVERFLOWEXPAND]
Returns a JavaScript object with properties: X,Y (Left and Top); relating to the 4 primary (N, S, E, W), 4 secondary (NE, SE, SW, NW), and origin (O) compass positions for O
Parameters:
objGUI – GUI object in the browser DOM (typically an HTML element such as a DIV or SPAN) for which to provide the X,Y for
strPoint – a character denoting one of the valid 9 compass points: 4 primary: (N, S, E, W); 4 secondary: (NE, SE, SW, NW); and origin: (O)
Returns a POSITION RULE object at the given index; Note that POSITION RULE objects are JavaScript objects that implement the following 3 properties: _pixel (the on-screen point around which to pivot/place), _offset (amount to nudge the placement), _point (compass direction)
Parameters:
intIndex – the index (in rank order of execution) of the POSITION RULEing rule set to apply (it is assumed that at least one POSITION RULE ruleset exists)
strAxis – character (string) representing whether the rule is for the X or Y axis. Rememeber to capitalize!
Returns:
Returns a JavaScript object array (hash). This hash contains the Y rules and the X rules for positioning the object
Returns:
Returns the ratio (a decimal between .01 and .99) to multiply the "Rise + Run" by. When applied by the 'show'
command during a double-pass, a width to height ratio can be established to provide a consistent L&F for
the text content. For example, a value of .8 would mean that the width of the heavyweight container would
represent 80% and the height would represent 20% of the total perimiter
Returns:
Returns handle/reference to the Heavyweight Object's on-screen counterpart—basically a handle to a DHTML SPAN;
Parameters:
objGUI – optional argument improves efficiency if provided.
Returns:
Browser-Native DHTML object
Deprecated.
Returns the release/build for the class (i.e., "2.2.00")
Returns:
Returns the CSS width property (in pixels); if this value is set, it is assumed that the Heavyweight container will not have its width lessened to fit on-screen.
Returns:
width (in pixels)
Returns the z-index property; assumes jsx3.gui.Heavyweight.DEFAULTZINDEX if none supplied
Returns:
void hide()
destorys the on-screen VIEW for the HW container; Hide() only affects the VIEW; this is not the same as setting visibility to "hidden", which doesn't actually destroy the VIEW
Sets an object reference to the Browser Element parent to be used; if none specified, the browser BODY will be used.
Note that this method must be called before setting any point rules for the hW instance, so those functions know the true origin from which to calculate left/top positions; returns ref to self
Parameters:
objGUI – HTML element in the browser
Returns:
this
Sets the HTML content to display inside the HW instance on-screen; returns ref to self
Parameters:
Returns:
this
Sets the CSS height property (in pixels); if this value is set, it is assumed that the Heavyweight container will not have its height lessened to fit on-screen.
returns reference to self to facilitate method chaining;
Parameters:
intHeight – height (in pixels)
Returns:
this object
Sets the overflow property for CONTENTS of the HW container; it is assumed that anytime a perfect fit cannot occur that the content will have its overflow property set to 'auto' unless specified otherwise
returns reference to self to facilitate method chaining;
Parameters:
strOverflow – [jsx3.gui.Block.OVERFLOWSCROLL, jsx3.gui.Block.OVERFLOWHIDDEN, jsx3.gui.Block.OVERFLOWEXPAND]
Returns:
this object
Sets the ratio (a decimal between .01 and .99) to multiply the "Rise + Run" by. When applied by the 'show' command during a double-pass, a width to height ratio can be established to provide a consistent L&F for the text content. For example, a value of .8 would mean that the width of the heavyweight container would represent 80% and the height would represent 20% of the total perimiter;
returns a ref to self
Parameters:
vntRatio – any value between .01 and .99
Returns:
this
if the HW instance has an on-screen VIEW, this method can be used to toggle its visibility; it has no effect on the MODEL; it is most commonly used when "[object].show(false);" is called, allowing the developer to manually adjust layout before actually showing the HW instance.
returns a ref to self for method chaining
Parameters:
strVisibility – [jsx3.gui.Block.VISIBILITYVISIBLE, jsx3.gui.Block.VISIBILITYHIDDEN]
Returns:
this object
void setWidth(intWidth
: int)
Sets the CSS width property (in pixels); if this value is set, it is assumed that the Heavyweight container will not have its width lessened to fit on-screen.
Parameters:
intWidth – width (in pixels)
void setZIndex(intZIndex
: int)
Sets the CSS z-index for the object; if null, is passed, jsx3.gui.Heavyweight.DEFAULTZINDEX will be used as the default value
Parameters:
intZIndex – z-index value
Sets the text/HTML for the control to be displayed on-screen; returns reference to self to facilitate method chaining;
Parameters:
bDisplay – true if null; if true, the heavyweight container is positioned and displayed immediately; if false, the container is painted on-screen, but its CSS 'visibility' property is set to 'hidden', allowing the developer to adjust as needed (via 2-pass, etc) before actually displaying;
converts the object to a string representation more useful than the default implementation provided by the native JS engine
Returns:
object profile as a string
Overrides:
Copyright © 2001-2007, TIBCO Software Inc.