|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.event.MouseAdapter
javax.swing.event.MouseInputAdapter
com.threerings.stage.tools.editor.PortalTool
public class PortalTool
A tool for setting a portal.
| Field Summary | |
|---|---|
protected Point |
_center
Center coordinates. |
protected EditorScenePanel |
_panel
The panel. |
protected EditablePortal |
_portal
Our newly created portal. |
protected StageScene |
_scene
The scene. |
| Constructor Summary | |
|---|---|
PortalTool()
|
|
| Method Summary | |
|---|---|
protected void |
calculateOrientation(int x,
int y)
Updates the orientation of the portal based on the current mouse position and potentially repaints. |
protected void |
dispose()
Get rid of ourselves. |
void |
init(EditorScenePanel panel,
int centerx,
int centery)
|
void |
mouseDragged(MouseEvent event)
When the mouse is dragged we update the current portal. |
void |
mouseReleased(MouseEvent event)
If button1 is released, we store the new portal, if button3: we cancel. |
void |
paintExtras(Graphics2D gfx)
Paint what the clusters would look like if we were to add them to the scene. |
protected boolean |
portalNameExists(String name)
See if the portal name already exists. |
protected void |
savePortal()
Adds our portal to the scene. |
| Methods inherited from class java.awt.event.MouseAdapter |
|---|
mouseClicked, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseWheelMoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.event.MouseListener |
|---|
mouseClicked, mouseEntered, mouseExited, mousePressed |
| Methods inherited from interface java.awt.event.MouseMotionListener |
|---|
mouseMoved |
| Field Detail |
|---|
protected EditorScenePanel _panel
protected StageScene _scene
protected Point _center
protected EditablePortal _portal
| Constructor Detail |
|---|
public PortalTool()
| Method Detail |
|---|
public void init(EditorScenePanel panel,
int centerx,
int centery)
public void mouseDragged(MouseEvent event)
mouseDragged in interface MouseMotionListenermouseDragged in class MouseAdapterpublic void mouseReleased(MouseEvent event)
mouseReleased in interface MouseListenermouseReleased in class MouseAdapterpublic void paintExtras(Graphics2D gfx)
paintExtras in interface ExtrasPainter
protected void calculateOrientation(int x,
int y)
protected void savePortal()
protected boolean portalNameExists(String name)
protected void dispose()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||