Package org.apache.pivot.wtk
Interface Skin
-
- All Superinterfaces:
ConstrainedVisual
,Visual
- All Known Subinterfaces:
FileBrowser.Skin
,VFSBrowser.Skin
,Window.Skin
- All Known Implementing Classes:
ActivityIndicatorSkin
,BorderSkin
,BoxPaneSkin
,ButtonSkin
,CalendarButtonSkin
,CalendarSkin
,CardPaneSkin
,ChartViewSkin
,CheckboxSkin
,ColorChooserButtonSkin
,ColorChooserButtonSkin.ColorChooserPopupSkin
,ColorChooserSkin
,ComponentSkin
,ContainerSkin
,DisplaySkin
,ExpanderSkin
,FileBrowserSkin
,FillPaneSkin
,FlowPaneSkin
,GridPaneFillerSkin
,GridPaneSkin
,ImageViewSkin
,LabelSkin
,LinkButtonSkin
,ListButtonSkin
,MenuBarItemSkin
,MenuButtonSkin
,MenuItemSkin
,MovieViewSkin
,NumberRulerSkin
,PanelSkin
,PushButtonSkin
,RadioButtonSkin
,RollupSkin
,RulerSkin
,ScrollPaneSkin
,SeparatorSkin
,SliderSkin
,StackPaneSkin
,TablePaneFillerSkin
,TablePaneSkin
,TabPaneSkin
,TerraAccordionSkin
,TerraAccordionSkin.PanelHeaderSkin
,TerraActivityIndicatorSkin
,TerraAlertSkin
,TerraBorderSkin
,TerraCalendarButtonSkin
,TerraCalendarSkin
,TerraCalendarSkin.DateButtonSkin
,TerraCheckboxSkin
,TerraColorChooserButtonSkin
,TerraColorChooserSkin
,TerraDialogSkin
,TerraExpanderSkin
,TerraExpanderSkin.ShadeButtonSkin
,TerraFileBrowserSheetSkin
,TerraFileBrowserSkin
,TerraFormSkin
,TerraFrameSkin
,TerraFrameSkin.FrameButtonSkin
,TerraGaugeSkin
,TerraGridPaneSkin
,TerraLabelSkin
,TerraLinkButtonSkin
,TerraListButtonSkin
,TerraListViewSkin
,TerraMenuBarItemSkin
,TerraMenuBarSkin
,TerraMenuButtonSkin
,TerraMenuItemSkin
,TerraMenuPopupSkin
,TerraMenuSkin
,TerraMeterSkin
,TerraPaletteSkin
,TerraPanoramaSkin
,TerraPanoramaSkin.ScrollButtonSkin
,TerraPromptSkin
,TerraPushButtonSkin
,TerraRadioButtonSkin
,TerraRollupSkin
,TerraRollupSkin.RollupButtonSkin
,TerraScrollBarSkin
,TerraScrollBarSkin.HandleSkin
,TerraScrollBarSkin.ScrollButtonSkin
,TerraScrollPaneCornerSkin
,TerraScrollPaneSkin
,TerraSeparatorSkin
,TerraSheetSkin
,TerraSliderSkin
,TerraSliderSkin.ThumbSkin
,TerraSpinnerSkin
,TerraSpinnerSkin.SpinButtonSkin
,TerraSpinnerSkin.SpinnerContentSkin
,TerraSplitPaneSkin
,TerraSplitPaneSkin.SplitterShadowSkin
,TerraSplitPaneSkin.SplitterSkin
,TerraSuggestionPopupSkin
,TerraTablePaneSkin
,TerraTableViewHeaderSkin
,TerraTableViewSkin
,TerraTabPaneSkin
,TerraTabPaneSkin.TabButtonSkin
,TerraTextAreaSkin
,TerraTextInputSkin
,TerraTextPaneSkin
,TerraTooltipSkin
,TerraTreeViewSkin
,TerraVFSBrowserSheetSkin
,TerraVFSBrowserSkin
,TextAreaSkin
,TextPaneSkin
,VFSBrowserSkin
,WindowSkin
public interface Skin extends ConstrainedVisual
Interface defining a "skin". A skin is the graphical representation of a component. In MVC terminology, a skin represents the "view" of the "model" data provided by a component. Components delegate a number of methods to the skin, including all methods defined by theVisual
interface as well as style properties and layout. In conjunction with renderers (implementations of theRenderer
interface), skins define the overall look and feel of an application.Skins are primarily responsible for the following:
- Adding additional subcomponents, if a composite.
- Painting the component; if a container, this is effectively the background of the container, since a container cannot paint on top of its children.
- Layout of subcomponents or content.
Skins may (but are not required to) expose internal properties that affect the appearance of the component as "style properties", similar to CSS styles. For example, a component might provide styles to let a caller set the foreground color and font. Since callers are not allowed to interact with a component's skin directly, access to styles is via the component's styles collection, which delegates to the dictionary methods in the installed skin. Skins are responsible for invalidating or repainting the component as appropriate in response to events and style changes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Component
getComponent()
Returns the component with which a skin is associated.void
install(Component component)
Associates a skin with a component.boolean
isFocusable()
Returns the skin's focusable state.boolean
isOpaque()
Tells whether or not this skin is fully opaque when painted.void
layout()
If the component on which the skin is installed is a container, lays out the container's children.-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
getBaseline, getPreferredHeight, getPreferredSize, getPreferredWidth, setSize, setSize
-
-
-
-
Method Detail
-
install
void install(Component component)
Associates a skin with a component.- Parameters:
component
- The component to which the skin is being attached.
-
getComponent
Component getComponent()
Returns the component with which a skin is associated.- Returns:
- This skin's associated component.
-
layout
void layout()
If the component on which the skin is installed is a container, lays out the container's children.
-
isFocusable
boolean isFocusable()
Returns the skin's focusable state.- Returns:
true
if this skin is focusable;false
, otherwise.
-
isOpaque
boolean isOpaque()
Tells whether or not this skin is fully opaque when painted.- Returns:
true
if this skin is opaque;false
if any part of it is transparent or translucent.
-
-