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.Prototype Class Referenceabstract

The Prototype is an abstract implementation of InterfaceBaseItem for complex interactive items. More...

Inherits com.spvessel.spacevil.Core.InterfaceBaseItem.

Inherited by com.spvessel.spacevil.BlankItem, com.spvessel.spacevil.ButtonCore, com.spvessel.spacevil.ButtonToggle, com.spvessel.spacevil.CheckBox, com.spvessel.spacevil.ComboBox, com.spvessel.spacevil.ComboBoxDropDown, com.spvessel.spacevil.ContextMenu, com.spvessel.spacevil.DialogItem, com.spvessel.spacevil.FileSystemEntry, com.spvessel.spacevil.FloatItem, com.spvessel.spacevil.Frame, com.spvessel.spacevil.FreeArea, com.spvessel.spacevil.Graph, com.spvessel.spacevil.Grid, com.spvessel.spacevil.HorizontalSlider, com.spvessel.spacevil.HorizontalSplitArea, com.spvessel.spacevil.HorizontalStack, com.spvessel.spacevil.ImageItem, com.spvessel.spacevil.Indicator, com.spvessel.spacevil.Label, com.spvessel.spacevil.ListArea, com.spvessel.spacevil.ListBox, com.spvessel.spacevil.LoadingScreen, com.spvessel.spacevil.MenuItem, com.spvessel.spacevil.PopUpMessage, com.spvessel.spacevil.ProgressBar, com.spvessel.spacevil.RadioButton, com.spvessel.spacevil.ResizableItem, com.spvessel.spacevil.ScrollHandler, com.spvessel.spacevil.SelectionItem, com.spvessel.spacevil.SideArea, com.spvessel.spacevil.SpinItem, com.spvessel.spacevil.SplitHolder, com.spvessel.spacevil.Tab, com.spvessel.spacevil.TextArea, com.spvessel.spacevil.TextEdit, com.spvessel.spacevil.TextView, com.spvessel.spacevil.ToolTipItem, com.spvessel.spacevil.TreeItem, com.spvessel.spacevil.VerticalSlider, com.spvessel.spacevil.VerticalSplitArea, com.spvessel.spacevil.VerticalStack, com.spvessel.spacevil.WindowAnchor, com.spvessel.spacevil.WrapArea, and com.spvessel.spacevil.WrapGrid.

Public Member Functions

 Prototype ()
 Default constructor of Prototype class. More...
 
void release ()
 Method to describe disposing item's resources if the item was removed. More...
 
void setHandler (CoreWindow handler)
 Setting the window to which the item will belong. More...
 
CoreWindow getHandler ()
 Getting the window to which the item belongs. More...
 
String getToolTip ()
 Getting tooltip text of the item. More...
 
void setToolTip (String text)
 Setting tooltip text of the item. More...
 
Prototype getParent ()
 Getting the parent of the item. More...
 
void setParent (Prototype parent)
 Setting the parent of the item. More...
 
Spacing getSpacing ()
 Getting indents between children of a container type item. 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...
 
Indents getPadding ()
 Getting indents of an item for offset its children. 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...
 
Indents getMargin ()
 Getting the indents of an item to offset itself relative to its container. More...
 
void setMargin (Indents margin)
 Setting the indents of an item to offset itself relative to its container. More...
 
void setMargin (int left, int top, int right, int bottom)
 Setting the indents of an item to offset itself relative to its container. More...
 
void setBorder (Border border)
 Setting border of an item's shape. More...
 
void setBorderFill (Color fill)
 Setting the border color of an item's shape. More...
 
Color getBorderFill ()
 Getting the border color oa an item's shape. More...
 
void setBorderFill (int r, int g, int b)
 Setting the border color of an item's shape in byte RGB format. More...
 
void setBorderFill (int r, int g, int b, int a)
 Setting the border color of an item's shape in byte RGB format. More...
 
void setBorderFill (float r, float g, float b)
 Setting the border color of an item's shape in float RGB format. More...
 
void setBorderFill (float r, float g, float b, float a)
 Setting the border color of an item's shape in float RGBA format. More...
 
void setBorderRadius (CornerRadius radius)
 Setting radius of the border's corners. More...
 
void setBorderRadius (int radius)
 Setting border radius with the same values for each corner of the rectangle object. More...
 
CornerRadius getBorderRadius ()
 Getting border radiuses. More...
 
void setBorderThickness (int thickness)
 Setting border thickness of an item's shape. More...
 
int getBorderThickness ()
 Getting border thickness of an item's shape. More...
 
void initElements ()
 Initializing children and their attributes. More...
 
List< float[]> getTriangles ()
 Getting triangles of item's shape. More...
 
void setTriangles (List< float[]> triangles)
 Setting triangles as item's shape. More...
 
void makeShape ()
 Making default item's shape. More...
 
void setBackground (Color color)
 Setting background color 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 in byte RGBA format. More...
 
void setBackground (float r, float g, float b)
 Setting background color of an item in float RGB format. More...
 
void setBackground (float r, float g, float b, float a)
 Setting background color of an item in float RGBA format. More...
 
Color getBackground ()
 Getting background color of an item. More...
 
void setItemName (String name)
 Setting the name of the item. More...
 
String getItemName ()
 Getting the name of the item. More...
 
void setMinWidth (int width)
 Setting the minimum width limit. More...
 
int getMinWidth ()
 Getting the minimum width limit. More...
 
void setWidth (int width)
 Setting item width. More...
 
int getWidth ()
 Getting item width. More...
 
void setMaxWidth (int width)
 Setting the maximum width limit. More...
 
int getMaxWidth ()
 Getting the maximum width limit. More...
 
void setMinHeight (int height)
 Setting the minimum height limit. More...
 
int getMinHeight ()
 Getting the minimum height limit. More...
 
void setHeight (int height)
 Setting item height. More...
 
int getHeight ()
 Getting item height. More...
 
void setMaxHeight (int height)
 Setting the maximum height limit. More...
 
int getMaxHeight ()
 Getting the maximum height limit. More...
 
void setSize (int width, int height)
 Setting item size (width and height). More...
 
Size getSize ()
 Getting current item size. More...
 
void setMinSize (int width, int height)
 Setting minimum item size limit (width and height limits). More...
 
Size getMinSize ()
 Getting current item minimum size limit. More...
 
void setMaxSize (int width, int height)
 Setting maximum item size limit (width and height limits). More...
 
Size getMaxSize ()
 Getting current item maximum size limit. More...
 
void setAlignment (List< ItemAlignment > alignment)
 Setting an alignment of an item's shape relative to its container. More...
 
void setAlignment (ItemAlignment... alignment)
 Setting an alignment of an item's shape relative to its container. More...
 
List< ItemAlignmentgetAlignment ()
 Getting an alignment of an item's shape relative to its container. More...
 
void setSizePolicy (SizePolicy width, SizePolicy height)
 Setting the size policy of an item's shape. More...
 
void setWidthPolicy (SizePolicy policy)
 Setting width policy of an item's shape. More...
 
SizePolicy getWidthPolicy ()
 Getting width policy of an item's shape.Can be FIXED (shape not changes its size) or EXPAND (shape is stretched to all available space). More...
 
void setHeightPolicy (SizePolicy policy)
 Setting height policy of an item's shape. More...
 
SizePolicy getHeightPolicy ()
 Getting height policy of an item's shape.Can be FIXED (shape not changes its size) or EXPAND (shape is stretched to all available space). More...
 
void setPosition (int x, int y)
 Setting item position. More...
 
void setX (int x)
 Setting X coordinate of the left-top corner of a shape. More...
 
int getX ()
 Getting X coordinate of the left-top corner of a shape. More...
 
void setY (int y)
 Setting Y coordinate of the left-top corner of a shape. More...
 
int getY ()
 Getting Y coordinate of the left-top corner of a shape. More...
 
void setConfines ()
 Setting the confines of the item relative to its parent's size and position. More...
 
void setConfines (int x0, int x1, int y0, int y1)
 Setting the confines of the item relative to its parent's size and position. More...
 
void setStyle (Style style)
 Setting a style that describes the appearance of an item. More...
 
Style getCoreStyle ()
 Getting the core (only appearance properties without inner styles) style of an item. More...
 
boolean isShadowDrop ()
 Getting the shadow visibility status of an item. More...
 
void setShadowDrop (boolean value)
 Setting the shadow visibility status of an item. More...
 
void setShadowRadius (int radius)
 Setting the specified blur radius of the shadow. More...
 
int getShadowRadius ()
 Getting the shadow blur raduis. More...
 
Color getShadowColor ()
 Getting shadow color. More...
 
void setShadowColor (Color color)
 Setting shadow color. More...
 
Position getShadowPos ()
 Getting the offset of the shadow relative to the position of the item. More...
 
int[] getShadowExtension ()
 Getting the values of shadow extensions in pixels. More...
 
void setShadowExtension (int wExtension, int hExtension)
 Setting the values of shadow extensions in pixels. More...
 
void setShadow (int radius, int x, int y, Color color)
 Setting the shadow with specified blur radius, axis shifts, shadow color. More...
 
void addItemState (ItemStateType type, ItemState state)
 Adding visual state for an item. More...
 
void removeItemState (ItemStateType type)
 Removing visual state of an item by type. More...
 
void removeAllItemStates ()
 Removing all item visual states. More...
 
ItemState getState (ItemStateType type)
 Getting item visual state by its type. More...
 
List< InterfaceBaseItemgetItems ()
 Getting list of the Prototype's inner items (children). More...
 
boolean removeItem (InterfaceBaseItem item)
 Removing the specified item from container (this). More...
 
void clear ()
 Removing all children. More...
 
void insertItem (InterfaceBaseItem item, int index)
 Inserting item to the container (this). More...
 
void addItems (InterfaceBaseItem... items)
 Adding sequence of items into the container (this). More...
 
void addItem (InterfaceBaseItem item)
 Adding item into the container (this). More...
 
void update (GeometryEventType type, int value)
 Updating an item size or/and position. More...
 
boolean isDrawable ()
 Getting the drawable (visibility) status of an item. More...
 
void setDrawable (boolean value)
 Setting the drawable (visibility) status of an item. More...
 
boolean isVisible ()
 Setting the visibility status of an item. More...
 
void setVisible (boolean value)
 Setting the visibility status of an item. More...
 
boolean isPassEvents ()
 Getting boolean value to know if this item can pass further any input events (mouse, keyboard and etc.). More...
 
boolean isPassEvents (InputEventType e)
 Getting boolean value to know if this item can pass further the specified type of input events (mouse, keyboard and etc.). More...
 
List< InputEventTypegetPassEvents ()
 Getting all allowed input events. More...
 
List< InputEventTypeGetBlockedEvents ()
 Getting all blocked input events. More...
 
void setPassEvents (boolean value)
 Setting on or off so that this item can pass further any input events (mouse, keyboard and etc.). More...
 
void setPassEvents (boolean value, InputEventType e)
 Setting on or off so that this item can pass further the specified type of input events (mouse, keyboard and etc.). More...
 
void setPassEvents (boolean value, List< InputEventType > events)
 Setting on or off so that this item can pass further the specified types of input events (mouse, keyboard and etc.). More...
 
void setPassEvents (boolean value, InputEventType... events)
 Setting on or off so that this item can pass further the specified types of input events (mouse, keyboard and etc.). More...
 
boolean isDisabled ()
 Returns True if this item is disabled (non-interactive) otherwise returns False. More...
 
void setDisabled (boolean value)
 Setting this item disabled (become non-interactive) or enabled. More...
 
boolean isMouseHover ()
 Returns True if this item is hovered otherwise returns False. More...
 
void setMouseHover (boolean value)
 Setting this item hovered (mouse cursor located within item's shape). More...
 
boolean isMousePressed ()
 Returns True if mouse is pressed on this item (mouse cursor located within item's shape and any of the mouse button is pressed) otherwise False. More...
 
void setMousePressed (boolean value)
 Setting True if you want that mouse is pressed on this item (mouse cursor located within item's shape and any of the mouse button is pressed) otherwise False. More...
 
boolean isFocused ()
 Returns True if this item gets focus otherwise False. More...
 
void setFocus ()
 Setting focus on this item if it is focusable. More...
 
void setContent (List< InterfaceBaseItem > content)
 Setting content for this item. More...
 
Figure isCustomFigure ()
 Getting the custom shape if it is set. More...
 
void setCustomFigure (Figure figure)
 Setting the custom shape to replace the default rectangle shape. More...
 
ItemHoverRule getHoverRule ()
 Getting the hovering rule of this item. More...
 
void setHoverRule (ItemHoverRule rule)
 Setting the hovering rule for this item. More...
 
CursorImage getCursor ()
 Getting the mouse cursor image of this item. More...
 
void setCursor (EmbeddedCursor cursor)
 Setting mouse cursor image for this item from embedded cursors. More...
 
void setCursor (CursorImage cursor)
 Setting mouse cursor image for this item. More...
 
void setCursor (BufferedImage bitmap)
 Creating and setting mouse cursor image for this item from specified bitmap image. More...
 
void setCursor (BufferedImage bitmap, int width, int height)
 Creating and setting mouse cursor image for this item from specified scaled bitmap image. More...
 

Public Attributes

EventCommonMethodState eventResize = new EventCommonMethodState()
 Event that is invoked when an item is resizing. More...
 
EventCommonMethodState eventDestroy = new EventCommonMethodState()
 Event that is invoked when an item is destroyed (removed). More...
 
EventMouseMethodState eventMouseHover = new EventMouseMethodState()
 Event that is invoked when mouse cursor enters inside an item area. More...
 
EventMouseMethodState eventMouseLeave = new EventMouseMethodState()
 Event that is invoked when mouse cursor leaves inside an item area. More...
 
EventMouseMethodState eventMouseClick = new EventMouseMethodState()
 Event that is invoked when mouse click (release) on an item. More...
 
EventMouseMethodState eventMouseDoubleClick = new EventMouseMethodState()
 Event that is invoked when mouse double click on an item. More...
 
EventMouseMethodState eventMousePress = new EventMouseMethodState()
 Event that is invoked when mouse press on an item. More...
 
EventMouseMethodState eventMouseDrag = new EventMouseMethodState()
 Event that is invoked when mouse drag on an item. More...
 
EventMouseMethodState eventMouseDrop = new EventMouseMethodState()
 Event that is invoked when mouse drop on an item. More...
 
EventMouseMethodState eventScrollUp = new EventMouseMethodState()
 Event that is invoked when mouse wheel scrolls up on an item. More...
 
EventMouseMethodState eventScrollDown = new EventMouseMethodState()
 Event that is invoked when mouse wheel scrolls down on an item. More...
 
EventKeyMethodState eventKeyPress = new EventKeyMethodState()
 Event that is invoked when key of keyboard is pressed. More...
 
EventKeyMethodState eventKeyRelease = new EventKeyMethodState()
 Event that is invoked when key of keyboard is released. More...
 
EventInputTextMethodState eventTextInput = new EventInputTextMethodState()
 Event that is invoked when typing text on the keyboard. More...
 
boolean isFocusable = true
 Item's focusable property. More...
 

Protected Member Functions

void updateState ()
 Updating Prototype's state according to its ItemStateType. More...
 
void setFocused (boolean value)
 
boolean getHoverVerification (float xpos, float ypos)
 
int[] getConfines ()
 
void setState (ItemStateType state)
 

Detailed Description

The Prototype is an abstract implementation of InterfaceBaseItem for complex interactive items.

Contains all the necessary methods for rendering objects and interacting with them.

Examples of subclasses: com.spvessel.spacevil.ButtonCore, com.spvessel.spacevil.TextEdit, com.spvessel.spacevil.ListBox and etc.

Constructor & Destructor Documentation

◆ Prototype()

com.spvessel.spacevil.Prototype.Prototype ( )

Default constructor of Prototype class.

Member Function Documentation

◆ addItem()

◆ addItems()

void com.spvessel.spacevil.Prototype.addItems ( InterfaceBaseItem...  items)

Adding sequence of items into the container (this).

Parameters
itemsSequence of items.

Reimplemented in com.spvessel.spacevil.ToolTipItem.

◆ addItemState()

void com.spvessel.spacevil.Prototype.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.

◆ clear()

◆ getAlignment()

List<ItemAlignment> com.spvessel.spacevil.Prototype.getAlignment ( )

Getting an alignment of an item's shape relative to its container.

Returns
Alignment as List of com.spvessel.spacevil.Flags.ItemAlignment.

Implements com.spvessel.spacevil.Core.InterfaceBehavior.

◆ getBackground()

Color com.spvessel.spacevil.Prototype.getBackground ( )

Getting background color of an item.

Returns
Background color as java.awt.Color.

Implements com.spvessel.spacevil.Core.InterfaceItem.

Reimplemented in com.spvessel.spacevil.SpinItem.

◆ GetBlockedEvents()

List<InputEventType> com.spvessel.spacevil.Prototype.GetBlockedEvents ( )

Getting all blocked input events.

Returns
Blocked input events as List<com.spvessel.spacevil.Flags.InputEventType>

◆ getBorderFill()

Color com.spvessel.spacevil.Prototype.getBorderFill ( )

Getting the border color oa an item's shape.

Returns
Border color as java.awt.Color.

◆ getBorderRadius()

CornerRadius com.spvessel.spacevil.Prototype.getBorderRadius ( )

Getting border radiuses.

Returns
Border radiuses as com.spvessel.spacevil.Decorations.CornerRadius.

◆ getBorderThickness()

int com.spvessel.spacevil.Prototype.getBorderThickness ( )

Getting border thickness of an item's shape.

Returns
Border thickness.

◆ getConfines()

int [] com.spvessel.spacevil.Prototype.getConfines ( )
protected

◆ getCoreStyle()

Style com.spvessel.spacevil.Prototype.getCoreStyle ( )

Getting the core (only appearance properties without inner styles) style of an item.

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

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ getCursor()

CursorImage com.spvessel.spacevil.Prototype.getCursor ( )

Getting the mouse cursor image of this item.

Returns
Mouse cursor image as com.spvessel.spacevil.Decorations.CursorImage.

◆ getHandler()

CoreWindow com.spvessel.spacevil.Prototype.getHandler ( )

Getting the window to which the item belongs.

Returns
Window as com.spvessel.spacevil.CoreWindow.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ getHeight()

int com.spvessel.spacevil.Prototype.getHeight ( )

Getting item height.

Returns
Height of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ getHeightPolicy()

SizePolicy com.spvessel.spacevil.Prototype.getHeightPolicy ( )

Getting height policy of an item's shape.Can be FIXED (shape not changes its size) or EXPAND (shape is stretched to all available space).

Returns
Height policy as com.spvessel.spacevil.Flags.SizePolicy.

Implements com.spvessel.spacevil.Core.InterfaceBehavior.

◆ getHoverRule()

ItemHoverRule com.spvessel.spacevil.Prototype.getHoverRule ( )

Getting the hovering rule of this item.

Can be ItemHoverRule.LAZY or ItemHoverRule.STRICT (see com.spvessel.spacevil.Flags.ItemHoverRule).

Returns
Hovering rule as com.spvessel.spacevil.Flags.ItemHoverRule.

◆ getHoverVerification()

◆ getItemName()

String com.spvessel.spacevil.Prototype.getItemName ( )

Getting the name of the item.

Returns
Item name as java.lang.String.

Implements com.spvessel.spacevil.Core.InterfaceItem.

◆ getItems()

List<InterfaceBaseItem> com.spvessel.spacevil.Prototype.getItems ( )

Getting list of the Prototype's inner items (children).

Returns
List of children as List<com.spvessel.spacevil.Core.InterfaceBaseItem>

◆ getMargin()

Indents com.spvessel.spacevil.Prototype.getMargin ( )

Getting the indents of an item to offset itself relative to its container.

Returns
Margin as com.spvessel.spacevil.Decorations.Indents.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ getMaxHeight()

int com.spvessel.spacevil.Prototype.getMaxHeight ( )

Getting the maximum height limit.

Returns
Maximum height limit of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ getMaxSize()

Size com.spvessel.spacevil.Prototype.getMaxSize ( )

Getting current item maximum size limit.

Returns
Minimum item size limit as com.spvessel.spacevil.Core.Size.

◆ getMaxWidth()

int com.spvessel.spacevil.Prototype.getMaxWidth ( )

Getting the maximum width limit.

Returns
Maximum width limit of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ getMinHeight()

int com.spvessel.spacevil.Prototype.getMinHeight ( )

Getting the minimum height limit.

Returns
Minimum height limit of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ getMinSize()

Size com.spvessel.spacevil.Prototype.getMinSize ( )

Getting current item minimum size limit.

Returns
Minimum item size limit as com.spvessel.spacevil.Core.Size.

◆ getMinWidth()

int com.spvessel.spacevil.Prototype.getMinWidth ( )

Getting the minimum width limit.

Returns
Minimum width limit of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ getPadding()

Indents com.spvessel.spacevil.Prototype.getPadding ( )

Getting indents of an item for offset its children.

Returns
Padding indents as com.spvessel.spacevil.Decorations.Indents.

◆ getParent()

Prototype com.spvessel.spacevil.Prototype.getParent ( )

Getting the parent of the item.

Returns
Parent as com.spvessel.spacevil.Prototype (Prototype is container and can contains children).

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ getPassEvents()

List<InputEventType> com.spvessel.spacevil.Prototype.getPassEvents ( )

Getting all allowed input events.

Returns
Allowed input events as List<com.spvessel.spacevil.Flags.InputEventType>

◆ getShadowColor()

Color com.spvessel.spacevil.Prototype.getShadowColor ( )

Getting shadow color.

Returns
Returns the shadow color as java.awt.Color.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ getShadowExtension()

int [] com.spvessel.spacevil.Prototype.getShadowExtension ( )

Getting the values of shadow extensions in pixels.

Returns
The values of shadow extensions. 0 - width extension, 1 - height extension.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ getShadowPos()

Position com.spvessel.spacevil.Prototype.getShadowPos ( )

Getting the offset of the shadow relative to the position of the item.

Returns
Shadow offset as com.spvessel.spacevil.Core.Position.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ getShadowRadius()

int com.spvessel.spacevil.Prototype.getShadowRadius ( )

Getting the shadow blur raduis.

Returns
The blur radius of the shadow.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ getSize()

Size com.spvessel.spacevil.Prototype.getSize ( )

Getting current item size.

Returns
Item size as com.spvessel.spacevil.Core.Size.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ getSpacing()

Spacing com.spvessel.spacevil.Prototype.getSpacing ( )

Getting indents between children of a container type item.

Returns
Indents between children as com.spvessel.spacevil.Decorations.Spacing.

◆ getState()

ItemState com.spvessel.spacevil.Prototype.getState ( ItemStateType  type)

Getting item visual state by its type.

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

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

◆ getToolTip()

String com.spvessel.spacevil.Prototype.getToolTip ( )

Getting tooltip text of the item.

Tooltip is hint about an item that appears when you hold the mouse cursor over an item long enough.

Returns
Tolltip text.

◆ getTriangles()

List<float[]> com.spvessel.spacevil.Prototype.getTriangles ( )

Getting triangles of item's shape.

Returns
Points list of the shape as List of float[2] array (2D).

Implements com.spvessel.spacevil.Core.InterfaceItem.

◆ getWidth()

int com.spvessel.spacevil.Prototype.getWidth ( )

Getting item width.

Returns
Width of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ getWidthPolicy()

SizePolicy com.spvessel.spacevil.Prototype.getWidthPolicy ( )

Getting width policy of an item's shape.Can be FIXED (shape not changes its size) or EXPAND (shape is stretched to all available space).

Returns
Width policy as com.spvessel.spacevil.Flags.SizePolicy.

Implements com.spvessel.spacevil.Core.InterfaceBehavior.

◆ getX()

int com.spvessel.spacevil.Prototype.getX ( )

Getting X coordinate of the left-top corner of a shape.

Returns
X position of the left-top corner.

Implements com.spvessel.spacevil.Core.InterfacePosition.

◆ getY()

int com.spvessel.spacevil.Prototype.getY ( )

Getting Y coordinate of the left-top corner of a shape.

Returns
Y position of the left-top corner.

Implements com.spvessel.spacevil.Core.InterfacePosition.

◆ initElements()

void com.spvessel.spacevil.Prototype.initElements ( )

Initializing children and their attributes.

Notice: This method is mainly for overriding only. SpaceVIL calls this method if necessary and no need to call it manually.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

Reimplemented in com.spvessel.spacevil.TextEdit, com.spvessel.spacevil.WrapGrid, com.spvessel.spacevil.ListBox, com.spvessel.spacevil.Tab, com.spvessel.spacevil.Label, com.spvessel.spacevil.MenuItem, com.spvessel.spacevil.TitleBar, com.spvessel.spacevil.TextArea, com.spvessel.spacevil.ButtonToggle, com.spvessel.spacevil.ComboBox, com.spvessel.spacevil.CheckBox, com.spvessel.spacevil.RadioButton, com.spvessel.spacevil.FileSystemEntry, com.spvessel.spacevil.PopUpMessage, com.spvessel.spacevil.ButtonCore, com.spvessel.spacevil.PasswordLine, com.spvessel.spacevil.TextView, com.spvessel.spacevil.TreeItem, com.spvessel.spacevil.ComboBoxDropDown, com.spvessel.spacevil.SideArea, com.spvessel.spacevil.HorizontalSlider, com.spvessel.spacevil.VerticalSlider, com.spvessel.spacevil.MessageItem, com.spvessel.spacevil.OpenEntryDialog, com.spvessel.spacevil.TreeView, com.spvessel.spacevil.SpinItem, com.spvessel.spacevil.ContextMenu, com.spvessel.spacevil.InputDialog, com.spvessel.spacevil.LoadingScreen, com.spvessel.spacevil.HorizontalSplitArea, com.spvessel.spacevil.VerticalSplitArea, com.spvessel.spacevil.FloatItem, com.spvessel.spacevil.VerticalScrollBar, com.spvessel.spacevil.ProgressBar, com.spvessel.spacevil.TabView, com.spvessel.spacevil.HorizontalScrollBar, com.spvessel.spacevil.Graph, com.spvessel.spacevil.SelectionItem, com.spvessel.spacevil.ToolTipItem, com.spvessel.spacevil.OpenDialog, com.spvessel.spacevil.Indicator, and com.spvessel.spacevil.DialogItem.

◆ insertItem()

void com.spvessel.spacevil.Prototype.insertItem ( InterfaceBaseItem  item,
int  index 
)

Inserting item to the container (this).

If the count of container elements is less than the index, then the element is added to the end of the list.

Parameters
itemChild as com.spvessel.spacevil.Core.InterfaceBaseItem.
indexIndex of insertion.

Reimplemented in com.spvessel.spacevil.WrapGrid, com.spvessel.spacevil.ListBox, com.spvessel.spacevil.WrapArea, com.spvessel.spacevil.Grid, com.spvessel.spacevil.ListArea, com.spvessel.spacevil.SideArea, com.spvessel.spacevil.HorizontalStack, and com.spvessel.spacevil.VerticalStack.

◆ isCustomFigure()

Figure com.spvessel.spacevil.Prototype.isCustomFigure ( )

Getting the custom shape if it is set.

You can set any shape using Prototype.setCustomFigure(Figure) and it will replace the default rectangle shape.

Returns
Custom shape as com.spvessel.spacevil.Decorations.Figure.

◆ isDisabled()

boolean com.spvessel.spacevil.Prototype.isDisabled ( )

Returns True if this item is disabled (non-interactive) otherwise returns False.

Returns
True: this item is disabled. False: this item is enabled.

◆ isDrawable()

boolean com.spvessel.spacevil.Prototype.isDrawable ( )

Getting the drawable (visibility) status of an item.

This property used in conjunction with the isVisible() property.

Explanation: an item can be visible and invisible, in some cases the item can be located outside the container (example: com.spvessel.spacevil.ListBox), and it must be invisible so as not to waste CPU / GPU resources, but in some cases you must control the visibility of elements that are inside container and should be invisible (example: com.spvessel.spacevil.TreeView).

Returns
True: if item is drawable (visible). False: if item is not drawable (invisible).

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ isFocused()

boolean com.spvessel.spacevil.Prototype.isFocused ( )

Returns True if this item gets focus otherwise False.

Returns
True: if this item is focused. False: if this item is not focused.

◆ isMouseHover()

boolean com.spvessel.spacevil.Prototype.isMouseHover ( )

Returns True if this item is hovered otherwise returns False.

Returns
True: this item is hovered. False: this item is not hovered.

◆ isMousePressed()

boolean com.spvessel.spacevil.Prototype.isMousePressed ( )

Returns True if mouse is pressed on this item (mouse cursor located within item's shape and any of the mouse button is pressed) otherwise False.

Returns
True: if mouse is pressed on this item. False: if mouse is not pressed on this item.

◆ isPassEvents() [1/2]

boolean com.spvessel.spacevil.Prototype.isPassEvents ( )

Getting boolean value to know if this item can pass further any input events (mouse, keyboard and etc.).

Tip: Need for filtering input events.

Returns
True: if this item pass on any input events. False: If this item do not pass any input events.

◆ isPassEvents() [2/2]

boolean com.spvessel.spacevil.Prototype.isPassEvents ( InputEventType  e)

Getting boolean value to know if this item can pass further the specified type of input events (mouse, keyboard and etc.).

Parameters
eType of input events as com.spvessel.spacevil.Flags.InputEventType.
Returns
True: if this item pass on the specified type of input events. False: If this item do not pass the specified type of input events.

◆ isShadowDrop()

boolean com.spvessel.spacevil.Prototype.isShadowDrop ( )

Getting the shadow visibility status of an item.

Returns
True: if shadow is visible. False: if shadow is invisible.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ isVisible()

boolean com.spvessel.spacevil.Prototype.isVisible ( )

Setting the visibility status of an item.

This property may used in conjunction with the isDrawable() property.

Returns
True: if item is visible. False: if item is invisible.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ makeShape()

void com.spvessel.spacevil.Prototype.makeShape ( )

Making default item's shape.

Use in conjunction with getTriangles() and setTriangles() methods.

Notice: This method is mainly for overriding only. SpaceVIL calls this method if necessary and no need to call it manually.

Implements com.spvessel.spacevil.Core.InterfaceItem.

◆ release()

void com.spvessel.spacevil.Prototype.release ( )

◆ removeAllItemStates()

void com.spvessel.spacevil.Prototype.removeAllItemStates ( )

Removing all item visual states.

◆ removeItem()

◆ removeItemState()

void com.spvessel.spacevil.Prototype.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() [1/2]

void com.spvessel.spacevil.Prototype.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).

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

Implements com.spvessel.spacevil.Core.InterfaceBehavior.

◆ setAlignment() [2/2]

void com.spvessel.spacevil.Prototype.setAlignment ( List< 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).

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

◆ setBackground() [1/5]

void com.spvessel.spacevil.Prototype.setBackground ( Color  color)

Setting background color of an item's shape.

Parameters
colorBackground color as java.awt.Color.

Implements com.spvessel.spacevil.Core.InterfaceItem.

Reimplemented in com.spvessel.spacevil.SpinItem.

◆ setBackground() [2/5]

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

Setting background 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)

Reimplemented in com.spvessel.spacevil.SpinItem.

◆ setBackground() [3/5]

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

Setting background 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)

Reimplemented in com.spvessel.spacevil.SpinItem.

◆ setBackground() [4/5]

void com.spvessel.spacevil.Prototype.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)

Reimplemented in com.spvessel.spacevil.SpinItem.

◆ setBackground() [5/5]

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

Setting background 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)

Reimplemented in com.spvessel.spacevil.SpinItem.

◆ setBorder()

void com.spvessel.spacevil.Prototype.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.

◆ setBorderFill() [1/5]

void com.spvessel.spacevil.Prototype.setBorderFill ( Color  fill)

Setting the border color of an item's shape.

Parameters
fillBorder color as java.awt.Color.

◆ setBorderFill() [2/5]

void com.spvessel.spacevil.Prototype.setBorderFill ( float  r,
float  g,
float  b 
)

Setting the border 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)

◆ setBorderFill() [3/5]

void com.spvessel.spacevil.Prototype.setBorderFill ( float  r,
float  g,
float  b,
float  a 
)

Setting the border 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)

◆ setBorderFill() [4/5]

void com.spvessel.spacevil.Prototype.setBorderFill ( int  r,
int  g,
int  b 
)

Setting the border 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)

◆ setBorderFill() [5/5]

void com.spvessel.spacevil.Prototype.setBorderFill ( int  r,
int  g,
int  b,
int  a 
)

Setting the border 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)
aAlpha color component. Range: (0 - 255)

◆ setBorderRadius() [1/2]

void com.spvessel.spacevil.Prototype.setBorderRadius ( CornerRadius  radius)

Setting radius of the border's corners.

Parameters
radiusRadiuses of the border's corners as com.spvessel.spacevil.Decorations.CornerRadius.

◆ setBorderRadius() [2/2]

void com.spvessel.spacevil.Prototype.setBorderRadius ( int  radius)

Setting border radius with the same values for each corner of the rectangle object.

Parameters
radiusRadius of the border's corners.

◆ setBorderThickness()

void com.spvessel.spacevil.Prototype.setBorderThickness ( int  thickness)

Setting border thickness of an item's shape.

Parameters
thicknessBorder thickness.

◆ setConfines() [1/2]

void com.spvessel.spacevil.Prototype.setConfines ( )

Setting the confines of the item relative to its parent's size and position.

Example: items can be partially (or completely) outside the container (example: ListBox), in which case the part that is outside the container should not be visible and should not interact with the user.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

Reimplemented in com.spvessel.spacevil.ComboBoxDropDown, com.spvessel.spacevil.ContextMenu, and com.spvessel.spacevil.FloatItem.

◆ setConfines() [2/2]

void com.spvessel.spacevil.Prototype.setConfines ( int  x0,
int  x1,
int  y0,
int  y1 
)

Setting the confines of the item relative to its parent's size and position.

Example: items can be partially (or completely) outside the container (example: ListBox), in which case the part that is outside the container should not be visible and should not interact with the user.

Parameters
x0Left X begin position.
x1Right X end position.
y0Top Y begin position.
y1Bottom Y end position.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setContent()

void com.spvessel.spacevil.Prototype.setContent ( List< InterfaceBaseItem content)

Setting content for this item.

Note: this method is only for sorting children i.e. Prototype.getItems() contains equal set of children as input argument: List<com.spvessel.spacevil.Core.InterfaceBaseItem> content. If content is different this method do nothing.

Parameters
contentSorted (in any way) content of this item.

◆ setCursor() [1/4]

void com.spvessel.spacevil.Prototype.setCursor ( BufferedImage  bitmap)

Creating and setting mouse cursor image for this item from specified bitmap image.

Parameters
bitmapBitmap for mouse cursor image as java.awt.image.BufferedImage.

◆ setCursor() [2/4]

void com.spvessel.spacevil.Prototype.setCursor ( BufferedImage  bitmap,
int  width,
int  height 
)

Creating and setting mouse cursor image for this item from specified scaled bitmap image.

Parameters
bitmapBitmap for mouse cursor image as java.awt.image.BufferedImage.
widthNew width of mouse cursor image.
heightNew height of mouse cursor image.

◆ setCursor() [3/4]

void com.spvessel.spacevil.Prototype.setCursor ( CursorImage  cursor)

Setting mouse cursor image for this item.

Parameters
cursorMouse cursor image as com.spvessel.spacevil.CursorImage.

◆ setCursor() [4/4]

void com.spvessel.spacevil.Prototype.setCursor ( EmbeddedCursor  cursor)

Setting mouse cursor image for this item from embedded cursors.

Parameters
cursorMouse cursor type as com.spvessel.spacevil.Flags.EmbeddedCursor.

◆ setCustomFigure()

void com.spvessel.spacevil.Prototype.setCustomFigure ( Figure  figure)

Setting the custom shape to replace the default rectangle shape.

Parameters
figureCustom shape as com.spvessel.spacevil.Decorations.Figure.

◆ setDisabled()

void com.spvessel.spacevil.Prototype.setDisabled ( boolean  value)

Setting this item disabled (become non-interactive) or enabled.

Parameters
valueTrue: if you want to disable this item. False: if you want to enable this item.

◆ setDrawable()

void com.spvessel.spacevil.Prototype.setDrawable ( boolean  value)

Setting the drawable (visibility) status of an item.

This property used in conjunction with the isVisible() property.

Explanation: an item can be visible and invisible, in some cases the item can be located outside the container (example: com.spvessel.spacevil.ListBox), and it must be invisible so as not to waste CPU / GPU resources, but in some cases you must control the visibility of elements that are inside container and should be invisible (example: com.spvessel.spacevil.TreeView).

Parameters
valueTrue: if item should be drawable (visible). False: if item should not be drawable (invisible).

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setFocus()

void com.spvessel.spacevil.Prototype.setFocus ( )

Setting focus on this item if it is focusable.

Reimplemented in com.spvessel.spacevil.TextArea, and com.spvessel.spacevil.TextEdit.

◆ setFocused()

void com.spvessel.spacevil.Prototype.setFocused ( boolean  value)
protected

◆ setHandler()

void com.spvessel.spacevil.Prototype.setHandler ( CoreWindow  handler)

Setting the window to which the item will belong.

Parameters
handlerWindow as com.spvessel.spacevil.CoreWindow.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setHeight()

void com.spvessel.spacevil.Prototype.setHeight ( int  height)

Setting item height.

If the value is greater/less than the maximum/minimum value of the height, then the height becomes equal to the maximum/minimum value.

Parameters
heightHeight of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

Reimplemented in com.spvessel.spacevil.WrapGrid, com.spvessel.spacevil.ListBox, com.spvessel.spacevil.TextView, com.spvessel.spacevil.TextArea, com.spvessel.spacevil.Grid, com.spvessel.spacevil.ResizableItem, com.spvessel.spacevil.SideArea, com.spvessel.spacevil.ImageItem, com.spvessel.spacevil.HorizontalSplitArea, and com.spvessel.spacevil.VerticalStack.

◆ setHeightPolicy()

void com.spvessel.spacevil.Prototype.setHeightPolicy ( SizePolicy  policy)

Setting height policy of an item's shape.

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

Parameters
policyHeight policy as com.spvessel.spacevil.Flags.SizePolicy.

Implements com.spvessel.spacevil.Core.InterfaceBehavior.

◆ setHoverRule()

void com.spvessel.spacevil.Prototype.setHoverRule ( ItemHoverRule  rule)

Setting the hovering rule for this item.

Parameters
ruleHovering rule as com.spvessel.spacevil.Flags.ItemHoverRule.

◆ setItemName()

void com.spvessel.spacevil.Prototype.setItemName ( String  name)

Setting the name of the item.

Parameters
nameItem name as java.lang.String.

Implements com.spvessel.spacevil.Core.InterfaceItem.

◆ setMargin() [1/2]

void com.spvessel.spacevil.Prototype.setMargin ( Indents  margin)

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

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

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setMargin() [2/2]

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

Setting the 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.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setMaxHeight()

void com.spvessel.spacevil.Prototype.setMaxHeight ( int  height)

Setting the maximum height limit.

Actual height cannot be greater than this limit.

Parameters
heightMaximum height limit of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ setMaxSize()

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

Setting maximum item size limit (width and height limits).

Parameters
widthMaximum width limit of the item.
heightMaximum height limit of the item.

◆ setMaxWidth()

void com.spvessel.spacevil.Prototype.setMaxWidth ( int  width)

Setting the maximum width limit.

Actual width cannot be greater than this limit.

Parameters
widthMaximum width limit of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ setMinHeight()

void com.spvessel.spacevil.Prototype.setMinHeight ( int  height)

Setting the minimum height limit.

Actual height cannot be less than this limit.

Parameters
heightMinimum height limit of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ setMinSize()

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

Setting minimum item size limit (width and height limits).

Parameters
widthMinimum width limit of the item.
heightMinimum height limit of the item.

◆ setMinWidth()

void com.spvessel.spacevil.Prototype.setMinWidth ( int  width)

Setting the minimum width limit.

Actual width cannot be less than this limit.

Parameters
widthMinimum width limit of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

◆ setMouseHover()

void com.spvessel.spacevil.Prototype.setMouseHover ( boolean  value)

Setting this item hovered (mouse cursor located within item's shape).

Parameters
valueTrue: if you want this item be hovered. False: if you want this item be not hovered.

Reimplemented in com.spvessel.spacevil.ListArea, com.spvessel.spacevil.SelectionItem, com.spvessel.spacevil.CheckBox, and com.spvessel.spacevil.RadioButton.

◆ setMousePressed()

void com.spvessel.spacevil.Prototype.setMousePressed ( boolean  value)

Setting True if you want that mouse is pressed on this item (mouse cursor located within item's shape and any of the mouse button is pressed) otherwise False.

Parameters
valueTrue: if you want this item be mouse pressed. False: if you want this item be not mouse pressed.

◆ setPadding() [1/2]

void com.spvessel.spacevil.Prototype.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.Prototype.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.

◆ setParent()

void com.spvessel.spacevil.Prototype.setParent ( Prototype  parent)

Setting the parent of the item.

Parameters
parentParent as com.spvessel.spacevil.Prototype (Prototype is container and can contains children).

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setPassEvents() [1/4]

void com.spvessel.spacevil.Prototype.setPassEvents ( boolean  value)

Setting on or off so that this item can pass further any input events (mouse, keyboard and etc.).

Parameters
valueTrue: if you want that this item may to pass on any input events. False: if you want that this item cannot to pass on any input events.

◆ setPassEvents() [2/4]

void com.spvessel.spacevil.Prototype.setPassEvents ( boolean  value,
InputEventType  e 
)

Setting on or off so that this item can pass further the specified type of input events (mouse, keyboard and etc.).

Parameters
valueTrue: if you want this item can pass further the specified type of input events. False: if you want this item connot pass further the specified type of input events.
eType of input events as com.spvessel.spacevil.Flags.InputEventType.

◆ setPassEvents() [3/4]

void com.spvessel.spacevil.Prototype.setPassEvents ( boolean  value,
InputEventType...  events 
)

Setting on or off so that this item can pass further the specified types of input events (mouse, keyboard and etc.).

Parameters
valueTrue: if you want this item can pass further the specified types of input events. False: if you want this item connot pass further the specified types of input events.
eventsSequence of input event types as com.spvessel.spacevil.Flags.InputEventType.

◆ setPassEvents() [4/4]

void com.spvessel.spacevil.Prototype.setPassEvents ( boolean  value,
List< InputEventType events 
)

Setting on or off so that this item can pass further the specified types of input events (mouse, keyboard and etc.).

Parameters
valueTrue: if you want this item can pass further the specified types of input events. False: if you want this item connot pass further the specified types of input events.
eventsList of input event types as com.spvessel.spacevil.Flags.InputEventType.

◆ setPosition()

void com.spvessel.spacevil.Prototype.setPosition ( int  x,
int  y 
)

Setting item position.

Parameters
xX position of the left-top corner
yY position of the left-top corner

◆ setShadow()

void com.spvessel.spacevil.Prototype.setShadow ( int  radius,
int  x,
int  y,
Color  color 
)

Setting the shadow with specified blur radius, axis shifts, shadow color.

Parameters
radiusA blur radius of the shadow.
xX shift of the shadow.
yY shift of the shadow.
colorA shadow color as java.awt.Color.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setShadowColor()

void com.spvessel.spacevil.Prototype.setShadowColor ( Color  color)

Setting shadow color.

Parameters
colorShadow color as java.awt.Color.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setShadowDrop()

void com.spvessel.spacevil.Prototype.setShadowDrop ( boolean  value)

Setting the shadow visibility status of an item.

Parameters
valueTrue: if shadow should be visible. False: if shadow should be invisible.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setShadowExtension()

void com.spvessel.spacevil.Prototype.setShadowExtension ( int  wExtension,
int  hExtension 
)

Setting the values of shadow extensions in pixels.

Parameters
wExtensionExtension by width.
hExtensionExtension by height.

◆ setShadowRadius()

void com.spvessel.spacevil.Prototype.setShadowRadius ( int  radius)

Setting the specified blur radius of the shadow.

Default: 0.

Parameters
radiusThe blur radius of the shadow.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setSize()

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

Setting item size (width and height).

Parameters
widthWidth of the item.
heightHeight of the item.

Implements com.spvessel.spacevil.Core.InterfaceSize.

Reimplemented in com.spvessel.spacevil.ImageItem.

◆ setSizePolicy()

void com.spvessel.spacevil.Prototype.setSizePolicy ( SizePolicy  width,
SizePolicy  height 
)

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
widthWidth policy of an item's shape as com.spvessel.spacevil.Flags.SizePolicy.
heightHeight policy of an item's shape as com.spvessel.spacevil.Flags.SizePolicy.

◆ setSpacing() [1/2]

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

Setting indents between children of a container type item.

Parameters
horizontalHorizontal indent. Default: 0.
verticalVertical indent. Default: 0.

◆ setSpacing() [2/2]

void com.spvessel.spacevil.Prototype.setSpacing ( Spacing  spacing)

Setting indents between children of a container type item.

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

◆ setState()

void com.spvessel.spacevil.Prototype.setState ( ItemStateType  state)
protected

◆ setStyle()

void com.spvessel.spacevil.Prototype.setStyle ( Style  style)

Setting a style that describes the appearance of an item.

Parameters
styleStyle as com.spvessel.spacevil.Decorations.Style.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

Reimplemented in com.spvessel.spacevil.TextEdit, com.spvessel.spacevil.WrapGrid, com.spvessel.spacevil.WrapArea, com.spvessel.spacevil.ListBox, com.spvessel.spacevil.TextView, com.spvessel.spacevil.TreeItem, com.spvessel.spacevil.OpenEntryDialog, com.spvessel.spacevil.Tab, com.spvessel.spacevil.ListArea, com.spvessel.spacevil.TextArea, com.spvessel.spacevil.ComboBox, com.spvessel.spacevil.ComboBoxDropDown, com.spvessel.spacevil.Label, com.spvessel.spacevil.TitleBar, com.spvessel.spacevil.ProgressBar, com.spvessel.spacevil.ContextMenu, com.spvessel.spacevil.MenuItem, com.spvessel.spacevil.RadioButton, com.spvessel.spacevil.SideArea, com.spvessel.spacevil.MessageItem, com.spvessel.spacevil.CheckBox, com.spvessel.spacevil.PopUpMessage, com.spvessel.spacevil.TabView, com.spvessel.spacevil.ButtonToggle, com.spvessel.spacevil.LoadingScreen, com.spvessel.spacevil.PasswordLine, com.spvessel.spacevil.TreeView, com.spvessel.spacevil.FileSystemEntry, com.spvessel.spacevil.ButtonCore, com.spvessel.spacevil.HorizontalSlider, com.spvessel.spacevil.VerticalSlider, com.spvessel.spacevil.HorizontalSplitArea, com.spvessel.spacevil.VerticalSplitArea, com.spvessel.spacevil.ToolTipItem, com.spvessel.spacevil.InputDialog, com.spvessel.spacevil.SpinItem, com.spvessel.spacevil.VerticalScrollBar, com.spvessel.spacevil.HorizontalScrollBar, com.spvessel.spacevil.DialogItem, com.spvessel.spacevil.SplitHolder, and com.spvessel.spacevil.Indicator.

◆ setToolTip()

void com.spvessel.spacevil.Prototype.setToolTip ( String  text)

Setting tooltip text of the item.

Tooltip is hint about an item that appears when you hold the mouse cursor over an item long enough.

Parameters
textTooltip text.

◆ setTriangles()

void com.spvessel.spacevil.Prototype.setTriangles ( List< float[]>  triangles)

Setting triangles as item's shape.

Parameters
trianglesPoints list of the shape as List of float[2] array (2D).

Implements com.spvessel.spacevil.Core.InterfaceItem.

◆ setVisible()

void com.spvessel.spacevil.Prototype.setVisible ( boolean  value)

Setting the visibility status of an item.

This property may used in conjunction with the isDrawable() property.

Parameters
valueTrue: if item should be visible. False: if item should be invisible.

Implements com.spvessel.spacevil.Core.InterfaceBaseItem.

◆ setWidth()

void com.spvessel.spacevil.Prototype.setWidth ( int  width)

◆ setWidthPolicy()

void com.spvessel.spacevil.Prototype.setWidthPolicy ( SizePolicy  policy)

Setting width policy of an item's shape.

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

Parameters
policyWidth policy as com.spvessel.spacevil.Flags.SizePolicy.

Implements com.spvessel.spacevil.Core.InterfaceBehavior.

◆ setX()

void com.spvessel.spacevil.Prototype.setX ( int  x)

◆ setY()

void com.spvessel.spacevil.Prototype.setY ( int  y)

◆ update()

void com.spvessel.spacevil.Prototype.update ( GeometryEventType  type,
int  value 
)

Updating an item size or/and position.

Parameters
typeType of event as com.spvessel.spacevil.Flags.GeometryEventType.
valueValue of a property that was changed.

Implements com.spvessel.spacevil.Core.InterfaceEventUpdate.

◆ updateState()

void com.spvessel.spacevil.Prototype.updateState ( )
protected

Updating Prototype's state according to its ItemStateType.

Member Data Documentation

◆ eventDestroy

EventCommonMethodState com.spvessel.spacevil.Prototype.eventDestroy = new EventCommonMethodState()

Event that is invoked when an item is destroyed (removed).

◆ eventKeyPress

EventKeyMethodState com.spvessel.spacevil.Prototype.eventKeyPress = new EventKeyMethodState()

Event that is invoked when key of keyboard is pressed.

◆ eventKeyRelease

EventKeyMethodState com.spvessel.spacevil.Prototype.eventKeyRelease = new EventKeyMethodState()

Event that is invoked when key of keyboard is released.

◆ eventMouseClick

EventMouseMethodState com.spvessel.spacevil.Prototype.eventMouseClick = new EventMouseMethodState()

Event that is invoked when mouse click (release) on an item.

◆ eventMouseDoubleClick

EventMouseMethodState com.spvessel.spacevil.Prototype.eventMouseDoubleClick = new EventMouseMethodState()

Event that is invoked when mouse double click on an item.

◆ eventMouseDrag

EventMouseMethodState com.spvessel.spacevil.Prototype.eventMouseDrag = new EventMouseMethodState()

Event that is invoked when mouse drag on an item.

◆ eventMouseDrop

EventMouseMethodState com.spvessel.spacevil.Prototype.eventMouseDrop = new EventMouseMethodState()

Event that is invoked when mouse drop on an item.

◆ eventMouseHover

EventMouseMethodState com.spvessel.spacevil.Prototype.eventMouseHover = new EventMouseMethodState()

Event that is invoked when mouse cursor enters inside an item area.

◆ eventMouseLeave

EventMouseMethodState com.spvessel.spacevil.Prototype.eventMouseLeave = new EventMouseMethodState()

Event that is invoked when mouse cursor leaves inside an item area.

◆ eventMousePress

EventMouseMethodState com.spvessel.spacevil.Prototype.eventMousePress = new EventMouseMethodState()

Event that is invoked when mouse press on an item.

◆ eventResize

EventCommonMethodState com.spvessel.spacevil.Prototype.eventResize = new EventCommonMethodState()

Event that is invoked when an item is resizing.

◆ eventScrollDown

EventMouseMethodState com.spvessel.spacevil.Prototype.eventScrollDown = new EventMouseMethodState()

Event that is invoked when mouse wheel scrolls down on an item.

◆ eventScrollUp

EventMouseMethodState com.spvessel.spacevil.Prototype.eventScrollUp = new EventMouseMethodState()

Event that is invoked when mouse wheel scrolls up on an item.

◆ eventTextInput

EventInputTextMethodState com.spvessel.spacevil.Prototype.eventTextInput = new EventInputTextMethodState()

Event that is invoked when typing text on the keyboard.

◆ isFocusable

boolean com.spvessel.spacevil.Prototype.isFocusable = true

Item's focusable property.

True: this item can get focus. False: this item cannot get focus.


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