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

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.WindowSkin
              extended by org.apache.pivot.wtk.skin.terra.TerraSheetSkin
All Implemented Interfaces:
org.apache.pivot.wtk.ComponentKeyListener, org.apache.pivot.wtk.ComponentListener, org.apache.pivot.wtk.ComponentMouseButtonListener, org.apache.pivot.wtk.ComponentMouseListener, org.apache.pivot.wtk.ComponentMouseWheelListener, org.apache.pivot.wtk.ComponentStateListener, org.apache.pivot.wtk.ComponentTooltipListener, org.apache.pivot.wtk.ConstrainedVisual, org.apache.pivot.wtk.ContainerListener, org.apache.pivot.wtk.ContainerMouseListener, org.apache.pivot.wtk.SheetCloseListener, org.apache.pivot.wtk.SheetStateListener, org.apache.pivot.wtk.Skin, org.apache.pivot.wtk.Visual, org.apache.pivot.wtk.Window.Skin, org.apache.pivot.wtk.WindowListener, org.apache.pivot.wtk.WindowStateListener
Direct Known Subclasses:
TerraFileBrowserSheetSkin, TerraPromptSkin

public class TerraSheetSkin
extends org.apache.pivot.wtk.skin.WindowSkin
implements org.apache.pivot.wtk.SheetStateListener

Sheet skin class.


Nested Class Summary
 class TerraSheetSkin.OpenTransition
           
protected  class TerraSheetSkin.ResizeImage
          Resize button image.
static class TerraSheetSkin.SheetPlacement
           
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.WindowSkin
org.apache.pivot.wtk.skin.WindowSkin.WindowFocusTraversalPolicy
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin
org.apache.pivot.wtk.skin.ContainerSkin.IndexFocusTraversalPolicy
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.SheetStateListener
org.apache.pivot.wtk.SheetStateListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.WindowListener
org.apache.pivot.wtk.WindowListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.WindowStateListener
org.apache.pivot.wtk.WindowStateListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener
org.apache.pivot.wtk.ContainerListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener
org.apache.pivot.wtk.ContainerMouseListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener
org.apache.pivot.wtk.ComponentListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener
org.apache.pivot.wtk.ComponentStateListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener
org.apache.pivot.wtk.ComponentMouseListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener
org.apache.pivot.wtk.ComponentMouseButtonListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener
org.apache.pivot.wtk.ComponentKeyListener.Adapter
 
Constructor Summary
TerraSheetSkin()
           
 
Method Summary
 void alignToOwner()
           
 Color getBorderColor()
           
 org.apache.pivot.wtk.Insets getPadding()
           
 int getPreferredHeight(int width)
           
 org.apache.pivot.wtk.Dimensions getPreferredSize()
           
 int getPreferredWidth(int height)
           
 TerraSheetSkin.SheetPlacement getSlideSource()
           
 int getStateTransitionDuration()
           
 int getStateTransitionRate()
           
 void install(org.apache.pivot.wtk.Component component)
           
 boolean isResizable()
           
 boolean keyPressed(org.apache.pivot.wtk.Component component, int keyCode, org.apache.pivot.wtk.Keyboard.KeyLocation keyLocation)
          ENTER Close the sheet with a 'result' of true.
 void layout()
           
 boolean mouseDown(org.apache.pivot.wtk.Container container, org.apache.pivot.wtk.Mouse.Button button, int x, int y)
           
 boolean mouseMove(org.apache.pivot.wtk.Component component, int x, int y)
           
 boolean mouseUp(org.apache.pivot.wtk.Component component, org.apache.pivot.wtk.Mouse.Button button, int x, int y)
           
 void paint(Graphics2D graphics)
           
 org.apache.pivot.util.Vote previewSheetClose(org.apache.pivot.wtk.Sheet sheet, boolean result)
           
 void setBackgroundColor(Color backgroundColor)
           
 void setBorderColor(Color borderColor)
           
 void setBorderColor(String borderColor)
           
 void setPadding(org.apache.pivot.collections.Dictionary<String,?> padding)
           
 void setPadding(org.apache.pivot.wtk.Insets padding)
           
 void setPadding(int padding)
           
 void setPadding(Number padding)
           
 void setPadding(String padding)
           
 void setResizable(boolean resizable)
           
 void setSlideSource(TerraSheetSkin.SheetPlacement slideSource)
           
 void setStateTransitionDuration(int stateTransitionDuration)
           
 void setStateTransitionRate(int stateTransitionRate)
           
 void sheetClosed(org.apache.pivot.wtk.Sheet sheet)
           
 void sheetCloseVetoed(org.apache.pivot.wtk.Sheet sheet, org.apache.pivot.util.Vote reason)
           
 void sizeChanged(org.apache.pivot.wtk.Component component, int previousWidth, int previousHeight)
           
 void windowClosed(org.apache.pivot.wtk.Window window, org.apache.pivot.wtk.Display display, org.apache.pivot.wtk.Window owner)
           
 void windowOpened(org.apache.pivot.wtk.Window window)
           
 
Methods inherited from class org.apache.pivot.wtk.skin.WindowSkin
activeChanged, contentChanged, getClientArea, iconAdded, iconInserted, iconsRemoved, maximizedChanged, previewWindowClose, previewWindowOpen, titleChanged, windowCloseVetoed, windowOpenVetoed
 
Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseMove, mouseUp, mouseWheel, 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, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseOut, mouseOver, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, 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.Skin
getComponent, isFocusable, isOpaque
 
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, setSize
 
Methods inherited from interface org.apache.pivot.wtk.Visual
getBaseline, getHeight, getWidth
 

Constructor Detail

TerraSheetSkin

public TerraSheetSkin()
Method Detail

install

public void install(org.apache.pivot.wtk.Component component)
Specified by:
install in interface org.apache.pivot.wtk.Skin
Overrides:
install in class org.apache.pivot.wtk.skin.WindowSkin

getPreferredWidth

public int getPreferredWidth(int height)
Specified by:
getPreferredWidth in interface org.apache.pivot.wtk.ConstrainedVisual
Overrides:
getPreferredWidth in class org.apache.pivot.wtk.skin.WindowSkin

getPreferredHeight

public int getPreferredHeight(int width)
Specified by:
getPreferredHeight in interface org.apache.pivot.wtk.ConstrainedVisual
Overrides:
getPreferredHeight in class org.apache.pivot.wtk.skin.WindowSkin

getPreferredSize

public org.apache.pivot.wtk.Dimensions getPreferredSize()
Specified by:
getPreferredSize in interface org.apache.pivot.wtk.ConstrainedVisual
Overrides:
getPreferredSize in class org.apache.pivot.wtk.skin.WindowSkin

layout

public void layout()
Specified by:
layout in interface org.apache.pivot.wtk.Skin
Overrides:
layout in class org.apache.pivot.wtk.skin.WindowSkin

paint

public void paint(Graphics2D graphics)
Specified by:
paint in interface org.apache.pivot.wtk.Visual
Overrides:
paint in class org.apache.pivot.wtk.skin.ContainerSkin

sizeChanged

public void sizeChanged(org.apache.pivot.wtk.Component component,
                        int previousWidth,
                        int previousHeight)
Specified by:
sizeChanged in interface org.apache.pivot.wtk.ComponentListener
Overrides:
sizeChanged in class org.apache.pivot.wtk.skin.ComponentSkin

mouseMove

public boolean mouseMove(org.apache.pivot.wtk.Component component,
                         int x,
                         int y)
Specified by:
mouseMove in interface org.apache.pivot.wtk.ComponentMouseListener
Overrides:
mouseMove in class org.apache.pivot.wtk.skin.ComponentSkin

mouseDown

public boolean mouseDown(org.apache.pivot.wtk.Container container,
                         org.apache.pivot.wtk.Mouse.Button button,
                         int x,
                         int y)
Specified by:
mouseDown in interface org.apache.pivot.wtk.ContainerMouseListener
Overrides:
mouseDown in class org.apache.pivot.wtk.skin.WindowSkin

mouseUp

public boolean mouseUp(org.apache.pivot.wtk.Component component,
                       org.apache.pivot.wtk.Mouse.Button button,
                       int x,
                       int y)
Specified by:
mouseUp in interface org.apache.pivot.wtk.ComponentMouseButtonListener
Overrides:
mouseUp in class org.apache.pivot.wtk.skin.ComponentSkin

keyPressed

public boolean keyPressed(org.apache.pivot.wtk.Component component,
                          int keyCode,
                          org.apache.pivot.wtk.Keyboard.KeyLocation keyLocation)
ENTER Close the sheet with a 'result' of true.
ESCAPE Close the sheet with a 'result' of false.

Specified by:
keyPressed in interface org.apache.pivot.wtk.ComponentKeyListener
Overrides:
keyPressed in class org.apache.pivot.wtk.skin.ComponentSkin

setBackgroundColor

public void setBackgroundColor(Color backgroundColor)
Overrides:
setBackgroundColor in class org.apache.pivot.wtk.skin.ContainerSkin

getBorderColor

public Color getBorderColor()

setBorderColor

public void setBorderColor(Color borderColor)

setBorderColor

public final void setBorderColor(String borderColor)

getPadding

public org.apache.pivot.wtk.Insets getPadding()

setPadding

public void setPadding(org.apache.pivot.wtk.Insets padding)

setPadding

public final void setPadding(org.apache.pivot.collections.Dictionary<String,?> padding)

setPadding

public final void setPadding(int padding)

setPadding

public final void setPadding(Number padding)

setPadding

public final void setPadding(String padding)

isResizable

public boolean isResizable()

setResizable

public void setResizable(boolean resizable)

getSlideSource

public TerraSheetSkin.SheetPlacement getSlideSource()

setSlideSource

public void setSlideSource(TerraSheetSkin.SheetPlacement slideSource)

getStateTransitionDuration

public int getStateTransitionDuration()

setStateTransitionDuration

public void setStateTransitionDuration(int stateTransitionDuration)

getStateTransitionRate

public int getStateTransitionRate()

setStateTransitionRate

public void setStateTransitionRate(int stateTransitionRate)

windowOpened

public void windowOpened(org.apache.pivot.wtk.Window window)
Specified by:
windowOpened in interface org.apache.pivot.wtk.WindowStateListener
Overrides:
windowOpened in class org.apache.pivot.wtk.skin.WindowSkin

windowClosed

public void windowClosed(org.apache.pivot.wtk.Window window,
                         org.apache.pivot.wtk.Display display,
                         org.apache.pivot.wtk.Window owner)
Specified by:
windowClosed in interface org.apache.pivot.wtk.WindowStateListener
Overrides:
windowClosed in class org.apache.pivot.wtk.skin.WindowSkin

previewSheetClose

public org.apache.pivot.util.Vote previewSheetClose(org.apache.pivot.wtk.Sheet sheet,
                                                    boolean result)
Specified by:
previewSheetClose in interface org.apache.pivot.wtk.SheetStateListener

sheetCloseVetoed

public void sheetCloseVetoed(org.apache.pivot.wtk.Sheet sheet,
                             org.apache.pivot.util.Vote reason)
Specified by:
sheetCloseVetoed in interface org.apache.pivot.wtk.SheetStateListener

sheetClosed

public void sheetClosed(org.apache.pivot.wtk.Sheet sheet)
Specified by:
sheetClosed in interface org.apache.pivot.wtk.SheetCloseListener

alignToOwner

public void alignToOwner()