Methods from javax.swing.JComponent: |
---|
_paintImmediately, access$100, access$200, addAncestorListener, addNotify, addVetoableChangeListener, alwaysOnTop, checkIfChildObscuredBySibling, clientPropertyChanged, compWriteObjectNotify, componentInputMapChanged, computeVisibleRect, computeVisibleRect, contains, createToolTip, disable, dndDone, dropLocationForPoint, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getCreatedDoubleBuffer, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getGraphicsInvoked, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getManagingFocusBackwardTraversalKeys, getManagingFocusForwardTraversalKeys, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getWriteObjCounter, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPainting, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintForceDoubleBuffered, paintImmediately, paintImmediately, paintToOffscreen, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, rectangleIsObscured, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, safelyGetGraphics, safelyGetGraphics, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setCreatedDoubleBuffer, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setDropLocation, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setUIProperty, setVerifyInputWhenFocusTarget, setVisible, setWriteObjCounter, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, update, updateUI |
Methods from java.awt.Component: |
---|
access$000, access$100, action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, adjustListeningChildrenOnParent, applyComponentOrientation, areFocusTraversalKeysSet, areInputMethodsEnabled, autoProcessMouseWheel, autoTransferFocus, bounds, canBeFocusOwner, checkGD, checkImage, checkImage, checkWindowClosingException, clearCurrentFocusCycleRootOnHide, clearMostRecentFocusOwnerOnHide, coalesceEvents, constructComponentName, contains, contains, containsFocus, countHierarchyMembers, createBufferStrategy, createBufferStrategy, createHierarchyEvents, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, dispatchMouseWheelToAncestor, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, eventTypeEnabled, findUnderMouseInWindow, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAccessibleIndexInParent, getAccessibleStateSet, getAlignmentX, getAlignmentY, getBackBuffer, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getBoundsOp, getBufferStrategy, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getContainingWindow, getContainingWindow, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFocusTraversalKeys_NoIDCheck, getFont, getFontMetrics, getFont_NoClientCode, getForeground, getGraphics, getGraphicsConfiguration, getGraphicsConfiguration_NoClientCode, getGraphics_NoClientCode, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getLocationOnScreen_NoTreeLock, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getNativeContainer, getParent, getParent_NoClientCode, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, initializeFocusTraversalKeys, inside, invalidate, isBackgroundSet, isCoalescingEnabled, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFocusTraversableOverridden, isFocusable, isFontSet, isForegroundSet, isInstanceOf, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isRecursivelyVisible, isSameOrAncestorOf, isShowing, isValid, isVisible, isVisible_NoClientCode, keyDown, keyUp, layout, lightweightPaint, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, nextFocusHelper, numListening, paint, paintAll, paintHeavyweightComponents, paramString, pointRelativeToComponent, postEvent, postNextFocusHelper, postsOldMouseEvents, preNextFocusHelper, preferredSize, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusHelper, requestFocusHelper, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resetGC, reshape, resize, resize, setBackground, setBounds, setBounds, setBoundsOp, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFocusTraversalKeys_NoIDCheck, setFocusable, setFont, setForeground, setGCFromPeer, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setRequestFocusController, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, updateCursorImmediately, validate |
Method from org.apache.jmeter.visualizers.StatGraphVisualizer Detail: |
public void actionPerformed(ActionEvent event) {
if (event.getSource() == displayButton) {
makeGraph();
} else if (event.getSource() == saveGraph) {
saveGraphToFile = true;
try {
ActionRouter.getInstance().getAction(
ActionNames.SAVE_GRAPHICS,SaveGraphics.class.getName()).doAction(
new ActionEvent(this,1,ActionNames.SAVE_GRAPHICS));
} catch (Exception e) {
log.error(e.getMessage());
}
} else if (event.getSource() == saveTable) {
JFileChooser chooser = FileDialoger.promptToSaveFile("statistics.csv"); //$NON-NLS-1$
if (chooser == null) {
return;
}
FileWriter writer = null;
try {
writer = new FileWriter(chooser.getSelectedFile());
Vector data = this.getAllTableData();
CSVSaveService.saveCSVStats(data,writer,saveHeaders.isSelected() ? COLUMNS : null);
} catch (FileNotFoundException e) {
log.warn(e.getMessage());
} catch (IOException e) {
log.warn(e.getMessage());
} finally {
JOrphanUtils.closeQuietly(writer);
}
}
}
|
public void add(SampleResult res) {
SamplingStatCalculator row = null;
final String sampleLabel = res.getSampleLabel();
synchronized (tableRows) {
row = (SamplingStatCalculator) tableRows.get(sampleLabel);
if (row == null) {
row = new SamplingStatCalculator(sampleLabel);
tableRows.put(row.getLabel(), row);
model.insertRow(row, model.getRowCount() - 1);
}
}
row.addSample(res);
((SamplingStatCalculator) tableRows.get(TOTAL_ROW_LABEL)).addSample(res);
model.fireTableDataChanged();
}
|
public void clearData() {
model.clearData();
tableRows.clear();
tableRows.put(TOTAL_ROW_LABEL, new SamplingStatCalculator(TOTAL_ROW_LABEL));
model.addRow(tableRows.get(TOTAL_ROW_LABEL));
}
Clears this visualizer and its model, and forces a repaint of the table. |
public Vector getAllTableData() {
Vector data = new Vector();
if (model.getRowCount() > 0) {
for (int rw=0; rw < model.getRowCount(); rw++) {
int cols = model.getColumnCount();
Vector column = new Vector();
data.add(column);
for (int idx=0; idx < cols; idx++) {
Object val = model.getValueAt(rw,idx);
column.add(val);
}
}
}
return data;
}
We use this method to get the data, since we are using
ObjectTableModel, so the calling getDataVector doesn't
work as expected. |
public String[] getAxisLabels() {
if (model.getRowCount() > 1) {
int count = model.getRowCount() -1;
String[] labels = new String[count];
for (int idx=0; idx < count; idx++) {
labels[idx] = (String)model.getValueAt(idx,0);
}
return labels;
}
return new String[]{ "/", "/samples", "/jsp-samples", "/manager", "/manager/status", "/hello", "/world" };
}
|
public double[][] getData() {
if (model.getRowCount() > 1) {
int count = model.getRowCount() -1;
int col = model.findColumn(columns.getText());
double[][] data = new double[1][count];
for (int idx=0; idx < count; idx++) {
data[0][idx] = ((Number)model.getValueAt(idx,col)).doubleValue();
}
return data;
}
return new double[][]{ { 250, 45, 36, 66, 145, 80, 55 } };
}
|
public String getLabelResource() {
return "aggregate_graph_title"; //$NON-NLS-1$
}
|
public JComponent getPrintableComponent() {
if (saveGraphToFile == true) {
saveGraphToFile = false;
graphPanel.setBounds(graphPanel.getLocation().x,graphPanel.getLocation().y,
graphPanel.width,graphPanel.height);
return graphPanel;
}
return this;
}
|
public void makeGraph() {
String wstr = graphWidth.getText();
String hstr = graphHeight.getText();
String lstr = maxLengthXAxisLabel.getText();
if (wstr.length() == 0) {
wstr = "450";//$NON-NLS-1$
}
if (hstr.length() == 0) {
hstr = "250";//$NON-NLS-1$
}
if (lstr.length() == 0) {
lstr = "20";//$NON-NLS-1$
}
int width = Integer.parseInt(wstr);
int height = Integer.parseInt(hstr);
int maxLength = Integer.parseInt(lstr);
graphPanel.setData(this.getData());
graphPanel.setHeight(height);
graphPanel.setWidth(width);
graphPanel.setTitle(graphTitle.getText());
graphPanel.setMaxLength(maxLength);
graphPanel.setXAxisLabels(getAxisLabels());
graphPanel.setXAxisTitle(columns.getText());
graphPanel.setYAxisLabels(this.yAxisLabel);
graphPanel.setYAxisTitle(this.yAxisTitle);
graphPanel.setPreferredSize(new Dimension(width,height));
graph.setSize(new Dimension(graph.getWidth(), height + 120));
spane.repaint();
}
|
public static boolean testFunctors() {
StatGraphVisualizer instance = new StatGraphVisualizer();
return instance.model.checkFunctors(null,instance.getClass());
}
|