当前位置: 首页>>代码示例>>Java>>正文


Java PaintEvent.getID方法代码示例

本文整理汇总了Java中java.awt.event.PaintEvent.getID方法的典型用法代码示例。如果您正苦于以下问题:Java PaintEvent.getID方法的具体用法?Java PaintEvent.getID怎么用?Java PaintEvent.getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.event.PaintEvent的用法示例。


在下文中一共展示了PaintEvent.getID方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: coalescePaintEvent

import java.awt.event.PaintEvent; //导入方法依赖的package包/类
@Override
public void coalescePaintEvent(PaintEvent e) {
    Rectangle r = e.getUpdateRect();
    if (!(e instanceof IgnorePaintEvent)) {
        paintArea.add(r, e.getID());
    }

    if (log.isLoggable(PlatformLogger.Level.FINEST)) {
        switch(e.getID()) {
        case PaintEvent.UPDATE:
            log.finest("coalescePaintEvent: UPDATE: add: x = " +
                r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
            return;
        case PaintEvent.PAINT:
            log.finest("coalescePaintEvent: PAINT: add: x = " +
                r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
            return;
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:WComponentPeer.java

示例2: coalescePaintEvent

import java.awt.event.PaintEvent; //导入方法依赖的package包/类
public void coalescePaintEvent(PaintEvent e) {
    Rectangle r = e.getUpdateRect();
    if (!(e instanceof IgnorePaintEvent)) {
        paintArea.add(r, e.getID());
    }
    if (true) {
        switch(e.getID()) {
          case PaintEvent.UPDATE:
              if (log.isLoggable(PlatformLogger.Level.FINER)) {
                  log.finer("XCP coalescePaintEvent : UPDATE : add : x = " +
                        r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
              }
              return;
          case PaintEvent.PAINT:
              if (log.isLoggable(PlatformLogger.Level.FINER)) {
                  log.finer("XCP coalescePaintEvent : PAINT : add : x = " +
                        r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
              }
              return;
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:XComponentPeer.java

示例3: coalescePaintEvent

import java.awt.event.PaintEvent; //导入方法依赖的package包/类
public void coalescePaintEvent(PaintEvent e) {
    Rectangle r = e.getUpdateRect();
    if (!(e instanceof IgnorePaintEvent)) {
        paintArea.add(r, e.getID());
    }

    if (log.isLoggable(PlatformLogger.FINEST)) {
        switch(e.getID()) {
        case PaintEvent.UPDATE:
            log.finest("coalescePaintEvent: UPDATE: add: x = " +
                r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
            return;
        case PaintEvent.PAINT:
            log.finest("coalescePaintEvent: PAINT: add: x = " +
                r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
            return;
        }
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:20,代码来源:WComponentPeer.java

示例4: coalescePaintEvent

import java.awt.event.PaintEvent; //导入方法依赖的package包/类
public void coalescePaintEvent(PaintEvent e) {
    Rectangle r = e.getUpdateRect();
    if (!(e instanceof IgnorePaintEvent)) {
        paintArea.add(r, e.getID());
    }
    if (true) {
        switch(e.getID()) {
          case PaintEvent.UPDATE:
              log.finer("XCP coalescePaintEvent : UPDATE : add : x = " +
                        r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
              return;
          case PaintEvent.PAINT:
              log.finer("XCP coalescePaintEvent : PAINT : add : x = " +
                        r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
              return;
        }
    }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:19,代码来源:XComponentPeer.java

示例5: coalescePaintEvent

import java.awt.event.PaintEvent; //导入方法依赖的package包/类
public void coalescePaintEvent(PaintEvent e) {
    Rectangle r = e.getUpdateRect();
    if (!(e instanceof IgnorePaintEvent)) {
        paintArea.add(r, e.getID());
    }

    if (log.isLoggable(PlatformLogger.Level.FINEST)) {
        switch(e.getID()) {
        case PaintEvent.UPDATE:
            log.finest("coalescePaintEvent: UPDATE: add: x = " +
                r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
            return;
        case PaintEvent.PAINT:
            log.finest("coalescePaintEvent: PAINT: add: x = " +
                r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
            return;
        }
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:20,代码来源:WComponentPeer.java

示例6: processPaintEvent

import java.awt.event.PaintEvent; //导入方法依赖的package包/类
private void processPaintEvent(PaintEvent event) {
    if (redrawManager == null || getIgnoreRepaint()) {
        return;
    }
    Rectangle clipRect = event.getUpdateRect();
    if ((clipRect.width <= 0) || (clipRect.height <= 0)) {
        return;
    }
    Graphics g = getGraphics();
    if (g == null) {
        return;
    }

    initGraphics(g, event);

    if (event.getID() == PaintEvent.PAINT) {
        paint(g);
    } else {
        update(g);
    }
    ((CommonGraphics2D)g).flush();
    g.dispose();
}
 
开发者ID:shannah,项目名称:cn1,代码行数:24,代码来源:Component.java

示例7: initGraphics

import java.awt.event.PaintEvent; //导入方法依赖的package包/类
void initGraphics(Graphics g, PaintEvent e) {
    Rectangle clip = e.getUpdateRect();
    if (clip instanceof ClipRegion) {
        g.setClip(((ClipRegion) clip).getClip());
    } else {
        g.setClip(clip);
    }
    if (isPrepainter()) {
        prepaint(g);
    } else if (!isLightweight() && (e.getID() == PaintEvent.PAINT)) {
        g.setColor(getBackground());
        g.fillRect(0, 0, w, h);
    }
    g.setFont(getFont());
    g.setColor(getForeground());
}
 
开发者ID:shannah,项目名称:cn1,代码行数:17,代码来源:Component.java

示例8: coalescePaintEvent

import java.awt.event.PaintEvent; //导入方法依赖的package包/类
public void coalescePaintEvent(PaintEvent e) {
    Rectangle r = e.getUpdateRect();
    if (!(e instanceof IgnorePaintEvent)) {
        paintArea.add(r, e.getID());
    }
    if (true) {
        switch(e.getID()) {
          case PaintEvent.UPDATE:
              if (log.isLoggable(PlatformLogger.FINER)) {
                  log.finer("XCP coalescePaintEvent : UPDATE : add : x = " +
                        r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
              }
              return;
          case PaintEvent.PAINT:
              if (log.isLoggable(PlatformLogger.FINER)) {
                  log.finer("XCP coalescePaintEvent : PAINT : add : x = " +
                        r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
              }
              return;
        }
    }
}
 
开发者ID:greghaskins,项目名称:openjdk-jdk7u-jdk,代码行数:23,代码来源:XComponentPeer.java

示例9: processPaintEvent

import java.awt.event.PaintEvent; //导入方法依赖的package包/类
private void processPaintEvent(PaintEvent event) {
    if (redrawManager == null) {
        return;
    }
    Rectangle clipRect = event.getUpdateRect();
    if ((clipRect.width <= 0) || (clipRect.height <= 0)) {
        return;
    }
    Graphics g = getGraphics();
    if (g == null) {
        return;
    }
    initGraphics(g, event);
    if (!getIgnoreRepaint()) {
        if (event.getID() == PaintEvent.PAINT) {
            paint(g);
        } else {
            update(g);
        }
    }
    g.dispose();
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:23,代码来源:Component.java


注:本文中的java.awt.event.PaintEvent.getID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。