sk.baka.ambient.views
Class ContainedPopupWindow

java.lang.Object
  extended by sk.baka.ambient.views.ContainedPopupWindow

public final class ContainedPopupWindow
extends java.lang.Object

A contained pop-up window. This window is contained in and positioned relative to owning view. Displays a simple string.

Author:
Martin Vysny

Nested Class Summary
static interface ContainedPopupWindow.IPlaceable
          Computes window placement.
 
Constructor Summary
ContainedPopupWindow(android.view.View owner, ContainedPopupWindow.IPlaceable coords)
          Creates new pop-up window instance.
 
Method Summary
 void dismiss()
          Dismisses the pop-up window.
 void dismissAfter(long timeMillis)
          Dismiss the pop-up window after designated time.
 void setText(java.lang.CharSequence text)
          Displays given text on the pop-up window, showing it if necessary.
 void updatePos()
          Updates the position of the window if the window is visible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainedPopupWindow

public ContainedPopupWindow(android.view.View owner,
                            ContainedPopupWindow.IPlaceable coords)
Creates new pop-up window instance.

Parameters:
owner - the owner window.
coords - computes coordinates for the pop-up.
Method Detail

setText

public void setText(java.lang.CharSequence text)
Displays given text on the pop-up window, showing it if necessary.

Parameters:
text - the text to display.

dismiss

public void dismiss()
Dismisses the pop-up window.


dismissAfter

public void dismissAfter(long timeMillis)
Dismiss the pop-up window after designated time. Canceled when a new text is set.

Parameters:
timeMillis - dismiss after this time period.

updatePos

public void updatePos()
Updates the position of the window if the window is visible.



Copyright © 2007-2009. All Rights Reserved.