Jx.Button.Tab

Extends: Jx.Button

Implements: Jx.ContentLoader

A single tab in a tab set.  A tab has a label (displayed in the tab) and a content area that is displayed when the tab is active.  A tab has to be added to both a Jx.TabSet (for the content) and Jx.Toolbar (for the actual tab itself) in order to be useful.  Alternately, you can use a Jx.TabBox which combines both into a single control at the cost of some flexibility in layout options.

A tab is a Jx.ContentLoader and you can specify the initial content of the tab using any of the methods supported by Jx.ContentLoader::loadContent.  You can acccess the actual DOM element that contains the content (if you want to dynamically insert content for instance) via the <Jx.Tab::content> property.

A tab is a button of type toggle which means that it emits the up and down events.

Example

var tab1 = new Jx.Button.Tab({
    label: 'tab 1',
    content: 'content1',
    onDown: function(tab) {
        console.log('tab became active');
    },
    onUp: function(tab) {
        console.log('tab became inactive');
    }
});

License

Copyright © 2008, DM Solutions Group Inc.

This file is licensed under an MIT style license

Summary
Jx.Button.TabExtends: Jx.Button
Properties
content{HTMLElement} The content area that is displayed when the tab is active.
Constructor
Jx.Button.TabCreate a new instance of Jx.Button.Tab.
Functions
clickedtriggered when the user clicks the button, processes the actionPerformed event

Properties

content

{HTMLElement} The content area that is displayed when the tab is active.

Constructor

Jx.Button.Tab

Create a new instance of Jx.Button.Tab.  Any layout options passed are used to create a Jx.Layout for the tab content area.

Parameters

options{Object} an object containing options that are used to control the appearance of the tab.  See Jx.Button, Jx.ContentLoader::loadContent and Jx.Layout::Jx.Layout for valid options.

Functions

clicked

clicked : function(evt)

triggered when the user clicks the button, processes the actionPerformed event

Extends: Object
clicked : function(evt)
triggered when the user clicks the button, processes the actionPerformed event
ContentLoader is a mix-in class that provides a consistent mechanism for other Jx controls to load content in one of four different ways:
Extends: Object
Extends: Object
Extends: Object
loadContent: function(element)
triggers loading of content based on options set for the current object.
Extends: Object
Create a new instance of Jx.Layout.