org.apache.pivot.wtk.skin.terra
Class TerraPanoramaSkin

java.lang.Object
  extended by org.apache.pivot.wtk.skin.ComponentSkin
      extended by org.apache.pivot.wtk.skin.ContainerSkin
          extended by org.apache.pivot.wtk.skin.terra.TerraPanoramaSkin
All Implemented Interfaces:
ComponentKeyListener, ComponentListener, ComponentMouseButtonListener, ComponentMouseListener, ComponentMouseWheelListener, ComponentStateListener, ComponentTooltipListener, ConstrainedVisual, ContainerListener, ContainerMouseListener, Skin, Viewport.Skin, ViewportListener, Visual

public class TerraPanoramaSkin
extends ContainerSkin
implements Viewport.Skin, ViewportListener

Panorama skin.


Nested Class Summary
protected  class TerraPanoramaSkin.EastButtonImage
          East button image.
protected  class TerraPanoramaSkin.NorthButtonImage
          North button image.
protected  class TerraPanoramaSkin.ScrollButton
           
protected  class TerraPanoramaSkin.ScrollButtonImage
          Abstract base class for button images.
 class TerraPanoramaSkin.ScrollButtonSkin
           
protected  class TerraPanoramaSkin.SouthButtonImage
          South button image.
protected  class TerraPanoramaSkin.WestButtonImage
          West button image.
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin
ContainerSkin.IndexFocusTraversalPolicy
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ViewportListener
ViewportListener.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
 
Constructor Summary
TerraPanoramaSkin()
           
 
Method Summary
 boolean getAlwaysShowScrollButtons()
           
 Color getButtonBackgroundColor()
           
 Color getButtonColor()
           
 int getButtonPadding()
           
protected  int getMaxScrollLeft()
           
protected  int getMaxScrollTop()
           
 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.
 Bounds getViewportBounds()
          The bounds of the Viewport within the container, for example, in ScrollPaneSkin, this excludes the scrollbars.
 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 mouseOut(Component component)
          Called when the mouse exits a component.
 void mouseOver(Component component)
          Called when the mouse enters a component.
 boolean mouseWheel(Component component, Mouse.ScrollType scrollType, int scrollAmount, int wheelRotation, int x, int y)
          Called when the mouse wheel is scrolled over a component.
 void scrollLeftChanged(Viewport panorama, int previousScrollLeft)
          Called when a viewport's scroll left has changed.
 void scrollTopChanged(Viewport panorama, int previousScrollTop)
          Called when a viewport's scroll top has changed.
 void setAlwaysShowScrollButtons(boolean alwaysShowScrollButtons)
           
 void setButtonBackgroundColor(Color buttonBackgroundColor)
           
 void setButtonBackgroundColor(int buttonBackgroundColor)
           
 void setButtonBackgroundColor(String buttonBackgroundColor)
           
 void setButtonColor(Color buttonColor)
           
 void setButtonColor(String buttonColor)
           
 void setButtonPadding(int buttonPadding)
           
 void setButtonPadding(Number padding)
           
protected  void updateScrollButtonVisibility()
           
 void viewChanged(Viewport panorama, Component previousView)
          Called when a viewport's view 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, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint
 
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, getBaseline, getBaseline, getComponent, getHeight, getWidth, heightLimitsChanged, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseMove, mouseUp, 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
 

Constructor Detail

TerraPanoramaSkin

public TerraPanoramaSkin()
Method Detail

install

public void install(Component component)
Description copied from interface: Skin
Associates a skin with a component.

Specified by:
install in interface Skin
Overrides:
install in class ContainerSkin
Parameters:
component - The component to which the skin is being attached.

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 interface ConstrainedVisual
Overrides:
getPreferredWidth in class ContainerSkin
Parameters:
height - The height by which to constrain the preferred width, or -1 for no 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 interface ConstrainedVisual
Overrides:
getPreferredHeight in class ContainerSkin
Parameters:
width - The width by which to constrain the preferred height, or -1 for no constraint.

getPreferredSize

public Dimensions getPreferredSize()
Description copied from interface: ConstrainedVisual
Returns the visual's unconstrained preferred size.

Specified by:
getPreferredSize in interface ConstrainedVisual
Overrides:
getPreferredSize in class ComponentSkin

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.

Specified by:
layout in interface Skin

getViewportBounds

public Bounds getViewportBounds()
Description copied from interface: Viewport.Skin
The bounds of the Viewport within the container, for example, in ScrollPaneSkin, this excludes the scrollbars.

Specified by:
getViewportBounds in interface Viewport.Skin

mouseWheel

public boolean mouseWheel(Component component,
                          Mouse.ScrollType scrollType,
                          int scrollAmount,
                          int wheelRotation,
                          int x,
                          int y)
Description copied from interface: ComponentMouseWheelListener
Called when the mouse wheel is scrolled over a component.

Specified by:
mouseWheel in interface ComponentMouseWheelListener
Overrides:
mouseWheel in class ComponentSkin
Returns:
true to consume the event; false to allow it to propagate.

getButtonColor

public Color getButtonColor()

setButtonColor

public void setButtonColor(Color buttonColor)

setButtonColor

public final void setButtonColor(String buttonColor)

getButtonBackgroundColor

public Color getButtonBackgroundColor()

setButtonBackgroundColor

public void setButtonBackgroundColor(Color buttonBackgroundColor)

setButtonBackgroundColor

public final void setButtonBackgroundColor(String buttonBackgroundColor)

setButtonBackgroundColor

public final void setButtonBackgroundColor(int buttonBackgroundColor)

getButtonPadding

public int getButtonPadding()

setButtonPadding

public void setButtonPadding(int buttonPadding)

setButtonPadding

public final void setButtonPadding(Number padding)

getAlwaysShowScrollButtons

public boolean getAlwaysShowScrollButtons()

setAlwaysShowScrollButtons

public void setAlwaysShowScrollButtons(boolean alwaysShowScrollButtons)

getMaxScrollTop

protected int getMaxScrollTop()

getMaxScrollLeft

protected int getMaxScrollLeft()

updateScrollButtonVisibility

protected void updateScrollButtonVisibility()

mouseOver

public void mouseOver(Component component)
Description copied from interface: ComponentMouseListener
Called when the mouse enters a component.

Specified by:
mouseOver in interface ComponentMouseListener
Overrides:
mouseOver in class ComponentSkin

mouseOut

public void mouseOut(Component component)
Description copied from interface: ComponentMouseListener
Called when the mouse exits a component.

Specified by:
mouseOut in interface ComponentMouseListener
Overrides:
mouseOut in class ComponentSkin

scrollTopChanged

public void scrollTopChanged(Viewport panorama,
                             int previousScrollTop)
Description copied from interface: ViewportListener
Called when a viewport's scroll top has changed.

Specified by:
scrollTopChanged in interface ViewportListener

scrollLeftChanged

public void scrollLeftChanged(Viewport panorama,
                              int previousScrollLeft)
Description copied from interface: ViewportListener
Called when a viewport's scroll left has changed.

Specified by:
scrollLeftChanged in interface ViewportListener

viewChanged

public void viewChanged(Viewport panorama,
                        Component previousView)
Description copied from interface: ViewportListener
Called when a viewport's view component has changed.

Specified by:
viewChanged in interface ViewportListener