public interface GUIElement
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Releases all allocated resources.
|
@NotNull java.lang.String |
getName()
Returns the internal name of this gui element.
|
boolean |
isDefault()
Returns whether this element is the default element.
|
boolean |
isIgnore()
Returns whether this gui element is to be ignored for user interaction.
|
void |
mouseClicked(@NotNull java.awt.event.MouseEvent e)
Will be called when the user has clicked (pressed+released) this element.
|
void |
mouseDragged(@NotNull java.awt.event.MouseEvent e)
Will be called when the mouse moves within this component while the
button is pressed.
|
void |
mouseEntered(@NotNull java.awt.event.MouseEvent e)
Will be called when the mouse has entered the bounding box of this
element.
|
void |
mouseExited(@NotNull java.awt.event.MouseEvent e)
Will be called when the mouse has left the bounding box of this element.
|
void |
mouseMoved(@NotNull java.awt.event.MouseEvent e)
Will be called when the mouse moves within this component.
|
void |
mousePressed(@NotNull java.awt.event.MouseEvent e)
Will be called when the user has pressed the mouse inside this element.
|
void |
mouseReleased(@NotNull java.awt.event.MouseEvent e)
Will be called when the user has released the mouse.
|
void |
mouseWheelMoved(int wheelRotation)
Will be called when the mouse wheel has been moved.
|
void |
notifyOpen()
Called each time the enclosing dialog is opened (or raised).
|
void |
setChanged()
Records that the contents have changed and must be repainted.
|
void |
setChangedListener(@Nullable GUIElementChangedListener changedListener)
Sets the
GUIElementChangedListener to be notified. |
void |
setDefault(boolean isDefault)
Sets whether this element is the default element.
|
void |
setIgnore()
Marks this gui element to be ignored for user interaction.
|
void dispose()
boolean isDefault()
void setDefault(boolean isDefault)
isDefault
- whether this element is the default elementvoid setIgnore()
boolean isIgnore()
@NotNull @NotNull java.lang.String getName()
void mouseClicked(@NotNull @NotNull java.awt.event.MouseEvent e)
mouseReleased(MouseEvent)
.e
- the mouse event relative to this elementvoid mouseEntered(@NotNull @NotNull java.awt.event.MouseEvent e)
e
- the mouse event relative to this elementvoid mouseExited(@NotNull @NotNull java.awt.event.MouseEvent e)
mouseEntered(MouseEvent)
has been called before.e
- the mouse event relative to this elementvoid mousePressed(@NotNull @NotNull java.awt.event.MouseEvent e)
e
- the mouse event relative to this elementvoid mouseReleased(@NotNull @NotNull java.awt.event.MouseEvent e)
mousePressed(MouseEvent)
has been
delivered before.e
- the mouse event relative to this elementvoid mouseMoved(@NotNull @NotNull java.awt.event.MouseEvent e)
e
- the mouse event relative to this elementvoid mouseDragged(@NotNull @NotNull java.awt.event.MouseEvent e)
mouseMoved(MouseEvent)
.
Note: if the mouse leaves this element's bounding box while the mouse
button is still pressed, further mouseDragged
(but no
mouseMoved
) events will be generated.
e
- the mouse event relative to this elementvoid mouseWheelMoved(int wheelRotation)
wheelRotation
- the movement amount; negative=away from the user,
positive=towards the uservoid setChanged()
void setChangedListener(@Nullable @Nullable GUIElementChangedListener changedListener)
GUIElementChangedListener
to be notified. Note that at
most one such listener may be set per gui element.changedListener
- the listener or null
to unsetvoid notifyOpen()