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

WindowManager is a static class that is designed to manage instances of a window and entire application. More...

Static Public Member Functions

static void setRenderFrequency (RedrawFrequency value)
 Setting the frequency of redrawing scene in idle state. More...
 
static RedrawFrequency getRenderFrequency ()
 Getting the current render frequency. More...
 
static void enableVSync (int value)
 Setting the vsync value. More...
 
static int getVSyncValue ()
 Getting the current vsync value. More...
 
static void setRenderType (RenderType value)
 Setting the common render type. More...
 
static void addWindow (CoreWindow wnd)
 Adding a window to rendering queue. More...
 
static void closeWindow (CoreWindow wnd)
 Closing the specified window if it exist in render queue. More...
 
static void startWith (CoreWindow... windows)
 Launching the applications and showing all specified windows. More...
 
static void appExit ()
 Exiting the current application. More...
 

Detailed Description

WindowManager is a static class that is designed to manage instances of a window and entire application.

Provides control for changing render frequency, render type, vertical sync, adding/closing windows, exiting the app and more.

Member Function Documentation

◆ addWindow()

static void com.spvessel.spacevil.WindowManager.addWindow ( CoreWindow  wnd)
static

Adding a window to rendering queue.

After adding the window shows up immediately.

Parameters
wndAny CoreWindow instance.

◆ appExit()

static void com.spvessel.spacevil.WindowManager.appExit ( )
static

Exiting the current application.

All windows will be closed and all their eventClose will be executed.

◆ closeWindow()

static void com.spvessel.spacevil.WindowManager.closeWindow ( CoreWindow  wnd)
static

Closing the specified window if it exist in render queue.

Parameters
wndAny CoreWindow instance.

◆ enableVSync()

static void com.spvessel.spacevil.WindowManager.enableVSync ( int  value)
static

Setting the vsync value.

If value is 0 - vsync is OFF, if other value - vsync is ON. The total amount of FPS calculated by the formula: 1.0 / Math.Abs(value) * DisplayRefreshRate, so if value is 2 (or -2) and dysplay refresh rate is 60 then 1.0 / 2 * 60 = 30 fps. Default: 1 - ENABLE.

Parameters
valueValue of vsync.

◆ getRenderFrequency()

static RedrawFrequency com.spvessel.spacevil.WindowManager.getRenderFrequency ( )
static

Getting the current render frequency.

Returns
The current render frequency as com.spvessel.spacevil.Flags.RedrawFrequency.

◆ getVSyncValue()

static int com.spvessel.spacevil.WindowManager.getVSyncValue ( )
static

Getting the current vsync value.

If value is 0 - vsync is OFF, if other value - vsync is ON. The total amount of FPS calculated by the formula: 1.0 / Math.Abs(value) * DisplayRefreshRate, so if value is 2 (or -2) and dysplay refresh rate is 60 then 1.0 / 2 * 60 = 30 fps. Default: 1 - ENABLE.

Returns
The current vsync value

◆ setRenderFrequency()

static void com.spvessel.spacevil.WindowManager.setRenderFrequency ( RedrawFrequency  value)
static

Setting the frequency of redrawing scene in idle state.

The higher the level, the more computer resources are used. Default: SpaceVIL.Core.RedrawFrequency.Low

Can be:

VERY_LOW - 1 frame per second,

LOW - up to 10 frames per second,

MEDIUM - up to 30 frames per second,

HIGH - up to 60 frames per second,

ULTRA - up to 120 frames per second,

Parameters
valueA frequency level as com.spvessel.spacevil.Flags.RedrawFrequency

◆ setRenderType()

static void com.spvessel.spacevil.WindowManager.setRenderType ( RenderType  value)
static

Setting the common render type.

Default: SpaceVIL.Core.RenderType.Periodic.

Can be:

IfNeeded - the scene is redrawn only if any input event occurs (mouse move, mouse click, keyboard key press, window resizing and etc.),

Periodic - the scene is redrawn according to the current render frequency type (See SetRenderFrequency(type)) in idle and every time when any input event occurs,

Always - the scene is constantly being redrawn.

Parameters
valueA render type as com.spvessel.spacevil.Flags.RenderType.

◆ startWith()

static void com.spvessel.spacevil.WindowManager.startWith ( CoreWindow...  windows)
static

Launching the applications and showing all specified windows.

Parameters
windowsA sequence of any amount of CoreWindow instances.

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