|
|||||||||
| Home >> All >> org >> zazof >> jteg >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.zazof.jteg.gui
Class CardContainerCanvas

java.lang.Objectjava.awt.Component
java.awt.Canvas
org.zazof.jteg.gui.CardContainerCanvas
- All Implemented Interfaces:
- javax.accessibility.Accessible, org.zazof.jteg.CardControllerListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable, java.awt.event.WindowListener
- public class CardContainerCanvas
- extends java.awt.Canvas
- implements org.zazof.jteg.CardControllerListener, java.awt.event.MouseListener, java.awt.event.WindowListener
- extends java.awt.Canvas
CardContainerCanvas is the class responsible for drawing the Cardset of the user of this client. It is the 'container' that will hold references to CardCanvas objects ,... It also implements the MouseListener interface for interaction with the user.
| Nested Class Summary |
| Nested classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
private java.util.Vector |
$cardCanvasList
|
private org.zazof.jteg.CardController |
$currentController
|
private javax.swing.JFrame |
$parent
|
private java.awt.image.BufferedImage |
bi
|
private static boolean |
DEBUG
|
private java.awt.Graphics2D |
g2d
|
| Fields inherited from class java.awt.Canvas |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
CardContainerCanvas(javax.swing.JFrame parent)
Constructor |
|
| Method Summary | |
void |
cardsChanged(org.zazof.jteg.CardController cc)
Method that mentions to the CardContainerCanvas that the cards have changed. |
org.zazof.jteg.Card |
getCardAt(int xCoord,
int yCoord)
Returns the card at the specified absolute coordinates. |
org.zazof.jteg.Card |
getCardAtPosition(int relativePosition)
Returns the card at the specified relative position. |
java.lang.String[] |
getExchangeParams()
|
void |
mouseClicked(java.awt.event.MouseEvent me)
Handles the actions that happen when a Mousebutton is clicked |
void |
mouseEntered(java.awt.event.MouseEvent me)
This method is called when the mouse enters a component. |
void |
mouseExited(java.awt.event.MouseEvent me)
This method is called when the mouse exits a component. |
void |
mousePressed(java.awt.event.MouseEvent me)
This method is called when the mouse is pressed over a component. |
void |
mouseReleased(java.awt.event.MouseEvent me)
This method is called when the mouse is released over a component. |
void |
paint(java.awt.Graphics g)
Repaints the canvas window. |
void |
update(java.awt.Graphics g)
Draw & Paint method. |
void |
windowActivated(java.awt.event.WindowEvent we)
This method is called when a window is activated. |
void |
windowClosed(java.awt.event.WindowEvent we)
This method is called when the window is closed. |
void |
windowClosing(java.awt.event.WindowEvent we)
This method is called when the user calls the system menu close function, giving the program a chance to cancel the close. |
void |
windowDeactivated(java.awt.event.WindowEvent we)
This method is called when the window is deactivated. |
void |
windowDeiconified(java.awt.event.WindowEvent we)
This method is called when the window is deiconified. |
void |
windowIconified(java.awt.event.WindowEvent we)
This method is called when the window is iconified. |
void |
windowOpened(java.awt.event.WindowEvent we)
This method is called when the window is made visible. |
| Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
$parent
private javax.swing.JFrame $parent
$currentController
private org.zazof.jteg.CardController $currentController
bi
private java.awt.image.BufferedImage bi
g2d
private java.awt.Graphics2D g2d
$cardCanvasList
private java.util.Vector $cardCanvasList
DEBUG
private static final boolean DEBUG
- See Also:
- Constant Field Values
| Constructor Detail |
CardContainerCanvas
public CardContainerCanvas(javax.swing.JFrame parent)
- Constructor
| Method Detail |
cardsChanged
public void cardsChanged(org.zazof.jteg.CardController cc)
- Method that mentions to the CardContainerCanvas that the cards have changed.
- Specified by:
cardsChangedin interfaceorg.zazof.jteg.CardControllerListener
paint
public void paint(java.awt.Graphics g)
- Description copied from class:
java.awt.Canvas - Repaints the canvas window. This method should be overridden by
a subclass to do something useful, as this method simply paints
the window with the background color.
update
public void update(java.awt.Graphics g)
- Draw & Paint method. Draws the different cards, with their selectionbox and the Put-2-armies button.
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent me)
- Handles the actions that happen when a Mousebutton is clicked
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent me)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse enters a component.
- Specified by:
mouseEnteredin interfacejava.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent me)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse exits a component.
- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent me)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse is pressed over a component.
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent me)
- Description copied from interface:
java.awt.event.MouseListener - This method is called when the mouse is released over a component.
- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener
getCardAt
public org.zazof.jteg.Card getCardAt(int xCoord, int yCoord)
- Returns the card at the specified absolute coordinates. Returns null if no card is at that position
getCardAtPosition
public org.zazof.jteg.Card getCardAtPosition(int relativePosition)
- Returns the card at the specified relative position. Returns null if there is no card active at that position
windowOpened
public void windowOpened(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener - This method is called when the window is made visible.
- Specified by:
windowOpenedin interfacejava.awt.event.WindowListener
windowClosing
public void windowClosing(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener - This method is called when the user calls the system menu close
function, giving the program a chance to cancel the close.
- Specified by:
windowClosingin interfacejava.awt.event.WindowListener
windowClosed
public void windowClosed(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener - This method is called when the window is closed.
- Specified by:
windowClosedin interfacejava.awt.event.WindowListener
windowIconified
public void windowIconified(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener - This method is called when the window is iconified.
- Specified by:
windowIconifiedin interfacejava.awt.event.WindowListener
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener - This method is called when the window is deiconified.
- Specified by:
windowDeiconifiedin interfacejava.awt.event.WindowListener
windowActivated
public void windowActivated(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener - This method is called when a window is activated. Only Frames and Dialogs
can be active, and the active window always contains the component with
focus.
- Specified by:
windowActivatedin interfacejava.awt.event.WindowListener
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent we)
- Description copied from interface:
java.awt.event.WindowListener - This method is called when the window is deactivated.
- Specified by:
windowDeactivatedin interfacejava.awt.event.WindowListener
getExchangeParams
public java.lang.String[] getExchangeParams() throws org.zazof.jteg.IllegalExchangeException
|
|||||||||
| Home >> All >> org >> zazof >> jteg >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC