com.jstatcom.component
Class TopFrameReference
- java.lang.Object
-
- com.jstatcom.component.TopFrameReference
-
public final class TopFrameReference extends java.lang.ObjectClass that simply holds a globally accessable reference to the top frame of the application. This needs to be accessed by classes that show messages that should be modal and centered on the screen. The reference should be set at program start. This class is a Singleton.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static javax.swing.JFramegetTopFrameRef()Gets the top-level reference.static voidsetTopFrameRef(javax.swing.JFrame newTopFrameRef)Set the reference to the top-level frame of the application.
-
-
-
Method Detail
-
getTopFrameRef
public static javax.swing.JFrame getTopFrameRef()
Gets the top-level reference.- Returns:
- the top reference
-
setTopFrameRef
public static void setTopFrameRef(javax.swing.JFrame newTopFrameRef)
Set the reference to the top-level frame of the application. The reference can only be once to make sure that it is a Singleton. This method is not thread-safe.- Parameters:
newTopFrameRef- the new top frame- Throws:
java.lang.IllegalStateException- if the reference was set before
-
-
DMelt 3.0 © DataMelt by jWork.ORG