Class ForceMaxSize
java.lang.Object
com.jackmeng.halcyoninae.cosmos.components.ForceMaxSize
- All Implemented Interfaces:
ComponentListener,EventListener
This class forces a certain size limit upon a JFrame.
This means it can only be: >= minWidth x >= minHeight
This mode can be quite janky at times, making the application glitch around if the Max or Min size is exceeded.
- Since:
- 3.0
- Author:
- Jack Meng
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionForceMaxSize(int MAX_WIDTH, int MAX_HEIGHT, int MIN_WIDTH, int MIN_HEIGHT) Constructs this object instance with the necessary instance variables. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoid
-
Field Details
-
a
private int a -
b
private int b -
c
private int c -
d
private int d
-
-
Constructor Details
-
ForceMaxSize
public ForceMaxSize(int MAX_WIDTH, int MAX_HEIGHT, int MIN_WIDTH, int MIN_HEIGHT) Constructs this object instance with the necessary instance variables.- Parameters:
MAX_WIDTH-MAX_HEIGHT-MIN_WIDTH-MIN_HEIGHT-
-
-
Method Details
-
componentResized
- Specified by:
componentResizedin interfaceComponentListener- Parameters:
e-
-
componentMoved
- Specified by:
componentMovedin interfaceComponentListener- Parameters:
e-
-
componentShown
- Specified by:
componentShownin interfaceComponentListener- Parameters:
e-
-
componentHidden
- Specified by:
componentHiddenin interfaceComponentListener- Parameters:
e-
-