- java.lang.Object
-
- org.icepdf.ri.viewer.WindowManager
-
- All Implemented Interfaces:
WindowManagementCallback
public class WindowManager extends Object implements WindowManagementCallback
An implementation of WindowManagementCallback to manage the viewer applications windows.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringAPPLICATION_HEIGHTstatic StringAPPLICATION_WIDTHstatic StringAPPLICATION_X_OFFSETstatic StringAPPLICATION_Y_OFFSETstatic ControllerFactorycontrollerFactorystatic intNEW_WINDOW_OFFSETstatic ViewBuilderFactoryviewBuilderFactory
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbringAllWindowsToFront(Controller frontMost)voidbringWindowToFront(int index)protected ControllercommonWindowCreation()protected ControllercommonWindowCreation(boolean isVisible)static WindowManagercreateInstance(ViewerPropertiesManager properties, ResourceBundle messageBundle)voiddisposeWindow(Controller controller, Frame viewer, Preferences preferences)Collection<Controller>getControllers()static WindowManagergetInstance()longgetNumberOfWindows()ViewerPropertiesManagergetProperties()ListgetWindowDocumentOriginList(Controller giveIndex)As long as no windows have opened or closed, then the indexes in the returned list should still be valid for doing operations on the respective Controller objectsvoidminimiseAllWindows()voidnewWindow(String location)voidnewWindow(String location, String printer)voidnewWindow(URL location)voidnewWindow(URL location, String printer)voidnewWindow(Document document, String fileName)voidnewWindow(Document document, String fileName, String printer)static voidnewWindowLocation(Container frame)Loads the last used windows location as well as other frame related settings and insures the frame is visible.voidquit(Controller controller, Frame viewer, Preferences preferences)static voidsaveViewerState(Container viewer)
-
-
-
Field Detail
-
APPLICATION_WIDTH
public static final String APPLICATION_WIDTH
- See Also:
- Constant Field Values
-
APPLICATION_HEIGHT
public static final String APPLICATION_HEIGHT
- See Also:
- Constant Field Values
-
APPLICATION_X_OFFSET
public static final String APPLICATION_X_OFFSET
- See Also:
- Constant Field Values
-
APPLICATION_Y_OFFSET
public static final String APPLICATION_Y_OFFSET
- See Also:
- Constant Field Values
-
NEW_WINDOW_OFFSET
public static final int NEW_WINDOW_OFFSET
- See Also:
- Constant Field Values
-
controllerFactory
public static ControllerFactory controllerFactory
-
viewBuilderFactory
public static final ViewBuilderFactory viewBuilderFactory
-
-
Method Detail
-
getInstance
public static WindowManager getInstance()
-
createInstance
public static WindowManager createInstance(ViewerPropertiesManager properties, ResourceBundle messageBundle)
-
getProperties
public ViewerPropertiesManager getProperties()
- Specified by:
getPropertiesin interfaceWindowManagementCallback
-
getNumberOfWindows
public long getNumberOfWindows()
-
getControllers
public Collection<Controller> getControllers()
- Specified by:
getControllersin interfaceWindowManagementCallback
-
newWindow
public void newWindow(String location)
- Specified by:
newWindowin interfaceWindowManagementCallback
-
newWindow
public void newWindow(URL location)
- Specified by:
newWindowin interfaceWindowManagementCallback
-
commonWindowCreation
protected Controller commonWindowCreation()
-
commonWindowCreation
protected Controller commonWindowCreation(boolean isVisible)
-
newWindowLocation
public static void newWindowLocation(Container frame)
Loads the last used windows location as well as other frame related settings and insures the frame is visible.- Parameters:
frame- parent window containers.
-
saveViewerState
public static void saveViewerState(Container viewer)
-
disposeWindow
public void disposeWindow(Controller controller, Frame viewer, Preferences preferences)
- Specified by:
disposeWindowin interfaceWindowManagementCallback
-
quit
public void quit(Controller controller, Frame viewer, Preferences preferences)
- Specified by:
quitin interfaceWindowManagementCallback
-
minimiseAllWindows
public void minimiseAllWindows()
- Specified by:
minimiseAllWindowsin interfaceWindowManagementCallback
-
bringAllWindowsToFront
public void bringAllWindowsToFront(Controller frontMost)
- Specified by:
bringAllWindowsToFrontin interfaceWindowManagementCallback
-
bringWindowToFront
public void bringWindowToFront(int index)
- Specified by:
bringWindowToFrontin interfaceWindowManagementCallback
-
getWindowDocumentOriginList
public List getWindowDocumentOriginList(Controller giveIndex)
As long as no windows have opened or closed, then the indexes in the returned list should still be valid for doing operations on the respective Controller objects- Specified by:
getWindowDocumentOriginListin interfaceWindowManagementCallback- Parameters:
giveIndex- Give this SwingControllers index in the list as an Integer appended to the List- Returns:
- List of String objects, each representing an open Document's origin. The last element may be an Integer
-
-