Package de.hshannover.dqgui.framework
Class WindowInstances
- java.lang.Object
-
- de.hshannover.dqgui.framework.WindowInstances
-
public final class WindowInstances extends java.lang.Object
Amount of window instances that can exist at the time of a view managed by theApplicationContext
.
Managed by identifier means that there can be n instances but they correspond to an identifier so calling them again will force the window in the foreground if a window with the called identifier is already loaded.
-
-
Field Summary
Fields Modifier and Type Field Description static WindowInstances
ONCE_AT_A_TIME
Only one window with the view can exist at the time.
If theApplicationContext
receives a load call the window referencing the view will be forced in the foreground.
These are not managed by an identifier.static WindowInstances
UNLIMITED
An unlimited amount of windows with the view can exist.
These are not managed by an identifier.static WindowInstances
UNLIMITED_MANAGED_BY_IDENTIFIER
An unlimited amount of windows with the view can exist.
These are managed by an identifier.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getPossibleInstances()
int
hashCode()
boolean
isIdentifierManaged()
static WindowInstances
of(int possibleInstances)
Create a WindowInstances object that is not managed by an identifier.
-1 means unlimited instances in this context.static WindowInstances
ofIdentifierManaged(int possibleInstances)
Create a WindowInstances object that is managed by an identifier.
-1 means unlimited instances in this context.
-
-
-
Field Detail
-
UNLIMITED
public static final WindowInstances UNLIMITED
An unlimited amount of windows with the view can exist.
These are not managed by an identifier.
-
UNLIMITED_MANAGED_BY_IDENTIFIER
public static final WindowInstances UNLIMITED_MANAGED_BY_IDENTIFIER
An unlimited amount of windows with the view can exist.
These are managed by an identifier.
-
ONCE_AT_A_TIME
public static final WindowInstances ONCE_AT_A_TIME
Only one window with the view can exist at the time.
If theApplicationContext
receives a load call the window referencing the view will be forced in the foreground.
These are not managed by an identifier.
-
-
Method Detail
-
of
public static WindowInstances of(int possibleInstances)
Create a WindowInstances object that is not managed by an identifier.
-1 means unlimited instances in this context.- Parameters:
possibleInstances
- number of possible instances.- Returns:
- possible window instances object.
- Throws:
java.lang.IllegalArgumentException
- if not -1 or > 0
-
ofIdentifierManaged
public static WindowInstances ofIdentifierManaged(int possibleInstances)
Create a WindowInstances object that is managed by an identifier.
-1 means unlimited instances in this context.- Parameters:
possibleInstances
- number of possible instances.- Returns:
- possible window instances object.
- Throws:
java.lang.IllegalArgumentException
- if not -1 or > 1
-
getPossibleInstances
public int getPossibleInstances()
- Returns:
- amount of possible instances.
-1 means unlimited
-
isIdentifierManaged
public boolean isIdentifierManaged()
- Returns:
- true if managed by an identifier
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-