Package hoverball
Class Application
java.lang.Object
hoverball.Application
public abstract class Application
extends java.lang.Object
The class Application administrates the outer window where all windows of a Hoverball application
are displayed.
All Hoverball windows are represented as internal frames (class JInternalFrame). Only the application window is a top-level frame (class JFrame) that shows the Hoverball windows on its desktop (class JDesktopPane). Please note:
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Application()
-
Method Summary
Modifier and Type Method Description static void
connect(java.lang.String address)
Connects the Hoverball application to the specified address.static void
disconnect()
Disconnects the Hoverball application.static void
exit()
Closes the application window and quits the program.static java.awt.Rectangle
getBounds()
Returns the application window bounds.static java.lang.String
getTitle()
Returns the application window title.static void
hide()
Hides the application window.static void
setBounds()
Adjusts the application window to a single displayed window.static void
setBounds(double ratio)
Defines the application window bounds.static void
setBounds(java.awt.Dimension size)
Defines the application window bounds.static void
setBounds(java.awt.Rectangle bounds)
Defines the application window bounds.static void
setTitle(java.lang.String title)
Defines the application window title.static void
show()
Shows the application window (explicit call not necessary).
-
Field Details
-
Constructor Details
-
Application
public Application()
-
-
Method Details
-
connect
public static void connect(java.lang.String address)Connects the Hoverball application to the specified address.- Parameters:
address
- network address
-
disconnect
public static void disconnect()Disconnects the Hoverball application. -
getBounds
public static java.awt.Rectangle getBounds()Returns the application window bounds.- Returns:
- the bounds
-
setBounds
public static void setBounds()Adjusts the application window to a single displayed window.When the application window is opened, it assumes the attributes of the first visible window in the list of the dektop.
-
setBounds
public static void setBounds(double ratio)Defines the application window bounds.- Parameters:
ratio
- ratio frame bounds / full screen (between 0 and 1)
-
setBounds
public static void setBounds(java.awt.Dimension size)Defines the application window bounds.- Parameters:
size
- frame size
-
setBounds
public static void setBounds(java.awt.Rectangle bounds)Defines the application window bounds.- Parameters:
bounds
- frame bounds
-
getTitle
public static java.lang.String getTitle()Returns the application window title.- Returns:
- the title
-
setTitle
public static void setTitle(java.lang.String title)Defines the application window title.- Parameters:
title
- title
-
exit
public static void exit()Closes the application window and quits the program. -
show
public static void show()Shows the application window (explicit call not necessary). -
hide
public static void hide()Hides the application window. If this method is called at the beginning, the Application window will not be shown automatically and stays hidden.
-