Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.gui.item.GUIItem Class Referenceabstract

A GUIElement representing an in-game object. More...

+ Inheritance diagram for com.realtime.crossfire.jxclient.gui.item.GUIItem:
+ Collaboration diagram for com.realtime.crossfire.jxclient.gui.item.GUIItem:

Public Member Functions

void activeChanged ()
 
abstract void button1Clicked (final int modifiers)
 Called when the left mouse button was pressed. More...
 
abstract void button2Clicked (final int modifiers)
 Called when the middle mouse button was pressed. More...
 
abstract void button3Clicked (final int modifiers)
 Called when the right mouse button was pressed. More...
 
void execute ()
 
void mouseClicked (@NotNull final MouseEvent e)
 Will be called when the user has clicked (pressed+released) this element.This event will be delivered after mouseReleased(MouseEvent).

Parameters
ethe mouse event relative to this element
More...
 
void setVisible (final boolean aFlag)
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement
abstract void execute ()
 Executes the actions associated with this GUI element. More...
 
boolean isActive ()
 Returns whether a GUI element is active. More...
 
void mousePressed (@NotNull final MouseEvent e)
 Will be called when the user has pressed the mouse inside this element. More...
 
void setActive (final boolean active)
 Sets the active state of a GUI element. More...
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
void dispose ()
 Releases all allocated resources. More...
 
String getName ()
 Returns the internal name of this gui element.The name is used in skin files for identifying an element.

Returns
the name
More...
 
boolean hasTooltipText ()
 Returns whether the tooltip is enabled.
Returns
whether the tooltip is enabled
More...
 
boolean isDefault ()
 Returns whether this element is the default element.The default element is selected with the ENTER key.

Returns
whether this element is the default element
More...
 
boolean isIgnore ()
 Returns whether this gui element is to be ignored for user interaction.
Returns
whether this gui element is ignored
More...
 
void mouseClicked (@NotNull final MouseEvent e)
 Will be called when the user has clicked (pressed+released) this element.This event will be delivered after mouseReleased(MouseEvent).

Parameters
ethe mouse event relative to this element
More...
 
void mouseDragged (@NotNull final MouseEvent e)
 Will be called when the mouse moves within this component while the button is pressed.This event will be delivered after mouseMoved(MouseEvent). Note: if the mouse leaves this element's bounding box while the mouse button is still pressed, further

(but no

) events will be generated.

Parameters
ethe mouse event relative to this element
More...
 
void mouseEntered (@NotNull final MouseEvent e, final boolean debugGui)
 Will be called when the mouse has entered the bounding box of this element.
Parameters
ethe mouse event relative to this element
debugGuiwhether –debug-gui is active
More...
 
void mouseExited (@NotNull final MouseEvent e)
 Will be called when the mouse has left the bounding box of this element.This function will not be called unless boolean) has been called before.

Parameters
ethe mouse event relative to this element
More...
 
void mouseMoved (@NotNull final MouseEvent e)
 Will be called when the mouse moves within this component.before.

Parameters
ethe mouse event relative to this element
More...
 
void mousePressed (@NotNull final MouseEvent e)
 Will be called when the user has pressed the mouse inside this element.
Parameters
ethe mouse event relative to this element
More...
 
void mouseReleased (@NotNull final MouseEvent e)
 Will be called when the user has released the mouse.This event may be delivered even if no previous mousePressed(MouseEvent) has been delivered before.

Parameters
ethe mouse event relative to this element
More...
 
void setChanged ()
 Records that the contents have changed and must be repainted. More...
 
void setChangedListener (@Nullable final GUIElementChangedListener changedListener)
 Sets the GUIElementChangedListener to be notified.Note that at most one such listener may be set per gui element.

Parameters
changedListenerthe listener or
null
to unset
More...
 
void setDefault (final boolean isDefault)
 Sets whether this element is the default element.The default element is selected with the ENTER key.

Parameters
isDefaultwhether this element is the default element
More...
 
void setIgnore ()
 Marks this gui element to be ignored for user interaction. More...
 
void setTooltipText (@Nullable final String tooltipText)
 Sets the tooltip text to show when the mouse is inside this element.
Parameters
tooltipTextthe text to show or
null
to disable the tooltip for this element
More...
 
void setTooltipText (@Nullable final String tooltipText, final int x, final int y, final int w, final int h)
 Sets the tooltip text to show when the mouse is inside this element.
Parameters
tooltipTextthe text to show, or
null
to disable the tooltip for this element
xthe x coordinate
ythe y coordinate
wthe width
hthe height
More...
 
String toString ()
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable
boolean canScroll (int distance)
 Returns whether scrolling is possible. More...
 
void resetScroll ()
 Resets the scroll index to the default value. More...
 
void scroll (int distance)
 Scrolls the element. More...
 

Protected Member Functions

 GUIItem (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name)
 Creates a new instance. More...
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement
 ActivatableGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final int transparency)
 Creates a new instance. More...
 
abstract void activeChanged ()
 Will be called whenever the active state has changed. More...
 
void markInactivePending ()
 Marks this GUI element as pending inactive. More...
 
void setInactiveIfPending ()
 Unsets the active state of this GUI element if is is pending. More...
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
 AbstractGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final int transparency)
 Creates a new instance. More...
 

Static Private Attributes

static final long serialVersionUID = 1
 The serial version UID. More...
 

Detailed Description

A GUIElement representing an in-game object.

Author
Lauwenmark
Andreas Kirschbaum

Definition at line 38 of file GUIItem.java.

Constructor & Destructor Documentation

◆ GUIItem()

com.realtime.crossfire.jxclient.gui.item.GUIItem.GUIItem ( @NotNull final TooltipManager  tooltipManager,
@NotNull final GUIElementListener  elementListener,
@NotNull final String  name 
)
protected

Creates a new instance.

Parameters
tooltipManagerthe tooltip manager to update
elementListenerthe element listener to notify
namethe name of this element

Definition at line 51 of file GUIItem.java.

Member Function Documentation

◆ activeChanged()

void com.realtime.crossfire.jxclient.gui.item.GUIItem.activeChanged ( )

Definition at line 107 of file GUIItem.java.

References com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged().

+ Here is the call graph for this function:

◆ button1Clicked()

abstract void com.realtime.crossfire.jxclient.gui.item.GUIItem.button1Clicked ( final int  modifiers)
abstract

◆ button2Clicked()

abstract void com.realtime.crossfire.jxclient.gui.item.GUIItem.button2Clicked ( final int  modifiers)
abstract

Called when the middle mouse button was pressed.

Parameters
modifiersthe input event modifiers

Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.button2Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItem.execute(), and com.realtime.crossfire.jxclient.gui.item.GUIItem.mouseClicked().

+ Here is the caller graph for this function:

◆ button3Clicked()

abstract void com.realtime.crossfire.jxclient.gui.item.GUIItem.button3Clicked ( final int  modifiers)
abstract

Called when the right mouse button was pressed.

Parameters
modifiersthe input event modifiers

Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.button3Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItem.execute(), and com.realtime.crossfire.jxclient.gui.item.GUIItem.mouseClicked().

+ Here is the caller graph for this function:

◆ execute()

void com.realtime.crossfire.jxclient.gui.item.GUIItem.execute ( )

◆ mouseClicked()

void com.realtime.crossfire.jxclient.gui.item.GUIItem.mouseClicked ( @NotNull final MouseEvent  e)

Will be called when the user has clicked (pressed+released) this element.This event will be delivered after mouseReleased(MouseEvent).

Parameters
ethe mouse event relative to this element

Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.

Definition at line 59 of file GUIItem.java.

References com.realtime.crossfire.jxclient.gui.item.GUIItem.button1Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItem.button2Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItem.button3Clicked(), and com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.setActive().

+ Here is the call graph for this function:

◆ setVisible()

void com.realtime.crossfire.jxclient.gui.item.GUIItem.setVisible ( final boolean  aFlag)

Definition at line 115 of file GUIItem.java.

References com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged().

+ Here is the call graph for this function:

Member Data Documentation

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.item.GUIItem.serialVersionUID = 1
staticprivate

The serial version UID.

Definition at line 43 of file GUIItem.java.


The documentation for this class was generated from the following file: