protected void setupCacheSamplesPanel() { cacheSamplesPanel = new CacheSamplesPanel(); // only add scroll bars in per-region mode if (globalMode) { add(cacheSamplesPanel); } else { cacheSamplesScrollPane = new JScrollPane(cacheSamplesPanel); cacheSamplesScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); cacheSamplesScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); cacheSamplesScrollPane.getVerticalScrollBar().setUnitIncrement(16); add(cacheSamplesScrollPane); } repaint(); }
@Override public synchronized void paint(Graphics g) { final Graphics2D g2 = (Graphics2D) g; final Dimension size = getSize(); g2.setColor(getBackground()); g2.fillRect(0, 0, size.width, size.height); long maxLevelExpiration = getPollPeriodMillis() * VU_MAX_DECAY_POLL_MULTIPLE; for (Map.Entry<String, int[]> entry : calculateRenderedSamples(scaleFactor).entrySet()) { g2.setColor(VU_HIT_DRAW_COLOR); g2.drawString(currentHitText, VU_X_MARGIN_LEFT - VU_X_SPACING - currentHitTextWidth, 1 + y - getVerticalAlignment(VU_HIT_HEIGHT, statsFontMetrics)); g2.setColor(VU_MISS_DRAW_COLOR); g2.drawString(currentMissText, VU_X_MARGIN_LEFT - VU_X_SPACING - currentMissTextWidth, 1 + y - getVerticalAlignment(VU_MISS_HEIGHT, statsFontMetrics)); g2.setColor(VU_PUT_DRAW_COLOR); g2.drawString(currentPutText, VU_X_MARGIN_LEFT - VU_X_SPACING - currentPutTextWidth, 1 + y - getVerticalAlignment(VU_PUT_HEIGHT, statsFontMetrics)); g2.setColor(VU_HIT_DRAW_COLOR); g2.drawString(maxHitText, VU_X_MARGIN_LEFT + VU_X_SPACING + maxWidth, 1 + adaptedY + VU_HIT_HEIGHT - getVerticalAlignment(VU_HIT_HEIGHT, statsFontMetrics)); g2.drawString(maxMissText, VU_X_MARGIN_LEFT + VU_X_SPACING + maxWidth, 1 + adaptedY + VU_HIT_HEIGHT + VU_MISS_HEIGHT
@Override public synchronized void paint(Graphics g) { final Graphics2D g2 = (Graphics2D) g; final Dimension size = getSize(); long maxLevelExpiration = getPollPeriodMillis() * VU_MAX_DECAY_POLL_MULTIPLE; for (Map.Entry<String, int[]> entry : calculateRenderedSamples(scaleFactor).entrySet()) { g2.setColor(VU_HIT_DRAW_COLOR); g2.drawString(currentHitText, VU_X_MARGIN_LEFT - VU_X_SPACING - currentHitTextWidth, 1 + y - getVerticalAlignment(VU_HIT_HEIGHT, statsFontMetrics)); g2.setColor(VU_MISS_DRAW_COLOR); g2.drawString(currentMissText, VU_X_MARGIN_LEFT - VU_X_SPACING - currentMissTextWidth, 1 + y - getVerticalAlignment(VU_MISS_HEIGHT, statsFontMetrics)); g2.setColor(VU_PUT_DRAW_COLOR); g2.drawString(currentPutText, VU_X_MARGIN_LEFT - VU_X_SPACING - currentPutTextWidth, 1 + y - getVerticalAlignment(VU_PUT_HEIGHT, statsFontMetrics)); g2.setColor(VU_HIT_DRAW_COLOR); g2.drawString(maxHitText, VU_X_MARGIN_LEFT + VU_X_SPACING + maxWidth, 1 + adaptedY + VU_HIT_HEIGHT - getVerticalAlignment(VU_HIT_HEIGHT, statsFontMetrics)); g2.drawString(maxMissText, VU_X_MARGIN_LEFT + VU_X_SPACING + maxWidth, 1 + adaptedY + VU_HIT_HEIGHT + VU_MISS_HEIGHT - getVerticalAlignment(VU_MISS_HEIGHT, statsFontMetrics)); 1 + adaptedY + VU_HEIGHT - getVerticalAlignment(VU_PUT_HEIGHT, statsFontMetrics));
@Override public synchronized void paint(Graphics g) { final Graphics2D g2 = (Graphics2D) g; final Dimension size = getSize(); long maxLevelExpiration = getPollPeriodMillis() * VU_MAX_DECAY_POLL_MULTIPLE; for (Map.Entry<String, int[]> entry : calculateRenderedSamples(scaleFactor).entrySet()) { g2.setColor(VU_HIT_DRAW_COLOR); g2.drawString(currentHitText, VU_X_MARGIN_LEFT - VU_X_SPACING - currentHitTextWidth, 1 + y - getVerticalAlignment(VU_HIT_HEIGHT, statsFontMetrics)); g2.setColor(VU_MISS_DRAW_COLOR); g2.drawString(currentMissText, VU_X_MARGIN_LEFT - VU_X_SPACING - currentMissTextWidth, 1 + y - getVerticalAlignment(VU_MISS_HEIGHT, statsFontMetrics)); g2.setColor(VU_PUT_DRAW_COLOR); g2.drawString(currentPutText, VU_X_MARGIN_LEFT - VU_X_SPACING - currentPutTextWidth, 1 + y - getVerticalAlignment(VU_PUT_HEIGHT, statsFontMetrics)); g2.setColor(VU_HIT_DRAW_COLOR); g2.drawString(maxHitText, VU_X_MARGIN_LEFT + VU_X_SPACING + maxWidth, 1 + adaptedY + VU_HIT_HEIGHT - getVerticalAlignment(VU_HIT_HEIGHT, statsFontMetrics)); g2.drawString(maxMissText, VU_X_MARGIN_LEFT + VU_X_SPACING + maxWidth, 1 + adaptedY + VU_HIT_HEIGHT + VU_MISS_HEIGHT - getVerticalAlignment(VU_MISS_HEIGHT, statsFontMetrics)); 1 + adaptedY + VU_HEIGHT - getVerticalAlignment(VU_PUT_HEIGHT, statsFontMetrics));
if (null == currentRegionCacheSamples || currentRegionCacheSamples.isEmpty()) { return calculatedSamples; } long animationPeriod = getPollPeriodMillis() / ANIMATION_POLL_PERIOD_DIVIDER;
if (null == currentRegionCacheSamples || currentRegionCacheSamples.isEmpty()) { return calculatedSamples; } long animationPeriod = getPollPeriodMillis() / ANIMATION_POLL_PERIOD_DIVIDER;
if (null == currentRegionCacheSamples || currentRegionCacheSamples.isEmpty()) { return calculatedSamples; } long animationPeriod = getPollPeriodMillis() / ANIMATION_POLL_PERIOD_DIVIDER;
protected void setupCacheSamplesPanel() { cacheSamplesPanel = new CacheSamplesPanel(); // only add scroll bars in per-region mode if (globalMode) { add(cacheSamplesPanel); } else { cacheSamplesScrollPane = new JScrollPane(cacheSamplesPanel); cacheSamplesScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); cacheSamplesScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); cacheSamplesScrollPane.getVerticalScrollBar().setUnitIncrement(16); add(cacheSamplesScrollPane); } repaint(); }
protected void setupCacheSamplesPanel() { cacheSamplesPanel = new CacheSamplesPanel(); // only add scroll bars in per-region mode if (globalMode) { add(cacheSamplesPanel); } else { cacheSamplesScrollPane = new JScrollPane(cacheSamplesPanel); cacheSamplesScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); cacheSamplesScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); cacheSamplesScrollPane.getVerticalScrollBar().setUnitIncrement(16); add(cacheSamplesScrollPane); } repaint(); }
public void run() { if (cacheSamplesPanel != null) { cacheSamplesPanel.repaint(); } } };
public void run() { if (cacheSamplesPanel != null) { cacheSamplesPanel.repaint(); } } };
public void run() { if (cacheSamplesPanel != null) { cacheSamplesPanel.repaint(); } } };