Crossfire JXClient, Trunk
|
Public Member Functions | |
void | button1Clicked (final int modifiers) |
void | button2Clicked (final int modifiers) |
void | button3Clicked (final int modifiers) |
boolean | canScroll (final int distance) |
void | dispose () |
int | getIndex () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
GUIItemQuest (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final ItemPainter itemPainter, final int defaultIndex, @NotNull final FacesManager facesManager, @NotNull final QuestsManager questsManager, @NotNull final ItemView questsView, @NotNull final CommandQueue commandQueue, final int size, @NotNull final GuiFactory guiFactory) | |
void | notifyOpen () |
void | resetScroll () |
void | scroll (final int distance) |
void | setIndexNoListeners (final int index) |
void | setSelected (final boolean selected) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.item.GUIItemItem | |
CfItem | getItem () |
TooltipText | getTooltip () |
void | paintComponent (@NotNull final Graphics g) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.item.GUIItem | |
void | activeChanged () |
void | execute () |
void | mouseClicked (@NotNull final MouseEvent e) |
void | setVisible (final boolean aFlag) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement | |
void | activateNextElement () |
void | activatePrevElement () |
boolean | isActive () |
void | mousePressed (@NotNull final MouseEvent e) |
void | setActive (final boolean active) |
void | setNextActive (@NotNull final ActivatableGUIElement next) |
void | setPrevActive (@NotNull final ActivatableGUIElement prev) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement | |
int | getDialogBorderBottom () |
int | getDialogBorderLeft () |
int | getDialogBorderRight () |
int | getDialogBorderTop () |
String | getName () |
void | inhibitListeners () |
boolean | isDefault () |
boolean | isIgnore () |
void | mouseDragged (@NotNull final MouseEvent e) |
void | mouseEntered (@NotNull final MouseEvent e) |
void | mouseExited (@NotNull final MouseEvent e) |
void | mouseMoved (@NotNull final MouseEvent e) |
void | mouseReleased (@NotNull final MouseEvent e) |
void | mouseWheelMoved (final int wheelRotation) |
void | setChanged () |
void | setChangedListener (@Nullable final GUIElementChangedListener changedListener) |
void | setDefault (final boolean isDefault) |
void | setIgnore () |
String | toString () |
Private Member Functions | |
void | setIndex (final int index) |
void | setQuest () |
Static Private Member Functions | |
static Dimension | getMinimumSizeInt () |
Private Attributes | |
final CommandQueue | commandQueue |
final int | defaultIndex |
final FacesManager | facesManager |
final FacesManagerListener | facesManagerListener |
int | index = -1 |
final LocationListener | locationListener |
final Runnable | locationListenerEdt |
Quest | quest |
final QuestListener | questListener = this::setQuest |
final QuestsManager | questsManager |
final QuestsManagerListener | questsManagerListener |
final ItemView | questsView |
boolean | selected |
final Object | sync = new Object() |
Static Private Attributes | |
static final long | serialVersionUID = 1 |
A GUIItemItem that represents an entry in a GUIQuestList.
Definition at line 50 of file GUIItemQuest.java.
com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.GUIItemQuest | ( | @NotNull final TooltipManager | tooltipManager, |
@NotNull final GUIElementListener | elementListener, | ||
@NotNull final String | name, | ||
@NotNull final ItemPainter | itemPainter, | ||
final int | defaultIndex, | ||
@NotNull final FacesManager | facesManager, | ||
@NotNull final QuestsManager | questsManager, | ||
@NotNull final ItemView | questsView, | ||
@NotNull final CommandQueue | commandQueue, | ||
final int | size, | ||
@NotNull final GuiFactory | guiFactory | ||
) |
Creates a new instance.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
itemPainter | the item painter for painting the icon |
defaultIndex | the default scroll index |
facesManager | the faces manager for looking up faces |
questsManager | the quests manager instance to watch |
questsView | the quests view to use |
commandQueue | the command queue for sending commands to the server |
size | the size of the component or 0
|
guiFactory | the global GUI factory instance |
Definition at line 181 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.commandQueue, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.defaultIndex, com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.facesManager, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.facesManagerListener, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.item.GUIItemItem.itemPainter, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsManager, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsManagerListener, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsView, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndex(), and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager.
void com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.button1Clicked | ( | final int | modifiers | ) |
Called when the left mouse button was pressed.
modifiers | the input event modifiers |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItem.
Definition at line 357 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.commandQueue, com.realtime.crossfire.jxclient.quests.Quest.getCode(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.quest, com.realtime.crossfire.jxclient.queue.CommandQueue.sendNcom(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest().
void com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.button2Clicked | ( | final int | modifiers | ) |
Called when the middle mouse button was pressed.
modifiers | the input event modifiers |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItem.
Definition at line 367 of file GUIItemQuest.java.
void com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.button3Clicked | ( | final int | modifiers | ) |
Called when the right mouse button was pressed.
modifiers | the input event modifiers |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItem.
Definition at line 371 of file GUIItemQuest.java.
boolean com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.canScroll | ( | final int | distance | ) |
Returns whether scrolling is possible.
distance | the distance to scroll |
Implements com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable.
Definition at line 211 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.items.ItemView.getSize(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.index, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsView, and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.sync.
void com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.dispose | ( | ) |
Releases all allocated resources.
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 197 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.facesManager, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.facesManagerListener, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.quest, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questListener, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsManager, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsManagerListener, com.realtime.crossfire.jxclient.quests.QuestsManager.removeCrossfireQuestChangedListener(), com.realtime.crossfire.jxclient.faces.FacesManager.removeFacesManagerListener(), and com.realtime.crossfire.jxclient.quests.Quest.removeQuestListener().
|
protected |
Returns the face for a CfItem instance.
item | the item instance |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 321 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.facesManager, com.realtime.crossfire.jxclient.items.CfItem.getFace(), com.realtime.crossfire.jxclient.faces.Face.getFaceNum(), com.realtime.crossfire.jxclient.faces.FacesManager.getOriginalImageIcon(), and com.realtime.crossfire.jxclient.gui.item.GUIItemItem.item.
int com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getIndex | ( | ) |
Returns the slot index.
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 341 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.index, and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.sync.
Dimension com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getMinimumSize | ( | ) |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 250 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getMinimumSizeInt().
|
staticprivate |
Returns the minimal size to display this component.
Definition at line 259 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getMinimumSize(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getPreferredSize().
Dimension com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getPreferredSize | ( | ) |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 243 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getMinimumSizeInt().
|
protected |
Returns whether this element should be drawn as "selected".
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 336 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.isActive(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.selected.
void com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.notifyOpen | ( | ) |
Called each time the enclosing dialog is opened (or raised).
Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.
Definition at line 207 of file GUIItemQuest.java.
void com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.resetScroll | ( | ) |
Resets the scroll index to the default value.
Implements com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable.
Definition at line 236 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.defaultIndex, and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndex().
void com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.scroll | ( | final int | distance | ) |
Scrolls the element.
distance | the distance to scroll |
Implements com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable.
Definition at line 226 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.index, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndex(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.sync.
|
private |
Sets the index of the currently selected quest. Updates the currently selected quest.
index | the index to set |
Definition at line 300 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.items.ItemView.addLocationListener(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.index, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.locationListener, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsView, com.realtime.crossfire.jxclient.items.ItemView.removeLocationListener(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.sync.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.GUIItemQuest(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.resetScroll(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.scroll().
void com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndexNoListeners | ( | final int | index | ) |
Sets the slot index to display without registering listeners for updates.
index | the slot index |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 348 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.items.ItemView.getItem(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.index, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsView, com.realtime.crossfire.jxclient.gui.item.GUIItemItem.setItemNoListeners(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.sync.
|
private |
Sets the currently selected quest. Attaches or detaches questListener as needed.
Definition at line 267 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.quests.Quest.addQuestListener(), com.realtime.crossfire.jxclient.items.ItemView.getItem(), com.realtime.crossfire.jxclient.quests.QuestsManager.getQuestByCode(), com.realtime.crossfire.jxclient.items.CfItem.getTag(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.index, com.realtime.crossfire.jxclient.gui.item.GUIItemItem.item, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.quest, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questListener, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsManager, com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.questsView, com.realtime.crossfire.jxclient.quests.Quest.removeQuestListener(), com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.sync, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipChanged().
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.button1Clicked(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndex().
void com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setSelected | ( | final boolean | selected | ) |
Sets the selected state.
selected | whether this element should be drawn as "selected" |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 326 of file GUIItemQuest.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.selected, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged().
|
private |
The command queue for sending commands.
Definition at line 107 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.button1Clicked(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.GUIItemQuest().
|
private |
The default scroll index.
Definition at line 72 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.GUIItemQuest(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.resetScroll().
|
private |
The FacesManager for looking up faces.
Definition at line 67 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.dispose(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getFace(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.GUIItemQuest().
|
private |
The FacesManagerListener registered to detect updated faces.
Definition at line 133 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.dispose(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.GUIItemQuest().
|
private |
The currently selected quest or
if none is selected. Corresponds to quest.
Definition at line 90 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.canScroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.scroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndexNoListeners(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest().
|
private |
The LocationListener used to detect items added to or removed from this quest slot.
Definition at line 149 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndex().
|
private |
Called from locationListener but runs on the EDT.
Definition at line 162 of file GUIItemQuest.java.
|
private |
The currently selected Quest, null if none.
Definition at line 84 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.button1Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.dispose(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest().
|
private |
The QuestListener attached to quest.
Definition at line 127 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.dispose(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest().
|
private |
The QuestsManager instance to watch.
Definition at line 78 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.dispose(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.GUIItemQuest(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest().
|
private |
The QuestsManagerListener used to detect spell changes.
Definition at line 113 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.dispose(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.GUIItemQuest().
|
private |
The spells view to use.
Definition at line 101 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.canScroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.GUIItemQuest(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndexNoListeners(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest().
|
private |
Whether this element is selected in its GUIQuestList.
Definition at line 95 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.isSelected(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setSelected().
|
staticprivate |
The serial version UID.
Definition at line 55 of file GUIItemQuest.java.
|
private |
The object used for synchronization on index.
Definition at line 61 of file GUIItemQuest.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.canScroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.getIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.scroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setIndexNoListeners(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest().