Package org.apache.pivot.wtk.skin.terra
Class TerraPromptSkin
- java.lang.Object
-
- org.apache.pivot.wtk.skin.ComponentSkin
-
- org.apache.pivot.wtk.skin.ContainerSkin
-
- org.apache.pivot.wtk.skin.WindowSkin
-
- org.apache.pivot.wtk.skin.terra.TerraSheetSkin
-
- org.apache.pivot.wtk.skin.terra.TerraPromptSkin
-
- All Implemented Interfaces:
ComponentKeyListener,ComponentListener,ComponentMouseButtonListener,ComponentMouseListener,ComponentMouseWheelListener,ComponentStateListener,ComponentTooltipListener,ConstrainedVisual,ContainerListener,ContainerMouseListener,PromptListener,SheetCloseListener,SheetStateListener,Skin,Visual,Window.Skin,WindowListener,WindowStateListener
public class TerraPromptSkin extends TerraSheetSkin implements PromptListener
Prompt skin.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.terra.TerraSheetSkin
TerraSheetSkin.OpenTransition, TerraSheetSkin.ResizeImage, TerraSheetSkin.SheetPlacement
-
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.PromptListener
PromptListener.Adapter, PromptListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.SheetStateListener
SheetStateListener.Adapter, SheetStateListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.WindowListener
WindowListener.Adapter, WindowListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.WindowStateListener
WindowStateListener.Adapter, WindowStateListener.Listeners
-
-
Constructor Summary
Constructors Constructor Description TerraPromptSkin()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbodyChanged(Prompt prompt, Component previousBody)Called when a prompt's body has changed.java.awt.ColorgetMessageBackgroundColor()java.awt.ColorgetMessageColor()java.awt.FontgetMessageFont()TextDecorationgetMessageTextDecoration()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.voidmessageChanged(Prompt prompt, java.lang.String previousMessage)Called when a prompt's message has changed.voidmessageTypeChanged(Prompt prompt, MessageType previousMessageType)Called when a prompt's message type has changed.voidoptionInserted(Prompt prompt, int index)Called when an option has been inserted into a prompt's option sequence.voidoptionsRemoved(Prompt prompt, int index, Sequence<?> removed)Called when options have been removed from a prompt's option sequence.VotepreviewWindowOpen(Window window)Called to preview a window open event.voidselectedOptionChanged(Prompt prompt, int previousSelectedOption)Called when a prompt's selected option has changed.voidsetMessageBackgroundColor(java.lang.Object backgroundColor)Sets the background color of the message label.voidsetMessageColor(java.lang.Object color)Sets the foreground color of the text of the message label.voidsetMessageFont(java.lang.Object font)Sets the font used to render the message label's text.voidsetMessageTextDecoration(TextDecoration textDecoration)Set the text decoration for the message label.voidsheetClosed(Sheet sheet)Called when the sheet has closed.voidwindowOpened(Window window)Called when a window has opened.-
Methods inherited from class org.apache.pivot.wtk.skin.terra.TerraSheetSkin
alignToOwner, getBorderColor, getPadding, getPreferredHeight, getPreferredSize, getPreferredWidth, getSlideSource, getStateTransitionDuration, getStateTransitionRate, isResizable, keyPressed, layout, mouseDown, mouseMove, mouseUp, paint, previewSheetClose, setBackgroundColor, setBorderColor, setBorderColor, setPadding, setPadding, setPadding, setPadding, setPadding, setPadding, setResizable, setSlideSource, setStateTransitionDuration, setStateTransitionRate, sheetCloseVetoed, sizeChanged, windowClosed
-
Methods inherited from class org.apache.pivot.wtk.skin.WindowSkin
contentChanged, getClientArea
-
Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseMove, mouseUp, mouseWheel, 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, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseOut, mouseOver, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setDefaultStyles, setSize, 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
getBaseline, setSize, setSize
-
Methods inherited from interface org.apache.pivot.wtk.Skin
getComponent, isFocusable, isOpaque
-
Methods inherited from interface org.apache.pivot.wtk.Visual
getBaseline, getHeight, getSize, getWidth
-
Methods inherited from interface org.apache.pivot.wtk.WindowListener
activeChanged, iconAdded, iconInserted, iconsRemoved, maximizedChanged, titleChanged
-
Methods inherited from interface org.apache.pivot.wtk.WindowStateListener
previewWindowClose, windowCloseVetoed, windowOpenVetoed
-
-
-
-
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 classTerraSheetSkin- Parameters:
component- The component to which the skin is being attached.
-
windowOpened
public void windowOpened(Window window)
Description copied from interface:WindowStateListenerCalled when a window has opened.- Specified by:
windowOpenedin interfaceWindowStateListener- Overrides:
windowOpenedin classTerraSheetSkin- Parameters:
window- The newly opened window.
-
messageTypeChanged
public void messageTypeChanged(Prompt prompt, MessageType previousMessageType)
Description copied from interface:PromptListenerCalled when a prompt's message type has changed.- Specified by:
messageTypeChangedin interfacePromptListener- Parameters:
prompt- The prompt object that has been changed.previousMessageType- The message type before the change.
-
messageChanged
public void messageChanged(Prompt prompt, java.lang.String previousMessage)
Description copied from interface:PromptListenerCalled when a prompt's message has changed.- Specified by:
messageChangedin interfacePromptListener- Parameters:
prompt- The prompt whose message has changed.previousMessage- What the message used to be.
-
bodyChanged
public void bodyChanged(Prompt prompt, Component previousBody)
Description copied from interface:PromptListenerCalled when a prompt's body has changed.- Specified by:
bodyChangedin interfacePromptListener- Parameters:
prompt- The prompt that has changed.previousBody- What the body of this prompt used to be.
-
optionInserted
public void optionInserted(Prompt prompt, int index)
Description copied from interface:PromptListenerCalled when an option has been inserted into a prompt's option sequence.- Specified by:
optionInsertedin interfacePromptListener- Parameters:
prompt- The prompt whose options have changed.index- The location where the new option was inserted.
-
optionsRemoved
public void optionsRemoved(Prompt prompt, int index, Sequence<?> removed)
Description copied from interface:PromptListenerCalled when options have been removed from a prompt's option sequence.- Specified by:
optionsRemovedin interfacePromptListener- Parameters:
prompt- The prompt whose options have changed.index- The starting location of the removed options.removed- The actual sequence of options removed.
-
selectedOptionChanged
public void selectedOptionChanged(Prompt prompt, int previousSelectedOption)
Description copied from interface:PromptListenerCalled when a prompt's selected option has changed.- Specified by:
selectedOptionChangedin interfacePromptListener- Parameters:
prompt- The prompt that changed.previousSelectedOption- The option that used to be the selected one.
-
previewWindowOpen
public Vote previewWindowOpen(Window window)
Description copied from interface:WindowStateListenerCalled to preview a window open event.- Specified by:
previewWindowOpenin interfaceWindowStateListener- Parameters:
window- The window that wants to open.- Returns:
- The vote from the listener as to whether to allow the open.
-
sheetClosed
public void sheetClosed(Sheet sheet)
Description copied from interface:SheetStateListenerCalled when the sheet has closed.- Specified by:
sheetClosedin interfaceSheetCloseListener- Specified by:
sheetClosedin interfaceSheetStateListener- Overrides:
sheetClosedin classTerraSheetSkin- Parameters:
sheet- The sheet that has been closed.
-
getMessageFont
public final java.awt.Font getMessageFont()
- Returns:
- The font used to render the message label's text.
-
setMessageFont
public final void setMessageFont(java.lang.Object font)
Sets the font used to render the message label's text.- Parameters:
font- The new font used to render the message label text.
-
getMessageColor
public final java.awt.Color getMessageColor()
- Returns:
- The foreground color of the text of the message label.
-
setMessageColor
public final void setMessageColor(java.lang.Object color)
Sets the foreground color of the text of the message label.- Parameters:
color- The new foreground color for the label text.
-
getMessageBackgroundColor
public final java.awt.Color getMessageBackgroundColor()
- Returns:
- The background color of the message label.
-
setMessageBackgroundColor
public final void setMessageBackgroundColor(java.lang.Object backgroundColor)
Sets the background color of the message label.- Parameters:
backgroundColor- The new background color for the message label (can benullto let the parent background show through).
-
getMessageTextDecoration
public final TextDecoration getMessageTextDecoration()
- Returns:
- The text decoration of the message label.
-
setMessageTextDecoration
public final void setMessageTextDecoration(TextDecoration textDecoration)
Set the text decoration for the message label.- Parameters:
textDecoration- The text decoration for the message label.
-
-