private class HostMenu.RemotePanel extends NewGameMenu.PlayerPanel
Modifier and Type | Field and Description |
---|---|
private Player |
player
The remote player associated with this panel.
|
CONTENT_HEIGHT, CONTENT_WIDTH
Modifier | Constructor and Description |
---|---|
private |
RemotePanel(Theme.PlayerTheme theme,
Player player)
Constructs a new remote panel for the given player.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Player> |
getPlayer()
Gets the configured player for this panel if it exists.
|
protected void |
handleMouseClick(java.awt.geom.Point2D loc)
Handles a mouse click on this component.
|
protected void |
renderRemoveButton(java.awt.Graphics2D g,
double x,
double y,
java.awt.geom.Point2D mouseLoc)
Renders the remove button at the given location.
|
hasPlayer, setHuman
private Player player
private RemotePanel(Theme.PlayerTheme theme, Player player)
theme
- The panel theme.player
- The remote player.public java.util.Optional<Player> getPlayer()
NewGameMenu.PlayerPanel
getPlayer
in class NewGameMenu.PlayerPanel
protected void renderRemoveButton(java.awt.Graphics2D g, double x, double y, java.awt.geom.Point2D mouseLoc)
NewGameMenu.PlayerPanel
renderRemoveButton
in class NewGameMenu.PlayerPanel
g
- The graphics context to use.x
- The x coordinate of the top left corner.y
- The y coordinate of the top left corner.mouseLoc
- The current cursor location.protected void handleMouseClick(java.awt.geom.Point2D loc)
NewGameMenu.PlayerPanel
handleMouseClick
in class NewGameMenu.PlayerPanel
loc
- The location that was clicked.