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

Public Member Functions

int getDialogBorderBottom ()
 
int getDialogBorderLeft ()
 
int getDialogBorderRight ()
 
int getDialogBorderTop ()
 
Dimension getMinimumSize ()
 
Dimension getPreferredSize ()
 
TooltipText getTooltip ()
 
 GUIDialogBackground (@NotNull final TooltipManager tooltipManager, @NotNull final JXCWindowRenderer windowRenderer, @NotNull final GUIElementListener elementListener, @NotNull final String name, final float alpha, @NotNull final Image frameNW, @NotNull final Image frameN, @NotNull final Image frameNE, @NotNull final Image frameW, @NotNull final Image frameC, @NotNull final Image frameE, @NotNull final Image frameSW, @NotNull final Image frameS, @NotNull final Image frameSE, @NotNull final GuiFactory guiFactory)
 
void mouseDragged (@NotNull final MouseEvent e)
 
void mousePressed (@NotNull final MouseEvent e)
 
void mouseReleased (@NotNull final MouseEvent e)
 
void notifyOpen ()
 
void paintComponent (@NotNull final Graphics g)
 
void setOpaqueDialogBackground (final boolean opaque)
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement
void dispose ()
 
String getName ()
 
void inhibitListeners ()
 
boolean isDefault ()
 
boolean isIgnore ()
 
void mouseClicked (@NotNull final MouseEvent e)
 
void mouseEntered (@NotNull final MouseEvent e)
 
void mouseExited (@NotNull final MouseEvent e)
 
void mouseMoved (@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 ()
 

Private Member Functions

void moveTo (@NotNull final MouseEvent e)
 

Private Attributes

final float alpha
 
boolean bottom
 
boolean dragging
 
final Image frameC
 
final Image frameE
 
final Image frameN
 
final Image frameNE
 
final Image frameNW
 
final Image frameS
 
final Image frameSE
 
final Image frameSW
 
final Image frameW
 
final GuiFactory guiFactory
 
final int heightN
 
final int heightS
 
boolean left
 
int mouseX
 
int mouseY
 
boolean opaque
 
boolean right
 
int startX1
 
int startX2
 
int startY1
 
int startY2
 
boolean top
 
final int widthE
 
final int widthW
 
final JXCWindowRenderer windowRenderer
 

Static Private Attributes

static final long serialVersionUID = 1L
 

Additional Inherited Members

- 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 ()
 

Detailed Description

A background image for dialog windows.

Author
Andreas Kirschbaum

Definition at line 46 of file GUIDialogBackground.java.

Constructor & Destructor Documentation

◆ GUIDialogBackground()

com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.GUIDialogBackground ( @NotNull final TooltipManager  tooltipManager,
@NotNull final JXCWindowRenderer  windowRenderer,
@NotNull final GUIElementListener  elementListener,
@NotNull final String  name,
final float  alpha,
@NotNull final Image  frameNW,
@NotNull final Image  frameN,
@NotNull final Image  frameNE,
@NotNull final Image  frameW,
@NotNull final Image  frameC,
@NotNull final Image  frameE,
@NotNull final Image  frameSW,
@NotNull final Image  frameS,
@NotNull final Image  frameSE,
@NotNull final GuiFactory  guiFactory 
)

Creates a new instance.

Parameters
tooltipManagerthe tooltip manager to update
windowRendererthe window renderer this element belongs to
elementListenerthe element listener to notify
namethe name of this element
alphathe alpha value for the background, 1 is opaque, 0 full transparent
frameNWthe north-west frame picture
frameNthe north frame picture
frameNEthe north-east frame picture
frameWthe west frame picture
frameCthe center frame picture
frameEthe east frame picture
frameSWthe south-west frame picture
frameSthe south frame picture
frameSEthe south-east frame picture
guiFactorythe global GUI factory instance

Definition at line 226 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.alpha, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.elementListener, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameC, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameE, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameN, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameNE, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameNW, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameS, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameSE, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameSW, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameW, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.guiFactory, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.heightN, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.heightS, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name, com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.widthE, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.widthW, and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.windowRenderer.

Member Function Documentation

◆ getDialogBorderBottom()

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.getDialogBorderBottom ( )

Returns the size of the dialog's bottom border.

Returns
the size in pixels or 0 if this GUI element is not a dialog

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

Definition at line 356 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameS.

◆ getDialogBorderLeft()

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.getDialogBorderLeft ( )

Returns the size of the dialog's left border.

Returns
the size in pixels or 0 if this GUI element is not a dialog

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

Definition at line 344 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameW.

◆ getDialogBorderRight()

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.getDialogBorderRight ( )

Returns the size of the dialog's right border.

Returns
the size in pixels or 0 if this GUI element is not a dialog

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

Definition at line 350 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameE.

◆ getDialogBorderTop()

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.getDialogBorderTop ( )

Returns the size of the dialog's top border.

Returns
the size in pixels or 0 if this GUI element is not a dialog

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

Definition at line 338 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameN.

◆ getMinimumSize()

Dimension com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.getMinimumSize ( )

◆ getPreferredSize()

Dimension com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.getPreferredSize ( )

Definition at line 315 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.getMinimumSize().

Here is the call graph for this function:

◆ getTooltip()

TooltipText com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.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 332 of file GUIDialogBackground.java.

◆ mouseDragged()

void com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseDragged ( @NotNull final MouseEvent  e)

Will be called when the mouse moves within this component while the button is pressed. This event will be delivered after mouseMoved(MouseEvent).

Note: if the mouse leaves this element's bounding box while the mouse button is still pressed, further

(but no

) events will be generated.

Parameters
ethe mouse event relative to this element

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

Definition at line 401 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.moveTo().

Here is the call graph for this function:

◆ mousePressed()

void com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mousePressed ( @NotNull final MouseEvent  e)

Will be called when the user has pressed the mouse inside this element.

Parameters
ethe mouse event relative to this element

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

Definition at line 361 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.bottom, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.dragging, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameE, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameN, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameS, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameW, com.realtime.crossfire.jxclient.gui.gui.Gui.getComponent(), com.realtime.crossfire.jxclient.skin.skin.GuiFactory.getGui(), com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.guiFactory, com.realtime.crossfire.jxclient.gui.gui.Gui.isAutoSize(), com.realtime.crossfire.jxclient.gui.gui.Gui.isUserResizable(), com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.left, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseX, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseY, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.right, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startX1, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startX2, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startY1, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startY2, and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.top.

Here is the call graph for this function:

◆ mouseReleased()

void com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseReleased ( @NotNull final MouseEvent  e)

Will be called when the user has released the mouse. This event may be delivered even if no previous mousePressed(MouseEvent) has been delivered before.

Parameters
ethe mouse event relative to this element

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

Definition at line 392 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.dragging, and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.moveTo().

Here is the call graph for this function:

◆ moveTo()

void com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.moveTo ( @NotNull final MouseEvent  e)
private

Moves the dialog the given point.

Parameters
ethe destination point

Definition at line 412 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.bottom, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.dragging, com.realtime.crossfire.jxclient.gui.gui.Gui.getComponent(), com.realtime.crossfire.jxclient.skin.skin.GuiFactory.getGui(), com.realtime.crossfire.jxclient.gui.misc.JXCWindowRenderer.getWindowHeight(), com.realtime.crossfire.jxclient.gui.misc.JXCWindowRenderer.getWindowWidth(), com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.guiFactory, com.realtime.crossfire.jxclient.gui.gui.Gui.isAutoSize(), com.realtime.crossfire.jxclient.gui.gui.Gui.isUserResizable(), com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.left, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseX, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseY, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.right, com.realtime.crossfire.jxclient.gui.gui.Gui.setBounds(), com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startX1, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startX2, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startY1, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startY2, com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.top, and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.windowRenderer.

Referenced by com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseDragged(), and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseReleased().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ notifyOpen()

void com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.notifyOpen ( )

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

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

Definition at line 327 of file GUIDialogBackground.java.

◆ paintComponent()

void com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.paintComponent ( @NotNull final Graphics  g)

◆ setOpaqueDialogBackground()

void com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.setOpaqueDialogBackground ( final boolean  opaque)

Sets whether the dialog's background is opaque.

Parameters
opaquewhether the background is opaque

Definition at line 274 of file GUIDialogBackground.java.

References com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.alpha, and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.opaque.

Referenced by com.realtime.crossfire.jxclient.gui.gui.Gui.setOpaqueDialogBackground().

Here is the caller graph for this function:

Member Data Documentation

◆ alpha

final float com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.alpha
private

◆ bottom

boolean com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.bottom
private

◆ dragging

boolean com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.dragging
private

◆ frameC

final Image com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameC
private

◆ frameE

final Image com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameE
private

◆ frameN

final Image com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameN
private

◆ frameNE

final Image com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameNE
private

◆ frameNW

final Image com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameNW
private

◆ frameS

final Image com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameS
private

◆ frameSE

final Image com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameSE
private

◆ frameSW

final Image com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameSW
private

◆ frameW

final Image com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.frameW
private

◆ guiFactory

final GuiFactory com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.guiFactory
private

◆ heightN

final int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.heightN
private

◆ heightS

final int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.heightS
private

◆ left

boolean com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.left
private

◆ mouseX

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseX
private

◆ mouseY

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseY
private

◆ opaque

boolean com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.opaque
private

◆ right

boolean com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.right
private

◆ serialVersionUID

final long com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.serialVersionUID = 1L
staticprivate

The serial version UID.

Definition at line 51 of file GUIDialogBackground.java.

◆ startX1

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startX1
private

The x coordinate of the left border of the dialog when resizing started.

Definition at line 188 of file GUIDialogBackground.java.

Referenced by com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mousePressed(), and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.moveTo().

◆ startX2

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startX2
private

The x coordinate of the right border of the dialog when resizing started.

Definition at line 199 of file GUIDialogBackground.java.

Referenced by com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mousePressed(), and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.moveTo().

◆ startY1

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startY1
private

The y coordinate of the top border of the dialog when resizing started.

Definition at line 193 of file GUIDialogBackground.java.

Referenced by com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mousePressed(), and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.moveTo().

◆ startY2

int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.startY2
private

The y coordinate of the bottom border of the dialog when resizing started.

Definition at line 205 of file GUIDialogBackground.java.

Referenced by com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mousePressed(), and com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.moveTo().

◆ top

boolean com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.top
private

◆ widthE

final int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.widthE
private

◆ widthW

final int com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.widthW
private

◆ windowRenderer

final JXCWindowRenderer com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.windowRenderer
private

The documentation for this class was generated from the following file:
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.mouseMoved
void mouseMoved(@NotNull final MouseEvent e)
Definition: AbstractGUIElement.java:211
com.realtime.crossfire.jxclient.gui.misc.GUIDialogBackground.mouseDragged
void mouseDragged(@NotNull final MouseEvent e)
Definition: GUIDialogBackground.java:401