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
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user