Package com.formdev.flatlaf.ui
Class FlatWindowResizer
- java.lang.Object
-
- com.formdev.flatlaf.ui.FlatWindowResizer
-
- All Implemented Interfaces:
ComponentListener
,PropertyChangeListener
,EventListener
- Direct Known Subclasses:
FlatWindowResizer.InternalFrameResizer
,FlatWindowResizer.WindowResizer
public abstract class FlatWindowResizer extends Object implements PropertyChangeListener, ComponentListener
Resizes frames, dialogs or internal frames.Could also be used to implement resize support for any Swing component by creating a new subclass.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
FlatWindowResizer.DragBorderComponent
static class
FlatWindowResizer.InternalFrameResizer
Resizes internal frames.static class
FlatWindowResizer.WindowResizer
Resizes frames and dialogs.
-
Field Summary
Fields Modifier and Type Field Description protected int
borderDragThickness
protected FlatWindowResizer.DragBorderComponent
bottomDragComp
protected int
cornerDragWidth
protected boolean
honorDialogMinimumSizeOnResize
protected boolean
honorFrameMinimumSizeOnResize
protected FlatWindowResizer.DragBorderComponent
leftDragComp
protected JComponent
resizeComp
protected FlatWindowResizer.DragBorderComponent
rightDragComp
protected FlatWindowResizer.DragBorderComponent
topDragComp
protected static Integer
WINDOW_RESIZER_LAYER
-
Constructor Summary
Constructors Modifier Constructor Description protected
FlatWindowResizer(JComponent resizeComp)
-
Method Summary
-
-
-
Field Detail
-
WINDOW_RESIZER_LAYER
protected static final Integer WINDOW_RESIZER_LAYER
-
resizeComp
protected final JComponent resizeComp
-
borderDragThickness
protected final int borderDragThickness
-
cornerDragWidth
protected final int cornerDragWidth
-
honorFrameMinimumSizeOnResize
protected final boolean honorFrameMinimumSizeOnResize
-
honorDialogMinimumSizeOnResize
protected final boolean honorDialogMinimumSizeOnResize
-
topDragComp
protected final FlatWindowResizer.DragBorderComponent topDragComp
-
bottomDragComp
protected final FlatWindowResizer.DragBorderComponent bottomDragComp
-
leftDragComp
protected final FlatWindowResizer.DragBorderComponent leftDragComp
-
rightDragComp
protected final FlatWindowResizer.DragBorderComponent rightDragComp
-
-
Constructor Detail
-
FlatWindowResizer
protected FlatWindowResizer(JComponent resizeComp)
-
-
Method Detail
-
createDragBorderComponent
protected FlatWindowResizer.DragBorderComponent createDragBorderComponent(int leadingResizeDir, int centerResizeDir, int trailingResizeDir)
-
uninstall
public void uninstall()
-
doLayout
public void doLayout()
-
getResizeInsets
protected Insets getResizeInsets()
-
addNotify
protected void addNotify()
-
removeNotify
protected void removeNotify()
-
updateVisibility
protected void updateVisibility()
-
isWindowResizable
protected abstract boolean isWindowResizable()
-
getWindowBounds
protected abstract Rectangle getWindowBounds()
-
setWindowBounds
protected abstract void setWindowBounds(Rectangle r)
-
limitToParentBounds
protected abstract boolean limitToParentBounds()
-
getParentBounds
protected abstract Rectangle getParentBounds()
-
honorMinimumSizeOnResize
protected abstract boolean honorMinimumSizeOnResize()
-
honorMaximumSizeOnResize
protected abstract boolean honorMaximumSizeOnResize()
-
getWindowMinimumSize
protected abstract Dimension getWindowMinimumSize()
-
getWindowMaximumSize
protected abstract Dimension getWindowMaximumSize()
-
beginResizing
protected void beginResizing(int direction)
-
endResizing
protected void endResizing()
-
propertyChange
public void propertyChange(PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
componentResized
public void componentResized(ComponentEvent e)
- Specified by:
componentResized
in interfaceComponentListener
-
componentMoved
public void componentMoved(ComponentEvent e)
- Specified by:
componentMoved
in interfaceComponentListener
-
componentShown
public void componentShown(ComponentEvent e)
- Specified by:
componentShown
in interfaceComponentListener
-
componentHidden
public void componentHidden(ComponentEvent e)
- Specified by:
componentHidden
in interfaceComponentListener
-
-