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.MessageBox Class Reference

MessageBox - a modal window for displaying any messages with ability to reply to them. More...

Inherits com.spvessel.spacevil.DialogWindow.

Public Member Functions

boolean getResult ()
 Get MessageBox boolean result. More...
 
int getUserButtonResult ()
 Getting result from custom toolbar (if it was created). More...
 
ButtonCore getOkButton ()
 Getting OK button for appearance customizing or assigning new actions. More...
 
ButtonCore getCancelButton ()
 Getting CANCEL button for appearance customizing or assigning new actions. More...
 
 MessageBox ()
 Default MessageBox constructor. More...
 
 MessageBox (String message, String title)
 Constructs a MessageBox with specified message and title. More...
 
void setMessageText (String text)
 Setting a text of message of MessageBox. More...
 
String getMessageText ()
 Getting the current text of message of MessageBox. More...
 
void setTitle (String title)
 Setting a text of title of MessageBox. More...
 
String getTitle ()
 Getting the current text of title of MessageBox. More...
 
void initWindow ()
 Initialize MessageBox window. More...
 
void show ()
 Show MessageBox window. More...
 
void close ()
 Close MessageBox window. More...
 
void addUserButton (ButtonCore button, int id)
 Adding a custom user button to toolbal with the specified ID. More...
 
Style getDialogButtonStyle ()
 Getting the current style of a custom user button (that placed into user's toolbar). More...
 
void setDialogButtonStyle (Style style)
 Setting a style for a custom user button (that placed into user's toolbar). More...
 
void setStyle (Style style)
 Setting a style for entire MessageBox. More...
 
- Public Member Functions inherited from com.spvessel.spacevil.DialogWindow
 DialogWindow ()
 Constructs a DialogWindow. More...
 
- Public Member Functions inherited from com.spvessel.spacevil.CoreWindow
 CoreWindow ()
 Constructs a CoreWindow. More...
 
void setParameters (String name, String title)
 Setting basic window attributes. More...
 
void setParameters (String name, String title, int width, int height)
 Setting basic window attributes. More...
 
void setParameters (String name, String title, int width, int height, boolean isBorder)
 Setting basic window attributes. More...
 
int getCount ()
 
UUID getWindowGuid ()
 
void setBackground (Color color)
 Setting window background color. More...
 
void setBackground (int r, int g, int b)
 Setting window background color. More...
 
void setBackground (int r, int g, int b, int a)
 Setting window background color. More...
 
void setBackground (float r, float g, float b)
 Setting window background color. More...
 
void setBackground (float r, float g, float b, float a)
 Setting window background color. More...
 
Color getBackground ()
 Getting window background color. More...
 
void setPadding (Indents padding)
 Setting padding indents. More...
 
void setPadding (int left, int top, int right, int bottom)
 Setting padding indents. More...
 
List< InterfaceBaseItemgetItems ()
 Getting items as a list of IBaseItem items. More...
 
void addItem (InterfaceBaseItem item)
 Adding an item to the window. More...
 
void addItems (InterfaceBaseItem... items)
 Allows to add multiple items to the window. More...
 
void insertItem (InterfaceBaseItem item, int index)
 Allows you to insert an item at a specified position. More...
 
boolean removeItem (InterfaceBaseItem item)
 Removing a specified item. More...
 
void clear ()
 Removing all containing items in the window. More...
 
void setWindowName (String value)
 Setting the window name. More...
 
String getWindowName ()
 Getting the window name. More...
 
void setWindowTitle (String title)
 Setting the window title text. More...
 
String getWindowTitle ()
 Getting the title text. More...
 
void setWidth (int width)
 Setting the window width. More...
 
void setHeight (int height)
 Setting the window height. More...
 
void setSize (int width, int height)
 Setting the window size in pixels: width and height. More...
 
void setMinWidth (int width)
 Setting the window minimum width. More...
 
void setMinHeight (int height)
 Setting the window minimum height. More...
 
void setMinSize (int width, int height)
 Setting the minimum window size in pixels: width and height. More...
 
void setMaxWidth (int width)
 Setting the window maximum width. More...
 
void setMaxHeight (int height)
 Setting the window maximum height. More...
 
void setMaxSize (int width, int height)
 Setting the maximum window size in pixels: width and height. More...
 
int getMinWidth ()
 Getting the current minimum window width. More...
 
int getWidth ()
 Getting the current minimum window width. More...
 
int getMaxWidth ()
 Getting the current maximum window width. More...
 
int getMinHeight ()
 Getting the current minimum window height. More...
 
int getHeight ()
 Getting the current window height. More...
 
int getMaxHeight ()
 Getting the current maximum window height. More...
 
Size getSize ()
 Getting the current window size. More...
 
void setX (int x)
 Setting the window x-coordinate (the left-top window corner). More...
 
int getX ()
 Getting the current window x-coordinate. More...
 
void setY (int y)
 Setting the window y-coordinate (the left-top window corner). More...
 
int getY ()
 Getting the current window y-coordinate. More...
 
void setPosition (int x, int y)
 Setting the window x-coordinate and y-coordinate (the left-top window corner). More...
 
void setPosition (Position position)
 Setting the window x-coordinate and y-coordinate (the left-top window corner). More...
 
Position getPosition ()
 Getting the current window position. More...
 
void setAntiAliasingQuality (MSAA msaa)
 Setting the anti aliasing quality (off, x2, x4, x8). More...
 
boolean isFocused ()
 Lets to know if the current window is focused or not. More...
 
void focus ()
 Sets the window focused. More...
 
void minimize ()
 Sets the window minimized. More...
 
void maximize ()
 Sets the window maximized. More...
 
void toggleFullScreen ()
 Toggles the window to full screen mode or windowed mode. More...
 
Prototype getFocusedItem ()
 Getting the current focused item in the current window. More...
 
void setFocusedItem (Prototype item)
 Setting the specified item to the focused state. More...
 
void resetFocus ()
 Returns focus to the root item of the window. More...
 
void setIcon (BufferedImage icon_big, BufferedImage icon_small)
 Sets the icons of the current window. More...
 
void setHidden (Boolean value)
 Hides of unhides the current window. More...
 
void setRenderFrequency (RedrawFrequency value)
 Lets to set the rendering frequency. More...
 
RedrawFrequency getRenderFrequency ()
 Getting the current rendering frequency. More...
 
void setAspectRatio (int w, int h)
 Lets to set aspect ratio. More...
 
void setBorder (Border border)
 Setting the border of the root item of the window. More...
 
void setBorderFill (Color fill)
 Setting the color of the window border. More...
 
void setBorderFill (int r, int g, int b)
 Setting the color of the window border. More...
 
void setBorderFill (int r, int g, int b, int a)
 Setting the color of the window border. More...
 
void setBorderFill (float r, float g, float b)
 Setting the color of the window border. More...
 
void setBorderFill (float r, float g, float b, float a)
 Setting the color of the window border. More...
 
void setBorderRadius (CornerRadius radius)
 Setting the corner radii of the window border. More...
 
void setBorderRadius (int radius)
 Setting the common corner radius of the window border. More...
 
void setBorderThickness (int thickness)
 Setting the window border thickness. More...
 
CornerRadius getBorderRadius ()
 Getting the current window border corner radii. More...
 
int getBorderThickness ()
 Getting the current window border thickness. More...
 
Color getBorderFill ()
 Getting the current window border color. More...
 
long getGLWID ()
 Getting the GLFW ID of the window. More...
 
void setShadeColor (Color color)
 Setting the dimmer color of the window. More...
 
void setShadeColor (int r, int g, int b)
 Setting the dimmer color of the window. More...
 
void setShadeColor (int r, int g, int b, int a)
 Setting the dimmer color of the window. More...
 
void setShadeColor (float r, float g, float b)
 Setting the dimmer color of the window. More...
 
void setShadeColor (float r, float g, float b, float a)
 Setting the dimmer color of the window. More...
 
Color getShadeColor ()
 Getting the current dimmer color. More...
 
Area getWorkArea ()
 Getting the area of a primary monitor. More...
 
Scale getDpiScale ()
 Getting DPI scale for the current window. More...
 
final void hold ()
 Makes this window inactive. More...
 
final void proceed ()
 Restores window activity. More...
 

Public Attributes

EventCommonMethod onCloseDialog = new EventCommonMethod()
 An event to describe the actions that must be performed after the window is closed. More...
 
- Public Attributes inherited from com.spvessel.spacevil.CoreWindow
boolean isDialog
 
boolean isClosed
 
boolean isHidden
 
boolean isResizable
 
boolean isAlwaysOnTop
 
boolean isBorderHidden
 
boolean isCentered
 
boolean isFocusable
 
boolean isOutsideClickClosable
 
boolean isMaximized
 
boolean isTransparent
 
EventCommonMethod eventOnStart = new EventCommonMethod()
 Lets to describe the actions when the window starts. More...
 
EventCommonMethod eventClose = new EventCommonMethod()
 Lets to describe the actions when closing the window. More...
 
EventDropMethodState eventDrop = new EventDropMethodState()
 Lets to describe the actions when you drag and drop files/folders to the current window. More...
 
EventCommonMethodState eventResize = new EventCommonMethodState()
 ATTENTION! Not implemented yet. More...
 
EventCommonMethodState eventDestroy = new EventCommonMethodState()
 ATTENTION! Not implemented yet. More...
 
EventMouseMethodState eventMouseHover = new EventMouseMethodState()
 Lets to describe the actions when mouse cursor hovers the root item of the window. More...
 
EventMouseMethodState eventMouseLeave = new EventMouseMethodState()
 Lets to describe the actions when mouse cursor leaves the root item of the window. More...
 
EventMouseMethodState eventMouseClick = new EventMouseMethodState()
 Lets to describe the actions when the root item of the window was clicked. More...
 
EventMouseMethodState eventMouseDoubleClick = new EventMouseMethodState()
 Lets to describe the actions when the root item of the window was double clicked. More...
 
EventMouseMethodState eventMousePress = new EventMouseMethodState()
 Lets to describe the actions when the root item of the window was pressed. More...
 
EventMouseMethodState eventMouseDrag = new EventMouseMethodState()
 Lets to describe the actions when the mouse button was pressed and moved inside the root item of the window. More...
 
EventMouseMethodState eventMouseDrop = new EventMouseMethodState()
 Lets to describe the actions when the mouse button was released after dragging. More...
 
EventMouseMethodState eventScrollUp = new EventMouseMethodState()
 Lets to describe the actions when mouse wheel scrolls up. More...
 
EventMouseMethodState eventScrollDown = new EventMouseMethodState()
 Lets to describe the actions when mouse wheel scrolls down. More...
 
EventKeyMethodState eventKeyPress = new EventKeyMethodState()
 Lets to describe the actions when a keyboard key was pressed. More...
 
EventKeyMethodState eventKeyRelease = new EventKeyMethodState()
 Lets to describe the actions when a keyboard key was released. More...
 
EventInputTextMethodState eventTextInput = new EventInputTextMethodState()
 Lets to describe the actions when you type text. More...
 

Detailed Description

MessageBox - a modal window for displaying any messages with ability to reply to them.

It supports custom toolbar to make user's reply flexible.

Constructor & Destructor Documentation

◆ MessageBox() [1/2]

com.spvessel.spacevil.MessageBox.MessageBox ( )

Default MessageBox constructor.

◆ MessageBox() [2/2]

com.spvessel.spacevil.MessageBox.MessageBox ( String  message,
String  title 
)

Constructs a MessageBox with specified message and title.

Parameters
messageMessage to a user as java.lang.String.
titleTitle of MessageBox as java.lang.String.

Member Function Documentation

◆ addUserButton()

void com.spvessel.spacevil.MessageBox.addUserButton ( ButtonCore  button,
int  id 
)

Adding a custom user button to toolbal with the specified ID.

Parameters
buttonUser button as com.spvessel.spacevil.ButtonCore.
idButton's ID as integer value.

◆ close()

void com.spvessel.spacevil.MessageBox.close ( )

Close MessageBox window.

Reimplemented from com.spvessel.spacevil.CoreWindow.

◆ getCancelButton()

ButtonCore com.spvessel.spacevil.MessageBox.getCancelButton ( )

Getting CANCEL button for appearance customizing or assigning new actions.

Returns
MessageBox's CANCEL button as com.spvessel.spacevil.ButtonCore.

◆ getDialogButtonStyle()

Style com.spvessel.spacevil.MessageBox.getDialogButtonStyle ( )

Getting the current style of a custom user button (that placed into user's toolbar).

Returns
The current style of custom user button as com.spvessel.spacevil.Decorations.Style.

◆ getMessageText()

String com.spvessel.spacevil.MessageBox.getMessageText ( )

Getting the current text of message of MessageBox.

Returns
The current text of message as java.lang.String.

◆ getOkButton()

ButtonCore com.spvessel.spacevil.MessageBox.getOkButton ( )

Getting OK button for appearance customizing or assigning new actions.

Returns
MessageBox's OK button as MessageBox's OK button as com.spvessel.spacevil.ButtonCore.

◆ getResult()

boolean com.spvessel.spacevil.MessageBox.getResult ( )

Get MessageBox boolean result.

Default: False

Returns
True: OK button was clicked. False: Close button or Cancel button was clicked.

◆ getTitle()

String com.spvessel.spacevil.MessageBox.getTitle ( )

Getting the current text of title of MessageBox.

Returns
The current text of title as java.lang.String.

◆ getUserButtonResult()

int com.spvessel.spacevil.MessageBox.getUserButtonResult ( )

Getting result from custom toolbar (if it was created).

Returns
Id of clicked button (see addUserButton(ButtonCore button, int id)).

◆ initWindow()

void com.spvessel.spacevil.MessageBox.initWindow ( )

Initialize MessageBox window.

Reimplemented from com.spvessel.spacevil.CoreWindow.

◆ setDialogButtonStyle()

void com.spvessel.spacevil.MessageBox.setDialogButtonStyle ( Style  style)

Setting a style for a custom user button (that placed into user's toolbar).

Parameters
styleA style for custom user button as com.spvessel.spacevil.Decorations.Style.

◆ setMessageText()

void com.spvessel.spacevil.MessageBox.setMessageText ( String  text)

Setting a text of message of MessageBox.

Parameters
textText of message as java.lang.String.

◆ setStyle()

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

Setting a style for entire MessageBox.

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

Parameters
styleA style for MessageBox as com.spvessel.spacevil.Decorations.Style.

◆ setTitle()

void com.spvessel.spacevil.MessageBox.setTitle ( String  title)

Setting a text of title of MessageBox.

Parameters
titleText of title as java.lang.String.

◆ show()

void com.spvessel.spacevil.MessageBox.show ( )

Show MessageBox window.

Reimplemented from com.spvessel.spacevil.DialogWindow.

Member Data Documentation

◆ onCloseDialog

EventCommonMethod com.spvessel.spacevil.MessageBox.onCloseDialog = new EventCommonMethod()

An event to describe the actions that must be performed after the window is closed.

Event type: com.spvessel.spacevil.Core.EventCommonMethod.

Function arguments: none.


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