![]() |
![]() |
org-netbeans-lib-profiler-charts16:39:41.588 INFO jd.cli.Main - Decompiling org-netbeans-lib-profiler-charts.jar package org.netbeans.lib.profiler.charts; class ChartComponent$1 {} /* Location: * Qualified Name: org.netbeans.lib.profiler.charts.ChartComponent.1 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.netbeans.lib.profiler.charts; import org.netbeans.lib.profiler.charts.swing.LongRect; public class ChartComponent$Context implements ChartContext { private ChartComponent chart; public ChartComponent$Context(ChartComponent paramChartComponent) { chart = paramChartComponent; } protected ChartComponent getChartComponent() { return chart; } public boolean isRightBased() { return chart.isRightBased(); } public boolean isBottomBased() { return chart.isBottomBased(); } public boolean fitsWidth() { return chart.fitsWidth(); } public boolean fitsHeight() { return chart.fitsHeight(); } public long getDataOffsetX() { return chart.getDataOffsetX(); } public long getDataOffsetY() { return chart.getDataOffsetY(); } public long getDataWidth() { return chart.getDataWidth(); } public long getDataHeight() { return chart.getDataHeight(); } public long getViewWidth() { return chart.getContentsWidth(); } public long getViewHeight() { return chart.getContentsHeight(); } public long getViewportOffsetX() { return 0L; } public long getViewportOffsetY() { return 0L; } public int getViewportWidth() { return chart.getWidth(); } public int getViewportHeight() { return chart.getHeight(); } public double getViewX(double paramDouble) { return ChartComponent.access$600(chart, paramDouble); } public double getReversedViewX(double paramDouble) { return ChartComponent.access$700(chart, paramDouble); } public double getViewY(double paramDouble) { return ChartComponent.access$800(chart, paramDouble); } public double getReversedViewY(double paramDouble) { return ChartComponent.access$900(chart, paramDouble); } public double getViewWidth(double paramDouble) { return ChartComponent.access$1000(chart, paramDouble); } public double getViewHeight(double paramDouble) { return ChartComponent.access$1100(chart, paramDouble); } public LongRect getViewRect(LongRect paramLongRect) { return getViewRectImpl(paramLongRect); } public double getDataX(double paramDouble) { return ChartComponent.access$1200(chart, paramDouble); } public double getReversedDataX(double paramDouble) { return ChartComponent.access$1300(chart, paramDouble); } public double getDataY(double paramDouble) { return ChartComponent.access$1400(chart, paramDouble); } public double getReversedDataY(double paramDouble) { return ChartComponent.access$1500(chart, paramDouble); } public double getDataWidth(double paramDouble) { return ChartComponent.access$1600(chart, paramDouble); } public double getDataHeight(double paramDouble) { return ChartComponent.access$1700(chart, paramDouble); } private LongRect getViewRectImpl(LongRect paramLongRect) { LongRect localLongRect = new LongRect(); x = (Math.ceil(getViewX(x))); width = (Math.ceil(getViewWidth(width))); if (isRightBased()) { x -= width; } y = (Math.ceil(getViewY(y))); height = (Math.ceil(getViewHeight(height))); if (isBottomBased()) { y -= height; } return localLongRect; } } /* Location: * Qualified Name: org.netbeans.lib.profiler.charts.ChartComponent.Context * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.netbeans.lib.profiler.charts; import java.util.List; class ChartComponent$ItemsModelListener implements ItemsListener { private ChartComponent$ItemsModelListener(ChartComponent paramChartComponent) {} public void itemsAdded(List<ChartItem> paramList) { this$0.itemsAdded(paramList); } public void itemsRemoved(List<ChartItem> paramList) { this$0.itemsRemoved(paramList); } public void itemsChanged(List<ChartItemChange> paramList) { this$0.itemsChanged(paramList); } } /* Location: * Qualified Name: org.netbeans.lib.profiler.charts.ChartComponent.ItemsModelListener * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.netbeans.lib.profiler.charts; import java.util.List; class ChartComponent$PaintersModelListener implements PaintersListener { private ChartComponent$PaintersModelListener(ChartComponent paramChartComponent) {} public void paintersChanged() { this$0.paintersChanged(); } public void paintersChanged(List<ItemPainter> paramList) { this$0.paintersChanged(paramList); } } /* Location: * Qualified Name: org.netbeans.lib.profiler.charts.ChartComponent.PaintersModelListener * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.netbeans.lib.profiler.charts; import java.awt.Rectangle; import java.util.Iterator; import java.util.List; import org.netbeans.lib.profiler.charts.swing.Utils; class ChartComponent$SelectionListener implements ChartSelectionListener { private ChartComponent$SelectionListener(ChartComponent paramChartComponent) {} public void selectionModeChanged(int paramInt1, int paramInt2) {} public void selectionBoundsChanged(Rectangle paramRectangle1, Rectangle paramRectangle2) {} public void highlightedItemsChanged(List<ItemSelection> paramList1, List<ItemSelection> paramList2, List<ItemSelection> paramList3) { refreshSelection(paramList2, paramList3); } public void selectedItemsChanged(List<ItemSelection> paramList1, List<ItemSelection> paramList2, List<ItemSelection> paramList3) { refreshSelection(paramList2, paramList3); } private void refreshSelection(List<ItemSelection> paramList1, List<ItemSelection> paramList2) { Rectangle localRectangle = new Rectangle(); Iterator localIterator; if ((!paramList2.isEmpty()) && (paramList2.get(0) != null)) { for (localIterator = paramList2.iterator(); localIterator.hasNext();) { localItemSelection = (ItemSelection)localIterator.next(); localChartItem = localItemSelection.getItem(); localItemPainter = ChartComponent.access$300(this$0).getPainter(localChartItem); if (localItemPainter.supportsHovering(localChartItem)) { if (localRectangle.isEmpty()) { localRectangle.setBounds(Utils.checkedRectangle(localItemPainter.getSelectionBounds(localItemSelection, this$0.getChartContext(localChartItem)))); } else { localRectangle.add(Utils.checkedRectangle(localItemPainter.getSelectionBounds(localItemSelection, this$0.getChartContext(localChartItem)))); } } } } ItemSelection localItemSelection; ChartItem localChartItem; ItemPainter localItemPainter; if (!localRectangle.isEmpty()) { ChartComponent.access$400(this$0, localRectangle); this$0.paintImmediately(localRectangle); localRectangle = new Rectangle(); } if ((!paramList1.isEmpty()) && (paramList1.get(0) != null)) { for (localIterator = paramList1.iterator(); localIterator.hasNext();) { localItemSelection = (ItemSelection)localIterator.next(); localChartItem = localItemSelection.getItem(); localItemPainter = ChartComponent.access$300(this$0).getPainter(localChartItem); if (localItemPainter.supportsHovering(localChartItem)) { if (localRectangle.isEmpty()) { localRectangle.setBounds(Utils.checkedRectangle(localItemPainter.getSelectionBounds(localItemSelection, this$0.getChartContext(localChartItem)))); } else { localRectangle.add(Utils.checkedRectangle(localItemPainter.getSelectionBounds(localItemSelection, this$0.getChartContext(localChartItem)))); } } } } if (!localRectangle.isEmpty()) { ChartComponent.access$500(this$0, localRectangle); this$0.paintImmediately(localRectangle); } } } /* Location: * Qualified Name: org.netbeans.lib.profiler.charts.ChartComponent.SelectionListener * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.netbeans.lib.profiler.charts; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.RenderingHints; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.netbeans.lib.profiler.charts.canvas.InteractiveCanvasComponent; import org.netbeans.lib.profiler.charts.swing.LongRect; import org.netbeans.lib.profiler.charts.swing.Utils; public class ChartComponent extends InteractiveCanvasComponent { private RenderingHints renderingHints; private List<ChartDecorator> preDecorators; private List<ChartDecorator> postDecorators; private ItemsModel itemsModel; private PaintersModel paintersModel; protected LongRect dataBounds; private LongRect initialDataBounds; private ChartContext chartContext; private ItemsModelListener itemsListener; private PaintersModelListener paintersListener; private List<ChartOverlay> overlays; private ChartSelectionModel selectionModel; private SelectionListener selectionListener; private List<ChartConfigurationListener> configurationListeners; public ChartComponent() { initRenderingHints(); itemsListener = new ItemsModelListener(null); paintersListener = new PaintersModelListener(null); dataBounds = new LongRect(); initialDataBounds = new LongRect(); setLayout(null); setSelectionModel(new ChartSelectionManager()); } public final void setItemsModel(ItemsModel paramItemsModel) { if (paramItemsModel == null) { throw new IllegalArgumentException("ItemsModel cannot be null"); } if (paramItemsModel == itemsModel) { return; } if (itemsModel != null) { itemsModel.removeItemsListener(itemsListener); } itemsModel = paramItemsModel; itemsModel.addItemsListener(itemsListener); updateChart(); } public final ItemsModel getItemsModel() { return itemsModel; } public final void setPaintersModel(PaintersModel paramPaintersModel) { if (paramPaintersModel == null) { throw new IllegalArgumentException("PaintersModel cannot be null"); } if (paramPaintersModel == paintersModel) { return; } if (paintersModel != null) { paintersModel.removePaintersListener(paintersListener); } paintersModel = paramPaintersModel; paintersModel.addPaintersListener(paintersListener); updateChart(); } public final PaintersModel getPaintersModel() { return paintersModel; } public final void setSelectionModel(ChartSelectionModel paramChartSelectionModel) { if (selectionModel != null) { selectionModel.removeSelectionListener(selectionListener); if ((selectionModel instanceof ChartSelectionManager)) { ((ChartSelectionManager)selectionModel).unregisterChart(this); } } selectionModel = paramChartSelectionModel; if (paramChartSelectionModel != null) { if (selectionListener == null) { selectionListener = new SelectionListener(null); } paramChartSelectionModel.addSelectionListener(selectionListener); if ((paramChartSelectionModel instanceof ChartSelectionManager)) { ((ChartSelectionManager)paramChartSelectionModel).registerChart(this); } } else { selectionListener = null; } } public final ChartSelectionModel getSelectionModel() { return selectionModel; } public final void setInitialDataBounds(LongRect paramLongRect) { if (LongRect.equals(paramLongRect, initialDataBounds)) { return; } LongRect.set(initialDataBounds, paramLongRect); if (LongRect.isEmpty(dataBounds)) { resizeChart(); invalidateImage(); repaintDirty(); } } public final LongRect getInitialDataBounds() { return initialDataBounds; } public final void setRenderingHints(RenderingHints paramRenderingHints) { renderingHints = Utils.checkedRenderingHints(paramRenderingHints); } public final RenderingHints getRenderingHints() { return (RenderingHints)renderingHints.clone(); } private void applyRenderingHints(Graphics2D paramGraphics2D) { if (renderingHints != null) { paramGraphics2D.setRenderingHints(renderingHints); } } private void initRenderingHints() { RenderingHints localRenderingHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); localRenderingHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED); setRenderingHints(localRenderingHints); } public final ChartContext getChartContext() { return getChartContext(null); } protected ChartContext getChartContext(ChartItem paramChartItem) { if (chartContext == null) { chartContext = createChartContext(); } return chartContext; } protected ChartContext createChartContext() { return new Context(this); } public final void addConfigurationListener(ChartConfigurationListener paramChartConfigurationListener) { if (configurationListeners == null) { configurationListeners = new ArrayList(); } configurationListeners.add(paramChartConfigurationListener); } public final void removeConfigurationListener(ChartConfigurationListener paramChartConfigurationListener) { if (configurationListeners == null) { return; } configurationListeners.remove(paramChartConfigurationListener); } protected final void offsetChanged(long paramLong1, long paramLong2, long paramLong3, long paramLong4) { super.offsetChanged(paramLong1, paramLong2, paramLong3, paramLong4); fireOffsetChanged(paramLong1, paramLong2, paramLong3, paramLong4); } protected final void scaleChanged(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4) { super.scaleChanged(paramDouble1, paramDouble2, paramDouble3, paramDouble4); fireScaleChanged(paramDouble1, paramDouble2, paramDouble3, paramDouble4); } protected final void dataBoundsChanged(long paramLong1, long paramLong2, long paramLong3, long paramLong4, long paramLong5, long paramLong6, long paramLong7, long paramLong8) { super.dataBoundsChanged(paramLong1, paramLong2, paramLong3, paramLong4, paramLong5, paramLong6, paramLong7, paramLong8); fireDataBoundsChanged(paramLong1, paramLong2, paramLong3, paramLong4, paramLong5, paramLong6, paramLong7, paramLong8); } protected final void contentsWillBeUpdated(long paramLong1, long paramLong2, double paramDouble1, double paramDouble2, long paramLong3, long paramLong4, double paramDouble3, double paramDouble4) { super.contentsWillBeUpdated(paramLong1, paramLong2, paramDouble1, paramDouble2, paramLong3, paramLong4, paramDouble3, paramDouble4); fireContentsWillBeUpdated(paramLong1, paramLong2, paramDouble1, paramDouble2, paramLong3, paramLong4, paramDouble3, paramDouble4); } protected final void contentsUpdated(long paramLong1, long paramLong2, double paramDouble1, double paramDouble2, long paramLong3, long paramLong4, double paramDouble3, double paramDouble4, int paramInt1, int paramInt2) { super.contentsUpdated(paramLong1, paramLong2, paramDouble1, paramDouble2, paramLong3, paramLong4, paramDouble3, paramDouble4, paramInt1, paramInt2); fireContentsUpdated(paramLong1, paramLong2, paramDouble1, paramDouble2, paramLong3, paramLong4, paramDouble3, paramDouble4, paramInt1, paramInt2); } private void fireOffsetChanged(long paramLong1, long paramLong2, long paramLong3, long paramLong4) { if (configurationListeners == null) { return; } for (ChartConfigurationListener localChartConfigurationListener : configurationListeners) { localChartConfigurationListener.offsetChanged(paramLong1, paramLong2, paramLong3, paramLong4); } } private void fireScaleChanged(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4) { if (configurationListeners == null) { return; } for (ChartConfigurationListener localChartConfigurationListener : configurationListeners) { localChartConfigurationListener.scaleChanged(paramDouble1, paramDouble2, paramDouble3, paramDouble4); } } private void fireDataBoundsChanged(long paramLong1, long paramLong2, long paramLong3, long paramLong4, long paramLong5, long paramLong6, long paramLong7, long paramLong8) { if (configurationListeners == null) { return; } for (ChartConfigurationListener localChartConfigurationListener : configurationListeners) { localChartConfigurationListener.dataBoundsChanged(paramLong1, paramLong2, paramLong3, paramLong4, paramLong5, paramLong6, paramLong7, paramLong8); } } private void fireContentsWillBeUpdated(long paramLong1, long paramLong2, double paramDouble1, double paramDouble2, long paramLong3, long paramLong4, double paramDouble3, double paramDouble4) { if (configurationListeners == null) { return; } for (ChartConfigurationListener localChartConfigurationListener : configurationListeners) { localChartConfigurationListener.contentsWillBeUpdated(paramLong1, paramLong2, paramDouble1, paramDouble2, paramLong3, paramLong4, paramDouble3, paramDouble4); } } private void fireContentsUpdated(long paramLong1, long paramLong2, double paramDouble1, double paramDouble2, long paramLong3, long paramLong4, double paramDouble3, double paramDouble4, int paramInt1, int paramInt2) { if (configurationListeners == null) { return; } for (ChartConfigurationListener localChartConfigurationListener : configurationListeners) { localChartConfigurationListener.contentsUpdated(paramLong1, paramLong2, paramDouble1, paramDouble2, paramLong3, paramLong4, paramDouble3, paramDouble4, paramInt1, paramInt2); } } public final void addPreDecorator(ChartDecorator paramChartDecorator) { if (preDecorators == null) { preDecorators = new ArrayList(2); } preDecorators.add(paramChartDecorator); } public final void removePreDecorator(ChartDecorator paramChartDecorator) { if (preDecorators != null) { preDecorators.remove(paramChartDecorator); } } final List<ChartDecorator> getPreDecorators() { return preDecorators; } public final void addPostDecorator(ChartDecorator paramChartDecorator) { if (postDecorators == null) { postDecorators = new ArrayList(2); } postDecorators.add(paramChartDecorator); } public final void removePostDecorator(ChartDecorator paramChartDecorator) { if (postDecorators != null) { postDecorators.remove(paramChartDecorator); } } final List<ChartDecorator> getPostDecorators() { return postDecorators; } public final void addOverlayComponent(ChartOverlay paramChartOverlay) { if (overlays == null) { overlays = new ArrayList(); } paramChartOverlay.setChartContext(getChartContext()); overlays.add(paramChartOverlay); add(paramChartOverlay); } public final void removeOverlayComponent(ChartOverlay paramChartOverlay) { remove(paramChartOverlay); overlays.remove(paramChartOverlay); paramChartOverlay.setChartContext(null); } protected void reshaped(Rectangle paramRectangle1, Rectangle paramRectangle2) { super.reshaped(paramRectangle1, paramRectangle2); if (overlays == null) { return; } for (ChartOverlay localChartOverlay : overlays) { localChartOverlay.setBounds(0, 0, width, height); } } protected void paintContents(Graphics paramGraphics, Rectangle paramRectangle) { Graphics2D localGraphics2D = (Graphics2D)paramGraphics; localGraphics2D.setClip(paramRectangle); applyRenderingHints(localGraphics2D); if (isOpaque()) { localGraphics2D.setColor(getBackground()); localGraphics2D.fillRect(x, y, width, height); } if (preDecorators != null) { for (ChartDecorator localChartDecorator1 : preDecorators) { localChartDecorator1.paint(localGraphics2D, paramRectangle, getChartContext()); } } if ((itemsModel != null) && (paintersModel != null)) { int i = itemsModel.getItemsCount(); if (i != 0) { int j = selectionModel != null ? 1 : 0; List localList1 = j != 0 ? selectionModel.getHighlightedItems() : null; List localList2 = j != 0 ? selectionModel.getSelectedItems() : null; List localList3 = j != 0 ? new ArrayList() : Collections.EMPTY_LIST; List localList4 = j != 0 ? new ArrayList() : Collections.EMPTY_LIST; for (int k = 0; k < i; k++) { ChartItem localChartItem = itemsModel.getItem(k); ItemPainter localItemPainter = paintersModel.getPainter(localChartItem); if (j != 0) { localList3.clear(); if (localItemPainter.supportsHovering(localChartItem)) { filterSelection(localList1, localList3, localChartItem); } localList4.clear(); if (localItemPainter.supportsSelecting(localChartItem)) { filterSelection(localList2, localList4, localChartItem); } } localItemPainter.paintItem(localChartItem, localList3, localList4, localGraphics2D, paramRectangle, getChartContext(localChartItem)); } } } if (postDecorators != null) { for (ChartDecorator localChartDecorator2 : postDecorators) { localChartDecorator2.paint(localGraphics2D, paramRectangle, getChartContext()); } } } private static void filterSelection(List<ItemSelection> paramList1, List<ItemSelection> paramList2, ChartItem paramChartItem) { if (paramChartItem == null) { return; } for (ItemSelection localItemSelection : paramList1) { if (localItemSelection.getItem().equals(paramChartItem)) { paramList2.add(localItemSelection); } } } public void setBackground(Color paramColor) { super.setBackground(Utils.checkedColor(paramColor)); } protected void computeDataBounds() { LongRect.clear(dataBounds); if ((itemsModel == null) || (paintersModel == null)) { return; } int i = itemsModel.getItemsCount(); for (int j = 0; j < i; j++) { ChartItem localChartItem = itemsModel.getItem(j); ItemPainter localItemPainter = paintersModel.getPainter(localChartItem); if (j == 0) { LongRect.set(dataBounds, localItemPainter.getItemBounds(localChartItem)); } else { LongRect.add(dataBounds, localItemPainter.getItemBounds(localChartItem)); } } } protected void resizeChart() { if (LongRect.isEmpty(dataBounds)) { LongRect localLongRect = new LongRect(dataBounds); if (width == 0L) { width = initialDataBounds.width; if (x == 0L) { x = initialDataBounds.x; } } if (height == 0L) { height = initialDataBounds.height; if (y == 0L) { y = initialDataBounds.y; } } setDataBounds(x, y, width, height); } else { setDataBounds(dataBounds.x, dataBounds.y, dataBounds.width, dataBounds.height); } } protected void updateChart() { computeDataBounds(); resizeChart(); invalidateImage(); repaintDirty(); } protected void itemsAdded(List<ChartItem> paramList) { LongRect localLongRect = new LongRect(dataBounds); for (Object localObject1 = paramList.iterator(); ((Iterator)localObject1).hasNext();) { localObject2 = (ChartItem)((Iterator)localObject1).next(); localObject3 = paintersModel.getPainter((ChartItem)localObject2); LongRect.add(dataBounds, ((ItemPainter)localObject3).getItemBounds((ChartItem)localObject2)); } Object localObject3; if (!LongRect.equals(localLongRect, dataBounds)) { resizeChart(); } localObject1 = null; for (Object localObject2 = paramList.iterator(); ((Iterator)localObject2).hasNext();) { localObject3 = (ChartItem)((Iterator)localObject2).next(); ItemPainter localItemPainter = paintersModel.getPainter((ChartItem)localObject3); if (localObject1 == null) { localObject1 = new LongRect(localItemPainter.getItemBounds((ChartItem)localObject3, getChartContext((ChartItem)localObject3))); } else { LongRect.add((LongRect)localObject1, localItemPainter.getItemBounds((ChartItem)localObject3, getChartContext((ChartItem)localObject3))); } } invalidateImage(Utils.checkedRectangle((LongRect)localObject1)); repaintDirty(); } protected void itemsRemoved(List<ChartItem> paramList) { ArrayList localArrayList = new ArrayList(paramList.size()); for (Object localObject1 = paramList.iterator(); ((Iterator)localObject1).hasNext();) { localObject2 = (ChartItem)((Iterator)localObject1).next(); ItemPainter localItemPainter1 = paintersModel.getPainter((ChartItem)localObject2); if (localItemPainter1 == null) { localArrayList = null; break; } localArrayList.add(localItemPainter1); } Object localObject2; if (localArrayList == null) { updateChart(); } else { localObject1 = new LongRect(dataBounds); computeDataBounds(); if (!LongRect.equals((LongRect)localObject1, dataBounds)) { resizeChart(); } localObject2 = null; for (int i = 0; i < paramList.size(); i++) { ChartItem localChartItem = (ChartItem)paramList.get(i); ItemPainter localItemPainter2 = (ItemPainter)localArrayList.get(i); if (localObject2 == null) { localObject2 = new LongRect(localItemPainter2.getItemBounds(localChartItem, getChartContext(localChartItem))); } else { LongRect.add((LongRect)localObject2, localItemPainter2.getItemBounds(localChartItem, getChartContext(localChartItem))); } } invalidateImage(Utils.checkedRectangle((LongRect)localObject2)); repaintDirty(); } } protected void itemsChanged(List<ChartItemChange> paramList) { ArrayList localArrayList = new ArrayList(paramList.size()); for (ChartItemChange localChartItemChange1 : paramList) { localArrayList.add(paintersModel.getPainter(localChartItemChange1.getItem())); } boolean bool1 = false; Object localObject1; for (int i = 0; i < paramList.size(); i++) { ChartItemChange localChartItemChange2 = (ChartItemChange)paramList.get(i); localObject1 = (ItemPainter)localArrayList.get(i); bool1 = ((ItemPainter)localObject1).isBoundsChange(localChartItemChange2); if (bool1) { break; } } if (bool1) { LongRect localLongRect1 = new LongRect(dataBounds); computeDataBounds(); if (!LongRect.equals(localLongRect1, dataBounds)) { resizeChart(); } } boolean bool2 = false; Object localObject2; for (int j = 0; j < paramList.size(); j++) { localObject1 = (ChartItemChange)paramList.get(j); localObject2 = (ItemPainter)localArrayList.get(j); bool2 = ((ItemPainter)localObject2).isAppearanceChange((ChartItemChange)localObject1); if (bool2) { break; } } if (bool2) { LongRect localLongRect2 = null; for (int k = 0; k < paramList.size(); k++) { localObject2 = (ChartItemChange)paramList.get(k); ChartItem localChartItem = ((ChartItemChange)localObject2).getItem(); ItemPainter localItemPainter = paintersModel.getPainter(localChartItem); if (localItemPainter.isAppearanceChange((ChartItemChange)localObject2)) { if (localLongRect2 == null) { localLongRect2 = new LongRect(localItemPainter.getDirtyBounds((ChartItemChange)localObject2, getChartContext(localChartItem))); } else { LongRect.add(localLongRect2, localItemPainter.getDirtyBounds((ChartItemChange)localObject2, getChartContext(localChartItem))); } } } invalidateImage(Utils.checkedRectangle(localLongRect2)); repaintDirtyAccel(); } else { repaintDirty(); } } protected void paintersChanged() { updateChart(); } protected void paintersChanged(List<ItemPainter> paramList) { HashSet localHashSet = new HashSet(); LongRect localLongRect1 = new LongRect(dataBounds); computeDataBounds(); if (!LongRect.equals(localLongRect1, dataBounds)) { resizeChart(); } for (int i = 0; i < itemsModel.getItemsCount(); i++) { localObject = itemsModel.getItem(i); if (paramList.contains(paintersModel.getPainter((ChartItem)localObject))) { localHashSet.add(localObject); } } LongRect localLongRect2 = null; for (Object localObject = localHashSet.iterator(); ((Iterator)localObject).hasNext();) { ChartItem localChartItem = (ChartItem)((Iterator)localObject).next(); ItemPainter localItemPainter = paintersModel.getPainter(localChartItem); if (localLongRect2 == null) { localLongRect2 = new LongRect(localItemPainter.getItemBounds(localChartItem, getChartContext(localChartItem))); } else { LongRect.add(localLongRect2, localItemPainter.getItemBounds(localChartItem, getChartContext(localChartItem))); } } invalidateImage(Utils.checkedRectangle(localLongRect2)); repaintDirty(); } private class ItemsModelListener implements ItemsListener { private ItemsModelListener() {} public void itemsAdded(List<ChartItem> paramList) { ChartComponent.this.itemsAdded(paramList); } public void itemsRemoved(List<ChartItem> paramList) { ChartComponent.this.itemsRemoved(paramList); } public void itemsChanged(List<ChartItemChange> paramList) { ChartComponent.this.itemsChanged(paramList); } } private class PaintersModelListener implements PaintersListener { private PaintersModelListener() {} public void paintersChanged() { ChartComponent.this.paintersChanged(); } public void paintersChanged(List<ItemPainter> paramList) { ChartComponent.this.paintersChanged(paramList); } } private class SelectionListener implements ChartSelectionListener { private SelectionListener() {} public void selectionModeChanged(int paramInt1, int paramInt2) {} public void selectionBoundsChanged(Rectangle paramRectangle1, Rectangle paramRectangle2) {} public void highlightedItemsChanged(List<ItemSelection> paramList1, List<ItemSelection> paramList2, List<ItemSelection> paramList3) { refreshSelection(paramList2, paramList3); } public void selectedItemsChanged(List<ItemSelection> paramList1, List<ItemSelection> paramList2, List<ItemSelection> paramList3) { refreshSelection(paramList2, paramList3); } private void refreshSelection(List<ItemSelection> paramList1, List<ItemSelection> paramList2) { Rectangle localRectangle = new Rectangle(); Iterator localIterator; if ((!paramList2.isEmpty()) && (paramList2.get(0) != null)) { for (localIterator = paramList2.iterator(); localIterator.hasNext();) { localItemSelection = (ItemSelection)localIterator.next(); localChartItem = localItemSelection.getItem(); localItemPainter = paintersModel.getPainter(localChartItem); if (localItemPainter.supportsHovering(localChartItem)) { if (localRectangle.isEmpty()) { localRectangle.setBounds(Utils.checkedRectangle(localItemPainter.getSelectionBounds(localItemSelection, getChartContext(localChartItem)))); } else { localRectangle.add(Utils.checkedRectangle(localItemPainter.getSelectionBounds(localItemSelection, getChartContext(localChartItem)))); } } } } ItemSelection localItemSelection; ChartItem localChartItem; ItemPainter localItemPainter; if (!localRectangle.isEmpty()) { invalidateImage(localRectangle); paintImmediately(localRectangle); localRectangle = new Rectangle(); } if ((!paramList1.isEmpty()) && (paramList1.get(0) != null)) { for (localIterator = paramList1.iterator(); localIterator.hasNext();) { localItemSelection = (ItemSelection)localIterator.next(); localChartItem = localItemSelection.getItem(); localItemPainter = paintersModel.getPainter(localChartItem); if (localItemPainter.supportsHovering(localChartItem)) { if (localRectangle.isEmpty()) { localRectangle.setBounds(Utils.checkedRectangle(localItemPainter.getSelectionBounds(localItemSelection, getChartContext(localChartItem)))); } else { localRectangle.add(Utils.checkedRectangle(localItemPainter.getSelectionBounds(localItemSelection, getChartContext(localChartItem)))); } } } } if (!localRectangle.isEmpty()) { invalidateImage(localRectangle); paintImmediately(localRectangle); } } } protected static class Context implements ChartContext { private ChartComponent chart; public Context(ChartComponent paramChartComponent) { chart = paramChartComponent; } protected ChartComponent getChartComponent() { return chart; } public boolean isRightBased() { return chart.isRightBased(); } public boolean isBottomBased() { return chart.isBottomBased(); } public boolean fitsWidth() { return chart.fitsWidth(); } public boolean fitsHeight() { return chart.fitsHeight(); } public long getDataOffsetX() { return chart.getDataOffsetX(); } public long getDataOffsetY() { return chart.getDataOffsetY(); } public long getDataWidth() { return chart.getDataWidth(); } public long getDataHeight() { return chart.getDataHeight(); } public long getViewWidth() { return chart.getContentsWidth(); } public long getViewHeight() { return chart.getContentsHeight(); } public long getViewportOffsetX() { return 0L; } public long getViewportOffsetY() { return 0L; } public int getViewportWidth() { return chart.getWidth(); } public int getViewportHeight() { return chart.getHeight(); } public double getViewX(double paramDouble) { return chart.getViewX(paramDouble); } public double getReversedViewX(double paramDouble) { return chart.getReversedViewX(paramDouble); } public double getViewY(double paramDouble) { return chart.getViewY(paramDouble); } public double getReversedViewY(double paramDouble) { return chart.getReversedViewY(paramDouble); } public double getViewWidth(double paramDouble) { return chart.getViewWidth(paramDouble); } public double getViewHeight(double paramDouble) { return chart.getViewHeight(paramDouble); } public LongRect getViewRect(LongRect paramLongRect) { return getViewRectImpl(paramLongRect); } public double getDataX(double paramDouble) { return chart.getDataX(paramDouble); } public double getReversedDataX(double paramDouble) { return chart.getReversedDataX(paramDouble); } public double getDataY(double paramDouble) { return chart.getDataY(paramDouble); } public double getReversedDataY(double paramDouble) { return chart.getReversedDataY(paramDouble); } public double getDataWidth(double paramDouble) { return chart.getDataWidth(paramDouble); } public double getDataHeight(double paramDouble) { return chart.getDataHeight(paramDouble); } private LongRect getViewRectImpl(LongRect paramLongRect) { LongRect localLongRect = new LongRect(); x = (Math.ceil(getViewX(x))); width = (Math.ceil(getViewWidth(width))); if (isRightBased()) { x -= width; } y = (Math.ceil(getViewY(y))); height = (Math.ceil(getViewHeight(height))); if (isBottomBased()) { y -= height; } return localLongRect; } } } /* Location: * Qualified Name: org.netbeans.lib.profiler.charts.ChartComponent * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.netbeans.lib.profiler.charts; public abstract class ChartConfigurationListener$Adapter implements ChartConfigurationListener { public void offsetChanged(long paramLong1, long paramLong2, long paramLong3, long paramLong4) {} public void scaleChanged(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4) {} public void dataBoundsChanged(long paramLong1, long paramLong2, long paramLong3, long paramLong4, long paramLong5, long paramLong6, long paramLong7, long paramLong8) {} public void contentsWillBeUpdated(long paramLong1, long paramLong2, double paramDouble1, double paramDouble2, long paramLong3, long paramLong4, double paramDouble3, double paramDouble4) {} public void contentsUpdated(long paramLong1, long paramLong2, double paramDouble1, double paramDouble2, long paramLong3, long paramLong4, double paramDouble3, double paramDouble4, int paramInt1, int paramInt2) {} } /* Location: * Qualified Name: org.netbeans.lib.profiler.charts.ChartConfigurationListener.Adapter * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */ package org.netbeans.lib.profiler.charts; public abstract interface ChartConfigurationListener { public abstract void offsetChanged(long paramLong1, long paramLong2, long paramLong3, long paramLong4); public abstract void scaleChanged(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4); public abstract void dataBoundsChanged(long paramLong1, long paramLong2, long paramLong3, long paramLong4, long paramLong5, long paramLong6, long paramLong7, long paramLong8); public abstract void contentsWillBeUpdated(long paramLong1, long paramLong2, double paramDouble1, double paramDouble2, long paramLong3, long paramLong4, double paramDouble3, double paramDouble4); public abstract void contentsUpdated(long paramLong1, long paramLong2, double paramDouble1, double paramDouble2, long paramLong3, long paramLong4, double paramDouble3, double paramDouble4, int paramInt1, int paramInt2); public static abstract class Adapter implements ChartConfigurationListener { public void offsetChanged(long paramLong1, long paramLong2, long paramLong3, long paramLong4) {} public void scaleChanged(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4) {} public void dataBoundsChanged(long paramLong1, long paramLong2, long paramLong3, lo Further reading...For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.New!JAR listings
|