|
||||||||||
| 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
javax.swing.JPanel
de.limdul.cassiopeia.cardeditor.ImagePanel
public class ImagePanel
Implementiert ein Panel für den Karteneditor, wo die Karte angezeigt wird.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| 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 |
|---|
| 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 | |
|---|---|
ImagePanel()
Erzeugt ein neues Panel. |
|
ImagePanel(MouseListener listener)
Erzeugt ein neues Panel. |
|
| Method Summary | |
|---|---|
void |
addExtra(int x,
int y,
int type)
Fügt ein Extra hinzu. |
boolean |
addGrasslandExtra(int x,
int y,
int extra)
Fügt ein Wiesenextra hinzu. |
boolean |
addRoadExtra(int x,
int y,
int extra)
Fügt ein Straßenextra hinzu. |
boolean |
addTownExtra(int x,
int y,
int extra)
Fügt ein Stadtextra hinzu. |
void |
addVertex(int x,
int y,
int type)
Fügt ein Vertex hinzu. |
Card |
getCard()
Liefert die aktive Karte. |
Edge |
getEdge(int x,
int y)
Liefert die Kante an der gegebenen Stelle. |
Extra |
getExtra(int x,
int y)
Liefert das Extra an der gegebenen Stelle. |
Dimension |
getPreferredSize()
|
Vertex |
getVertex(int x,
int y)
Liefert das Vertex an der angegebenen Stelle. |
boolean |
isValidNewVertex(int x,
int y)
Testet, ob die angegebene Koordinate ein neues Vertex aufnehmen kann. |
void |
paint(Graphics g)
|
void |
setCard(Card card)
Setzt die aktive Karte. |
void |
setCard(Card card,
Addon addon)
Setzt die aktive Karte. |
void |
setPictureNumber(int number)
Läd das Bild mit der angegebenen Nummer. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ImagePanel()
public ImagePanel(MouseListener listener)
listener - Der Mauslistener.| Method Detail |
|---|
public void setCard(Card card)
card - Die zu setzende Karte.
public void setCard(Card card,
Addon addon)
card - Die Karteaddon - Das Addon, aus dem das Bild angezeigt werden soll.public Dimension getPreferredSize()
getPreferredSize in class JComponentComponent.getPreferredSize()public void paint(Graphics g)
paint in class JComponentComponent.paint(java.awt.Graphics)
public boolean isValidNewVertex(int x,
int y)
x - Die X-Koordinate.y - Die Y-Koordinate.
true, wenn es eine gültige Koordinate für ein neues Vertex ist, false sonst.
public void addVertex(int x,
int y,
int type)
x - Die X-Koordinate des neuen Vertex.y - Die Y-Koordinate des neuen Vertex.type - Der Typ des neuen Vertex.
public Vertex getVertex(int x,
int y)
x - Die X-Koordinate des neuen Vertex.y - Die Y-Koordinate des neuen Vertex.
public Card getCard()
public boolean addTownExtra(int x,
int y,
int extra)
x - Die X-Koordinate des Extras.y - Die Y-Koordinate des Extras.extra - Das hinzufügende Extra
true bei Erfolg, false sonst.
public boolean addGrasslandExtra(int x,
int y,
int extra)
x - Die X-Koordinate des Extras.y - Die Y-Koordinate des Extras.extra - Das hinzufügende Extra
true bei Erfolg, false sonst.
public boolean addRoadExtra(int x,
int y,
int extra)
x - Die X-Koordinate des Extras.y - Die Y-Koordinate des Extras.extra - Das hinzufügende Extra
true bei Erfolg, false sonst.
public void addExtra(int x,
int y,
int type)
x - Die X-Koordinate des Extras.y - Die Y-Koordinate des Extras.type - Der Typ des Extras.
public Extra getExtra(int x,
int y)
x - Die X-Koordinate.y - Die Y-Koordinate.
public Edge getEdge(int x,
int y)
x - Die X-Koordinate.y - Die Y-Koordinate.
public void setPictureNumber(int number)
number - Die Nummer.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||