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 classTerraSplitPaneSkin.SplitterSplit pane splitter component.protected classTerraSplitPaneSkin.SplitterShadowSplit pane splitter shadow component.protected classTerraSplitPaneSkin.SplitterShadowSkinSplit pane splitter shadow component skin.protected classTerraSplitPaneSkin.SplitterSkinSplit 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 voidbottomRightChanged(SplitPane splitPane, Component previousBottomRight)Called when a split pane's bottom right component has changed.intgetPreferredHeight(int width)Returns the visual's preferred height given the provided width constraint.DimensionsgetPreferredSize()Returns the visual's unconstrained preferred size.intgetPreferredWidth(int height)Returns the visual's preferred width given the provided height constraint.java.awt.ColorgetSplitterHandlePrimaryColor()java.awt.ColorgetSplitterHandleSecondaryColor()intgetSplitterThickness()booleangetUseShadow()voidinstall(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.voidlayout()If the component on which the skin is installed is a container, lays out the container's children.voidlockedChanged(SplitPane splitPane)Called when a split pane's locked flag has changed.voidorientationChanged(SplitPane splitPane)Called when a split pane's orientation has changed.voidprimaryRegionChanged(SplitPane splitPane)Called when a split pane's primary region has changed.voidresizeModeChanged(SplitPane splitPane, SplitPane.ResizeMode previousResizeMode)Called when a split pane's split location has changed.voidsetSize(int width, int height)Set the final size of the component after layout has finished.voidsetSplitterHandlePrimaryColor(int splitterHandlePrimaryColor)voidsetSplitterHandlePrimaryColor(java.awt.Color splitterHandlePrimaryColor)voidsetSplitterHandlePrimaryColor(java.lang.String splitterHandlePrimaryColor)voidsetSplitterHandleSecondaryColor(int splitterHandleSecondaryColor)voidsetSplitterHandleSecondaryColor(java.awt.Color splitterHandleSecondaryColor)voidsetSplitterHandleSecondaryColor(java.lang.String splitterHandleSecondaryColor)voidsetSplitterThickness(int splitterThickness)voidsetUseShadow(boolean useShadow)voidsplitRatioChanged(SplitPane splitPane, float previousSplitLocation)Called when a split pane's split location has changed.voidtopLeftChanged(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:ComponentSkinMust 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:
installin interfaceSkin- Overrides:
installin classContainerSkin- Parameters:
component- The component to which the skin is being attached.
-
setSize
public void setSize(int width, int height)Description copied from class:ComponentSkinSet the final size of the component after layout has finished.All subclasses must call this superclass method in order to set the
ComponentSkin.widthandComponentSkin.heightvalues, but may need to do additional calculations before doing so.- Specified by:
setSizein interfaceConstrainedVisual- Overrides:
setSizein 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:ConstrainedVisualReturns the visual's preferred width given the provided height constraint.- Specified by:
getPreferredWidthin interfaceConstrainedVisual- Overrides:
getPreferredWidthin classContainerSkin- Parameters:
height- The height by which to constrain the preferred width, or-1for no constraint.- Returns:
- The preferred width given the height constraint.
-
getPreferredHeight
public int getPreferredHeight(int width)
Description copied from interface:ConstrainedVisualReturns the visual's preferred height given the provided width constraint.- Specified by:
getPreferredHeightin interfaceConstrainedVisual- Overrides:
getPreferredHeightin classContainerSkin- Parameters:
width- The width by which to constrain the preferred height, or-1for no constraint.- Returns:
- The preferred height given the width constraint.
-
getPreferredSize
public Dimensions getPreferredSize()
Description copied from interface:ConstrainedVisualReturns the visual's unconstrained preferred size.- Specified by:
getPreferredSizein interfaceConstrainedVisual- Overrides:
getPreferredSizein 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:SkinIf 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:SplitPaneListenerCalled when a split pane's top left component has changed.- Specified by:
topLeftChangedin 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:SplitPaneListenerCalled when a split pane's bottom right component has changed.- Specified by:
bottomRightChangedin 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:SplitPaneListenerCalled when a split pane's orientation has changed.- Specified by:
orientationChangedin interfaceSplitPaneListener- Parameters:
splitPane- The source of the event.
-
primaryRegionChanged
public void primaryRegionChanged(SplitPane splitPane)
Description copied from interface:SplitPaneListenerCalled when a split pane's primary region has changed.- Specified by:
primaryRegionChangedin interfaceSplitPaneListener- Parameters:
splitPane- The source of the event.
-
splitRatioChanged
public void splitRatioChanged(SplitPane splitPane, float previousSplitLocation)
Description copied from interface:SplitPaneListenerCalled when a split pane's split location has changed.- Specified by:
splitRatioChangedin 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:SplitPaneListenerCalled when a split pane's locked flag has changed.- Specified by:
lockedChangedin interfaceSplitPaneListener- Parameters:
splitPane- The source of the event.
-
resizeModeChanged
public void resizeModeChanged(SplitPane splitPane, SplitPane.ResizeMode previousResizeMode)
Description copied from interface:SplitPaneListenerCalled when a split pane's split location has changed.- Specified by:
resizeModeChangedin interfaceSplitPaneListener- Parameters:
splitPane- The source of the event.previousResizeMode- The previous setting of the resizeMode.
-
-