Crossfire JXClient, Trunk
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.map.GUIMiniMap Class Reference
Inheritance diagram for com.realtime.crossfire.jxclient.gui.map.GUIMiniMap:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.gui.map.GUIMiniMap:
Collaboration graph

Public Member Functions

Dimension getPreferredSize ()
 
TooltipText getTooltip ()
 
 GUIMiniMap (final boolean avoidCopyArea, @NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final MapUpdaterState mapUpdaterState, @NotNull final FacesProvider facesProvider, @NotNull final DarknessColors darknessColors, final int width, final int height, @NotNull final GuiFactory guiFactory)
 
void notifyOpen ()
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap
void dispose ()
 
Dimension getMinimumSize ()
 
int getOffsetX ()
 
int getOffsetY ()
 
int getPlayerX ()
 
int getPlayerY ()
 
void paintComponent (@NotNull final Graphics g)
 
void setBounds (final int x, final int y, final int width, final int height)
 
- 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 mouseClicked (@NotNull final MouseEvent e)
 
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 mousePressed (@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 ()
 

Protected Member Functions

void markPlayer (@NotNull final Graphics g, final int dx, final int dy)
 
void paintSquareBackground (@NotNull final Graphics g, final int px, final int py, final boolean hasImage, @NotNull final CfMapSquare mapSquare)
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap
 AbstractGUIMap (final boolean avoidCopyArea, @NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final MapUpdaterState mapUpdaterState, @NotNull final FacesProvider facesProvider, @Nullable final SmoothingRenderer smoothingRenderer, @NotNull final DarknessColors darknessColors, @NotNull final GuiFactory guiFactory)
 
int getMapHeight ()
 
int getMapWidth ()
 
void paintColoredSquare (@NotNull final Graphics g, @NotNull final Color color, final int x, final int y)
 
void redrawSquare (@NotNull final Graphics g, @NotNull final CfMapSquare mapSquare, @NotNull final CfMap map, final int x, final int y)
 
- Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
 AbstractGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory)
 
TooltipText newTooltipText (@Nullable final String tooltipText)
 
void tooltipChanged ()
 

Private Attributes

final int height
 
final MapUpdaterState mapUpdaterState
 
final int tileSize
 
final int width
 

Static Private Attributes

static final long serialVersionUID = 1
 
static final Color[] TILE_COLORS
 

Detailed Description

Displays a small map view.

Author
Lauwenmark
Andreas Kirschbaum

Definition at line 44 of file GUIMiniMap.java.

Constructor & Destructor Documentation

◆ GUIMiniMap()

com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.GUIMiniMap ( final boolean  avoidCopyArea,
@NotNull final TooltipManager  tooltipManager,
@NotNull final GUIElementListener  elementListener,
@NotNull final String  name,
@NotNull final MapUpdaterState  mapUpdaterState,
@NotNull final FacesProvider  facesProvider,
@NotNull final DarknessColors  darknessColors,
final int  width,
final int  height,
@NotNull final GuiFactory  guiFactory 
)

Creates a new instance.

Parameters
avoidCopyAreawhether map scrolling is done by copying pixel areas; if unset, always repaint all map squares
tooltipManagerthe tooltip manager to update
elementListenerthe element listener to notify
namethe name of this element
mapUpdaterStatethe map updater state instance to use
facesProviderthe faces provider for looking up faces
darknessColorsthe darkness colors instance for converting darkness values into colors
widththe map width in squares
heightthe map height in squares
guiFactorythe global GUI factory instance

Definition at line 110 of file GUIMiniMap.java.

References com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap.avoidCopyArea, com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap.darknessColors, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap.facesProvider, com.realtime.crossfire.jxclient.faces.FacesProvider.getSize(), com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory, com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.height, com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.mapUpdaterState, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.tileSize, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager, and com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.width.

Here is the call graph for this function:

Member Function Documentation

◆ getPreferredSize()

Dimension com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.getPreferredSize ( )

◆ getTooltip()

TooltipText com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.getTooltip ( )

Returns the current tooltip text.

Returns
the tooltip text or
null
to not show a tooltip

Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.

Definition at line 158 of file GUIMiniMap.java.

◆ markPlayer()

void com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.markPlayer ( @NotNull final Graphics  g,
final int  dx,
final int  dy 
)
protected

◆ notifyOpen()

void com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.notifyOpen ( )

Called each time the enclosing dialog is opened (or raised).

Implements com.realtime.crossfire.jxclient.gui.gui.GUIElement.

Definition at line 153 of file GUIMiniMap.java.

◆ paintSquareBackground()

void com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.paintSquareBackground ( @NotNull final Graphics  g,
final int  px,
final int  py,
final boolean  hasImage,
@NotNull final CfMapSquare  mapSquare 
)
protected

Paints the background of a map square.

Parameters
gthe graphics to paint into
pxthe x-offset for painting
pythe y-offset for painting
hasImagewhether the square contains at least one image
mapSquarethe map square

Reimplemented from com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap.

Definition at line 119 of file GUIMiniMap.java.

References com.realtime.crossfire.jxclient.gui.map.AbstractGUIMap.paintColoredSquare(), and com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.TILE_COLORS.

Here is the call graph for this function:

Member Data Documentation

◆ height

final int com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.height
private

◆ mapUpdaterState

final MapUpdaterState com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.mapUpdaterState
private

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.serialVersionUID = 1
staticprivate

The serial version UID.

Definition at line 49 of file GUIMiniMap.java.

◆ TILE_COLORS

final Color [] com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.TILE_COLORS
staticprivate
Initial value:
= {
Color.BLACK,
Color.WHITE,
Color.BLUE,
Color.RED,
Color.GREEN,
Color.YELLOW,
Color.PINK,
Color.GRAY,
Color.ORANGE,
Color.CYAN,
Color.MAGENTA,
Color.DARK_GRAY,
Color.DARK_GRAY,
Color.DARK_GRAY,
Color.DARK_GRAY,
Color.DARK_GRAY,
}

The colors for displaying magic map data.

Definition at line 76 of file GUIMiniMap.java.

Referenced by com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.paintSquareBackground().

◆ tileSize

final int com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.tileSize
private

◆ width

final int com.realtime.crossfire.jxclient.gui.map.GUIMiniMap.width
private

The documentation for this class was generated from the following file: