|
www.sdmetrics.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--sdmetrics.app.DiagPanel
|
+--sdmetrics.app.DiagKiviat
Class to draw a kiviat diagram for a model element.
| Nested Class Summary | |
static interface |
DiagKiviat.Listener
Listener for mouse events in the diagram. |
| Field Summary | |
protected boolean |
dataAvailable
Flag indicating if metric data is available to draw. |
protected java.awt.Color |
drawColor
Color for lines and text. |
protected java.awt.Color |
fillColor
Colors to fill histgram bars / cumulative graph. |
protected boolean |
graphAvailable
Flag indicating if the available metric data is suitable to draw a graph. |
protected boolean |
labelAxis
Flag indicating if the metric/element name should be written on the graph. |
protected int |
LABELHEIGHT
Height of label. |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
DiagKiviat()
|
|
| Method Summary | |
void |
addListener(DiagKiviat.Listener l)
Add a listener for mouse click events on the diagram. |
void |
drawImage(java.awt.image.BufferedImage bufferedImage)
Draws the current graph into a specified image. |
void |
drawPercentiles(java.lang.Boolean[] percentiles)
Change the settings which percentiles to display on the kiviat diagram, and repain the graph accordingly. |
java.lang.String |
drawSVG(int width,
int height)
Get the SVG code to draw the current graph. |
protected java.lang.StringBuffer |
genSVGCode(int width,
int height)
Create the contents of the SVG file. |
static java.awt.Color[] |
initGrayShades(int numel)
Calculate a set of increasingly lighter shades of gray. |
boolean |
isGraphAvailable()
Test if the component currently has data available from which it can draw a graph. |
protected void |
paintComponent(java.awt.Graphics g)
Draw the kiviat diagram based on the current data. |
void |
showElement(DescStats dstats,
DataTable tview,
int table,
int elem,
java.lang.Boolean[] percentiles)
Draw the kiviat diagram for a model element. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.awt.Color drawColor
protected java.awt.Color fillColor
protected boolean dataAvailable
protected boolean graphAvailable
protected boolean labelAxis
protected final int LABELHEIGHT
| Constructor Detail |
public DiagKiviat()
| Method Detail |
protected void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic static java.awt.Color[] initGrayShades(int numel)
numel - The number of gray shades needed.
protected java.lang.StringBuffer genSVGCode(int width,
int height)
sdmetrics.app.DiagPanel
genSVGCode in class sdmetrics.app.DiagPanelwidth - Width of the graph to generate.height - Height of the graph to generate.
/lt;svg> tags of the
resulting SVG file.
public void showElement(DescStats dstats,
DataTable tview,
int table,
int elem,
java.lang.Boolean[] percentiles)
dstats - Object from which to obtain the descriptive statistics.tview - Object from which to obtain the metric names and metric data.table - Index of the table that contains the model element to draw.elem - Index (column number) of the model element to draw.percentiles - Array of booleans indicating which percentiles to draw.public void drawPercentiles(java.lang.Boolean[] percentiles)
percentiles - Array of boolean indicating which percentiles to draw.public void addListener(DiagKiviat.Listener l)
l - Listener to add.public boolean isGraphAvailable()
public java.lang.String drawSVG(int width,
int height)
width - Width of the graph to generate.height - Height of the graph to generate.
public void drawImage(java.awt.image.BufferedImage bufferedImage)
bufferedImage - Image to draw into.
|
www.sdmetrics.com | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||