|
|||||||||||
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.ColumnView
Represents a column of cards (face up) on the screen. The space will expand to fit the required image size.
Overrides the returnWidget(Widget)
method to replace the Card that was
extracted during getCardViewForTopCard()
Images do not reflect 'selected' status of the underlying cards.
Constructor Summary | |
ColumnView(Column col)
ColumnView constructor. |
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. |
ColumnView |
getColumnView(java.awt.event.MouseEvent me)
If the MouseEvent falls on a non-top card of this Column, construct a column of these cards and return a CardView widget to manage the column as it is dragged on the screen. |
void |
redraw()
Redraw a ColumnView. |
boolean |
returnWidget(Widget w)
Return the CardView widget's model element back onto the underlying Column. |
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 |
Methods inherited from interface ks.common.model.ElementListener |
modelChanged |
Constructor Detail |
public ColumnView(Column col)
Method 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 Column View.
Note: The Widget returned by this method can be restored back to the underlying
model element by invoking returnWidget(Widget)
(since v1.6).
me
- java.awt.event.MouseEventpublic ColumnView getColumnView(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 Column View.
Note: The Widget returned by this method can be restored back to the underlying model
element by invoking returnWidget(Widget)
(since v1.6).
me
- java.awt.event.MouseEventpublic void redraw()
If a column is empty, a thin rectangle outline will be drawn showing the base of the column. (since V1.6.10)
Because ColumnView objects may fluctuate in size, we never know our maximal height when creating the image: we start with a default size, but then this may grow... While we can't expand larger than our original Widget size, we should still accommodate as much as we can. Thus, we keep a "high water mark" for the largest height value seen so far, and grow our offscreenImage accordingly. This functionality was added in V1.6.10.
To make programming easier, the smallest size a ColumnView image can be is 13 cards.
redraw
in class Widget
public boolean returnWidget(Widget w)
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 |