public class TerraSheetSkin extends WindowSkin implements SheetStateListener
Modifier and Type | Class and Description |
---|---|
class |
TerraSheetSkin.OpenTransition |
protected class |
TerraSheetSkin.ResizeImage
Resize button image.
|
static class |
TerraSheetSkin.SheetPlacement |
WindowSkin.WindowFocusTraversalPolicy
ContainerSkin.IndexFocusTraversalPolicy
SheetStateListener.Adapter
WindowListener.Adapter
WindowStateListener.Adapter
ContainerListener.Adapter
ContainerMouseListener.Adapter
ComponentListener.Adapter
ComponentStateListener.Adapter
ComponentMouseListener.Adapter
ComponentMouseButtonListener.Adapter
ComponentKeyListener.Adapter
Constructor and Description |
---|
TerraSheetSkin() |
Modifier and Type | Method and Description |
---|---|
void |
alignToOwner() |
Color |
getBorderColor() |
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.
|
TerraSheetSkin.SheetPlacement |
getSlideSource() |
int |
getStateTransitionDuration() |
int |
getStateTransitionRate() |
void |
install(Component component)
Associates a skin with a component.
|
boolean |
isResizable() |
boolean |
keyPressed(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
ENTER Close the sheet with a 'result' of true. |
void |
layout()
If the component on which the skin is installed is a container, lays
out the container's children.
|
boolean |
mouseDown(Container container,
Mouse.Button button,
int x,
int y)
Called when the mouse is pressed over a container.
|
boolean |
mouseMove(Component component,
int x,
int y)
Called when the mouse is moved over a component.
|
boolean |
mouseUp(Component component,
Mouse.Button button,
int x,
int y)
Called when a mouse button is released over a component.
|
void |
paint(Graphics2D graphics)
Paints the visual.
|
Vote |
previewSheetClose(Sheet sheet,
boolean result)
Called to preview a sheet close event.
|
void |
setBackgroundColor(Color backgroundColor)
Sets the background of the container to a solid color.
|
void |
setBorderColor(Color borderColor) |
void |
setBorderColor(String borderColor) |
void |
setPadding(Dictionary<String,?> padding) |
void |
setPadding(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(Sheet sheet)
Called when a sheet has closed.
|
void |
sheetCloseVetoed(Sheet sheet,
Vote reason)
Called when a sheet close event has been vetoed.
|
void |
sizeChanged(Component component,
int previousWidth,
int previousHeight)
Called when a component's size has changed.
|
void |
windowClosed(Window window,
Display display,
Window owner)
Called when a window has closed.
|
void |
windowOpened(Window window)
Called when a window has opened.
|
activeChanged, contentChanged, getClientArea, iconAdded, iconInserted, iconsRemoved, maximizedChanged, previewWindowClose, previewWindowOpen, titleChanged, windowCloseVetoed, windowOpenVetoed
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseMove, mouseUp, mouseWheel, setBackgroundColor, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponent, isFocusable, isOpaque
getBaseline, setSize
getBaseline, getHeight, getWidth
public void install(Component component)
Skin
install
in interface Skin
install
in class WindowSkin
component
- The component to which the skin is being attached.public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth
in interface ConstrainedVisual
getPreferredWidth
in class WindowSkin
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 WindowSkin
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 WindowSkin
public void layout()
Skin
layout
in interface Skin
layout
in class WindowSkin
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 void sizeChanged(Component component, int previousWidth, int previousHeight)
ComponentListener
sizeChanged
in interface ComponentListener
sizeChanged
in class ComponentSkin
public boolean mouseMove(Component component, int x, int y)
ComponentMouseListener
mouseMove
in interface ComponentMouseListener
mouseMove
in class ComponentSkin
public boolean mouseDown(Container container, Mouse.Button button, int x, int y)
ContainerMouseListener
mouseDown
in interface ContainerMouseListener
mouseDown
in class WindowSkin
public boolean mouseUp(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseUp
in interface ComponentMouseButtonListener
mouseUp
in class ComponentSkin
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
keyPressed
in interface ComponentKeyListener
keyPressed
in class ComponentSkin
public void setBackgroundColor(Color backgroundColor)
ContainerSkin
setBackgroundColor
in class ContainerSkin
public Color getBorderColor()
public void setBorderColor(Color borderColor)
public final void setBorderColor(String borderColor)
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 boolean isResizable()
public void setResizable(boolean resizable)
public TerraSheetSkin.SheetPlacement getSlideSource()
public void setSlideSource(TerraSheetSkin.SheetPlacement slideSource)
public int getStateTransitionDuration()
public void setStateTransitionDuration(int stateTransitionDuration)
public int getStateTransitionRate()
public void setStateTransitionRate(int stateTransitionRate)
public void windowOpened(Window window)
WindowStateListener
windowOpened
in interface WindowStateListener
windowOpened
in class WindowSkin
public void windowClosed(Window window, Display display, Window owner)
WindowStateListener
windowClosed
in interface WindowStateListener
windowClosed
in class WindowSkin
public Vote previewSheetClose(Sheet sheet, boolean result)
SheetStateListener
previewSheetClose
in interface SheetStateListener
public void sheetCloseVetoed(Sheet sheet, Vote reason)
SheetStateListener
sheetCloseVetoed
in interface SheetStateListener
public void sheetClosed(Sheet sheet)
SheetCloseListener
sheetClosed
in interface SheetCloseListener
public void alignToOwner()