|
|||||||||
| 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.GraphWrapper
Class GraphWrapper acting as a wrapper for class Graph. By extending this class, User can implement different kinds of graphs like LineGraph, BarGraph, FilledGraph MultiBarGraph and MultiLineGraph.
See the superclass Graph, for details on parameters and more on methods for setting up the parameters.
Graph, Serialized Form| Inner Class Summary | |
(package private) class |
GraphWrapper.adlist
Adjustment listener for the scroll bar. |
| 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.awt.GridBagLayout |
gb
|
protected java.awt.GridBagConstraints |
gbc
|
protected javax.swing.JPanel |
jp
|
protected javax.swing.JScrollBar |
jsb
|
protected Graph |
sg
|
| 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 | |
GraphWrapper()
Constructor for simple graph. |
|
| Method Summary | |
void |
addMouseListener(java.awt.event.MouseListener l)
Adds the specified mouse listener to receive the mouse events |
void |
barGraphSetUp()
This calls barGraphSetUp of Graph.java . |
void |
filledGraphSetUp()
This calls filledGraphSetUp of Graph.java . |
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 simplegraphwrapper. |
java.awt.Font |
getScaleFont()
To get scale font. |
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. |
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 calls lineGraphSetUp of Graph.java . |
void |
removeMouseListener(java.awt.event.MouseListener l)
Removes the specified mouse listener |
void |
setAbsoluteTime(boolean b)
To set whether the graph can use absolute time or not. |
void |
setBarColor(java.awt.Color c)
To set bar color. |
void |
setBarColors(java.awt.Color[] c)
To set bar colors. |
void |
setBgcolor(java.awt.Color c)
To set background color. |
void |
setFgcolor(java.awt.Color c)
To set background color. |
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 |
setNoOfBars(int i)
To set number of bars. |
void |
setNoOfLines(int i)
To set number of lines. |
void |
setNoOfValues(int i)
To set no of polled values to be displayed in the graph. |
void |
setResult(int i,
long diff)
Sets the result. |
void |
setResult(long diff)
To set the result. |
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 title 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,
paintComponent,
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,
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,
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 Graph sg
protected javax.swing.JScrollBar jsb
protected javax.swing.JPanel jp
protected java.awt.GridBagLayout gb
protected java.awt.GridBagConstraints gbc
| Constructor Detail |
public GraphWrapper()
| Method Detail |
public void addMouseListener(java.awt.event.MouseListener l)
public void removeMouseListener(java.awt.event.MouseListener l)
public void lineGraphSetUp()
public void barGraphSetUp()
public void filledGraphSetUp()
public java.awt.Dimension getPreferredSize()
public void setResult(long diff)
public void setResult(int i,
long diff)
This calls the setResult of Graph.java. The int argument(linenumber) should always start from 0. For example, Three SnmpPoller's are going to connected to this MultiLineGraph.
[1'st poller or hook-up file]
setNumericResult(long diff) { target.setResult(0,diff); [target is MultiLineGraph.] }
[2'nd poller or hook-up file]
setNumericResult(long diff) { target.setResult(1,diff); [target is MultiLineGraph.] }
[3'rd poller or hook-up file]
setNumericResult(long diff) { target.setResult(2,diff); [target is MultiLineGraph.] }
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 | ||||||||