|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.skin.ComponentSkin
pivot.wtk.skin.ContainerSkin
pivot.wtk.skin.terra.TerraTabPaneSkin
public class TerraTabPaneSkin
Tab pane skin.
TODO Make tab buttons focusable?
TODO Disable the tab button when the component is disabled? We'd need style properties to present a disabled tab button state. We'd also need to manage button enabled state independently of tab pane enabled state.
TODO Add showCloseButton style.
Nested Class Summary | |
---|---|
class |
TerraTabPaneSkin.ExpandTransition
|
protected class |
TerraTabPaneSkin.TabButton
|
protected class |
TerraTabPaneSkin.TabButtonSkin
|
Nested classes/interfaces inherited from class pivot.wtk.skin.ContainerSkin |
---|
ContainerSkin.IndexFocusTraversalPolicy |
Field Summary | |
---|---|
protected FlowPane |
buttonFlowPane
|
protected Panorama |
buttonPanorama
|
static int |
GRADIENT_BEVEL_THICKNESS
|
Fields inherited from class pivot.wtk.skin.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
TerraTabPaneSkin()
|
Method Summary | |
---|---|
void |
collapsibleChanged(TabPane tabPane)
Called when a tab pane's collapsible flag has changed. |
void |
cornerChanged(TabPane tabPane,
Component previousCorner)
Called when a tab pane's corner component (the component in the free space next to the tabs) has changed. |
java.awt.Color |
getActiveTabColor()
|
java.awt.Color |
getBorderColor()
|
java.awt.Color |
getButtonColor()
|
java.awt.Font |
getButtonFont()
|
Insets |
getButtonPadding()
|
int |
getButtonSpacing()
|
java.awt.Color |
getInactiveTabColor()
|
Insets |
getPadding()
|
int |
getPreferredHeight(int width)
Returns the visual's preferred height given the provided width constraint. |
Dimensions |
getPreferredSize()
Returns the visual's unconstrained preferred size. |
int |
getPreferredWidth(int height)
Returns the visual's preferred width given the provided height constraint. |
void |
iconChanged(TabPane tabPane,
Component component,
Image previousIcon)
Called when a tab's icon attribute has changed. |
void |
install(Component component)
Associates a skin with a component. |
void |
layout()
If the component on which the skin is installed is a container, lays out the container's children. |
void |
nameChanged(TabPane tabPane,
Component component,
java.lang.String previousName)
Called when a tab's name attribute has changed. |
void |
paint(java.awt.Graphics2D graphics)
Paints the visual. |
Vote |
previewSelectedIndexChange(TabPane tabPane,
int selectedIndex)
Called to preview a selected index change. |
void |
selectedIndexChanged(TabPane tabPane,
int previousSelectedIndex)
Called when a tab pane's selected index has changed. |
void |
selectedIndexChangeVetoed(TabPane tabPane,
Vote reason)
Called when a selected index change has been vetoed. |
void |
selectionChanged(Button.Group group,
Button previousSelection)
Called when a button group's selection has changed. |
void |
setActiveTabColor(java.awt.Color activeTabColor)
|
void |
setActiveTabColor(java.lang.String activeTabColor)
|
void |
setBorderColor(java.awt.Color borderColor)
|
void |
setBorderColor(java.lang.String borderColor)
|
void |
setButtonColor(java.awt.Color buttonColor)
|
void |
setButtonColor(java.lang.String buttonColor)
|
void |
setButtonFont(java.awt.Font buttonFont)
|
void |
setButtonFont(java.lang.String buttonFont)
|
void |
setButtonPadding(Insets buttonPadding)
|
void |
setButtonPadding(int buttonPadding)
|
void |
setButtonSpacing(int buttonSpacing)
|
void |
setInactiveTabColor(java.awt.Color inactiveTabColor)
|
void |
setInactiveTabColor(java.lang.String inactiveTabColor)
|
void |
setPadding(Dictionary<java.lang.String,?> padding)
|
void |
setPadding(Insets padding)
|
void |
setPadding(int padding)
|
void |
setPadding(java.lang.Number padding)
|
void |
setSize(int width,
int height)
Sets the visual's render size. |
void |
tabInserted(TabPane tabPane,
int index)
Called when a tab has been inserted into a tab pane's tab sequence. |
void |
tabOrientationChanged(TabPane tabPane)
Called when a tab pane's orientation has changed. |
void |
tabsRemoved(TabPane tabPane,
int index,
Sequence<Component> tabs)
Called when a tab has been removed from a tab pane's tab sequence. |
void |
uninstall()
Dissociates a skin from a component. |
protected void |
updateButtonData(Component tab)
|
Methods inherited from class pivot.wtk.skin.ContainerSkin |
---|
componentInserted, componentsRemoved, contextKeyChanged, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, setBackgroundColor, setBackgroundColor, setBackgroundPaint |
Methods inherited from class pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeColor, displayableChanged, enabledChanged, focusedChanged, getComponent, getHeight, getWidth, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, sizeChanged, styleUpdated, tooltipTextChanged, visibleChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Panorama buttonPanorama
protected FlowPane buttonFlowPane
public static final int GRADIENT_BEVEL_THICKNESS
Constructor Detail |
---|
public TerraTabPaneSkin()
Method Detail |
---|
public void setSize(int width, int height)
ConstrainedVisual
setSize
in interface ConstrainedVisual
setSize
in class ComponentSkin
public void install(Component component)
Skin
install
in interface Skin
install
in class ContainerSkin
component
- The component to which the skin is being attached.public void uninstall()
Skin
uninstall
in interface Skin
uninstall
in class ContainerSkin
public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth
in interface ConstrainedVisual
getPreferredWidth
in class ContainerSkin
height
- The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int width)
ConstrainedVisual
getPreferredHeight
in interface ConstrainedVisual
getPreferredHeight
in class ContainerSkin
width
- The width by which to constrain the preferred height, or -1
for no constraint.public Dimensions getPreferredSize()
ConstrainedVisual
getPreferredSize
in interface ConstrainedVisual
getPreferredSize
in class ComponentSkin
public void layout()
Skin
layout
in interface Skin
public void paint(java.awt.Graphics2D graphics)
Visual
paint
in interface Visual
paint
in class ContainerSkin
graphics
- The graphics context in which to paint the visual.public java.awt.Color getActiveTabColor()
public void setActiveTabColor(java.awt.Color activeTabColor)
public final void setActiveTabColor(java.lang.String activeTabColor)
public java.awt.Color getInactiveTabColor()
public void setInactiveTabColor(java.awt.Color inactiveTabColor)
public final void setInactiveTabColor(java.lang.String inactiveTabColor)
public java.awt.Color getBorderColor()
public void setBorderColor(java.awt.Color borderColor)
public final void setBorderColor(java.lang.String borderColor)
public Insets getPadding()
public void setPadding(Insets padding)
public final void setPadding(Dictionary<java.lang.String,?> padding)
public final void setPadding(int padding)
public final void setPadding(java.lang.Number padding)
public java.awt.Font getButtonFont()
public void setButtonFont(java.awt.Font buttonFont)
public final void setButtonFont(java.lang.String buttonFont)
public java.awt.Color getButtonColor()
public void setButtonColor(java.awt.Color buttonColor)
public final void setButtonColor(java.lang.String buttonColor)
public Insets getButtonPadding()
public void setButtonPadding(Insets buttonPadding)
public final void setButtonPadding(int buttonPadding)
public int getButtonSpacing()
public void setButtonSpacing(int buttonSpacing)
protected void updateButtonData(Component tab)
public void tabOrientationChanged(TabPane tabPane)
TabPaneListener
tabOrientationChanged
in interface TabPaneListener
public void collapsibleChanged(TabPane tabPane)
TabPaneListener
collapsibleChanged
in interface TabPaneListener
public void tabInserted(TabPane tabPane, int index)
TabPaneListener
tabInserted
in interface TabPaneListener
public void tabsRemoved(TabPane tabPane, int index, Sequence<Component> tabs)
TabPaneListener
tabsRemoved
in interface TabPaneListener
public void cornerChanged(TabPane tabPane, Component previousCorner)
TabPaneListener
cornerChanged
in interface TabPaneListener
public Vote previewSelectedIndexChange(TabPane tabPane, int selectedIndex)
TabPaneSelectionListener
previewSelectedIndexChange
in interface TabPaneSelectionListener
public void selectedIndexChangeVetoed(TabPane tabPane, Vote reason)
TabPaneSelectionListener
selectedIndexChangeVetoed
in interface TabPaneSelectionListener
public void selectedIndexChanged(TabPane tabPane, int previousSelectedIndex)
TabPaneSelectionListener
selectedIndexChanged
in interface TabPaneSelectionListener
public void nameChanged(TabPane tabPane, Component component, java.lang.String previousName)
TabPaneAttributeListener
nameChanged
in interface TabPaneAttributeListener
public void iconChanged(TabPane tabPane, Component component, Image previousIcon)
TabPaneAttributeListener
iconChanged
in interface TabPaneAttributeListener
public void selectionChanged(Button.Group group, Button previousSelection)
Button.GroupListener
selectionChanged
in interface Button.GroupListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |