Files
nenya/src/java/com/threerings/miso/client/SceneObjectIndicator.java
T
Charlie Groves b01c773d20 Generalize SceneObjectTips into SceneObjectIndicators to allow things other
than tooltips to be painted for interesting objects.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@469 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-19 23:05:04 +00:00

41 lines
1015 B
Java

package com.threerings.miso.client;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.util.Collection;
import javax.swing.Icon;
/**
* Draws something to indicate a fascinating, clickable object in a scene.
*/
public interface SceneObjectIndicator
{
/**
* Returns the bounds of the indicator when drawn.
*/
public Rectangle getBounds ();
/**
* Positions the indicator in the scene in relation to <code>key</code>
*/
public void layout (Graphics2D gfx, SceneObject key, Rectangle viewBounds,
Collection<Rectangle> otherIndicators);
/**
* Called when the indicator is removed from the scene.
*/
public void removed ();
/**
* Paints the indicator in the scene. Always called after
* {@link #layout(Graphics2D, SceneObject, Rectangle, Collection)}
*/
public void paint (Graphics2D gfx);
/**
* Updates the Icon and text for the indicator.
*/
public void update (Icon icon, String tiptext);
}