|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.Background
de.enough.polish.ui.backgrounds.LayerBackground
public class LayerBackground
Provides a background consisting of several other backgrounds.
Usage example:
backgrounds {
contentTop {
type: partial-gradient;
start: 0%;
end: 10%;
top-color: #ccc;
bottom-color: #fff;
}
contentBottom {
type: partial-gradient;
start: 90%;
end: 100%;
top-color: #fff;
bottom-color: #ccc;
}
contentBg {
type: image;
image: url(logo.png);
anchor: hcenter | vcenter;
color: #fff;
}
}
.myScreen {
padding: 2%;
background {
type: layer;
layers: contentTop, contentBottom, contentBg;
}
}
Copyright Enough Software 2009
| Field Summary | |
|---|---|
protected Dimension[] |
margins
|
| Fields inherited from class de.enough.polish.ui.Background |
|---|
borderWidth |
| Constructor Summary | |
|---|---|
LayerBackground(Background[] layers)
Creates a new layer background. |
|
LayerBackground(Background[] layers,
Dimension[] margins)
Creates a new layer background. |
|
| Method Summary | |
|---|---|
void |
animate(Screen screen,
Item parent,
long currentTime,
ClippingRegion repaintRegion)
Animates this background. |
void |
hideNotify()
Informs the background that it is being hidden shortly. |
void |
paint(int x,
int y,
int width,
int height,
Graphics g)
Paints this background. |
void |
releaseResources()
Releases all (memory intensive) resources such as images or RGB arrays of this background. |
void |
setStyle(Style style)
Allows backgrounds to be animated using CSS attribute animations. |
void |
showNotify()
Informs the background that it is being shown shortly or that it is now applied to a new visible item. |
| Methods inherited from class de.enough.polish.ui.Background |
|---|
addRelativeToBackgroundRegion, animate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Dimension[] margins
| Constructor Detail |
|---|
public LayerBackground(Background[] layers)
layers - the nested backgrounds
public LayerBackground(Background[] layers,
Dimension[] margins)
layers - the nested backgrounds| Method Detail |
|---|
public void paint(int x,
int y,
int width,
int height,
Graphics g)
Background
paint in class Backgroundx - the horizontal start pointy - the vertical start pointwidth - the width of the backgroundheight - the height of the backgroundg - the Graphics on which the background should be painted.
public void animate(Screen screen,
Item parent,
long currentTime,
ClippingRegion repaintRegion)
Background
animate in class Backgroundscreen - the parent screenparent - the parent item, can be null when the background belongs to a screencurrentTime - the current time in millisecondsrepaintRegion - the repaint area that needs to be updated when this item is animatedItem.addRelativeToContentRegion(ClippingRegion, int, int, int, int)public void showNotify()
Background
showNotify in class Backgroundpublic void hideNotify()
Background
hideNotify in class Backgroundpublic void releaseResources()
Background
releaseResources in class Backgroundpublic void setStyle(Style style)
Background
setStyle in class Backgroundstyle - the style containing typically only one element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||