|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent net.sf.magicproject.clickable.Clickable net.sf.magicproject.clickable.targetable.Targetable net.sf.magicproject.clickable.targetable.card.AbstractCard
public abstract class AbstractCard
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.BaselineResizeBehavior |
Field Summary | |
---|---|
Player |
controller
Player controller |
boolean |
reversed
tell if this card is reversed or not, that means this card is controlled by opponent or not. |
Visibility |
visibility
Indicates if this card is returned or not, that means back image is visible or not. |
Fields inherited from class net.sf.magicproject.clickable.targetable.Targetable |
---|
cachedAbilities, controllerModifier, indirections, registerModifiers, registers |
Fields inherited from class net.sf.magicproject.clickable.Clickable |
---|
highLightColor, isHighLighted |
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
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 |
Method Summary | |
---|---|
abstract void |
checkAllCardsOf(Test test,
java.util.List<Targetable> list,
Ability ability)
Checks all cards corresponding to this constraints |
abstract int |
countAllCardsOf(Test test,
Ability ability,
boolean canBePreempted)
Checks all cards corresponding to the specified constraints |
java.lang.String |
getCardName()
This function return the result of Component#getName(). |
Player |
getController()
Return the controller of this card |
DatabaseCard |
getDatabase()
Return the database configuration of this card : picture, database properties (credits, language,...) |
VirtualCard |
getMUI()
Return UI of this card. |
java.awt.Image |
getPreviewImage()
Return the card's picture as it would be displayed in the preview panel. |
abstract java.lang.String |
getTooltipString()
Return HTML tooltip string of this card. |
java.awt.Image |
image()
Return the card's picture |
abstract boolean |
isACopy()
Indicates if the current card in the stack is a copy or not |
boolean |
isCard()
return true if this targetable is a card |
void |
mouseEntered(java.awt.event.MouseEvent e)
is called when mouse is on this card, will disp a preview |
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
moveCard(int newIdPlace,
Player newController,
boolean newIsTapped,
int idPosition)
Move this card to a new place tapped or not under the control of a player |
boolean |
needReverse()
Is this card need to be reversed to suit to the player view. |
void |
notifyChange()
Notify this listener that the listen content has been updated. |
void |
reverse(boolean reversed)
Reverse this card if the specified parameter is true |
void |
reverseAsNeeded()
Reverse this card if controller is not you |
java.awt.Image |
scaledImage()
Return the scaled card's picture |
java.lang.String |
toString()
return the card's name |
Methods inherited from class net.sf.magicproject.clickable.targetable.Targetable |
---|
actionPerformed, addModifier, addModifier, addPrivateNamedObject, addTimestampReference, clearDamages, clearPrivateNamedObject, decrementTimestampReference, getCreator, getId, getLastKnownTargetable, getOriginalTargetable, getPrivateNamedObject, getPrivateNamedObjects, getTimestamp, getValue, getValueIndirection, isAbility, isPlayer, isSpell, removeModifier, removeModifier, removePrivateNamedObject, setCreator, targetize, targetize, tokenize |
Methods inherited from class net.sf.magicproject.clickable.Clickable |
---|
disHighLight, disHighlight, highLight, mouseClicked, mousePressed, mouseReleased, sendClickToOpponent |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean reversed
public Visibility visibility
public Player controller
Method Detail |
---|
public boolean isCard()
isCard
in class Targetable
public abstract int countAllCardsOf(Test test, Ability ability, boolean canBePreempted)
test
- applied to count valid cardsability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.canBePreempted
- true
if the valid targets can be derterminated
before runtime.
public abstract void checkAllCardsOf(Test test, java.util.List<Targetable> list, Ability ability)
test
- applied to count valid cardslist
- the list containing the founded cardsability
- is the ability owning this test. The card component of this
ability should correspond to the card owning this test too.public void moveCard(int newIdPlace, Player newController, boolean newIsTapped, int idPosition)
newIdPlace
- the new place for this cardnewController
- new controler of this card. If null, the controler is the owner.newIsTapped
- dertermines if this card will come tapped or notidPosition
- from IdPositionspublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
mouseExited
in class Clickable
public abstract java.lang.String getTooltipString()
public void reverseAsNeeded()
public boolean needReverse()
public void reverse(boolean reversed)
reversed
- if true the card will be tured as if your controled controls itpublic java.awt.Image image()
public java.awt.Image scaledImage()
public final void notifyChange()
MonitorListener
notifyChange
in interface MonitorListener
public final java.awt.Image getPreviewImage()
public java.lang.String toString()
toString
in class Targetable
public abstract boolean isACopy()
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
mouseEntered
in class Clickable
e
- is the mouse eventpublic Player getController()
public final java.lang.String getCardName()
public final DatabaseCard getDatabase()
public VirtualCard getMUI()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |