|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectks.common.view.Widget
ks.common.view.PileView
Creates view of a pile of cards (only top one being visible).
Cards are extracted from the top of a pile using getCardViewForTopCard()
which
returns a ColumnView object even though only one card can be extracted at a time.
Note: Since v1.6, supports the returnWidget(Widget)
interface to reverse
the action of getCardViewForTopCard()
.
Creation date: (10/27/01 1:20:11 PM)
Constructor Summary | |
PileView(Element me)
PileView constructor comment. |
Method Summary | |
CardView |
getCardViewForTopCard(java.awt.event.MouseEvent me)
If the MouseEvent falls on the top card of this Column, remove the top card from the Model and return a CardView widget to manage the card as it is dragged on the screen. |
void |
redraw()
redraw Widget image. |
boolean |
returnWidget(Widget w)
Return the CardView widget's model element back onto the underlying Pile. |
Methods inherited from class ks.common.view.Widget |
getBounds, getCardImages, getContainer, getHeight, getImage, getModelElement, getMouseManager, getName, getWidth, getX, getXY, getY, inBounds, isDirty, modelChanged, paint, paint, paint, refresh, refresh, setBounds, setBounds, setContainer, setDirty, setHeight, setImage, setMouseAdapter, setMouseManager, setMouseMotionAdapter, setName, setUndoAdapter, setWidth, setX, setXY, setY, toString, translate |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PileView(Element me)
me
- ks.common.model.ElementMethod Detail |
public CardView getCardViewForTopCard(java.awt.event.MouseEvent me)
Note: the Column Model will be altered by this method if the mouseEvent maps to the top card in the Pile View.
Don't forget to let container know that we are the source for the dragging widget.
me
- java.awt.event.MouseEventpublic void redraw()
If the Pile is empty, a thin rectangle border is drawn. Any faceup/facedown cards in the Pile are drawn as appropriate.
redraw
in class Widget
public boolean returnWidget(Widget w)
If parameter widget is not a CardView object, this method will throw an IllegalCastException.
returnWidget
in class Widget
w
- ks.common.view.Widget
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |