Class NullCloseButton
- java.lang.Object
-
- ch.swingfx.twinkle.style.closebutton.NullCloseButton
-
- All Implemented Interfaces:
ICloseButton
public class NullCloseButton extends java.lang.Object implements ICloseButton
ANullCloseButtonis 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 booleanisMouseOverCloseButton(java.awt.Point mousePosition)Test if the mouse is over the close buttonvoidpaintCloseButton(java.awt.Graphics g)Paint the close buttonICloseButtonwithPosition(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:ICloseButtonPaint the close button- Specified by:
paintCloseButtonin interfaceICloseButton- Parameters:
g-Graphicsto paint on
-
isMouseOverCloseButton
public boolean isMouseOverCloseButton(java.awt.Point mousePosition)
Description copied from interface:ICloseButtonTest if the mouse is over the close button- Specified by:
isMouseOverCloseButtonin 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:ICloseButtonSet the position of the close button- Specified by:
withPositionin interfaceICloseButton- Parameters:
x- x positiony- y position- Returns:
- this
ICloseButton
-
-