本文整理匯總了Java中prefuse.util.display.PaintListener類的典型用法代碼示例。如果您正苦於以下問題:Java PaintListener類的具體用法?Java PaintListener怎麽用?Java PaintListener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PaintListener類屬於prefuse.util.display包,在下文中一共展示了PaintListener類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: firePrePaint
import prefuse.util.display.PaintListener; //導入依賴的package包/類
/**
* Fires a pre-paint notification to PaintListeners.
*
* @param g
* the current graphics context
*/
protected void firePrePaint(AndroidGraphics2D g)
{
if (m_painters != null && m_painters.size() > 0)
{
Object[] lstnrs = m_painters.getArray();
for (int i = 0; i < lstnrs.length; ++i)
{
try
{
((PaintListener) lstnrs[i]).prePaint(this, g);
} catch (Exception e)
{
s_logger.warning("Exception thrown by PaintListener: " + e + "\n" + StringLib.getStackTrace(e));
}
}
}
}
示例2: firePostPaint
import prefuse.util.display.PaintListener; //導入依賴的package包/類
/**
* Fires a post-paint notification to PaintListeners.
*
* @param g
* the current graphics context
*/
protected void firePostPaint(AndroidGraphics2D g)
{
if (m_painters != null && m_painters.size() > 0)
{
Object[] lstnrs = m_painters.getArray();
for (int i = 0; i < lstnrs.length; ++i)
{
try
{
((PaintListener) lstnrs[i]).postPaint(this, g);
} catch (Exception e)
{
s_logger.warning("Exception thrown by PaintListener: " + e + "\n" + StringLib.getStackTrace(e));
}
}
}
}
示例3: addPaintListener
import prefuse.util.display.PaintListener; //導入依賴的package包/類
/**
* Add a PaintListener to this Display to receive notifications about paint events.
*
* @param pl
* the {@link prefuse.util.display.PaintListener} to add
*/
public void addPaintListener(PaintListener pl)
{
if (m_painters == null)
m_painters = new CopyOnWriteArrayList<PaintListener>();
m_painters.add(pl);
}
示例4: removePaintListener
import prefuse.util.display.PaintListener; //導入依賴的package包/類
/**
* Remove a PaintListener from this Display.
*
* @param pl
* the {@link prefuse.util.display.PaintListener} to remove
*/
public void removePaintListener(PaintListener pl)
{
m_painters.remove(pl);
}