22 package com.realtime.crossfire.jxclient.gui.misc;
43 import java.awt.Color;
44 import java.awt.Component;
45 import java.awt.Container;
46 import java.awt.Dimension;
47 import java.awt.DisplayMode;
48 import java.awt.Frame;
49 import java.awt.Graphics;
50 import java.awt.GraphicsConfiguration;
51 import java.awt.GraphicsDevice;
52 import java.awt.GraphicsEnvironment;
53 import java.awt.Insets;
54 import java.awt.Point;
55 import java.awt.Rectangle;
56 import java.awt.Toolkit;
57 import java.awt.Window;
58 import java.awt.event.ComponentEvent;
59 import java.awt.event.ComponentListener;
60 import java.awt.event.KeyEvent;
61 import java.awt.event.MouseEvent;
62 import java.awt.image.BufferStrategy;
63 import java.io.IOException;
64 import java.io.Writer;
65 import java.text.DateFormat;
66 import java.text.SimpleDateFormat;
67 import java.util.Collection;
68 import java.util.Date;
69 import java.util.Iterator;
70 import java.util.List;
71 import java.util.ListIterator;
72 import java.util.concurrent.CopyOnWriteArrayList;
73 import javax.swing.JFrame;
74 import javax.swing.JLayeredPane;
75 import javax.swing.JViewport;
76 import javax.swing.RootPaneContainer;
77 import javax.swing.event.MouseInputListener;
78 import org.jetbrains.annotations.NotNull;
79 import org.jetbrains.annotations.Nullable;
118 private static final long serialVersionUID = 1L;
121 public void paint(@NotNull
final Graphics g) {
168 private final Rectangle
maximumWindowBounds = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
177 public void mouseClicked(
final MouseEvent e) {
182 public void mousePressed(
final MouseEvent e) {
187 public void mouseReleased(
final MouseEvent e) {
192 public void mouseEntered(
final MouseEvent e) {
197 public void mouseExited(
final MouseEvent e) {
202 public void mouseDragged(
final MouseEvent e) {
207 public void mouseMoved(
final MouseEvent e) {
236 private final List<Gui>
openDialogs =
new CopyOnWriteArrayList<>();
255 private final Collection<GUIMap>
maps =
new CopyOnWriteArrayList<>();
262 private final Collection<GUIFloorList>
floorLists =
new CopyOnWriteArrayList<>();
300 private final DateFormat
simpleDateFormat =
new SimpleDateFormat(
"yyyy-MM-dd HH:mm:ss,SSS ");
309 public void componentResized(
final ComponentEvent e) {
310 final RootPaneContainer tmpFrame =
frame;
311 assert tmpFrame != null;
312 final int width = tmpFrame.getContentPane().getWidth();
313 final int height = tmpFrame.getContentPane().getHeight();
319 public void componentMoved(
final ComponentEvent e) {
324 public void componentShown(
final ComponentEvent e) {
329 public void componentHidden(
final ComponentEvent e) {
345 graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();
346 graphicsDevice = graphicsEnvironment.getDefaultScreenDevice();
348 debugScreenWrite(
"getMaxWindowDimension: maximum window bounds="+maximumWindowBounds);
360 debugScreenWrite(
"setFullScreenMode: resolution="+(resolution == null ?
"default" : resolution));
363 if (frame == this.frame && isFullScreen && bufferStrategy != null && (resolution == null || resolution.getWidth() == windowWidth && resolution.getHeight() ==
windowHeight)) {
371 final Dimension dimension;
372 if (resolution == null) {
373 dimension =
new Dimension(currentDisplayMode.getWidth(), currentDisplayMode.getHeight());
374 debugScreenWrite(
"setFullScreenMode: full-screen requested, dimension="+dimension+
" [using current display resolution]");
376 dimension =
new Dimension(resolution.getWidth(), resolution.getHeight());
377 debugScreenWrite(
"setFullScreenMode: full-screen requested, dimension="+dimension+
" [using user-specified resolution]");
379 frame.setPreferredSize(dimension);
380 frame.setResizable(
false);
381 frame.setUndecorated(
true);
392 if (resolution == null || resolution.equalsDisplayMode(currentDisplayMode)) {
393 debugScreenWrite(
"setFullScreenMode: requested resolution matches screen resolution");
401 final DisplayMode newDisplayMode =
new DisplayMode(resolution.getWidth(), resolution.getHeight(), DisplayMode.BIT_DEPTH_MULTI, DisplayMode.REFRESH_RATE_UNKNOWN);
404 }
catch (
final IllegalArgumentException ex) {
405 debugScreenWrite(
"setFullScreenMode: setting screen resolution failed: "+ex.getMessage());
414 if (this.frame != null) {
415 this.frame.removeComponentListener(componentListener);
418 this.frame.addComponentListener(componentListener);
433 debugScreenWrite(
"setWindowMode: resolution="+(resolution == null ?
"default" : resolution)+
", fixedSize="+fixedSize);
436 if (frame == this.frame && !isFullScreen && bufferStrategy != null && (resolution == null || resolution.getWidth() == windowWidth && resolution.getHeight() ==
windowHeight)) {
445 frame.setUndecorated(
false);
446 frame.setResizable(!fixedSize);
448 final Dimension dimension;
450 if (resolution == null) {
451 dimension =
new Dimension(currentDisplayMode.getWidth(), currentDisplayMode.getHeight());
453 dimension = resolution.asDimension();
455 final int x = centerPoint.x-dimension.width/2;
456 final int y = centerPoint.y-dimension.height/2;
458 frame.setLocation(x, y);
460 frame.setVisible(
true);
461 final Insets frameInsets = frame.getInsets();
465 debugScreenWrite(
"setResolutionPre: maximal window dimension="+maxDimension);
466 if (dimension.width > maxDimension.width || dimension.height > maxDimension.height) {
468 if (resolution == null) {
469 dimension.width = Math.max(minResolution.getWidth()+frameInsets.left+frameInsets.right, maxDimension.width);
470 dimension.height = Math.max(minResolution.getHeight()+frameInsets.top+frameInsets.bottom, maxDimension.height);
471 debugScreenWrite(
"setResolutionPre: window size exceeds maximum allowed size, reducing window size to "+dimension.width+
"x"+dimension.height);
473 debugScreenWrite(
"setResolutionPre: window size exceeds maximum allowed size, ignoring");
479 frame.setPreferredSize(dimension);
480 frame.setSize(dimension);
483 final int x2 = centerPoint.x-dimension.width/2-frameInsets.left;
484 final int y2 = centerPoint.y-dimension.height/2-frameInsets.top;
485 debugScreenWrite(
"setResolutionPre: moving window to "+x2+
"/"+y2+
" "+dimension.width+
"x"+dimension.height);
486 frame.setBounds(x2, y2, dimension.width+frameInsets.left+frameInsets.right, dimension.height+frameInsets.top+frameInsets.bottom);
490 if (this.frame != null) {
491 this.frame.removeComponentListener(componentListener);
494 this.frame.addComponentListener(componentListener);
522 private void setResolutionPost(@NotNull
final Window frame, @NotNull
final Dimension dimension) {
524 frame.createBufferStrategy(2);
525 bufferStrategy = frame.getBufferStrategy();
527 final Insets insets = frame.getInsets();
528 offsetX = insets.left;
529 offsetY = insets.top;
530 debugScreenWrite(
"setResolutionPost: offset="+offsetX+
"x"+offsetY+
" "+insets);
533 frame.requestFocusInWindow();
537 frame.add(layeredPane);
538 if (currentGui == null) {
542 if (windowWidth > 0 && windowHeight > 0) {
543 assert currentGui != null;
544 currentGui.setSize(windowWidth, windowHeight);
560 if (this.windowWidth == windowWidth && this.windowHeight == windowHeight) {
565 debugScreenWrite(
"updateWindowSize: gui size="+this.windowWidth+
"x"+this.windowHeight);
566 if (currentGui != null) {
567 currentGui.setSize(windowWidth, windowHeight);
581 final GraphicsConfiguration graphicsConfiguration = graphicsDevice.getDefaultConfiguration();
582 final Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(graphicsConfiguration);
585 final int maxWidth = maximumWindowBounds.width-screenInsets.left-screenInsets.right-frameInsets.left-frameInsets.right;
586 final int maxHeight = maximumWindowBounds.height-screenInsets.top-screenInsets.bottom-frameInsets.top-frameInsets.bottom;
587 debugScreenWrite(
"getMaxWindowDimension: maximum window dimension="+maxWidth+
"x"+maxHeight);
588 return new Dimension(maxWidth, maxHeight);
595 if (isFullScreen && frame != null) {
596 if (currentGui != null) {
600 assert frame != null;
602 assert frame != null;
604 assert frame != null;
606 assert frame != null;
607 frame.removeComponentListener(componentListener);
616 public void redraw(@NotNull
final Graphics g) {
617 layeredPane.paint(g);
626 for (
int ig = 0; ig < 3; ig++) {
627 assert bufferStrategy != null;
628 final Graphics g = bufferStrategy.getDrawGraphics();
631 assert bufferStrategy != null;
632 bufferStrategy.show();
641 g.setColor(Color.BLACK);
642 assert frame != null;
643 final int width = frame.getWidth();
644 assert frame != null;
645 final int height = frame.getHeight();
646 g.fillRect(0, 0, width, height);
657 public boolean openDialog(@NotNull
final Gui dialog,
final boolean autoCloseOnDeactivate) {
658 if (dialog == currentGui) {
662 if (!openDialogs.isEmpty() && openDialogs.get(openDialogs.size()-1) == dialog) {
667 dialog.activateDefaultElement();
669 dialog.setGuiAutoCloseListener(guiAutoCloseListener);
681 if (dialog == currentGui) {
685 if (!openDialogs.isEmpty() && openDialogs.get(openDialogs.size()-1) == dialog) {
706 return openDialogs.contains(dialog);
716 return OpenDialogsIterator::new;
723 @SuppressWarnings(
"NullableProblems")
726 if (frame != null && currentGui != null) {
735 if (windowWidth > 0 && windowHeight > 0) {
736 assert currentGui != null;
737 currentGui.setSize(windowWidth, windowHeight);
757 dialog.setActiveElementActive(
false);
773 dialog.setActiveElementActive(
false);
778 dialog.setGuiAutoCloseListener(null);
780 dialog.activateDefaultElement();
790 if (this.tooltip != null) {
791 layeredPane.remove(this.tooltip);
794 if (this.tooltip != null) {
795 layeredPane.add(this.tooltip, 2, -1);
804 if (this.rendererGuiState == rendererGuiState) {
812 if (!dialog.isHidden(rendererGuiState)) {
822 listener.guiStateChanged(rendererGuiState);
857 final Point mouse = frame == null ? null : frame.getMousePosition(
true);
864 if (dialog.isWithinDrawingArea(mouse.x, mouse.y)) {
865 final MouseEvent mouseEvent =
new MouseEvent(frame, 0, System.currentTimeMillis(), 0, mouse.x, mouse.y, 0,
false);
885 final Dimension preferredSize = dialog.getPreferredSize();
886 final Dimension size;
888 if (preferredSize == null) {
889 size =
new Dimension(320, 200);
891 size =
new Dimension(Math.min(preferredSize.width,
windowWidth), Math.min(preferredSize.height,
windowHeight));
893 dialog.setSize(size);
910 final Point mouse = frame == null ? null : frame.getMousePosition(
true);
917 assert frame != null;
921 if (dialog.isWithinDrawingArea(mouse.x, mouse.y)) {
922 final MouseEvent mouseEvent =
new MouseEvent(frame, 0, System.currentTimeMillis(), 0, mouse.x, mouse.y, 0,
false);
929 assert frame != null;
939 assert frame != null;
956 if (dialog.deactivateCommandInput()) {
959 if (dialog.isModal()) {
978 if (buffer != null) {
981 if (dialog.isModal()) {
999 return buffer == null ? null : buffer.
getBuffer();
1009 if (metaElementList != null) {
1025 if (textArea1 != null) {
1033 if (textArea2 != null) {
1038 if (dialog.isModal()) {
1070 return it.hasPrevious();
1073 @SuppressWarnings(
"IteratorNextCanNotThrowNoSuchElementException")
1077 return it.previous();
1081 public void remove() {
1082 throw new UnsupportedOperationException(
"remove() not implemented");
1111 for (Component result = component; result != null; result = result.getParent()) {
1113 return (AbstractGUIElement)result;
1115 if (result instanceof JViewport) {
1116 final JViewport viewport = (JViewport)result;
1117 final Point position = viewport.getViewPosition();
1118 mouseEvent.translatePoint(-position.x, -position.y);
1133 final MouseEvent ce = e;
1136 final int eX = ce.getX();
1137 final int eY = ce.getY();
1142 if (elected != null) {
1146 if (dialog.isModal()) {
1151 if (elected == null) {
1172 return gui.getElementFromPoint(x, y);
1180 if (debugScreen == null) {
1186 debugScreen.append(message);
1187 debugScreen.append(
"\n");
1188 debugScreen.flush();
1189 }
catch (
final IOException ex) {
1190 System.err.println(
"Cannot write screen debug: "+ex.getMessage());
1192 throw new AssertionError(ex);
1202 private void addToLayeredPane(@NotNull
final Component component,
final int layer,
final int index) {
1203 layeredPane.add(component, layer, index);
1213 layeredPane.remove(component);
1243 if (component instanceof Container) {
1244 final Container container = (Container)component;
1245 for (
int i = 0; i < container.getComponentCount(); i++) {
1258 if (component instanceof Container) {
1259 final Container container = (Container)component;
1260 for (
int i = 0; i < container.getComponentCount(); i++) {
1271 if (component instanceof
GUIMap) {
1272 final GUIMap map = (GUIMap)component;
1276 final GUIFloorList floorList = (GUIFloorList)component;
1279 if (component instanceof Container) {
1280 final Container container = (Container)component;
1281 for (
int i = 0; i < container.getComponentCount(); i++) {
1292 if (component instanceof
GUIMap) {
1293 final GUIMap map = (GUIMap)component;
1297 final GUIFloorList floorList = (GUIFloorList)component;
1300 if (component instanceof Container) {
1301 final Container container = (Container)component;
1302 for (
int i = 0; i < container.getComponentCount(); i++) {
1313 if (frame == null || !frame.isVisible()) {
1331 width = Math.max(width, map.getPreferredMapWidth());
1332 height = Math.max(height, map.getPreferredMapHeight());
1334 return new Dimension(width, height);
1342 int minNumLookObjects = Integer.MAX_VALUE;
1344 minNumLookObjects = Math.min(minNumLookObjects, floorList.getNumLookObjects());
1346 if (minNumLookObjects < Integer.MAX_VALUE) {
1347 return minNumLookObjects;
1362 if (textArea == null) {
1366 if (!textArea.
getName().equals(
"command")) {
1379 final boolean result = graphicsDevice.isDisplayChangeSupported();
1389 debugScreenWrite(
"setDisplayMode("+displayMode.getWidth()+
"x"+displayMode.getHeight()+
")");
1390 graphicsDevice.setDisplayMode(displayMode);
1399 final DisplayMode displayMode = graphicsDevice.getDisplayMode();
1400 debugScreenWrite(
"getDisplayMode()="+displayMode.getWidth()+
"x"+displayMode.getHeight());
1410 final boolean result = graphicsDevice.isFullScreenSupported();
1424 graphicsDevice.setFullScreenWindow(window);
1433 final Point result = graphicsEnvironment.getCenterPoint();
JXCWindowRenderer(@NotNull final MouseTracker mouseTracker, @NotNull final CrossfireServerConnection crossfireServerConnection, @Nullable final Writer debugScreen)
Creates a new instance.
int offsetY
The y-offset of the visible window.
START
The start screen is active.
void setPreferredMapSize(int preferredMapWidth, int preferredMapHeight)
Sets the preferred map size.
boolean setFullScreenMode(@NotNull final JFrame frame, @Nullable final Resolution resolution)
Tries to switch to the given resolution.
Interface for clients interested in auto-close events of Gui instances.
void addGuiStateListener(@NotNull final RendererGuiStateListener listener)
Adds a gui state listener to be notified about rendererGuiState changes.
void mouseClicked(@Nullable final AbstractGUIElement element, @NotNull final MouseEvent e)
Handles a mouse clicked event.
void endRendering()
Ends rendering and reverts the display settings.
boolean isDisplayChangeSupported()
Returns the graphicsDevice supports low-level display changes.
void setResolutionPost(@NotNull final Window frame, @NotNull final Dimension dimension)
Tries to switch to the given resolution.
Gui currentGui
The currently displayed Gui.
void removeComponent(@NotNull final Component component)
Removes a Component.
void setCurrentGui(@NotNull final Gui gui)
Sets the Gui to display.
Combines a list of GUIElements to for a gui.
boolean closeDialog(@NotNull final Gui dialog)
Closes a dialog.
final DateFormat simpleDateFormat
A formatter for timestamps.
A list of event listeners.
final Rectangle maximumWindowBounds
The maximal size of a window.
void updateWindowSize(final int windowWidth, final int windowHeight)
Updates the window size for rendering from the main window size.
void mouseDragged(@Nullable final GUIElement element, @NotNull final MouseEvent e)
Handles a mouse dragged event.
final GraphicsEnvironment graphicsEnvironment
The used GraphicsEnvironment.
static AbstractGUIElement findElement(@NotNull final Component component, @NotNull final MouseEvent mouseEvent)
Finds the gui element a given Component is part of.
boolean isDialogOpen(@NotNull final Gui dialog)
Returns whether a given dialog is currently visible.
static GUIText activateCommandInput(@NotNull final Gui gui)
Returns the first command text field of a gui and make it active.
Iterable< Gui > getOpenDialogs()
Returns all open dialogs in reverse painting order; the first element is the top-most dialog...
RendererGuiState getGuiState()
Returns the current gui state.
final Container layeredPane
The JLayeredPane added as the top-level component to frame.
void updateServerSettings()
Updates server based settings to current screen size.
final CrossfireServerConnection crossfireServerConnection
The CrossfireServerConnection to monitor.
AbstractGUIElement findElement(@NotNull final MouseEvent e)
Finds the gui element for a given MouseEvent.
void setActive(final boolean active)
Sets the active state of a GUI element.
static final int DEFAULT_NUM_LOOK_OBJECTS
The default number of ground view objects.
A gui element implementing the message window.
void mouseEntered(@Nullable final AbstractGUIElement element, @NotNull final MouseEvent e)
Handles a mouse entered event.
static final int DEFAULT_MAP_HEIGHT
The default map height to request from the server.
Represents a pressed or released key.
void removeFromLayeredPane(@NotNull final Component component)
Removes a component from layeredPane.
final Collection< GUIFloorList > floorLists
The GUIItemList instances that currentGui and openDialogs contain and that display floor items...
A GUIItemList for floor views.
Buffer getActiveMessageBuffer()
Returns the active message buffer.
static Buffer getActiveMessageBuffer(@NotNull final Gui gui)
Returns the active message buffer for a Gui instance.
Dimension getMaxWindowDimension(@NotNull final Insets frameInsets)
Returns the maximum dimension of a frame to fit on the screen.
int getWindowHeight()
Returns the height of the client area.
int offsetX
The x-offset of the visible window.
GUIText activateCommandInput()
Activates the command input text field.
Interface defining an abstract GUI element.
boolean handleKeyPress(@NotNull final KeyEvent2 e)
Dispatches a key press KeyEvent.
Renders a Gui instance into a Frame.
final MouseTracker mouseTracker
The MouseTracker instance.
boolean deactivateCommandInput()
Deactivates the command input text field.
void setWindowMode(@NotNull final JFrame frame, @Nullable final Resolution resolution, @NotNull final Resolution minResolution, final boolean fixedSize)
Tries to switch to the given resolution.
boolean handleKeyPress(@NotNull final KeyEvent2 e)
Dispatches a key press KeyEvent.
String getName()
Returns the internal name of this gui element.The name is used in skin files for identifying an eleme...
void redraw(@NotNull final Graphics g)
Paints the view into the given graphics instance.
void mousePressed(@Nullable final AbstractGUIElement element, @NotNull final MouseEvent e)
Handles a mouse pressed event.
A GUIList instance that displays GUIItemItem instances.
Buffer getBuffer()
Returns the Buffer instance containing the text messages.
void addToLayeredPane(@NotNull final Component component, final int layer, final int index)
Adds a component to layeredPane.
Dimension getMapSize()
Returns the map size in squares.
final List< Gui > openDialogs
Currently opened dialogs.
void redrawBlack(@NotNull final Graphics g)
Repaints all to black.
final ComponentListener componentListener
The ComponentListener attached to frame.
void openDialogsAdd(@NotNull final Gui dialog)
Adds a dialog to openDialogs.
All gui states of JXCWindowRenderer.
BufferStrategy bufferStrategy
The current BufferStrategy.
void setPreferredNumLookObjects(int preferredNumLookObjects)
Sets the maximum number of objects in the ground view.
Component tooltip
The tooltip to use, or.
void removeMouseTrackerRecursively(@NotNull final Component component)
Removes mouseTracker recursively from all children of a Component.
boolean wasDisplayed
Records whether the frame has been displayed before.
final MouseInputListener mouseInputListener
A MouseInputListener that forwards to mouseTracker.
final Writer debugScreen
The Writer to write screen debug to or.
void setDisplayMode(@NotNull final DisplayMode displayMode)
Sets the display mode of the graphicsDevice.
An Iterator that returns all open dialogs in painting order.
void clearGUI(@NotNull final Gui gui)
Sets a gui to display and clears the display.
RendererGuiState rendererGuiState
The current gui state.
Utility class for Swing related functions.
Manages the contents of the contents of a log window.
void mouseExited(@NotNull final MouseEvent e)
Handles a mouse exited event.
boolean deactivateCommandInput()
Deactivates the command text input field of this dialog.
DisplayMode getDisplayMode()
Returns the current display mode of the graphicsDevice.
void openDialogInt(@NotNull final Gui dialog)
Opens a dialog.
int getNumLookObjects()
Returns the number of ground view objects to request from the server.
final GraphicsDevice graphicsDevice
The used GraphicsDevice.
void removeMouseTracker(@NotNull final Component component)
Removes mouseTracker from a Component.
boolean toggleDialog(@NotNull final Gui dialog)
Toggles a dialog: if the dialog is not shown, show it; else hide it.
boolean isFullScreenSupported()
Returns whether the graphicsDevice supports full-screen exclusive mode.
void mouseReleased(@Nullable final AbstractGUIElement element, @NotNull final MouseEvent e)
Handles a mouse released event.
Abstract base class for GUI elements to be shown in Guis.
boolean openDialogsRemove(@NotNull final Gui dialog)
Removes a dialog to openDialogs.
void addMouseTrackerRecursively(@NotNull final Component component)
Adds mouseTracker recursively to all children of a Component.
void setTooltip(@Nullable final Component tooltip)
Sets the tooltip to use, or.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
final EventListenerList2< RendererGuiStateListener > rendererGuiStateListeners
Listeners to be notified about rendererGuiState changes.
boolean isFullScreen
Records whether full-screen mode is active.
void setResolutionPre(@NotNull final Window frame)
Tries to switch to the given resolution.
Information about JXClient's screen/window resolution.
void setGuiState(@NotNull final RendererGuiState rendererGuiState)
Sets the current gui state.
AbstractGUIElement getElementFromPoint(@NotNull final Gui gui, final int eX, final int eY)
Determines the GUIElement for a given coordinate with a given Gui instance.
Tracks mouse actions and delivers mouse events to affected GUIElement.
void addMouseTracker(@NotNull final Component component)
Adds mouseTracker to a Component.
final Collection< GUIMap > maps
All GUIMap instances that currentGui and openDialogs contain.
int getWindowWidth()
Returns the width of the client area.
void debugScreenWrite(@NotNull final CharSequence message)
Writes a message to the screen debug.
Point getCenterPoint()
Returns the Point where windows should be centered.
void setSelectedHostname(@NotNull final String serverName)
Selects a server entry.
void raiseDialog(@NotNull final Gui dialog)
Raises an already opened dialog.
Abstract base class for gui elements implementing text fields.
final DisplayMode defaultDisplayMode
The default screen mode that was active when the client did start.
void paintActiveComponent(@NotNull final Graphics g)
Marks the active component in a Graphics instance.
void addComponent(@NotNull final Component component)
Adds a Component.
static final int DEFAULT_MAP_WIDTH
The default map width to request from the server.
int windowWidth
The width of the client area in pixels.
JFrame frame
The associated JFrame.
void setFullScreenWindow(@Nullable final Window window)
Enter full-screen mode, or return to windowed mode.
boolean openDialog(@NotNull final Gui dialog, final boolean autoCloseOnDeactivate)
Opens a dialog.
static void invokeAndWait(@NotNull final Runnable runnable)
Calls SwingUtilities#invokeAndWait(Runnable) if not on the EDT or calls the Runnable directly if on t...
final ListIterator< Gui > it
The backing list iterator; it returns the elements in reversed order.
Abstract base class for text input fields.
int windowHeight
The height of the client area in pixels.
Interface for listeners interested in gui state changes.
void mouseMoved(@Nullable final AbstractGUIElement element, @NotNull final MouseEvent e)
Handles a mouse moved event.