|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
stella.jview.JRoofView.JRoofCanvas
protected class JRoofView.JRoofCanvas
A class that displays the STELLA building and the roofs according
to the images, blinking instances and offsets assigned to it. It is
the swing representation for the JRoofView class, which hands
over the actual roof representation to this class, which is responsible
for drawing it.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private Image |
background
The background to draw. |
private Point[] |
btr
The position of the bottom roofs, left and right, variable. |
private Point[] |
lkn
The position of the locks, north half. |
private Point[] |
lks
The position of the locks, south half. |
private BlinkingImage[] |
locknorth
The blinking instance for N-lock. |
private BlinkingImage[] |
locksouth
The blinking instance for S-lock. |
private Point[] |
lon
The position of the open-limit, north. |
private Point[] |
los
The position of the open-limit, south. |
private Point[] |
lsn
The position of the shut-limit, north. |
private Point[] |
lss
The position of the shut-limit, south. |
private Image[] |
opennorth
The images for N-limit switch open. |
private Image[] |
opensouth
The images for S-limit switch open. |
private Image[] |
roofside
The blinking instance for side roof. |
private Image[] |
rooftop
The instance for top roof. |
private Image[] |
shutnorth
The images for N-limit switch shut. |
private Image[] |
shutsouth
The images for S-limit switch shut. |
private Point[] |
spd
The position of the speed indicator, left and right. |
private BlinkingImage[] |
speed
A speedometer blinking image. |
private Point[] |
tpr
The position of the top roofs, left and right, variable. |
private Image[] |
xnorth
The images for X-switch, north. |
private Point[] |
xsn
The position of the x-switch, north. |
private Image[] |
xsouth
The images for X-switch, south. |
private Point[] |
xss
The position of the x-switch, south. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 |
| Constructor Summary | |
|---|---|
protected |
JRoofView.JRoofCanvas()
Constructs a new canvas for drawing the STELLA layout. |
| Method Summary | |
|---|---|
void |
paint(Graphics g)
Paints the component. |
protected BlinkingImage |
prepareBlinker(Point offset,
Image on,
Image off,
int freq,
boolean stopon)
Prepares a blinking image instance. |
protected void |
setStella(Image bg)
Sets the background image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Image background
private Image[] opennorth
private Image[] opensouth
private Image[] shutnorth
private Image[] shutsouth
private Image[] xnorth
private Image[] xsouth
private Image[] rooftop
private Image[] roofside
private BlinkingImage[] locknorth
private BlinkingImage[] locksouth
private BlinkingImage[] speed
private Point[] tpr
private Point[] btr
private Point[] lon
private Point[] los
private Point[] lsn
private Point[] lss
private Point[] xsn
private Point[] xss
private Point[] spd
private Point[] lkn
private Point[] lks
| Constructor Detail |
|---|
protected JRoofView.JRoofCanvas()
| Method Detail |
|---|
protected void setStella(Image bg)
protected BlinkingImage prepareBlinker(Point offset,
Image on,
Image off,
int freq,
boolean stopon)
public void paint(Graphics g)
paint in class JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||