Reference for JVM version of SpaceVIL  0.3.5.8
SpaceVIL (Space of Visual Items Layout) is a cross-platform and multilingual framework for creating GUI client applications for .NET Standard, .NET Core and JVM. SpaceVIL is based on OpenGL graphic technology and GLFW. Using this framework in conjunction with .Net Core or with a JVM, you can work and create graphical client applications on Linux, Mac OS X and Windows.
com.spvessel.spacevil.Decorations.Style Class Reference

Style is a class that describes the appearance of an element. More...

Inherits Cloneable.

Public Member Functions

 Style ()
 Constructs a default Style. More...
 
void setStyle (InterfaceBaseItem... items)
 Setting this style for all items in sequence. More...
 
void setSize (int width, int height)
 Setting size of an item's shape. More...
 
void setMinSize (int width, int height)
 Setting minimum size of an item's shape (shape can not be smaller than specified width and height). More...
 
void setMaxSize (int width, int height)
 Setting maximim size of an item's shape (shape can not be bigger than specified width and height). More...
 
void setSizePolicy (SizePolicy widthPolicy, SizePolicy heightPolicy)
 Setting the size policy of an item's shape. More...
 
void setBackground (int r, int g, int b)
 Setting background color of an item's shape in byte RGB format. More...
 
void setBackground (int r, int g, int b, int a)
 Setting background color of an item's shape in byte RGBA format. More...
 
void setBackground (float r, float g, float b)
 Setting background color of an item's shape in float RGB format. More...
 
void setBackground (float r, float g, float b, float a)
 Setting background color of an item's shape in float RGBA format. More...
 
void setForeground (int r, int g, int b)
 Setting text color of an item in byte RGB format. More...
 
void setForeground (int r, int g, int b, int a)
 Setting text color of an item in byte RGBA format. More...
 
void setForeground (float r, float g, float b)
 Setting text color of an item in float RGB format. More...
 
void setForeground (float r, float g, float b, float a)
 Setting text color of an item in float RGBA format. More...
 
void setPadding (Indents padding)
 Setting indents of an item to offset its children. More...
 
void setPadding (int left, int top, int right, int bottom)
 Setting indents of an item to offset its children. More...
 
void setMargin (Indents margin)
 Setting indents of an item to offset itself relative to its container. More...
 
void setMargin (int left, int top, int right, int bottom)
 Setting indents of an item to offset itself relative to its container. More...
 
void setSpacing (Spacing spacing)
 Setting indents between children of a container type item. More...
 
void setSpacing (int horizontal, int vertical)
 Setting indents between children of a container type item. More...
 
void setBorder (Border border)
 Setting border of an item's shape. More...
 
void setBorder (Color fill, CornerRadius radius, int thickness)
 Setting border for an item's shape. More...
 
void setShadow (Shadow shadow)
 Setting shadow for an item's shape. More...
 
void setAlignment (ItemAlignment... alignment)
 Setting an Alignment of an item's shape relative to its container. More...
 
void setTextAlignment (ItemAlignment... alignment)
 Alignment of an item's text. More...
 
void addInnerShape (InterfaceBaseItem shape)
 Add inner primitives to the object (as decorations only). More...
 
void addInnerStyle (String keyName, Style style)
 Assigning a style for an item's child by key name. More...
 
Style getInnerStyle (String keyName)
 Getting a child’s style by key name. More...
 
void removeInnerStyle (String keyName)
 Removing a child's style by its key name. More...
 
void addItemState (ItemStateType type, ItemState state)
 Adding visual state for an item. More...
 
ItemState getState (ItemStateType type)
 Getting visual state of an item by type. More...
 
Map< ItemStateType, ItemStategetAllStates ()
 Getting all presented in the current style visual states of an item. More...
 
void removeItemState (ItemStateType type)
 Removing visual state of an item by type. More...
 
Style clone ()
 Cloning the current style and returning a new deep copy of Style. More...
 

Static Public Member Functions

static Style getDefaultCommonStyle ()
 Getting a default common style. More...
 
static Style getButtonCoreStyle ()
 Getting default style for a ButtonCore item. More...
 
static Style getButtonToggleStyle ()
 Getting default style for a ButtonToggle item. More...
 
static Style getCheckBoxStyle ()
 Getting default style for a CheckBox item. More...
 
static Style getIndicatorStyle ()
 Getting default style for a Indicator item. More...
 
static Style getTextLineStyle ()
 Getting default style for a text type item. More...
 
static Style getComboBoxStyle ()
 Getting default style for a ComboBox item. More...
 
static Style getComboBoxDropDownStyle ()
 Getting default style for a ComboBoxDropDown item. More...
 
static Style getMenuItemStyle ()
 Getting default style for a MenuItem item. More...
 
static Style getContextMenuStyle ()
 Getting default style for a ContextMenu item. More...
 
static Style getFreeAreaStyle ()
 Getting default style for a FreeArea item. More...
 
static Style getFrameStyle ()
 Getting default style for a Frame item. More...
 
static Style getGridStyle ()
 Getting default style for a Grid item. More...
 
static Style getHorizontalScrollBarStyle ()
 Getting default style for a HorizontalScrollBar item. More...
 
static Style getSimpleHorizontalScrollBarStyle ()
 Getting simplified style for a SimpleHorizontalScrollBar item. More...
 
static Style getVerticalScrollBarStyle ()
 Getting default style for a VerticalScrollBar item. More...
 
static Style getSimpleVerticalScrollBarStyle ()
 Getting simplified style for a SimpleVerticalScrollBar item. More...
 
static Style getHorizontalSliderStyle ()
 Getting default style for a HorizontalSlider item. More...
 
static Style getVerticalSliderStyle ()
 Getting default style for a VerticalSlider item. More...
 
static Style getHorizontalStackStyle ()
 Getting default style for a HorizontalStack item. More...
 
static Style getVerticalStackStyle ()
 Getting default style for a VerticalStack item. More...
 
static Style getHorizontalSplitAreaStyle ()
 Getting default style for a HorizontalSplitArea item. More...
 
static Style getVerticalSplitAreaStyle ()
 Getting default style for a VerticalSplitArea item. More...
 
static Style getLabelStyle ()
 Getting default style for a Label item. More...
 
static Style getListAreaStyle ()
 Getting default style for a ListArea item. More...
 
static Style getListBoxStyle ()
 Getting default style for a ListBox item. More...
 
static Style getWContainerStyle ()
 Note: not supported in current version. More...
 
static Style getRadioButtonStyle ()
 Getting default style for a RadioButton item. More...
 
static Style getPasswordLineStyle ()
 Getting default style for a PasswordLine item. More...
 
static Style getTextEditStyle ()
 Getting default style for a TextEdit item. More...
 
static Style getTextBlockStyle ()
 Getting default style for a sealed TextBlock item. More...
 
static Style getTextAreaStyle ()
 Getting default style for a TextArea item. More...
 
static Style getTextViewStyle ()
 Getting default style for a TextView item. More...
 
static Style getPopUpMessageStyle ()
 Getting default style for a PopUpMessage item. More...
 
static Style getProgressBarStyle ()
 Getting default style for a ProgressBar item. More...
 
static Style getToolTipStyle ()
 Getting default style for a ToolTip item. More...
 
static Style getTitleBarStyle ()
 Getting default style for a TitleBar item. More...
 
static Style getTreeViewStyle ()
 Getting default style for a TreeView item. More...
 
static Style getTreeItemStyle ()
 Getting default style for a TreeItem item. More...
 
static Style getSpinItemStyle ()
 Getting default style for a SpinItem item. More...
 
static Style getDialogItemStyle ()
 Getting default style for a DialogItem item. More...
 
static Style getMessageItemStyle ()
 Getting default style for a MessageItem item. More...
 
static Style getWindowContainerStyle ()
 Getting default style for a window itself. More...
 
static Style getFileSystemEntryStyle ()
 Getting default style for a FileSystemEntry item. More...
 
static Style getOpenEntryDialogStyle ()
 Getting default style for a OpenEntryDialog item. More...
 
static Style getInputDialogStyle ()
 Getting default style for a InputDialog item. More...
 
static Style getSelectionItemStyle ()
 Getting default style for a SelectionItem item. More...
 
static Style getWrapAreaStyle ()
 Getting default style for a WrapArea item. More...
 
static Style getWrapGridStyle ()
 Getting default style for a WrapGrid item. More...
 
static Style getSideAreaStyle ()
 Getting default style for a SideArea item. More...
 
static Style getImageItemStyle ()
 Getting default style for a ImageItem item. More...
 
static Style getLoadingScreenStyle ()
 Getting default style for a LoadingScreen item. More...
 
static Style getTabStyle ()
 Getting default style for a Tab item. More...
 
static Style getTabBarStyle ()
 Getting default style for a TabBar item. More...
 
static Style getTabViewStyle ()
 Getting default style for a *** item. More...
 

Public Attributes

Color background
 Background color of an item's shape. More...
 
Color foreground
 Color of an item's text. More...
 
Font font = null
 Font of an item's text. More...
 
SizePolicy widthPolicy
 Width policy of an item's shape. More...
 
SizePolicy heightPolicy
 Height policy of an item's shape. More...
 
int width
 Width of an item's shape. More...
 
int minWidth
 Minimum width of an item's shape (shape cannot be smaller this value). More...
 
int maxWidth
 Maximum width of an item's shape (shape cannot be bigger this value). More...
 
int height
 Height of an item's shape. More...
 
int minHeight
 Minimum height of an item's shape (shape cannot be smaller this value). More...
 
int maxHeight
 Maximum height of an item's shape (shape cannot be bigget this value). More...
 
List< ItemAlignmentalignment
 Alignment of an item's shape relative to its container. More...
 
List< ItemAlignmenttextAlignment
 Alignment of an item's text. More...
 
int x
 X axis position of left-top cornet of an item's shape. More...
 
int y
 Y axis position of left-top cornet of an item's shape. More...
 
Indents padding = new Indents()
 Indents of an item to offset its children. More...
 
Spacing spacing = new Spacing()
 Indents between children of a container type item. More...
 
Indents margin = new Indents()
 Indents of an item to offset itself relative to its container. More...
 
CornerRadius borderRadius = new CornerRadius()
 Radiuses to round the rectangular shape of the item. More...
 
int borderThickness = 0
 Thickness of an item's border. More...
 
Color borderFill = new Color(0, 0, 0, 0)
 Color of an item's border. More...
 
List< float[]> shape
 A form of an item's shape. More...
 
boolean isFixedShape = false
 A flag that determines if the shape of an item can be changed or not. More...
 
List< InterfaceBaseIteminnerShapes
 A storage of shapes for future use. More...
 
int shadowRadius
 Blur radius of a shadow. More...
 
int shadowXOffset
 X shift of a shadow. More...
 
int shadowYOffset
 Y shift of a shadow. More...
 
boolean isShadowDrop = false
 Drop shadow flag. More...
 
Color shadowColor
 Color of a shadow. More...
 
boolean isVisible
 A flag that determines if an item is visible or not. More...
 

Detailed Description

Style is a class that describes the appearance of an element.

Can contains Styles for inner items.

Constructor & Destructor Documentation

◆ Style()

com.spvessel.spacevil.Decorations.Style.Style ( )

Constructs a default Style.

Member Function Documentation

◆ addInnerShape()

void com.spvessel.spacevil.Decorations.Style.addInnerShape ( InterfaceBaseItem  shape)

Add inner primitives to the object (as decorations only).

Note: not supported in the current version!

Parameters
shapeShape as com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ addInnerStyle()

void com.spvessel.spacevil.Decorations.Style.addInnerStyle ( String  keyName,
Style  style 
)

Assigning a style for an item's child by key name.

Parameters
keyNameKey name of a child.
styleStyle as com.spvessel.spacevil.Decorations.Style.

◆ addItemState()

void com.spvessel.spacevil.Decorations.Style.addItemState ( ItemStateType  type,
ItemState  state 
)

Adding visual state for an item.

Type can be BASE, HOVERED, PRESSED, TOGGLED, FOCUSED, DISABLED.

Parameters
typeType as com.spvessel.spacevil.Flags.ItemStateType.
stateVisual state as com.spvessel.spacevil.Decorations.ItemState.

◆ clone()

Style com.spvessel.spacevil.Decorations.Style.clone ( )

Cloning the current style and returning a new deep copy of Style.

Returns
Deep copy of current style as com.spvessel.spacevil.Decorations.Style.

◆ getAllStates()

Map<ItemStateType, ItemState> com.spvessel.spacevil.Decorations.Style.getAllStates ( )

Getting all presented in the current style visual states of an item.

Returns
Map of an ItemStateTypes and its ItemStates.

◆ getButtonCoreStyle()

static Style com.spvessel.spacevil.Decorations.Style.getButtonCoreStyle ( )
static

Getting default style for a ButtonCore item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getButtonToggleStyle()

static Style com.spvessel.spacevil.Decorations.Style.getButtonToggleStyle ( )
static

Getting default style for a ButtonToggle item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getCheckBoxStyle()

static Style com.spvessel.spacevil.Decorations.Style.getCheckBoxStyle ( )
static

Getting default style for a CheckBox item.

Properly filled in all the necessary properties.

Inner styles: "indicator", "text".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getComboBoxDropDownStyle()

static Style com.spvessel.spacevil.Decorations.Style.getComboBoxDropDownStyle ( )
static

Getting default style for a ComboBoxDropDown item.

Properly filled in all the necessary properties.

Inner styles: "itemlist".

Inner styles for "itemlist": "vscrollbar", "hscrollbar", "menu".

This is part of ComboBox item style.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getComboBoxStyle()

static Style com.spvessel.spacevil.Decorations.Style.getComboBoxStyle ( )
static

Getting default style for a ComboBox item.

Properly filled in all the necessary properties.

Inner styles: "selection", "dropdownbutton", "dropdownarea", "arrow".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getContextMenuStyle()

static Style com.spvessel.spacevil.Decorations.Style.getContextMenuStyle ( )
static

Getting default style for a ContextMenu item.

Properly filled in all the necessary properties.

Inner styles: "itemlist".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getDefaultCommonStyle()

static Style com.spvessel.spacevil.Decorations.Style.getDefaultCommonStyle ( )
static

Getting a default common style.

Properly filled in all the necessary properties.

Use this method to create instance of Style class instead of using pure constructor (new Style()).

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getDialogItemStyle()

static Style com.spvessel.spacevil.Decorations.Style.getDialogItemStyle ( )
static

Getting default style for a DialogItem item.

Properly filled in all the necessary properties.

Inner styles: "window".

This is part of OpenEntryDialog item style.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getFileSystemEntryStyle()

static Style com.spvessel.spacevil.Decorations.Style.getFileSystemEntryStyle ( )
static

Getting default style for a FileSystemEntry item.

Properly filled in all the necessary properties.

Inner styles: "icon", "text".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getFrameStyle()

static Style com.spvessel.spacevil.Decorations.Style.getFrameStyle ( )
static

Getting default style for a Frame item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getFreeAreaStyle()

static Style com.spvessel.spacevil.Decorations.Style.getFreeAreaStyle ( )
static

Getting default style for a FreeArea item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getGridStyle()

static Style com.spvessel.spacevil.Decorations.Style.getGridStyle ( )
static

Getting default style for a Grid item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getHorizontalScrollBarStyle()

static Style com.spvessel.spacevil.Decorations.Style.getHorizontalScrollBarStyle ( )
static

Getting default style for a HorizontalScrollBar item.

Properly filled in all the necessary properties.

Inner styles: "uparrow", "downarrow", "slider".

Inner styles for "slider": "track", "handler".

This is part of many items style.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getHorizontalSliderStyle()

static Style com.spvessel.spacevil.Decorations.Style.getHorizontalSliderStyle ( )
static

Getting default style for a HorizontalSlider item.

Properly filled in all the necessary properties.

Inner styles: "track", "handler".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getHorizontalSplitAreaStyle()

static Style com.spvessel.spacevil.Decorations.Style.getHorizontalSplitAreaStyle ( )
static

Getting default style for a HorizontalSplitArea item.

Properly filled in all the necessary properties.

Inner styles: "splitholder".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getHorizontalStackStyle()

static Style com.spvessel.spacevil.Decorations.Style.getHorizontalStackStyle ( )
static

Getting default style for a HorizontalStack item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getImageItemStyle()

static Style com.spvessel.spacevil.Decorations.Style.getImageItemStyle ( )
static

Getting default style for a ImageItem item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getIndicatorStyle()

static Style com.spvessel.spacevil.Decorations.Style.getIndicatorStyle ( )
static

Getting default style for a Indicator item.

Properly filled in all the necessary properties.

Inner styles: "marker".

This is part of CheckBox item style.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getInnerStyle()

Style com.spvessel.spacevil.Decorations.Style.getInnerStyle ( String  keyName)

Getting a child’s style by key name.

Parameters
keyNameKey name of a child.
Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getInputDialogStyle()

static Style com.spvessel.spacevil.Decorations.Style.getInputDialogStyle ( )
static

Getting default style for a InputDialog item.

Properly filled in all the necessary properties.

Inner styles: "window", "button", "textedit", "layout", "toolbar".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getLabelStyle()

static Style com.spvessel.spacevil.Decorations.Style.getLabelStyle ( )
static

Getting default style for a Label item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getListAreaStyle()

static Style com.spvessel.spacevil.Decorations.Style.getListAreaStyle ( )
static

Getting default style for a ListArea item.

Properly filled in all the necessary properties.

Inner styles: "selection".

This is part of many items style.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getListBoxStyle()

static Style com.spvessel.spacevil.Decorations.Style.getListBoxStyle ( )
static

Getting default style for a ListBox item.

Properly filled in all the necessary properties.

Inner styles: "area", "vscrollbar", "hscrollbar", "menu".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getLoadingScreenStyle()

static Style com.spvessel.spacevil.Decorations.Style.getLoadingScreenStyle ( )
static

Getting default style for a LoadingScreen item.

Properly filled in all the necessary properties.

Inner styles: "text", "image".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getMenuItemStyle()

static Style com.spvessel.spacevil.Decorations.Style.getMenuItemStyle ( )
static

Getting default style for a MenuItem item.

Properly filled in all the necessary properties.

Inner styles: "text", "arrow".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getMessageItemStyle()

static Style com.spvessel.spacevil.Decorations.Style.getMessageItemStyle ( )
static

Getting default style for a MessageItem item.

Properly filled in all the necessary properties.

Inner styles: "window", "button", "toolbar", "userbar", "message", "layout".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getOpenEntryDialogStyle()

static Style com.spvessel.spacevil.Decorations.Style.getOpenEntryDialogStyle ( )
static

Getting default style for a OpenEntryDialog item.

Properly filled in all the necessary properties.

Inner styles: "window", "layout", "toolbar", "toolbarbutton", "addressline", "filenameline", "list", "controlpanel", "okbutton", "cancelbutton", "filter", "filtertext", "divider".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getPasswordLineStyle()

static Style com.spvessel.spacevil.Decorations.Style.getPasswordLineStyle ( )
static

Getting default style for a PasswordLine item.

Properly filled in all the necessary properties.

Inner styles: "showmarker", "textedit".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getPopUpMessageStyle()

static Style com.spvessel.spacevil.Decorations.Style.getPopUpMessageStyle ( )
static

Getting default style for a PopUpMessage item.

Properly filled in all the necessary properties.

Inner styles: "closebutton".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getProgressBarStyle()

static Style com.spvessel.spacevil.Decorations.Style.getProgressBarStyle ( )
static

Getting default style for a ProgressBar item.

Properly filled in all the necessary properties.

Inner styles: "progressbar".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getRadioButtonStyle()

static Style com.spvessel.spacevil.Decorations.Style.getRadioButtonStyle ( )
static

Getting default style for a RadioButton item.

Properly filled in all the necessary properties.

Inner styles: "indicator", "text".

Inner styles of "indicator": "marker".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getSelectionItemStyle()

static Style com.spvessel.spacevil.Decorations.Style.getSelectionItemStyle ( )
static

Getting default style for a SelectionItem item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getSideAreaStyle()

static Style com.spvessel.spacevil.Decorations.Style.getSideAreaStyle ( )
static

Getting default style for a SideArea item.

Properly filled in all the necessary properties.

Inner styles: "window", "closebutton".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getSimpleHorizontalScrollBarStyle()

static Style com.spvessel.spacevil.Decorations.Style.getSimpleHorizontalScrollBarStyle ( )
static

Getting simplified style for a SimpleHorizontalScrollBar item.

Properly filled in all the necessary properties.

Inner styles: "uparrow", "downarrow", "slider".

Inner styles for "slider": "track", "handler".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getSimpleVerticalScrollBarStyle()

static Style com.spvessel.spacevil.Decorations.Style.getSimpleVerticalScrollBarStyle ( )
static

Getting simplified style for a SimpleVerticalScrollBar item.

Properly filled in all the necessary properties.

Inner styles: "uparrow", "downarrow", "slider".

Inner styles for "slider": "track", "handler".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getSpinItemStyle()

static Style com.spvessel.spacevil.Decorations.Style.getSpinItemStyle ( )
static

Getting default style for a SpinItem item.

Properly filled in all the necessary properties.

Inner styles: "uparrow", "downarrow", "buttonsarea", "textedit".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getState()

ItemState com.spvessel.spacevil.Decorations.Style.getState ( ItemStateType  type)

Getting visual state of an item by type.

Type can be BASE, HOVERED, PRESSED, TOGGLED, FOCUSED, DISABLED.

Parameters
typeType as com.spvessel.spacevil.Flags.ItemStateType.
Returns
Visual state as com.spvessel.spacevil.Decorations.ItemState.

◆ getTabBarStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTabBarStyle ( )
static

Getting default style for a TabBar item.

Properly filled in all the necessary properties.

This is part of TabView item style.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTabStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTabStyle ( )
static

Getting default style for a Tab item.

Properly filled in all the necessary properties.

Inner styles: "text", "closebutton", "view".

This is part of TabView item style as "tab".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTabViewStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTabViewStyle ( )
static

Getting default style for a *** item.

Properly filled in all the necessary properties.

Inner styles: "tabbar", "tab", "viewarea".

Inner styles for "tab": see Style.GetTabStyle().

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTextAreaStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTextAreaStyle ( )
static

Getting default style for a TextArea item.

Properly filled in all the necessary properties.

Inner styles: "textedit", "vscrollbar", "hscrollbar", "menu".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTextBlockStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTextBlockStyle ( )
static

Getting default style for a sealed TextBlock item.

Properly filled in all the necessary properties.

Inner styles: "cursor", "selection".

This is part of TextArea item style as "textedit".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTextEditStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTextEditStyle ( )
static

Getting default style for a TextEdit item.

Properly filled in all the necessary properties.

Inner styles: "text".

Inner styles for "text": "cursor", "selection", "substrate".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTextLineStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTextLineStyle ( )
static

Getting default style for a text type item.

Attention: not all the necessary properties properly filled.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTextViewStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTextViewStyle ( )
static

Getting default style for a TextView item.

Properly filled in all the necessary properties.

Inner styles: "selection".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTitleBarStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTitleBarStyle ( )
static

Getting default style for a TitleBar item.

Properly filled in all the necessary properties.

Inner styles: "closebutton", "minimizebutton", "maximizebutton", "title".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getToolTipStyle()

static Style com.spvessel.spacevil.Decorations.Style.getToolTipStyle ( )
static

Getting default style for a ToolTip item.

Properly filled in all the necessary properties.

Inner styles: "text".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTreeItemStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTreeItemStyle ( )
static

Getting default style for a TreeItem item.

Properly filled in all the necessary properties.

Inner styles: "indicator", "branchicon", "leaficon".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getTreeViewStyle()

static Style com.spvessel.spacevil.Decorations.Style.getTreeViewStyle ( )
static

Getting default style for a TreeView item.

Properly filled in all the necessary properties.

Inner styles: "area", "vscrollbar", "hscrollbar", "menu".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getVerticalScrollBarStyle()

static Style com.spvessel.spacevil.Decorations.Style.getVerticalScrollBarStyle ( )
static

Getting default style for a VerticalScrollBar item.

Properly filled in all the necessary properties.

Inner styles: "uparrow", "downarrow", "slider".

Inner styles for "slider": "track", "handler".

This is part of many items style.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getVerticalSliderStyle()

static Style com.spvessel.spacevil.Decorations.Style.getVerticalSliderStyle ( )
static

Getting default style for a VerticalSlider item.

Properly filled in all the necessary properties.

Inner styles: "track", "handler".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getVerticalSplitAreaStyle()

static Style com.spvessel.spacevil.Decorations.Style.getVerticalSplitAreaStyle ( )
static

Getting default style for a VerticalSplitArea item.

Properly filled in all the necessary properties.

Inner styles: "splitholder".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getVerticalStackStyle()

static Style com.spvessel.spacevil.Decorations.Style.getVerticalStackStyle ( )
static

Getting default style for a VerticalStack item.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getWContainerStyle()

static Style com.spvessel.spacevil.Decorations.Style.getWContainerStyle ( )
static

Note: not supported in current version.

Returns
default style for WContainer objects.

◆ getWindowContainerStyle()

static Style com.spvessel.spacevil.Decorations.Style.getWindowContainerStyle ( )
static

Getting default style for a window itself.

Properly filled in all the necessary properties.

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getWrapAreaStyle()

static Style com.spvessel.spacevil.Decorations.Style.getWrapAreaStyle ( )
static

Getting default style for a WrapArea item.

Properly filled in all the necessary properties.

Inner styles: "selection".

This is part of WrapGrid item style as "area".

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ getWrapGridStyle()

static Style com.spvessel.spacevil.Decorations.Style.getWrapGridStyle ( )
static

Getting default style for a WrapGrid item.

Properly filled in all the necessary properties.

Inner styles: "area", "vscrollbar", "hscrollbar".

Inner styles for "area": see Style.getWrapAreaStyle().

Returns
Style as com.spvessel.spacevil.Decorations.Style.

◆ removeInnerStyle()

void com.spvessel.spacevil.Decorations.Style.removeInnerStyle ( String  keyName)

Removing a child's style by its key name.

Parameters
keyNameKey name of a child.

◆ removeItemState()

void com.spvessel.spacevil.Decorations.Style.removeItemState ( ItemStateType  type)

Removing visual state of an item by type.

Type can be BASE, HOVERED, PRESSED, TOGGLED, FOCUSED, DISABLED.

Parameters
typeType as com.spvessel.spacevil.Flags.ItemStateType.

◆ setAlignment()

void com.spvessel.spacevil.Decorations.Style.setAlignment ( ItemAlignment...  alignment)

Setting an Alignment of an item's shape relative to its container.

Combines with alignment by vertically (TOP, VCENTER, BOTTOM) and horizontally (LEFT, HCENTER, RIGHT). Attention: this property is required.

Parameters
alignmentAlignment as com.spvessel.spacevil.Flags.ItemAlignment.

◆ setBackground() [1/4]

void com.spvessel.spacevil.Decorations.Style.setBackground ( float  r,
float  g,
float  b 
)

Setting background color of an item's shape in float RGB format.

Parameters
rRed color component. Range: (0.0f - 1.0f)
gGreen color component. Range: (0.0f - 1.0f)
bBlue color component. Range: (0.0f - 1.0f)

◆ setBackground() [2/4]

void com.spvessel.spacevil.Decorations.Style.setBackground ( float  r,
float  g,
float  b,
float  a 
)

Setting background color of an item's shape in float RGBA format.

Parameters
rRed color component. Range: (0.0f - 1.0f)
gGreen color component. Range: (0.0f - 1.0f)
bBlue color component. Range: (0.0f - 1.0f)
aAlpha color component. Range: (0.0f - 1.0f)

◆ setBackground() [3/4]

void com.spvessel.spacevil.Decorations.Style.setBackground ( int  r,
int  g,
int  b 
)

Setting background color of an item's shape in byte RGB format.

Parameters
rRed color component. Range: (0 - 255)
gGreen color component. Range: (0 - 255)
bBlue color component. Range: (0 - 255)

◆ setBackground() [4/4]

void com.spvessel.spacevil.Decorations.Style.setBackground ( int  r,
int  g,
int  b,
int  a 
)

Setting background color of an item's shape in byte RGBA format.

Parameters
rRed color component. Range: (0 - 255)
gGreen color component. Range: (0 - 255)
bBlue color component. Range: (0 - 255)
aAlpha color component. Range: (0 - 255)

◆ setBorder() [1/2]

void com.spvessel.spacevil.Decorations.Style.setBorder ( Border  border)

Setting border of an item's shape.

Border consist of corner radiuses, thickness and color.

Parameters
borderBorder as com.spvessel.spacevil.Decorations.Border.

◆ setBorder() [2/2]

void com.spvessel.spacevil.Decorations.Style.setBorder ( Color  fill,
CornerRadius  radius,
int  thickness 
)

Setting border for an item's shape.

Border consist of corner radiuses, thickness and color.

Parameters
fillBorder color as java.awt.Color.
radiusRadiuses of an border corners as com.spvessel.spacevil.Decorations.CornerRadius.
thicknessBorder thickness.

◆ setForeground() [1/4]

void com.spvessel.spacevil.Decorations.Style.setForeground ( float  r,
float  g,
float  b 
)

Setting text color of an item in float RGB format.

Parameters
rRed color component. Range: (0.0f - 1.0f)
gGreen color component. Range: (0.0f - 1.0f)
bBlue color component. Range: (0.0f - 1.0f)

◆ setForeground() [2/4]

void com.spvessel.spacevil.Decorations.Style.setForeground ( float  r,
float  g,
float  b,
float  a 
)

Setting text color of an item in float RGBA format.

Parameters
rRed color component. Range: (0.0f - 1.0f)
gGreen color component. Range: (0.0f - 1.0f)
bBlue color component. Range: (0.0f - 1.0f)
aAlpha color component. Range: (0.0f - 1.0f)

◆ setForeground() [3/4]

void com.spvessel.spacevil.Decorations.Style.setForeground ( int  r,
int  g,
int  b 
)

Setting text color of an item in byte RGB format.

Parameters
rRed color component. Range: (0 - 255)
gGreen color component. Range: (0 - 255)
bBlue color component. Range: (0 - 255)

◆ setForeground() [4/4]

void com.spvessel.spacevil.Decorations.Style.setForeground ( int  r,
int  g,
int  b,
int  a 
)

Setting text color of an item in byte RGBA format.

Parameters
rRed color component. Range: (0 - 255)
gGreen color component. Range: (0 - 255)
bBlue color component. Range: (0 - 255)
aAlpha color component. Range: (0 - 255)

◆ setMargin() [1/2]

void com.spvessel.spacevil.Decorations.Style.setMargin ( Indents  margin)

Setting indents of an item to offset itself relative to its container.

Parameters
marginIndents as com.spvessel.spacevil.Decorations.Indents.

◆ setMargin() [2/2]

void com.spvessel.spacevil.Decorations.Style.setMargin ( int  left,
int  top,
int  right,
int  bottom 
)

Setting indents of an item to offset itself relative to its container.

Parameters
leftIndent on the left.
topIndent on the top.
rightIndent on the right.
bottomIndent on the bottom.

◆ setMaxSize()

void com.spvessel.spacevil.Decorations.Style.setMaxSize ( int  width,
int  height 
)

Setting maximim size of an item's shape (shape can not be bigger than specified width and height).

Parameters
widthMaximim width of a shape.
heightMaximim height of a shape.

◆ setMinSize()

void com.spvessel.spacevil.Decorations.Style.setMinSize ( int  width,
int  height 
)

Setting minimum size of an item's shape (shape can not be smaller than specified width and height).

Parameters
widthMinimum width of a shape.
heightMinimum height of a shape.

◆ setPadding() [1/2]

void com.spvessel.spacevil.Decorations.Style.setPadding ( Indents  padding)

Setting indents of an item to offset its children.

Parameters
paddingPadding indents as com.spvessel.spacevil.Decorations.Indents.

◆ setPadding() [2/2]

void com.spvessel.spacevil.Decorations.Style.setPadding ( int  left,
int  top,
int  right,
int  bottom 
)

Setting indents of an item to offset its children.

Parameters
leftIndent on the left.
topIndent on the top.
rightIndent on the right.
bottomIndent on the bottom.

◆ setShadow()

void com.spvessel.spacevil.Decorations.Style.setShadow ( Shadow  shadow)

Setting shadow for an item's shape.

Parameters
shadowShadow as com.spvessel.spacevil.Decorations.Shadow.

◆ setSize()

void com.spvessel.spacevil.Decorations.Style.setSize ( int  width,
int  height 
)

Setting size of an item's shape.

Parameters
widthWidth of a shape.
heightHeight of a shape.

◆ setSizePolicy()

void com.spvessel.spacevil.Decorations.Style.setSizePolicy ( SizePolicy  widthPolicy,
SizePolicy  heightPolicy 
)

Setting the size policy of an item's shape.

Can be FIXED (shape not changes its size) or EXPAND (shape is stretched to all available space).

Parameters
widthPolicyWidth policy of an item's shape.
heightPolicyHeight policy of an item's shape.

◆ setSpacing() [1/2]

void com.spvessel.spacevil.Decorations.Style.setSpacing ( int  horizontal,
int  vertical 
)

Setting indents between children of a container type item.

Parameters
horizontalHorizontal indent.
verticalVertical indent.

◆ setSpacing() [2/2]

void com.spvessel.spacevil.Decorations.Style.setSpacing ( Spacing  spacing)

Setting indents between children of a container type item.

Parameters
spacingSpacing as com.spvessel.spacevil.Decorations.Spacing.

◆ setStyle()

void com.spvessel.spacevil.Decorations.Style.setStyle ( InterfaceBaseItem...  items)

Setting this style for all items in sequence.

Parameters
itemsA sequence of items that are com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setTextAlignment()

void com.spvessel.spacevil.Decorations.Style.setTextAlignment ( ItemAlignment...  alignment)

Alignment of an item's text.

Combines with alignment by vertically (TOP, VCENTER, BOTTOM) and horizontally (LEFT, HCENTER, RIGHT). Can be used only if the item contains text and in this case this property is required.

Parameters
alignmentText alignment as com.spvessel.spacevil.Flags.ItemAlignment.

Member Data Documentation

◆ alignment

List<ItemAlignment> com.spvessel.spacevil.Decorations.Style.alignment

Alignment of an item's shape relative to its container.

Combines with alignment by vertically (TOP, VCENTER, BOTTOM) and horizontally (LEFT, HCENTER, RIGHT). Attention: this property is required.

This property is com.spvessel.spacevil.Flags.ItemAlignment.

◆ background

Color com.spvessel.spacevil.Decorations.Style.background

Background color of an item's shape.

Attention: this property is required.

This property is java.awt.Color.

◆ borderFill

Color com.spvessel.spacevil.Decorations.Style.borderFill = new Color(0, 0, 0, 0)

Color of an item's border.

This property is java.awt.Color.

◆ borderRadius

CornerRadius com.spvessel.spacevil.Decorations.Style.borderRadius = new CornerRadius()

Radiuses to round the rectangular shape of the item.

◆ borderThickness

int com.spvessel.spacevil.Decorations.Style.borderThickness = 0

Thickness of an item's border.

Default: 0.

◆ font

Font com.spvessel.spacevil.Decorations.Style.font = null

Font of an item's text.

Can be used only if the item contains text and in this case this property is required.

This property is java.awt.Font

◆ foreground

Color com.spvessel.spacevil.Decorations.Style.foreground

Color of an item's text.

Can be used only if the item contains text and in this case this property is required.

This property is java.awt.Color.

◆ height

int com.spvessel.spacevil.Decorations.Style.height

Height of an item's shape.

◆ heightPolicy

SizePolicy com.spvessel.spacevil.Decorations.Style.heightPolicy

Height policy of an item's shape.

Can be Fixed (shape not changes its size) or Expand (shape is stretched to all available space). Attention: this property is required.

This property is com.spvessel.spacevil.Flags.SizePolicy.

◆ innerShapes

List<InterfaceBaseItem> com.spvessel.spacevil.Decorations.Style.innerShapes

A storage of shapes for future use.

Note: not supported in the current version!

Format: java.util.List<com.spvessel.spacevil.Core.InterfaceBaseItem>.

◆ isFixedShape

boolean com.spvessel.spacevil.Decorations.Style.isFixedShape = false

A flag that determines if the shape of an item can be changed or not.

True: if shape can not be resized. False: if shape can be resised. Default: False.

◆ isShadowDrop

boolean com.spvessel.spacevil.Decorations.Style.isShadowDrop = false

Drop shadow flag.

True: allow shadow dropping. False: not allow shadow dropping.

Default: False.

◆ isVisible

boolean com.spvessel.spacevil.Decorations.Style.isVisible

A flag that determines if an item is visible or not.

True: if visible. False: if not visible. Default: True.

◆ margin

Indents com.spvessel.spacevil.Decorations.Style.margin = new Indents()

Indents of an item to offset itself relative to its container.

Attention: this property is required.

This property is com.spvessel.spacevil.Decorations.Indents.

◆ maxHeight

int com.spvessel.spacevil.Decorations.Style.maxHeight

Maximum height of an item's shape (shape cannot be bigget this value).

Default: 32767.

◆ maxWidth

int com.spvessel.spacevil.Decorations.Style.maxWidth

Maximum width of an item's shape (shape cannot be bigger this value).

Default: 32767.

◆ minHeight

int com.spvessel.spacevil.Decorations.Style.minHeight

Minimum height of an item's shape (shape cannot be smaller this value).

Default: 0.

◆ minWidth

int com.spvessel.spacevil.Decorations.Style.minWidth

Minimum width of an item's shape (shape cannot be smaller this value).

Default: 0.

◆ padding

Indents com.spvessel.spacevil.Decorations.Style.padding = new Indents()

Indents of an item to offset its children.

Attention: this property is required.

This property is com.spvessel.spacevil.Decorations.Indents.

◆ shadowColor

Color com.spvessel.spacevil.Decorations.Style.shadowColor

Color of a shadow.

This property is java.awt.Color.

◆ shadowRadius

int com.spvessel.spacevil.Decorations.Style.shadowRadius

Blur radius of a shadow.

Min value: 0. Max value: 10. Default: 0.

◆ shadowXOffset

int com.spvessel.spacevil.Decorations.Style.shadowXOffset

X shift of a shadow.

◆ shadowYOffset

int com.spvessel.spacevil.Decorations.Style.shadowYOffset

Y shift of a shadow.

◆ shape

List<float[]> com.spvessel.spacevil.Decorations.Style.shape

A form of an item's shape.

If not assigned, the shape is rectangular.

Format: java.util.List<float[]>.

◆ spacing

Spacing com.spvessel.spacevil.Decorations.Style.spacing = new Spacing()

Indents between children of a container type item.

It is used mainly in containers.

This property is com.spvessel.spacevil.Decorations.Spacing.

◆ textAlignment

List<ItemAlignment> com.spvessel.spacevil.Decorations.Style.textAlignment

Alignment of an item's text.

Combines with alignment by vertically (TOP, VCENTER, BOTTOM) and horizontally (LEFT, HCENTER, RIGHT). Can be used only if the item contains text and in this case this property is required.

This property is com.spvessel.spacevil.Flags.ItemAlignment.

◆ width

int com.spvessel.spacevil.Decorations.Style.width

Width of an item's shape.

◆ widthPolicy

SizePolicy com.spvessel.spacevil.Decorations.Style.widthPolicy

Width policy of an item's shape.

Can be Fixed (shape not changes its size) or Expand (shape is stretched to all available space). Attention: this property is required.

This property is com.spvessel.spacevil.Flags.SizePolicy.

◆ x

int com.spvessel.spacevil.Decorations.Style.x

X axis position of left-top cornet of an item's shape.

This property itself is mostly ignored. Used only when creating container-type items or with com.spvessel.spacevil.FreeArea.

◆ y

int com.spvessel.spacevil.Decorations.Style.y

Y axis position of left-top cornet of an item's shape.

This property itself is mostly ignored. Used only when creating container-type items or with com.spvessel.spacevil.FreeArea.


The documentation for this class was generated from the following file: