OverviewSingleDeprecated

jsx3.gui

class Tab

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.gui.Tab

All Implemented Interfaces:

jsx3.gui.Interactive, jsx3.util.EventDispatcher

class Tab
extends jsx3.gui.Block
Renders a tab in a tabbed pane. An instance of this class must be child of an instance of jsx3.gui.TabbedPane. A tab should have exactly one child, usually a jsx3.gui.Block, which holds all of its content.

See Also:

jsx3.gui.TabbedPane

Field Summary
static String
ACTIVEBEVEL
static String
CHILDBGCOLOR
#e8e8f5
static String
DEFAULTACTIVECOLOR
#e8e8f5
static String
DEFAULTBEVELIMAGE
static String
Deprecated.
static String
DEFAULTINACTIVECOLOR
#d8d8e5
static String
Deprecated.
static String
INACTIVEBEVEL
static int
STATEDISABLED
0 : disabled
static int
STATEENABLED
1 : enabled (default)
Constructor Summary
void
init(strName : String, strText : String, vntWidth : int | String, strHexActiveColor : String, strHexInactiveColor : String)
instance initializer
Method Summary
jsx3.gui.Tab
doClickTab(bFocus : boolean, bForce : boolean)
Deprecated. replaced with doShow()
void
Brings this tab and its associated pane forward in the stack among all sibling tabs.
String
Returns valid CSS property value, (e.g.
String
Returns background image that will underlay each tab to provide an outset-type border.
jsx3.app.Model
Returns the child of this tab that will be painted as the content of this tab.
int
Returns the state for the tab control.
String
Returns valid CSS property value, (e.g.
static String
Deprecated.
boolean
onSetParent(objParent : ?)
is called when an item is about to be set; returns false if the parent is not of the appropriate type; in this case, the parent must be a jsx3.gui.TabbedPane or derivative class
String
Returns the DHTML, used for this object's on-screen VIEW
jsx3.gui.Tab
setActiveColor(strActiveColor : String)
Sets valid CSS property value, (e.g.
jsx3.gui.Tab
setBevel(strURL : String)
Sets background image that will underlay each tab to provide an outset-type border; if this value is not set or null is passed, the default background image for the jsx3.gui.Tab class will be use the contant value, jsx3.gui.Tab.DEFAULTBEVELIMAGE;
jsx3.gui.Tab
setEnabled(STATE : int)
Sets the enabled state for the tab control; returns reference to self to facilitate method chaining
jsx3.gui.Tab
setInactiveColor(strInactiveColor : String)
Sets valid CSS property value, (e.g.
jsx3.gui.Tab
setText(strText : String, bRepaint : boolean)
Sets the text/HTML for the control to be displayed on-screen; returns reference to self to facilitate method chaining;
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, setBackground, setBackgroundColor, setBorder, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask
Methods Inherited From jsx3.gui.Interactive
doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy
Methods Inherited From jsx3.gui.Painted
focus, getAbsolutePosition, getAttribute, getAttributes, getDynamicProperty, getRendered, insertHTML, onAfterPaint, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute, setDynamicProperty
Methods Inherited From jsx3.app.Model
adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

ACTIVEBEVEL

static String ACTIVEBEVEL

CHILDBGCOLOR

static String CHILDBGCOLOR
#e8e8f5

DEFAULTACTIVECOLOR

static String DEFAULTACTIVECOLOR
#e8e8f5

DEFAULTBEVELIMAGE

static String DEFAULTBEVELIMAGE

DEFAULTHIGHLIGHT

static String DEFAULTHIGHLIGHT
Deprecated.
#f6f6ff

DEFAULTINACTIVECOLOR

static String DEFAULTINACTIVECOLOR
#d8d8e5

DEFAULTSHADOW

static String DEFAULTSHADOW
Deprecated.
#a6a6af

INACTIVEBEVEL

static String INACTIVEBEVEL

STATEDISABLED

static final int STATEDISABLED
0 : disabled

STATEENABLED

static final int STATEENABLED
1 : enabled (default)
Constructor Detail

init

void init(strName : String, strText : String, vntWidth : int | String, strHexActiveColor : String, strHexInactiveColor : String)
instance initializer

Parameters:

strNameunique name distinguishing this object from all other JSX GUI objects in the JSX application
strTexttext to display within the given tab; if null, jsx3.gui.Tab.DEFAULTTEXT is used
vntWidthone of: 1) the width as an integer representing a fixed pixel width for the tab (e.g., 80) ; 2) the width as a percentage representing this tab's width as a percentage of how wide the entire tabbed pane should be (e.g., "25%"); 3) no value (null) to designate that this tab should be just large engough to contain the value of the parameter, @strText;
strHexActiveColorvalid css property for defining the color to use when the tab is active (i.e., red, #ff0000, etc)
strHexInactiveColorvalid css property for defining the color to use when the tab is inactive (i.e., red, #ff0000, etc)
Method Detail

doClickTab

jsx3.gui.Tab doClickTab(bFocus : boolean, bForce : boolean)
Deprecated. replaced with doShow()
Brings this tab and its associated pane forward in the stack among all sibling tabs. This method invokes the EXECUTE event only under the deprecated 3.0 event protocol.

Parameters:

bFocusif null, assume true; if false, do not give focus to the tab's on-screen VIEW
bForcefalse if null; to avoid updating the VIEW, tabs ignore click events if they're already the active tab; this will override and force the click to occur

Returns:

this object 

See Also:

doShow()

doShow

void doShow()
Brings this tab and its associated pane forward in the stack among all sibling tabs.

getActiveColor

String getActiveColor()
Returns valid CSS property value, (e.g., red, #ffffff) when tab is active. Default: jsx3.gui.Tab.DEFAULTACTIVECOLOR

Returns:

valid CSS property value, (e.g., red, #ffffff)  

getBevel

String getBevel()
Returns background image that will underlay each tab to provide an outset-type border. Default: jsx3.gui.Tab.DEFAULTBEVELIMAGE

Returns:

valid url (typically relative) to point to an image that can be used as a bacground image for the tab  

getContentChild

jsx3.app.Model getContentChild()
Returns the child of this tab that will be painted as the content of this tab. This implementation returns the first child of this stack.

Returns:

 

getEnabled

int getEnabled()
Returns the state for the tab control. Default: jsx3.gui.Tab.STATEENABLED

Returns:

one of: jsx3.gui.Tab.STATEDISABLED, jsx3.gui.Tab.STATEENABLED  

getInactiveColor

String getInactiveColor()
Returns valid CSS property value, (e.g., red, #ffffff) when tab is inactive (not selected tab in the group). Default: jsx3.gui.Tab.DEFAULTINACTIVECOLOR

Returns:

valid CSS property value, (e.g., red, #ffffff)  

getVersion

static String getVersion()
Deprecated.
Returns the release/build for the class (i.e., "2.2.00")

Returns:

 

onSetParent

boolean onSetParent(objParent : ?)
is called when an item is about to be set; returns false if the parent is not of the appropriate type; in this case, the parent must be a jsx3.gui.TabbedPane or derivative class

Parameters:

objParent

Returns:

true to allow the set, false to veto  

Overrides:

onSetParent in jsx3.app.Model

paint

String paint()
Returns the DHTML, used for this object's on-screen VIEW

Returns:

DHTML  

Overrides:

paint in jsx3.gui.Block

setActiveColor

jsx3.gui.Tab setActiveColor(strActiveColor : String)
Sets valid CSS property value, (e.g., red, #ffffff) when tab is active;

Parameters:

strActiveColorvalid CSS property value, (e.g., red, #ffffff)

Returns:

this object  

setBevel

jsx3.gui.Tab setBevel(strURL : String)
Sets background image that will underlay each tab to provide an outset-type border; if this value is not set or null is passed, the default background image for the jsx3.gui.Tab class will be use the contant value, jsx3.gui.Tab.DEFAULTBEVELIMAGE;

Parameters:

strURLvalid url (typically relative) to point to an image that can be used as a bacground image for the tab

Returns:

this object  

setEnabled

jsx3.gui.Tab setEnabled(STATE : int)
Sets the enabled state for the tab control; returns reference to self to facilitate method chaining

Parameters:

STATEone of: jsx3.gui.Tab.STATEDISABLED, jsx3.gui.Tab.STATEENABLED

Returns:

this object  

setInactiveColor

jsx3.gui.Tab setInactiveColor(strInactiveColor : String)
Sets valid CSS property value, (e.g., red, #ffffff) when tab is inactive (not selected tab in the group);

Parameters:

strInactiveColorvalid CSS property value, (e.g., red, #ffffff)

Returns:

this object  

setText

jsx3.gui.Tab setText(strText : String, bRepaint : boolean)
Sets the text/HTML for the control to be displayed on-screen; returns reference to self to facilitate method chaining;

Parameters:

strTexttext/HTML
bRepaintif true, the view of this object is immediately updated, obviating the need to call repaint().

Returns:

 

Overrides:

setText in jsx3.gui.Block