public class MinimumSizeComponentListener extends Object implements ComponentListener
| Constructor and Description |
|---|
MinimumSizeComponentListener(Component comp,
int minWidth,
int minHeight)
Constructor for the MinimumSizeComponentListener.
|
| Modifier and Type | Method and Description |
|---|---|
void |
componentHidden(ComponentEvent ev) |
void |
componentMoved(ComponentEvent ev) |
void |
componentResized(ComponentEvent ev)
ComponentListener implementation.
|
void |
componentShown(ComponentEvent ev) |
public MinimumSizeComponentListener(Component comp, int minWidth, int minHeight)
comp - the component for which we want to set a minimum sizeminWidth - the minimum width for the componentminHeight - the minimum height for the componentpublic void componentResized(ComponentEvent ev)
When the method is called check the size and if it is below the minimum size specified in the constructor, resize it to the minimum size.
componentResized in interface ComponentListenerev - the component event.public void componentMoved(ComponentEvent ev)
componentMoved in interface ComponentListenerpublic void componentShown(ComponentEvent ev)
componentShown in interface ComponentListenerpublic void componentHidden(ComponentEvent ev)
componentHidden in interface ComponentListenerCopyright © 2010-2020 Wren Security. All Rights Reserved.