Package com.formdev.flatlaf.ui
Class FlatWindowResizer
- java.lang.Object
-
- com.formdev.flatlaf.ui.FlatWindowResizer
-
- All Implemented Interfaces:
java.awt.event.ComponentListener
,java.beans.PropertyChangeListener
,java.util.EventListener
- Direct Known Subclasses:
FlatWindowResizer.InternalFrameResizer
,FlatWindowResizer.WindowResizer
public abstract class FlatWindowResizer extends java.lang.Object implements java.beans.PropertyChangeListener, java.awt.event.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 javax.swing.JComponent
resizeComp
protected FlatWindowResizer.DragBorderComponent
rightDragComp
protected FlatWindowResizer.DragBorderComponent
topDragComp
protected static java.lang.Integer
WINDOW_RESIZER_LAYER
-
Constructor Summary
Constructors Modifier Constructor Description protected
FlatWindowResizer(javax.swing.JComponent resizeComp)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addNotify()
protected void
beginResizing(int direction)
void
componentHidden(java.awt.event.ComponentEvent e)
void
componentMoved(java.awt.event.ComponentEvent e)
void
componentResized(java.awt.event.ComponentEvent e)
void
componentShown(java.awt.event.ComponentEvent e)
protected FlatWindowResizer.DragBorderComponent
createDragBorderComponent(int leadingResizeDir, int centerResizeDir, int trailingResizeDir)
void
doLayout()
protected void
endResizing()
protected java.awt.Insets
getResizeInsets()
protected abstract java.awt.Rectangle
getWindowBounds()
protected abstract java.awt.Dimension
getWindowMinimumSize()
protected abstract boolean
honorMinimumSizeOnResize()
protected abstract boolean
isWindowResizable()
void
propertyChange(java.beans.PropertyChangeEvent e)
protected void
removeNotify()
protected abstract void
setWindowBounds(java.awt.Rectangle r)
void
uninstall()
protected void
updateVisibility()
-
-
-
Field Detail
-
WINDOW_RESIZER_LAYER
protected static final java.lang.Integer WINDOW_RESIZER_LAYER
-
resizeComp
protected final javax.swing.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
-
-
Method Detail
-
createDragBorderComponent
protected FlatWindowResizer.DragBorderComponent createDragBorderComponent(int leadingResizeDir, int centerResizeDir, int trailingResizeDir)
-
uninstall
public void uninstall()
-
doLayout
public void doLayout()
-
getResizeInsets
protected java.awt.Insets getResizeInsets()
-
addNotify
protected void addNotify()
-
removeNotify
protected void removeNotify()
-
updateVisibility
protected void updateVisibility()
-
isWindowResizable
protected abstract boolean isWindowResizable()
-
getWindowBounds
protected abstract java.awt.Rectangle getWindowBounds()
-
setWindowBounds
protected abstract void setWindowBounds(java.awt.Rectangle r)
-
honorMinimumSizeOnResize
protected abstract boolean honorMinimumSizeOnResize()
-
getWindowMinimumSize
protected abstract java.awt.Dimension getWindowMinimumSize()
-
beginResizing
protected void beginResizing(int direction)
-
endResizing
protected void endResizing()
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
componentResized
public void componentResized(java.awt.event.ComponentEvent e)
- Specified by:
componentResized
in interfacejava.awt.event.ComponentListener
-
componentMoved
public void componentMoved(java.awt.event.ComponentEvent e)
- Specified by:
componentMoved
in interfacejava.awt.event.ComponentListener
-
componentShown
public void componentShown(java.awt.event.ComponentEvent e)
- Specified by:
componentShown
in interfacejava.awt.event.ComponentListener
-
componentHidden
public void componentHidden(java.awt.event.ComponentEvent e)
- Specified by:
componentHidden
in interfacejava.awt.event.ComponentListener
-
-