|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--com.adventnet.snmp.ui.Graph
Class Graph is the base class for all the graph beans(BarGraph,LineGraph,FilledGraph,MultiLineGraph and MultiBarGraph.) Graph beans are useful to represent the values that are polled from one or more variables of a remote agent. It can be used with bean builders and other applications.
| Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent,
javax.swing.JComponent.IntVector,
javax.swing.JComponent.KeyboardBinding,
javax.swing.JComponent.KeyboardState |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
| Field Summary | |
protected java.util.Vector[] |
bardata
|
protected int |
boxheight
|
protected int |
boxwidth
|
protected int |
boxX
|
protected int |
boxY
|
protected int |
count3
|
protected java.util.Vector[] |
data
The data to be graphed, i.e. |
protected java.util.Date |
date
|
protected java.util.Date |
date1
|
protected java.awt.Image |
dbuf
|
protected java.awt.Image |
dbuf1
|
protected int |
dotRad
marker length, and radius of graph point. |
protected java.util.Vector[] |
filledgraphdata
|
protected java.awt.Graphics |
g
|
protected java.awt.Graphics |
g1
|
protected java.awt.Graphics |
glegend
|
protected java.awt.Graphics |
graph
|
protected java.awt.Graphics |
graph1
|
protected int |
halfWid
|
protected int |
height
|
boolean |
isGraphResized
To know whether graph is resized or not . |
boolean |
isScrollBarEnabled
To know whether scroll bar is enabled or not . |
boolean |
isXRangeChanged
To know whether XRange is changed or not . |
protected int |
markLen
marker length, and radius of graph point. |
int |
maxX
The maximum value on the X scale. |
protected int |
maxX1
|
int |
minX
The minimum value on the X scale. |
int |
noOfPages
|
protected int |
prevht
|
protected int |
prevwid
Height and Width of the Panel. |
protected java.lang.String |
s
|
protected java.awt.Font |
scaleFont
The labels font name, e.g. |
protected java.util.Vector[] |
tempvector
|
protected java.util.Date[] |
timearray
To find the polling interval |
protected int |
width
Height and Width of the Panel. |
protected int |
x
|
protected int[] |
XGrids
|
protected int[] |
xMarks
|
int |
xRange
Difference between x minimum and x maximum. |
protected long |
xval
|
protected int |
y
|
protected int[] |
YGrids
|
protected int[] |
yMarks
|
protected int |
yValueForDisplay
|
| Fields inherited from class javax.swing.JComponent |
_bounds,
accessibleContext,
listenerList,
paintingChild,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Container |
component,
containerListener,
layoutMgr,
ncomponents |
| Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
componentListener,
componentListenerK,
componentOrientation,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
| Constructor Summary | |
Graph()
This constructor adds mouse and mouse motion listeners for the graph. |
|
| Method Summary | |
(package private) boolean |
addBarGraphPoint(int barnum,
double[] nextpoint)
Add a point for bar graph without repainting the entire bar and multi bar graph. |
(package private) boolean |
addFilledGraphPoint(int barnum,
double[] nextpoint)
Add a point for filled graph without repainting the entire graph. |
(package private) boolean |
addPoint(int linenum,
double[] nextpoint)
Add a point without repainting the entire line and multi line graph. |
void |
barGraphSetUp()
This is needed to setup the time at which bean has been instantiated. |
void |
calculatePoints()
calculate the points on the graph |
protected long |
computeX(int x)
To compute X value(for corresponding x point). |
protected int |
computeXPoint(double xval)
To compute X point (for corresponding x value(time)) |
protected long |
computeY(int y)
To compute Y value(for corresponding y point). |
protected int |
computeYPoint(double yval)
To compute y point (for corresponding y value). |
protected void |
drawGraph()
|
void |
drawLegend(java.awt.Graphics glegend)
To draw a box to show value and time . |
void |
drawSkeletenGraph()
To draw the graph . |
void |
filledGraphSetUp()
This is needed to setup the time at which bean has been instantiated. |
java.awt.Color |
getBarColor()
To get bar color . |
java.awt.Color[] |
getBarColors()
To get bar colors. |
java.awt.Color |
getBgcolor()
To get background color . |
java.awt.Color |
getFgcolor()
To get foreground color. |
java.awt.Color |
getLinecolor()
To get line color. |
java.awt.Color[] |
getLineColors()
To get line colors. |
long |
getMaxY()
To get maximum value in y axis. |
long |
getMinY()
To get minimum value in y axis. |
int |
getNoOfBars()
To get number of bars. |
int |
getNoOfLines()
To get number of lines. |
int |
getNoOfValues()
To get no of polled values to be displayed in the graph . |
java.awt.Dimension |
getPreferredSize()
To get the preferred size for the graph . |
java.awt.Font |
getScaleFont()
To get scale font. |
int |
getTime()
|
java.lang.String |
getTitle()
To get title of graph. |
java.awt.Font |
getTitleFont()
To get font of the title. |
int |
getXGrids()
To get number of vertical grids. |
java.lang.String |
getXLabel()
To get label on the X axis. |
int |
getXRange()
To get difference between x minimum and x maximum. |
int |
getXScalePoints()
To get number of marks on x axis. |
int |
getYGrids()
To get number of horizontal grids. |
java.lang.String |
getYLabel()
To get label on the Y axis. |
int |
getYScalePoints()
To get number of marks on y axis. |
void |
graphData()
To graph the data |
boolean |
isAbsoluteTime()
To know whether the graph is using absolute time or not. |
boolean |
isShowTitle()
To know whether it can show the title or not. |
boolean |
isShowxLabel()
To know whether it can show the x label or not. |
boolean |
isShowyLabel()
To know whether it can show the y label or not. |
boolean |
isTimeAverage()
To know whether time average the polled value or not. |
void |
lineGraphSetUp()
This is needed to setup the time at which bean has been instantiated. |
void |
paintComponent(java.awt.Graphics g)
|
double[] |
results(long diff)
To change the maximum x and y values corresponding to time and polled value. |
java.lang.String |
roundUp(java.lang.String ss)
To round-up the Scale points . |
void |
setAbsoluteTime(boolean b)
To set whether the graph can use absolute time or not. |
void |
setBarColor(java.awt.Color c)
To set line color. |
void |
setBarColors(java.awt.Color[] c)
To set bar colors. |
void |
setBarGraphResult(long diff)
This updates the bar graph with the new value |
void |
setBgcolor(java.awt.Color c)
To set background color. |
void |
setFgcolor(java.awt.Color c)
To set foreground color. |
void |
setFilledGraphResult(long diff)
This updates the filled graph with the new value |
void |
setLinecolor(java.awt.Color c)
To set line color. |
void |
setLineColors(java.awt.Color[] c)
To set line colors. |
void |
setMaxY(long l)
To set maximum value in y axis. |
void |
setMinY(long l)
To set minimum value in y axis. |
void |
setMultiBarGraphResult(int barNumber,
long diff)
This updates the multi bar graph with the new value |
void |
setNoOfBars(int i)
To set no of bars. |
void |
setNoOfLines(int i)
To set no of lines. |
void |
setNoOfValues(int i)
To set no of polled values to be displayed in the graph . |
void |
setResult(int lineNumber,
long diff)
This updates the line graph with the new value |
void |
setResult(long diff)
This updates the line graph with the new value |
void |
setScaleFont(java.awt.Font f)
To set scale font. |
void |
setShowTitle(boolean b)
To set whether it can show the title or not. |
void |
setShowxLabel(boolean b)
To set whether it can show the x label or not. |
void |
setShowyLabel(boolean b)
To set whether it can show the y label or not. |
void |
setTimeAverage(boolean b)
To set whether time average the polled value or not. |
void |
setTitle(java.lang.String s)
To set name of graph. |
void |
setTitleFont(java.awt.Font f)
To set font of the title. |
void |
setXGrids(int i)
To set number of vertical grids. |
void |
setXLabel(java.lang.String s)
To set label on the X axis. |
void |
setXRange(int i)
To set difference between x minimum and x maximum. |
void |
setXScalePoints(int i)
To set number of marks on x axis. |
void |
setYGrids(int i)
To set number of horizontal grids. |
void |
setYLabel(java.lang.String s)
To set label on the Y axis. |
void |
setYScalePoints(int i)
To set number of marks on y axis. |
| Methods inherited from class javax.swing.JPanel |
|
| Methods inherited from class javax.swing.JComponent |
_paintImmediately,
addAncestorListener,
addNotify,
addPropertyChangeListener,
addPropertyChangeListener,
addVetoableChangeListener,
alwaysOnTop,
bindingForKeyStroke,
checkIfChildObscuredBySibling,
computeVisibleRect,
computeVisibleRect,
contains,
createToolTip,
enableSerialization,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getMinimumSize,
getNextFocusableComponent,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paint,
paintBorder,
paintChildren,
paintImmediately,
paintImmediately,
print,
printAll,
processComponentKeyEvent,
processFocusEvent,
processKeyBinding,
processKeyBindings,
processKeyBindingsForAllComponents,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
rectangleIsObscured,
rectangleIsObscuredBySibling,
registerKeyboardAction,
registerKeyboardAction,
registerWithKeyboardManager,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBackground,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setForeground,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPaintingChild,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
setVisible,
shouldDebugGraphics,
superProcessMouseMotionEvent,
unregisterKeyboardAction,
unregisterWithKeyboardManager,
update |
| Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
applyOrientation,
countComponents,
deliverEvent,
dispatchEventImpl,
dispatchEventToSelf,
doLayout,
eventEnabled,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getCursorTarget,
getLayout,
getMouseEventTarget,
getWindow,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
nextFocus,
paintComponents,
postProcessKeyEvent,
postsOldMouseEvents,
preferredSize,
preProcessKeyEvent,
printComponents,
printHeavyweightComponents,
processContainerEvent,
processEvent,
proxyEnableEvents,
proxyRequestFocus,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setFocusOwner,
setLayout,
transferFocus,
updateCursor,
validate,
validateTree |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
constructComponentName,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getIntrinsicCursor,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isEnabledImpl,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
processComponentEvent,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
show,
show,
size,
toString,
transferFocus |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected int width
protected int prevwid
protected int height
protected int prevht
public int noOfPages
public boolean isScrollBarEnabled
public boolean isGraphResized
public boolean isXRangeChanged
protected int maxX1
protected int yValueForDisplay
protected transient java.awt.Graphics g
protected transient java.awt.Graphics graph
protected transient java.awt.Graphics g1
protected transient java.awt.Graphics graph1
protected transient java.awt.Graphics glegend
protected transient java.awt.Image dbuf
protected transient java.awt.Image dbuf1
protected java.awt.Font scaleFont
public int minX
public int maxX
public int xRange
protected int[] XGrids
protected int[] YGrids
protected int[] xMarks
protected int[] yMarks
protected int markLen
protected int dotRad
protected java.util.Vector[] data
protected java.util.Vector[] bardata
protected java.util.Vector[] filledgraphdata
protected java.util.Vector[] tempvector
protected int halfWid
protected java.util.Date date
protected java.util.Date date1
protected java.util.Date[] timearray
protected int count3
protected int x
protected int y
protected int boxX
protected int boxY
protected int boxwidth
protected int boxheight
protected long xval
protected java.lang.String s
| Constructor Detail |
public Graph()
| Method Detail |
public void drawLegend(java.awt.Graphics glegend)
public java.awt.Dimension getPreferredSize()
public void lineGraphSetUp()
public void barGraphSetUp()
public void filledGraphSetUp()
public void setResult(long diff)
public void setResult(int lineNumber,
long diff)
public void setBarGraphResult(long diff)
public void setMultiBarGraphResult(int barNumber,
long diff)
public void setFilledGraphResult(long diff)
public double[] results(long diff)
public void paintComponent(java.awt.Graphics g)
protected void drawGraph()
public int getTime()
protected long computeX(int x)
protected long computeY(int y)
protected int computeXPoint(double xval)
protected int computeYPoint(double yval)
public void calculatePoints()
public void drawSkeletenGraph()
public void graphData()
boolean addPoint(int linenum,
double[] nextpoint)
boolean addBarGraphPoint(int barnum,
double[] nextpoint)
boolean addFilledGraphPoint(int barnum,
double[] nextpoint)
public java.lang.String roundUp(java.lang.String ss)
public java.lang.String getTitle()
public void setTitle(java.lang.String s)
public boolean isShowTitle()
public void setShowTitle(boolean b)
public java.awt.Font getTitleFont()
public void setTitleFont(java.awt.Font f)
public java.awt.Color getBgcolor()
public void setBgcolor(java.awt.Color c)
public java.awt.Color getFgcolor()
public void setFgcolor(java.awt.Color c)
public java.awt.Color getLinecolor()
public void setLinecolor(java.awt.Color c)
public java.awt.Color getBarColor()
public void setBarColor(java.awt.Color c)
public java.lang.String getXLabel()
public void setXLabel(java.lang.String s)
public boolean isShowxLabel()
public void setShowxLabel(boolean b)
public java.lang.String getYLabel()
public void setYLabel(java.lang.String s)
public boolean isShowyLabel()
public void setShowyLabel(boolean b)
public boolean isTimeAverage()
public void setTimeAverage(boolean b)
public java.awt.Font getScaleFont()
public void setScaleFont(java.awt.Font f)
public int getXRange()
public void setXRange(int i)
public long getMinY()
public void setMinY(long l)
public long getMaxY()
public void setMaxY(long l)
public int getXGrids()
public void setXGrids(int i)
public int getYGrids()
public void setYGrids(int i)
public int getXScalePoints()
public void setXScalePoints(int i)
public int getYScalePoints()
public void setYScalePoints(int i)
public int getNoOfLines()
public void setNoOfLines(int i)
public int getNoOfBars()
public void setNoOfBars(int i)
public java.awt.Color[] getLineColors()
public void setLineColors(java.awt.Color[] c)
public java.awt.Color[] getBarColors()
public void setBarColors(java.awt.Color[] c)
public int getNoOfValues()
public void setNoOfValues(int i)
public boolean isAbsoluteTime()
public void setAbsoluteTime(boolean b)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||