Package org.apache.pivot.wtk.skin.terra
Class TerraSplitPaneSkin
- java.lang.Object
-
- org.apache.pivot.wtk.skin.ComponentSkin
-
- org.apache.pivot.wtk.skin.ContainerSkin
-
- org.apache.pivot.wtk.skin.terra.TerraSplitPaneSkin
-
- All Implemented Interfaces:
ComponentKeyListener
,ComponentListener
,ComponentMouseButtonListener
,ComponentMouseListener
,ComponentMouseWheelListener
,ComponentStateListener
,ComponentTooltipListener
,ConstrainedVisual
,ContainerListener
,ContainerMouseListener
,Skin
,SplitPaneListener
,Visual
public class TerraSplitPaneSkin extends ContainerSkin implements SplitPaneListener
Split pane skin.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TerraSplitPaneSkin.Splitter
Split pane splitter component.protected class
TerraSplitPaneSkin.SplitterShadow
Split pane splitter shadow component.protected class
TerraSplitPaneSkin.SplitterShadowSkin
Split pane splitter shadow component skin.protected class
TerraSplitPaneSkin.SplitterSkin
Split pane splitter component 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.ComponentKeyListener
ComponentKeyListener.Adapter, ComponentKeyListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener
ComponentListener.Adapter, ComponentListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener
ComponentMouseButtonListener.Adapter, ComponentMouseButtonListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener
ComponentMouseListener.Adapter, ComponentMouseListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseWheelListener
ComponentMouseWheelListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener
ComponentStateListener.Adapter, ComponentStateListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentTooltipListener
ComponentTooltipListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener
ContainerListener.Adapter, ContainerListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener
ContainerMouseListener.Adapter, ContainerMouseListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.SplitPaneListener
SplitPaneListener.Adapter, SplitPaneListener.Listeners
-
-
Constructor Summary
Constructors Constructor Description TerraSplitPaneSkin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bottomRightChanged(SplitPane splitPane, Component previousBottomRight)
Called when a split pane's bottom right component has changed.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.java.awt.Color
getSplitterHandlePrimaryColor()
java.awt.Color
getSplitterHandleSecondaryColor()
int
getSplitterThickness()
boolean
getUseShadow()
void
install(Component component)
Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.void
layout()
If the component on which the skin is installed is a container, lays out the container's children.void
lockedChanged(SplitPane splitPane)
Called when a split pane's locked flag has changed.void
orientationChanged(SplitPane splitPane)
Called when a split pane's orientation has changed.void
primaryRegionChanged(SplitPane splitPane)
Called when a split pane's primary region has changed.void
resizeModeChanged(SplitPane splitPane, SplitPane.ResizeMode previousResizeMode)
Called when a split pane's split location has changed.void
setSize(int width, int height)
Set the final size of the component after layout has finished.void
setSplitterHandlePrimaryColor(int splitterHandlePrimaryColor)
void
setSplitterHandlePrimaryColor(java.awt.Color splitterHandlePrimaryColor)
void
setSplitterHandlePrimaryColor(java.lang.String splitterHandlePrimaryColor)
void
setSplitterHandleSecondaryColor(int splitterHandleSecondaryColor)
void
setSplitterHandleSecondaryColor(java.awt.Color splitterHandleSecondaryColor)
void
setSplitterHandleSecondaryColor(java.lang.String splitterHandleSecondaryColor)
void
setSplitterThickness(int splitterThickness)
void
setUseShadow(boolean useShadow)
void
splitRatioChanged(SplitPane splitPane, float previousSplitLocation)
Called when a split pane's split location has changed.void
topLeftChanged(SplitPane splitPane, Component previousTopLeft)
Called when a split pane's top left component has changed.-
Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseDown, mouseMove, mouseUp, mouseWheel, paint, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint
-
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin
colorFromObject, colorFromObject, colorFromObject, colorFromObject, currentTheme, cursorChanged, decodeFont, defaultBackgroundColor, defaultForegroundColor, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, fontFromObject, getBaseline, getBaseline, getColor, getComponent, getFocusRectangleStroke, getHeight, getSize, getTextInputMethodListener, getThemeFont, getWidth, heightLimitsChanged, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setDefaultStyles, sizeChanged, themeHasThickFocusRectangle, themeHasTransitionEnabled, themeIsDark, themeIsFlat, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
setSize
-
-
-
-
Method Detail
-
install
public void install(Component component)
Description copied from class:ComponentSkin
Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.- Specified by:
install
in interfaceSkin
- Overrides:
install
in classContainerSkin
- Parameters:
component
- The component to which the skin is being attached.
-
setSize
public void setSize(int width, int height)
Description copied from class:ComponentSkin
Set the final size of the component after layout has finished.All subclasses must call this superclass method in order to set the
ComponentSkin.width
andComponentSkin.height
values, but may need to do additional calculations before doing so.- Specified by:
setSize
in interfaceConstrainedVisual
- Overrides:
setSize
in classComponentSkin
- Parameters:
width
- The new (final) width of the component after layout.height
- The new (final) height of the component after layout.
-
getPreferredWidth
public int getPreferredWidth(int height)
Description copied from interface:ConstrainedVisual
Returns the visual's preferred width given the provided height constraint.- Specified by:
getPreferredWidth
in interfaceConstrainedVisual
- Overrides:
getPreferredWidth
in classContainerSkin
- Parameters:
height
- The height by which to constrain the preferred width, or-1
for no constraint.- Returns:
- The preferred width given the height constraint.
-
getPreferredHeight
public int getPreferredHeight(int width)
Description copied from interface:ConstrainedVisual
Returns the visual's preferred height given the provided width constraint.- Specified by:
getPreferredHeight
in interfaceConstrainedVisual
- Overrides:
getPreferredHeight
in classContainerSkin
- Parameters:
width
- The width by which to constrain the preferred height, or-1
for no constraint.- Returns:
- The preferred height given the width constraint.
-
getPreferredSize
public Dimensions getPreferredSize()
Description copied from interface:ConstrainedVisual
Returns the visual's unconstrained preferred size.- Specified by:
getPreferredSize
in interfaceConstrainedVisual
- Overrides:
getPreferredSize
in classComponentSkin
- Returns:
- The preferred size (width and height) of this component.
Depending on the component this can be a static value or derived (as for a container) from its subcomponents, etc.
The default implementation simply calls
ConstrainedVisual.getPreferredWidth(int)
andConstrainedVisual.getPreferredHeight(int)
.
-
layout
public void layout()
Description copied from interface:Skin
If the component on which the skin is installed is a container, lays out the container's children.
-
getSplitterHandlePrimaryColor
public java.awt.Color getSplitterHandlePrimaryColor()
-
setSplitterHandlePrimaryColor
public void setSplitterHandlePrimaryColor(java.awt.Color splitterHandlePrimaryColor)
-
setSplitterHandlePrimaryColor
public final void setSplitterHandlePrimaryColor(java.lang.String splitterHandlePrimaryColor)
-
setSplitterHandlePrimaryColor
public final void setSplitterHandlePrimaryColor(int splitterHandlePrimaryColor)
-
getSplitterHandleSecondaryColor
public java.awt.Color getSplitterHandleSecondaryColor()
-
setSplitterHandleSecondaryColor
public void setSplitterHandleSecondaryColor(java.awt.Color splitterHandleSecondaryColor)
-
setSplitterHandleSecondaryColor
public final void setSplitterHandleSecondaryColor(java.lang.String splitterHandleSecondaryColor)
-
setSplitterHandleSecondaryColor
public final void setSplitterHandleSecondaryColor(int splitterHandleSecondaryColor)
-
getSplitterThickness
public int getSplitterThickness()
-
setSplitterThickness
public void setSplitterThickness(int splitterThickness)
-
getUseShadow
public boolean getUseShadow()
-
setUseShadow
public void setUseShadow(boolean useShadow)
-
topLeftChanged
public void topLeftChanged(SplitPane splitPane, Component previousTopLeft)
Description copied from interface:SplitPaneListener
Called when a split pane's top left component has changed.- Specified by:
topLeftChanged
in interfaceSplitPaneListener
- Parameters:
splitPane
- The source of the event.previousTopLeft
- The previous component. The new component can be found inside the splitPane.
-
bottomRightChanged
public void bottomRightChanged(SplitPane splitPane, Component previousBottomRight)
Description copied from interface:SplitPaneListener
Called when a split pane's bottom right component has changed.- Specified by:
bottomRightChanged
in interfaceSplitPaneListener
- Parameters:
splitPane
- The source of the event.previousBottomRight
- The previous component. The new component can be found inside the splitPane.
-
orientationChanged
public void orientationChanged(SplitPane splitPane)
Description copied from interface:SplitPaneListener
Called when a split pane's orientation has changed.- Specified by:
orientationChanged
in interfaceSplitPaneListener
- Parameters:
splitPane
- The source of the event.
-
primaryRegionChanged
public void primaryRegionChanged(SplitPane splitPane)
Description copied from interface:SplitPaneListener
Called when a split pane's primary region has changed.- Specified by:
primaryRegionChanged
in interfaceSplitPaneListener
- Parameters:
splitPane
- The source of the event.
-
splitRatioChanged
public void splitRatioChanged(SplitPane splitPane, float previousSplitLocation)
Description copied from interface:SplitPaneListener
Called when a split pane's split location has changed.- Specified by:
splitRatioChanged
in interfaceSplitPaneListener
- Parameters:
splitPane
- The source of the event.previousSplitLocation
- The previous setting of the splitRatio.
-
lockedChanged
public void lockedChanged(SplitPane splitPane)
Description copied from interface:SplitPaneListener
Called when a split pane's locked flag has changed.- Specified by:
lockedChanged
in interfaceSplitPaneListener
- Parameters:
splitPane
- The source of the event.
-
resizeModeChanged
public void resizeModeChanged(SplitPane splitPane, SplitPane.ResizeMode previousResizeMode)
Description copied from interface:SplitPaneListener
Called when a split pane's split location has changed.- Specified by:
resizeModeChanged
in interfaceSplitPaneListener
- Parameters:
splitPane
- The source of the event.previousResizeMode
- The previous setting of the resizeMode.
-
-