Java 类java.awt.event.PaintEvent 实例源码

项目:OpenJSharp    文件:WComponentPeer.java   
@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;
        }
    }
}
项目:OpenJSharp    文件:RepaintArea.java   
/**
 * Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified <code>Rectangle</code>
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:OpenJSharp    文件:XComponentPeer.java   
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;
        }
    }
}
项目:jdk8u-jdk    文件:RepaintArea.java   
/**
 * Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified <code>Rectangle</code>
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:jdk8u-jdk    文件:WComponentPeer.java   
@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;
        }
    }
}
项目:jdk8u-jdk    文件:XComponentPeer.java   
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;
        }
    }
}
项目:openjdk-jdk10    文件:RepaintArea.java   
/**
 * Adds a {@code Rectangle} to this {@code RepaintArea}.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified {@code Rectangle}
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:openjdk-jdk10    文件:XComponentPeer.java   
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;
        }
    }
}
项目:openjdk-jdk10    文件:WComponentPeer.java   
@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;
        }
    }
}
项目:openjdk9    文件:RepaintArea.java   
/**
 * Adds a {@code Rectangle} to this {@code RepaintArea}.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified {@code Rectangle}
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:openjdk9    文件:XComponentPeer.java   
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;
        }
    }
}
项目:openjdk9    文件:WComponentPeer.java   
@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;
        }
    }
}
项目:jdk8u_jdk    文件:RepaintArea.java   
/**
 * Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified <code>Rectangle</code>
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:jdk8u_jdk    文件:WComponentPeer.java   
@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;
        }
    }
}
项目:jdk8u_jdk    文件:XComponentPeer.java   
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;
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:RepaintArea.java   
/**
 * Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified <code>Rectangle</code>
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:WComponentPeer.java   
@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;
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:XComponentPeer.java   
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;
        }
    }
}
项目:javify    文件:EventQueue.java   
/**
 * Sorts events to their priority and calls
 * {@link #postEventImpl(AWTEvent, int)}.
 *
 * @param evt the event to post
 */
private synchronized final void postEventImpl(AWTEvent evt)
{
  int priority = NORM_PRIORITY;
  if (evt instanceof PaintEvent || evt instanceof LowPriorityEvent)
    priority = LOW_PRIORITY;
  // TODO: Maybe let Swing RepaintManager events also be processed with
  // low priority.
  if (evt instanceof NativeEventLoopRunningEvent)
    {
      nativeLoopRunning = ((NativeEventLoopRunningEvent) evt).isRunning();
      notify();
      return;
    }
  postEventImpl(evt, priority);
}
项目:javify    文件:GtkComponentPeer.java   
public void handleEvent (AWTEvent event)
{
  int id = event.getID();
  KeyEvent ke = null;

  switch (id)
    {
    case PaintEvent.PAINT:
      paintComponent((PaintEvent) event);
      break;
    case PaintEvent.UPDATE:
      updateComponent((PaintEvent) event);
      break;
    case KeyEvent.KEY_PRESSED:
      ke = (KeyEvent) event;
      gtkWidgetDispatchKeyEvent (ke.getID (), ke.getWhen (), ke.getModifiersEx (),
                                 ke.getKeyCode (), ke.getKeyLocation ());
      break;
    case KeyEvent.KEY_RELEASED:
      ke = (KeyEvent) event;
      gtkWidgetDispatchKeyEvent (ke.getID (), ke.getWhen (), ke.getModifiersEx (),
                                 ke.getKeyCode (), ke.getKeyLocation ());
      break;
    }
}
项目:javify    文件:QtComponentPeer.java   
public void handleEvent (AWTEvent e)
{
  int eventID = e.getID();
  Rectangle r;

  switch (eventID)
    {
    case ComponentEvent.COMPONENT_SHOWN:
      QtToolkit.repaintThread.queueComponent(this);
      break;
    case PaintEvent.PAINT:
    case PaintEvent.UPDATE:
      r = ((PaintEvent)e).getUpdateRect();
      QtToolkit.repaintThread.queueComponent(this, r.x, r.y,
                                             r.width, r.height);
      break;
    case KeyEvent.KEY_PRESSED:
      break;
    case KeyEvent.KEY_RELEASED:
      break;
    }
}
项目:jvm-stm    文件:EventQueue.java   
/**
 * Sorts events to their priority and calls
 * {@link #postEventImpl(AWTEvent, int)}.
 *
 * @param evt the event to post
 */
private synchronized final void postEventImpl(AWTEvent evt)
{
  int priority = NORM_PRIORITY;
  if (evt instanceof PaintEvent || evt instanceof LowPriorityEvent)
    priority = LOW_PRIORITY;
  // TODO: Maybe let Swing RepaintManager events also be processed with
  // low priority.
  if (evt instanceof NativeEventLoopRunningEvent)
    {
      nativeLoopRunning = ((NativeEventLoopRunningEvent) evt).isRunning();
      notify();
      return;
    }
  postEventImpl(evt, priority);
}
项目:jvm-stm    文件:GtkComponentPeer.java   
public void handleEvent (AWTEvent event)
{
  int id = event.getID();
  KeyEvent ke = null;

  switch (id)
    {
    case PaintEvent.PAINT:
      paintComponent((PaintEvent) event);
      break;
    case PaintEvent.UPDATE:
      updateComponent((PaintEvent) event);
      break;
    case KeyEvent.KEY_PRESSED:
      ke = (KeyEvent) event;
      gtkWidgetDispatchKeyEvent (ke.getID (), ke.getWhen (), ke.getModifiersEx (),
                                 ke.getKeyCode (), ke.getKeyLocation ());
      break;
    case KeyEvent.KEY_RELEASED:
      ke = (KeyEvent) event;
      gtkWidgetDispatchKeyEvent (ke.getID (), ke.getWhen (), ke.getModifiersEx (),
                                 ke.getKeyCode (), ke.getKeyLocation ());
      break;
    }
}
项目:jvm-stm    文件:QtComponentPeer.java   
public void handleEvent (AWTEvent e)
 {
   int eventID = e.getID();
   Rectangle r;

   switch (eventID)
     {
     case ComponentEvent.COMPONENT_SHOWN:
QtToolkit.repaintThread.queueComponent(this);
       break;
     case PaintEvent.PAINT:
     case PaintEvent.UPDATE:    
r = ((PaintEvent)e).getUpdateRect();
QtToolkit.repaintThread.queueComponent(this, r.x, r.y,
                       r.width, r.height);
       break;
     case KeyEvent.KEY_PRESSED:
break;
     case KeyEvent.KEY_RELEASED:
break;
     }
 }
项目:VarJ    文件:EventQueue.java   
private boolean coalescePaintEvent(PaintEvent e) {                                 
    ComponentPeer sourcePeer = ((Component)e.getSource()).peer;                
    if (sourcePeer != null) {                                                  
        sourcePeer.coalescePaintEvent(e);                                      
    }                                                                          
    EventQueueItem[] cache = ((Component)e.getSource()).eventCache;               
    if (cache == null) {                                                       
        return false;                                                          
    }                                                                          
    int index = eventToCacheIndex(e);                                          

    if (index != -1 && cache[index] != null) {
        PaintEvent merged = mergePaintEvents(e, (PaintEvent)cache[index].event);
        if (merged != null) {
            cache[index].event = merged;
            return true;
        }
    }
    return false;
}
项目:VarJ    文件:EventQueue.java   
private boolean coalesceEvent(AWTEvent e, int priority) {                      
    if (!(e.getSource() instanceof Component)) {                               
        return false;                                                          
    }                                                                          
    if (e instanceof PeerEvent) {                                              
        return coalescePeerEvent((PeerEvent)e);                                
    }                                                                          
    // The worst case                                                          
    if (((Component)e.getSource()).isCoalescingEnabled()
        && coalesceOtherEvent(e, priority)) 
    {
        return true;
    }                                                                          
    if (e instanceof PaintEvent) {                                             
        return coalescePaintEvent((PaintEvent)e);                              
    }                                                                          
    if (e instanceof MouseEvent) {                                             
        return coalesceMouseEvent((MouseEvent)e);                              
    }                                                                          
    return false;                                                              
}
项目:infobip-open-jdk-8    文件:RepaintArea.java   
/**
 * Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified <code>Rectangle</code>
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:infobip-open-jdk-8    文件:WComponentPeer.java   
@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;
        }
    }
}
项目:infobip-open-jdk-8    文件:XComponentPeer.java   
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;
        }
    }
}
项目:jdk8u-dev-jdk    文件:RepaintArea.java   
/**
 * Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified <code>Rectangle</code>
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:jdk8u-dev-jdk    文件:WComponentPeer.java   
@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;
        }
    }
}
项目:jdk8u-dev-jdk    文件:XComponentPeer.java   
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;
        }
    }
}
项目:jdk7-jdk    文件:RepaintArea.java   
/**
 * Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified <code>Rectangle</code>
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:jdk7-jdk    文件:WComponentPeer.java   
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;
        }
    }
}
项目:jdk7-jdk    文件:XComponentPeer.java   
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;
        }
    }
}
项目:openjdk-source-code-learn    文件:RepaintArea.java   
/**
 * Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified <code>Rectangle</code>
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:openjdk-source-code-learn    文件:WComponentPeer.java   
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;
        }
    }
}
项目:openjdk-source-code-learn    文件:XComponentPeer.java   
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;
        }
    }
}
项目:OLD-OpenJDK8    文件:RepaintArea.java   
/**
 * Adds a <code>Rectangle</code> to this <code>RepaintArea</code>.
 * PAINT Rectangles are divided into mostly vertical and mostly horizontal.
 * Each group is unioned together.
 * UPDATE Rectangles are unioned.
 *
 * @param   r   the specified <code>Rectangle</code>
 * @param   id  possible values PaintEvent.UPDATE or PaintEvent.PAINT
 * @since   1.3
 */
public synchronized void add(Rectangle r, int id) {
    // Make sure this new rectangle has positive dimensions
    if (r.isEmpty()) {
        return;
    }
    int addTo = UPDATE;
    if (id == PaintEvent.PAINT) {
        addTo = (r.width > r.height) ? HORIZONTAL : VERTICAL;
    }
    if (paintRects[addTo] != null) {
        paintRects[addTo].add(r);
    } else {
        paintRects[addTo] = new Rectangle(r);
    }
}
项目:OLD-OpenJDK8    文件:WComponentPeer.java   
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;
        }
    }
}