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) |
int | getIndex () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
GUIItemKnowledge (@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 KnowledgeManager knowledgeManager, @NotNull final ItemView view, @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 | |
void | dispose () |
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 | setKnowledgeItem () |
Static Private Member Functions | |
static Dimension | getMinimumSizeInt () |
Private Attributes | |
final CommandQueue | commandQueue |
final int | defaultIndex |
final FacesManager | facesManager |
final FacesManagerListener | facesManagerListener |
int | index = -1 |
KnowledgeItem | item |
final KnowledgeManager | knowledgeManager |
boolean | selected |
final Object | sync = new Object() |
final ItemView | view |
Static Private Attributes | |
static final long | serialVersionUID = 1 |
Definition at line 45 of file GUIItemKnowledge.java.
com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge | ( | @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 KnowledgeManager | knowledgeManager, | ||
@NotNull final ItemView | view, | ||
@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 |
knowledgeManager | the knowledge manager instance to watch |
view | the item 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 120 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.faces.FacesManager.addFacesManagerListener(), com.realtime.crossfire.jxclient.knowledge.KnowledgeManager.addKnowledgeListener(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.commandQueue, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.defaultIndex, com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.facesManager, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.facesManagerListener, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.index, com.realtime.crossfire.jxclient.gui.item.GUIItemItem.itemPainter, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.knowledgeManager, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setKnowledgeItem(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.sync, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager, and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.view.
void com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.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 278 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.commandQueue, com.realtime.crossfire.jxclient.knowledge.KnowledgeItem.getKnowledgeIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.item, and com.realtime.crossfire.jxclient.queue.CommandQueue.sendNcom().
void com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.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 287 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.knowledge.KnowledgeManager.canAttemptType(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.commandQueue, com.realtime.crossfire.jxclient.knowledge.KnowledgeItem.getKnowledgeIndex(), com.realtime.crossfire.jxclient.knowledge.KnowledgeItem.getType(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.item, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.knowledgeManager, and com.realtime.crossfire.jxclient.queue.CommandQueue.sendNcom().
void com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.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 297 of file GUIItemKnowledge.java.
boolean com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.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 153 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.knowledge.KnowledgeManager.getTypes(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.index, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.knowledgeManager, and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.sync.
|
protected |
Returns the face for a CfItem instance.
item | the item instance |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 241 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.facesManager, com.realtime.crossfire.jxclient.knowledge.KnowledgeItem.getFaceNum(), com.realtime.crossfire.jxclient.faces.FacesManager.getOriginalImageIcon(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.item.
int com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getIndex | ( | ) |
Returns the slot index.
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 261 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.index, and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.sync.
Dimension com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getMinimumSize | ( | ) |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 192 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getMinimumSizeInt().
|
staticprivate |
Returns the minimal size to display this component.
Definition at line 201 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getMinimumSize(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getPreferredSize().
Dimension com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getPreferredSize | ( | ) |
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 185 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getMinimumSizeInt().
|
protected |
Returns whether this element should be drawn as "selected".
Reimplemented from com.realtime.crossfire.jxclient.gui.item.GUIItemItem.
Definition at line 256 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.isActive(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.selected.
void com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.notifyOpen | ( | ) |
Called each time the enclosing dialog is opened (or raised).
Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.
Definition at line 301 of file GUIItemKnowledge.java.
void com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.resetScroll | ( | ) |
Resets the scroll index to the default value.
Implements com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable.
Definition at line 178 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.defaultIndex, and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndex().
void com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.scroll | ( | final int | distance | ) |
Scrolls the element.
distance | the distance to scroll |
Implements com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable.
Definition at line 168 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.index, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndex(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.sync.
|
private |
Sets the index of the currently selected item. Updates the currently selected spell.
index | the index to set |
Definition at line 228 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.index, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setKnowledgeItem(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.sync.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.resetScroll(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.scroll().
void com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.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 268 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.items.ItemView.getItem(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.index, com.realtime.crossfire.jxclient.gui.item.GUIItemItem.setItemNoListeners(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setKnowledgeItem(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.sync, and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.view.
|
private |
Sets the currently selected KnowledgeItem.
Definition at line 208 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.knowledge.KnowledgeManager.getKnowledge(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.index, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.item, com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.knowledgeManager, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.sync.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndex(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndexNoListeners().
void com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.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 246 of file GUIItemKnowledge.java.
References com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.selected, and com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged().
|
private |
The command queue for sending commands.
Definition at line 87 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.button1Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.button2Clicked(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge().
|
private |
The default scroll index.
Definition at line 70 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.resetScroll().
|
private |
The FacesManager for looking up faces.
Definition at line 62 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getFace(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge().
|
private |
The FacesManagerListener registered to detect updated faces.
Definition at line 100 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge().
|
private |
The currently selected spell or
if none is selected. Corresponds to item.
Definition at line 76 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.canScroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.scroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndexNoListeners(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setKnowledgeItem().
|
private |
Definition at line 93 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.button1Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.button2Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getFace(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setKnowledgeItem().
|
private |
Definition at line 65 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.button2Clicked(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.canScroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setKnowledgeItem().
|
private |
Whether this element is selected in its GUIKnowledgeList.
Definition at line 81 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.isSelected(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setSelected().
|
staticprivate |
The serial version UID.
Definition at line 50 of file GUIItemKnowledge.java.
|
private |
The object used for synchronization on index.
Definition at line 56 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.canScroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.getIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.scroll(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndex(), com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndexNoListeners(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setKnowledgeItem().
|
private |
Definition at line 90 of file GUIItemKnowledge.java.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.GUIItemKnowledge(), and com.realtime.crossfire.jxclient.gui.item.GUIItemKnowledge.setIndexNoListeners().