6 Kasım 2018 Salı

Swing RepaintManager Sınıfı

Giriş
Açıklaması şöyle. Bu sınıfı bir Swing thread'inden değil bir başka thread'den gelen hataları yakalamak için kullanabilir.z
repaint makes a request to the RepaintManager to paint part or all of a component. The RepaintManager will decide what and how much will be painted, possible consolidating repaint requests into as small a number of updates as possible (so repeatedly calling repaint could actually slow your paint process).

The RepaintManager then pushes a paint event onto the Event Dispatching Thread. This ensures that the paint event is handle within the context of the EDT.
addDirtyRegion metodu
Örnek ver

addInvalidComponent metodu
Örnek ver

currentManager metodu
Şöyle yaparız.
RepaintManager rm = RepaintManager.currentManager(component);

Hiç yorum yok:

Yorum Gönder