Class NullCloseButton
- java.lang.Object
-
- ch.swingfx.twinkle.style.closebutton.NullCloseButton
-
- All Implemented Interfaces:
ICloseButton
public class NullCloseButton extends java.lang.Object implements ICloseButton
ANullCloseButton
is an invisible close button. So if you don't want to display a close button use this class.
-
-
Constructor Summary
Constructors Constructor Description NullCloseButton()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isMouseOverCloseButton(java.awt.Point mousePosition)
Test if the mouse is over the close buttonvoid
paintCloseButton(java.awt.Graphics g)
Paint the close buttonICloseButton
withPosition(int x, int y)
Set the position of the close button
-
-
-
Method Detail
-
paintCloseButton
public void paintCloseButton(java.awt.Graphics g)
Description copied from interface:ICloseButton
Paint the close button- Specified by:
paintCloseButton
in interfaceICloseButton
- Parameters:
g
-Graphics
to paint on
-
isMouseOverCloseButton
public boolean isMouseOverCloseButton(java.awt.Point mousePosition)
Description copied from interface:ICloseButton
Test if the mouse is over the close button- Specified by:
isMouseOverCloseButton
in interfaceICloseButton
- Parameters:
mousePosition
- position of the mouse- Returns:
- true if mouse if over the button
-
withPosition
public ICloseButton withPosition(int x, int y)
Description copied from interface:ICloseButton
Set the position of the close button- Specified by:
withPosition
in interfaceICloseButton
- Parameters:
x
- x positiony
- y position- Returns:
- this
ICloseButton
-
-