Top Description Fields Constructors Methods
com.dlsc.workbenchfx.view.controls.module

public Class Tab

extends Control
Class Inheritance
Imports
com.dlsc.workbenchfx.Workbench, com.dlsc.workbenchfx.model.WorkbenchModule, com.dlsc.workbenchfx.util.WorkbenchUtils, javafx.beans.binding.Bindings, javafx.beans.property.BooleanProperty, .ObjectProperty, .ReadOnlyBooleanProperty, .ReadOnlyObjectProperty, .ReadOnlyStringProperty, .SimpleBooleanProperty, .SimpleObjectProperty, .SimpleStringProperty, .StringProperty, javafx.css.PseudoClass, javafx.scene.Node, javafx.scene.control.Control, .Skin, org.slf4j.Logger, .LoggerFactory

Represents the standard control used to display WorkbenchModules as tabs in the toolbar.
Authors
François Martin, Marco Sanfratello

Field Summary

Modifier and TypeField and Description
private final BooleanProperty
private final ObjectProperty<Node>
private static final Logger
private final ObjectProperty<WorkbenchModule>
private final StringProperty
private static final PseudoClass
private final Workbench

Constructor Summary

AccessConstructor and Description
public
Tab(Workbench
which created this Tab
workbench
)

Constructs a new Tab.

Method Summary

Modifier and TypeMethod and Description
public final ReadOnlyBooleanProperty
public final void
close()

Closes the WorkbenchModule along with this Tab.

protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control.

public final Node
public final WorkbenchModule
public final String
public final ReadOnlyObjectProperty<Node>
public final boolean
public final ReadOnlyObjectProperty<WorkbenchModule>
public final ReadOnlyStringProperty
public final void
open()

Opens the WorkbenchModule belonging to this Tab.

public final void
setModule(WorkbenchModule
to be represented by this Tab
module
)

Defines the module which is being represented by this Tab.

private void
private void
private void
Inherited from javafx.scene.control.Control:
computeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthcontextMenuPropertyexecuteAccessibleActiongetBaselineOffsetgetClassCssMetaDatagetContextMenugetControlCssMetaDatagetCssMetaDatagetInitialFocusTraversablegetSkingetTooltipisResizablelayoutChildrenqueryAccessibleAttributesetContextMenusetSkinsetTooltipskinPropertytooltipProperty

Field Detail

activeTabback to summary
private final BooleanProperty activeTab
iconback to summary
private final ObjectProperty<Node> icon
LOGGERback to summary
private static final Logger LOGGER
moduleback to summary
private final ObjectProperty<WorkbenchModule> module
nameback to summary
private final StringProperty name
SELECTEDback to summary
private static final PseudoClass SELECTED
workbenchback to summary
private final Workbench workbench

Constructor Detail

Tabback to summary
public Tab(Workbench workbench)

Constructs a new Tab.

Parameters
workbench:Workbench

which created this Tab

Method Detail

activeTabPropertyback to summary
public final ReadOnlyBooleanProperty activeTabProperty()
closeback to summary
public final void close()

Closes the WorkbenchModule along with this Tab.

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Doc from javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Returns:Skin<?>

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Annotations
@Override
getIconback to summary
public final Node getIcon()
getModuleback to summary
public final WorkbenchModule getModule()
getNameback to summary
public final String getName()
iconPropertyback to summary
public final ReadOnlyObjectProperty<Node> iconProperty()
isActiveTabback to summary
public final boolean isActiveTab()
modulePropertyback to summary
public final ReadOnlyObjectProperty<WorkbenchModule> moduleProperty()
namePropertyback to summary
public final ReadOnlyStringProperty nameProperty()
openback to summary
public final void open()

Opens the WorkbenchModule belonging to this Tab.

setModuleback to summary
public final void setModule(WorkbenchModule module)

Defines the module which is being represented by this Tab.

Parameters
module:WorkbenchModule

to be represented by this Tab

setupActiveTabListenerback to summary
private void setupActiveTabListener()
setupEventHandlersback to summary
private void setupEventHandlers()
setupModuleListenersback to summary
private void setupModuleListeners()