 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.items;
27 import java.util.Collection;
28 import java.util.HashSet;
29 import org.jetbrains.annotations.NotNull;
61 private final Object
sync =
new Object();
104 synchronized (
sync) {
105 for (
int i = firstIndex; i <= lastIndex; i++) {
117 synchronized (
sync) {
127 final Integer[] tmpModifiedSlots;
128 synchronized (
sync) {
132 if (tmpModifiedSlots.length > 0) {
134 locationsListener.locationsModified(tmpModifiedSlots);
136 for (
int index : tmpModifiedSlots) {
138 locationListener.locationChanged();
Abstract base class for ItemView implementing classes.
void removeLocationsListener(@NotNull final LocationsListener locationsListener)
Removes a LocationsListener to be notified when any displayed item has changed.
void trigger()
Notifies the callback.
Interface for listeners interested in changed item locations.
void removeLocationListener(final int index, @NotNull final LocationListener locationListener)
Removes a LocationListener to be notified when the item displayed in a floor slot has changed.
A list of event listeners.
final EventListenerList2< LocationsListener > locationsListeners
The registered LocationsListeners to be notified about changes.
void addLocationsListener(@NotNull final LocationsListener locationsListener)
Adds a LocationsListener to be notified when any displayed item has changed.
A scheduler for asynchronous event notifications.
void addModified(final int index)
Marks a slot as modified.
Interface for listeners interested in changed items.
void fireEvents()
Delivers outstanding change events.
void deliverEvents()
Delivers all pending events.
void start()
Activates this instance.
void addLocationListener(final int index, @NotNull final LocationListener locationListener)
Adds a LocationListener to be notified when the item displayed in a floor slot has changed.
final IndexedEventListenerList< LocationListener > locationListeners
The registered ItemListeners to be notified about changes.
void addModifiedRange(final int firstIndex, final int lastIndex)
Marks a range of slots as modified.
final EventScheduler fireEventScheduler
The event scheduler for delaying event generation.
final Object sync
The synchronization object for accesses to modifiedSlots.
final Collection< Integer > modifiedSlots
The pending modified floor slots to be reported to listeners.
AbstractItemView()
Creates a new instance.