+ * Cause an action to occur on this {@link GuiReaderBook}.
+ */
+ public void action() {
+ for (BookActionListener listener : listeners) {
+ listener.action(GuiReaderBook.this);
+ }
+ }
+
+ /**
+ * Cause a select event on this {@link GuiReaderBook}.
+ * <p>
+ * Have a look at {@link GuiReaderBook#setSelected(boolean)}.
+ */
+ private void select() {
+ for (BookActionListener listener : listeners) {
+ listener.select(GuiReaderBook.this);
+ }
+ }
+
+ /**
+ * Request a popup.
+ *
+ * @param target
+ * the target component for the popup
+ * @param x
+ * the X position of the click/request (in case of popup request
+ * from the keyboard, the center of the target should be selected
+ * as point of reference)
+ * @param y
+ * the Y position of the click/request (in case of popup request
+ * from the keyboard, the center of the target should be selected
+ * as point of reference)
+ */
+ public void popup(Component target, int x, int y) {
+ for (BookActionListener listener : listeners) {
+ listener.select((GuiReaderBook.this));
+ listener.popupRequested(GuiReaderBook.this, target, x, y);
+ }
+ }
+
+ /**
+ * The information about the book represented by this item.