本文整理汇总了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);
}