|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.skin.ComponentSkin
org.apache.pivot.wtk.skin.ContainerSkin
org.apache.pivot.wtk.skin.TabPaneSkin
org.apache.pivot.wtk.skin.terra.TerraTabPaneSkin
public class TerraTabPaneSkin
Tab pane skin.
Nested Class Summary | |
---|---|
class |
TerraTabPaneSkin.SelectionChangeTransition
Selection change transition. |
class |
TerraTabPaneSkin.TabButton
Tab button component. |
class |
TerraTabPaneSkin.TabButtonSkin
Tab button skin. |
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
---|
ContainerSkin.IndexFocusTraversalPolicy |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TabPaneListener |
---|
TabPaneListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TabPaneSelectionListener |
---|
TabPaneSelectionListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.TabPaneAttributeListener |
---|
TabPaneAttributeListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener |
---|
ContainerListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener |
---|
ContainerMouseListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener |
---|
ComponentListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener |
---|
ComponentStateListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener |
---|
ComponentMouseListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener |
---|
ComponentMouseButtonListener.Adapter |
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener |
---|
ComponentKeyListener.Adapter |
Field Summary | |
---|---|
static int |
GRADIENT_BEVEL_THICKNESS
|
Fields inherited from class org.apache.pivot.wtk.skin.TabPaneSkin |
---|
tabButtonBoxPane |
Constructor Summary | |
---|---|
TerraTabPaneSkin()
|
Method Summary | |
---|---|
void |
closeableChanged(TabPane tabPane)
Called when a tab pane's closeable property has changed. |
void |
collapsibleChanged(TabPane tabPane)
Called when a tab pane's collapsible property has changed. |
void |
cornerChanged(TabPane tabPane,
Component previousCorner)
Called when a tab pane's corner component has changed. |
Color |
getActiveTabColor()
|
int |
getBaseline(int width,
int height)
Returns the baseline for a given width and height. |
Color |
getBorderColor()
|
Color |
getButtonColor()
|
Font |
getButtonFont()
|
Insets |
getButtonPadding()
|
int |
getButtonSpacing()
|
Color |
getInactiveBorderColor()
|
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. |
int |
getSelectionChangeDuration()
|
int |
getSelectionChangeRate()
|
Orientation |
getTabOrientation()
|
void |
install(Component component)
Associates a skin with a component. |
boolean |
keyPressed(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
Key presses have no effect if the event has already been consumed. |
void |
layout()
If the component on which the skin is installed is a container, lays out the container's children. |
void |
paint(Graphics2D graphics)
Paints the visual. |
Vote |
previewRemoveTabs(TabPane tabPane,
int index,
int count)
Called to preview a tab removal. |
Vote |
previewSelectedIndexChange(TabPane tabPane,
int selectedIndex)
Called to preview a selected index change. |
void |
removeTabsVetoed(TabPane tabPane,
Vote vote)
Called when a tab removal has been vetoed. |
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 |
setActiveTabColor(Color activeTabColor)
|
void |
setActiveTabColor(int activeTabColor)
|
void |
setActiveTabColor(String activeTabColor)
|
void |
setBorderColor(Color borderColor)
|
void |
setBorderColor(int borderColor)
|
void |
setBorderColor(String borderColor)
|
void |
setButtonColor(Color buttonColor)
|
void |
setButtonColor(int buttonColor)
|
void |
setButtonColor(String buttonColor)
|
void |
setButtonCornerRadius(int buttonCornerRadius)
|
void |
setButtonCornerRadius(Number radius)
|
void |
setButtonCornerRadius(String radius)
|
void |
setButtonFont(Dictionary<String,?> buttonFont)
|
void |
setButtonFont(Font buttonFont)
|
void |
setButtonFont(String buttonFont)
|
void |
setButtonPadding(Dictionary<String,?> padding)
|
void |
setButtonPadding(Insets buttonPadding)
|
void |
setButtonPadding(int buttonPadding)
|
void |
setButtonPadding(Number padding)
|
void |
setButtonPadding(String padding)
|
void |
setButtonSpacing(int buttonSpacing)
|
void |
setInactiveBorderColor(Color inactiveBorderColor)
|
void |
setInactiveBorderColor(int inactiveBorderColor)
|
void |
setInactiveBorderColor(String inactiveBorderColor)
|
void |
setInactiveTabColor(Color inactiveTabColor)
|
void |
setInactiveTabColor(int inactiveTabColor)
|
void |
setInactiveTabColor(String inactiveTabColor)
|
void |
setPadding(Dictionary<String,?> padding)
|
void |
setPadding(Insets padding)
|
void |
setPadding(int padding)
|
void |
setPadding(Number padding)
|
void |
setPadding(String padding)
|
void |
setSelectionChangeDuration(int selectionChangeDuration)
|
void |
setSelectionChangeRate(int selectionChangeRate)
|
void |
setTabOrientation(Orientation tabOrientation)
|
void |
tabDataChanged(TabPane tabPane,
Component component,
Object previousTabData)
Called when a tab's tab data attribute has changed. |
void |
tabDataRendererChanged(TabPane tabPane,
Button.DataRenderer previousTabDataRenderer)
Called when a tab pane's tab data renderer has changed. |
void |
tabInserted(TabPane tabPane,
int index)
Called when a tab has been inserted into a tab pane's tab sequence. |
void |
tabsRemoved(TabPane tabPane,
int index,
Sequence<Component> removed)
Called when a tab has been removed from a tab pane's tab sequence. |
void |
tooltipTextChanged(TabPane tabPane,
Component component,
String previousTooltipText)
Called when a tab's tooltipText attribute has changed. |
Methods inherited from class org.apache.pivot.wtk.skin.TabPaneSkin |
---|
isVisible, setVisible |
Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
---|
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseDown, mouseMove, mouseUp, mouseWheel, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint |
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, getBaseline, getComponent, getHeight, getWidth, heightLimitsChanged, invalidateComponent, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int GRADIENT_BEVEL_THICKNESS
Constructor Detail |
---|
public TerraTabPaneSkin()
Method Detail |
---|
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 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 int getBaseline(int width, int height)
ConstrainedVisual
getBaseline
in interface ConstrainedVisual
getBaseline
in class ComponentSkin
public void layout()
Skin
layout
in interface Skin
public void paint(Graphics2D graphics)
Visual
paint
in interface Visual
paint
in class ContainerSkin
graphics
- The graphics context in which to paint the visual.public Color getActiveTabColor()
public void setActiveTabColor(Color activeTabColor)
public final void setActiveTabColor(String activeTabColor)
public final void setActiveTabColor(int activeTabColor)
public Color getInactiveTabColor()
public void setInactiveTabColor(Color inactiveTabColor)
public final void setInactiveTabColor(String inactiveTabColor)
public final void setInactiveTabColor(int inactiveTabColor)
public Color getBorderColor()
public void setBorderColor(Color borderColor)
public final void setBorderColor(String borderColor)
public final void setBorderColor(int borderColor)
public Color getInactiveBorderColor()
public void setInactiveBorderColor(Color inactiveBorderColor)
public final void setInactiveBorderColor(String inactiveBorderColor)
public final void setInactiveBorderColor(int inactiveBorderColor)
public Insets getPadding()
public void setPadding(Insets padding)
public final void setPadding(Dictionary<String,?> padding)
public final void setPadding(int padding)
public final void setPadding(Number padding)
public final void setPadding(String padding)
public Font getButtonFont()
public void setButtonFont(Font buttonFont)
public final void setButtonFont(String buttonFont)
public final void setButtonFont(Dictionary<String,?> buttonFont)
public Color getButtonColor()
public void setButtonColor(Color buttonColor)
public final void setButtonColor(String buttonColor)
public final void setButtonColor(int buttonColor)
public Insets getButtonPadding()
public void setButtonPadding(Insets buttonPadding)
public final void setButtonPadding(Dictionary<String,?> padding)
public final void setButtonPadding(int buttonPadding)
public final void setButtonPadding(Number padding)
public final void setButtonPadding(String padding)
public int getButtonSpacing()
public void setButtonSpacing(int buttonSpacing)
public final void setButtonCornerRadius(int buttonCornerRadius)
public final void setButtonCornerRadius(Number radius)
public final void setButtonCornerRadius(String radius)
public Orientation getTabOrientation()
public void setTabOrientation(Orientation tabOrientation)
public int getSelectionChangeDuration()
public void setSelectionChangeDuration(int selectionChangeDuration)
public int getSelectionChangeRate()
public void setSelectionChangeRate(int selectionChangeRate)
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
CommandModifier + KEYPAD_1
to
KEYPAD_9
or CommandModifier +
1
to 9
Select the (enabled) tab at
index 0 to 8 respectively
keyPressed
in interface ComponentKeyListener
keyPressed
in class ComponentSkin
Platform.getCommandModifier()
public void tabInserted(TabPane tabPane, int index)
TabPaneListener
tabInserted
in interface TabPaneListener
public Vote previewRemoveTabs(TabPane tabPane, int index, int count)
TabPaneListener
previewRemoveTabs
in interface TabPaneListener
public void removeTabsVetoed(TabPane tabPane, Vote vote)
TabPaneListener
removeTabsVetoed
in interface TabPaneListener
public void tabsRemoved(TabPane tabPane, int index, Sequence<Component> removed)
TabPaneListener
tabsRemoved
in interface TabPaneListener
public void cornerChanged(TabPane tabPane, Component previousCorner)
TabPaneListener
cornerChanged
in interface TabPaneListener
public void tabDataRendererChanged(TabPane tabPane, Button.DataRenderer previousTabDataRenderer)
TabPaneListener
tabDataRendererChanged
in interface TabPaneListener
public void closeableChanged(TabPane tabPane)
TabPaneListener
closeableChanged
in interface TabPaneListener
public void collapsibleChanged(TabPane tabPane)
TabPaneListener
collapsibleChanged
in interface TabPaneListener
public Vote previewSelectedIndexChange(TabPane tabPane, int selectedIndex)
TabPaneSelectionListener
previewSelectedIndexChange
in interface TabPaneSelectionListener
tabPane
- The source of the event.selectedIndex
- The index that will be selected.public void selectedIndexChangeVetoed(TabPane tabPane, Vote reason)
TabPaneSelectionListener
selectedIndexChangeVetoed
in interface TabPaneSelectionListener
tabPane
- The source of the event.reason
- The reason the event was vetoed.public void selectedIndexChanged(TabPane tabPane, int previousSelectedIndex)
TabPaneSelectionListener
selectedIndexChanged
in interface TabPaneSelectionListener
tabPane
- The source of the event.previousSelectedIndex
- If the selection changed directly, contains the index that was previously
selected. Otherwise, contains the current selection.public void tabDataChanged(TabPane tabPane, Component component, Object previousTabData)
TabPaneAttributeListener
tabDataChanged
in interface TabPaneAttributeListener
public void tooltipTextChanged(TabPane tabPane, Component component, String previousTooltipText)
TabPaneAttributeListener
tooltipTextChanged
in interface TabPaneAttributeListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |