|
||||||||||
| 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
net.pacbell.jfai.toh.ui.CanvasPanel
public class CanvasPanel
A panel containing the 3D-view of the puzzle.
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
(package private) static Log |
LOG
The trace log. |
| 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 | |
|---|---|
CanvasPanel(Base base,
List<Disk> disks)
Creates a panel with the 3D drawing canvas. |
|
| Method Summary | |
|---|---|
void |
beginPinSelection(BufferedValue pinModel)
Prepares for the selection of a pin in the scene. |
void |
cleanUp()
Ends the visualization. |
void |
endPinSelection()
Ends pin selection. |
Canvas3D |
getCanvas()
Gets the 3D canvas. |
List<DiskView> |
getDiskViews()
Gets the list of disk views. |
(package private) SimpleUniverse |
getUniverse()
Gets the Universe. |
protected void |
pickPin(BufferedValue pinModel,
Pin pin)
A pin was selected in the 3D view. |
void |
updateDisks(List<Disk> disks)
Refreshes all disk views by removing all existing disk views and creating a view for each of the given disks. |
| 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 |
| Field Detail |
|---|
static final Log LOG
| Constructor Detail |
|---|
public CanvasPanel(Base base,
List<Disk> disks)
base - a Basedisks - the disks| Method Detail |
|---|
public void beginPinSelection(BufferedValue pinModel)
Assume that this method is called in the event dispatch thread, for example, when a toggle button was pressed.
pinModel - a BufferedValue for the selected pinpublic void cleanUp()
public void endPinSelection()
public Canvas3D getCanvas()
public List<DiskView> getDiskViews()
public void updateDisks(List<Disk> disks)
disks - the disks
protected void pickPin(BufferedValue pinModel,
Pin pin)
This could be called outside of the event dispatch thread.
pinModel - a BufferedValue for the selected pinpin - a PinSimpleUniverse getUniverse()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||