Package org.faceless.pdf2.viewer2.util
Class BoundedDesktopManager
- java.lang.Object
-
- javax.swing.DefaultDesktopManager
-
- org.faceless.pdf2.viewer2.util.BoundedDesktopManager
-
- All Implemented Interfaces:
Serializable
,DesktopManager
public class BoundedDesktopManager extends DefaultDesktopManager
DesktopManager which ensures JInternalFrames cannot be dragged out of view. Derived from http://stackoverflow.com/questions/8136944/preventing-jinternalframe-from-being-moved-out-of-a-jdesktoppane- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BoundedDesktopManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginDraggingFrame(JComponent f)
void
beginResizingFrame(JComponent f, int direction)
void
setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
-
Methods inherited from class javax.swing.DefaultDesktopManager
activateFrame, closeFrame, deactivateFrame, deiconifyFrame, dragFrame, endDraggingFrame, endResizingFrame, getBoundsForIconOf, getPreviousBounds, iconifyFrame, maximizeFrame, minimizeFrame, openFrame, removeIconFor, resizeFrame, setPreviousBounds, setWasIcon, wasIcon
-
-
-
-
Method Detail
-
beginDraggingFrame
public void beginDraggingFrame(JComponent f)
- Specified by:
beginDraggingFrame
in interfaceDesktopManager
- Overrides:
beginDraggingFrame
in classDefaultDesktopManager
-
beginResizingFrame
public void beginResizingFrame(JComponent f, int direction)
- Specified by:
beginResizingFrame
in interfaceDesktopManager
- Overrides:
beginResizingFrame
in classDefaultDesktopManager
-
setBoundsForFrame
public void setBoundsForFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
- Specified by:
setBoundsForFrame
in interfaceDesktopManager
- Overrides:
setBoundsForFrame
in classDefaultDesktopManager
-
-