|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.ItemView
de.enough.polish.ui.ContainerView
de.enough.polish.ui.containerviews.SlideContainerView
public class SlideContainerView
Slides the parent container in any direction, this animation can used for menus for example.
menu {
view-type: slide;
}
menu {
view-type: slide;
slideview-direction: leftop; // moving from bottom-right to the left-top corner
}
Copyright Enough Software 2006 - 2009
history
Aug 21, 2006 - rob creation
| Field Summary |
|---|
| Fields inherited from class de.enough.polish.ui.ItemView |
|---|
availableHeight, availableWidth, contentHeight, contentWidth, isFocused, isLayoutCenter, isLayoutRight, layout, paddingHorizontal, paddingVertical, parentItem |
| Constructor Summary | |
|---|---|
SlideContainerView()
|
|
| Method Summary | |
|---|---|
void |
animate(long currentTime,
ClippingRegion repaintRegion)
Animates this item. |
protected int |
calculateNext(int current,
int target,
long currentTime,
int completeDistance)
Calculates the next value |
protected void |
initAnimation()
Initializes the animation. |
protected void |
initContent(Item parentContainerItem,
int firstLineWidth,
int availWidth,
int availHeight)
Initializes this container view. |
void |
paintBackground(Background background,
int x,
int y,
int width,
int height,
Graphics g)
|
void |
paintBorder(Border border,
int x,
int y,
int width,
int height,
Graphics g)
|
protected void |
paintContent(Container container,
Item[] myItems,
int x,
int y,
int leftBorder,
int rightBorder,
int clipX,
int clipY,
int clipWidth,
int clipHeight,
Graphics g)
Paints the content of this container view. |
protected void |
setStyle(Style style)
Sets the style for this view. |
void |
showNotify()
Notifies this view that it is about to be shown (again). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SlideContainerView()
| Method Detail |
|---|
public void animate(long currentTime,
ClippingRegion repaintRegion)
ItemView
animate in class ContainerViewcurrentTime - the current time in millisecondsrepaintRegion - the repaint area that needs to be updated when this item is animatedItem.getAbsoluteX(),
Item.getAbsoluteY()
protected int calculateNext(int current,
int target,
long currentTime,
int completeDistance)
current - the current valuetarget - the target valuecurrentTime - the current timecompleteDistance - the complete distance
protected void initAnimation()
public void showNotify()
ContainerView
showNotify in class ContainerView
protected void initContent(Item parentContainerItem,
int firstLineWidth,
int availWidth,
int availHeight)
ContainerView
initContent in class ContainerViewparentContainerItem - the Container which uses this view, use parent.getItems() for retrieving all items.firstLineWidth - the maximum width of the first lineavailWidth - the maximum width of any following linesavailHeight - the maximum height of the viewItemView.contentWidth,
ItemView.contentHeight
protected void paintContent(Container container,
Item[] myItems,
int x,
int y,
int leftBorder,
int rightBorder,
int clipX,
int clipY,
int clipWidth,
int clipHeight,
Graphics g)
ContainerView
paintContent in class ContainerViewcontainer - the parent containermyItems - the items that should be paintedx - the left start positiony - the upper start positionleftBorder - the left border, nothing must be painted left of this positionrightBorder - the right border, nothing must be painted right of this positionclipX - absolute horizontal clipping startclipY - absolute verical clipping startclipWidth - clipping widthclipHeight - clipping heightg - the Graphics on which this item should be painted.
public void paintBackground(Background background,
int x,
int y,
int width,
int height,
Graphics g)
paintBackground in class ItemView
public void paintBorder(Border border,
int x,
int y,
int width,
int height,
Graphics g)
paintBorder in class ItemViewprotected void setStyle(Style style)
ContainerView
setStyle in class ContainerViewstyle - the style
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||