# PortalTool (vilya 1.3 API)
Date: 2011-04-06

## com.threerings.stage.tools.editor
Class PortalTool

    java.lang.Object
      java.awt.event.MouseAdapter
          javax.swing.event.MouseInputAdapter
              com.threerings.stage.tools.editor.PortalTool

All Implemented Interfaces:
  ExtrasPainter, MouseListener, MouseMotionListener, MouseWheelListener, EventListener, MouseInputListener

    public class PortalTool

extends MouseInputAdapter
implements ExtrasPainter

A tool for setting a portal.

Constructor Summary
`PortalTool()`

Method Summary
`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.

Methods inherited from class java.awt.event.MouseAdapter
`mouseClicked, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseWheelMoved`

Methods inherited from class java.lang.Object
`equals, 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`

Constructor Detail

### PortalTool

    public PortalTool()

Method Detail

### init

    public void init(EditorScenePanel panel,
                     int centerx,
                     int centery)

### mouseDragged

    public void mouseDragged(MouseEvent event)

  When the mouse is dragged we update the current portal.

  Specified by:
    `mouseDragged` in interface `MouseMotionListener`
  Overrides:
    `mouseDragged` in class `MouseAdapter`

### mouseReleased

    public void mouseReleased(MouseEvent event)

  If button1 is released, we store the new portal, if button3: we cancel.

  Specified by:
    `mouseReleased` in interface `MouseListener`
  Overrides:
    `mouseReleased` in class `MouseAdapter`

### paintExtras

    public void paintExtras(Graphics2D gfx)

  Paint what the clusters would look like if we were to add them to the scene.

  Specified by:
    `paintExtras` in interface `ExtrasPainter`

Copyright © 2011. All Rights Reserved.