|
||||||||||
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 | +--org.opennms.bb.eui.operator.components.OperatorChartPanel
OperatorChartPanel is the chart that creates the labels and the bars for each level The chart creates the bars in the appropriate color based on the normal and warning levels. The bars ask the chart for the size they ought to paint themselves to. The chart returns appropriate sizes based on the zoom level (perspective/zoom)
Inner Class Summary | |
protected class |
OperatorChartPanel.BarNameComparator
Name comparator for the bars |
protected class |
OperatorChartPanel.BarSeverityComparator
Bar severity comparator |
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent, JComponent.ActionStandin, JComponent.IntVector, JComponent.KeyboardState |
Inner classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.AWTTreeLock |
Field Summary | |
(package private) boolean |
bZoomIn
|
(package private) OperatorBar |
firstBar
|
(package private) Color |
greenColor
|
(package private) double |
highestLen
|
(package private) String |
ID
|
(package private) String |
ID_SEPARATOR
|
(package private) String |
LEVEL
|
(package private) double |
lowestLen
|
private int |
maxUnitIncrement
|
(package private) double |
normal
|
(package private) OperatorInterfacePanel |
operatorParent
|
(package private) Color |
redColor
|
(package private) double |
warning
|
(package private) Color |
yellowColor
|
Fields inherited from class javax.swing.JPanel |
defaultLayout, uiClassID |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, needsPaint, printing, printingThreads, serialVersionUID |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
(package private) |
OperatorChartPanel(OperatorInterfacePanel parentPanel,
String id,
String levelName,
String dataFileName)
|
Method Summary | |
(package private) String |
createHtml(Object barSysName,
Object barSysDescr)
Create an HTML string for the tooltip |
double |
getChartWidth()
Return width for the ruler to draw itself |
int |
getChartX(Component comp)
Return starting point for the ruler to draw itself from |
Color |
getColor(double length)
Decide on the bar color depending on the normal and warning levels |
double |
getHighestLen()
Return length of the longest bar |
String |
getID()
Return id |
Vector |
getLabels()
Get bar labels |
String |
getLevel()
Return level |
double |
getLowestLen()
Return length of the shortest bar |
Dimension |
getPreferredScrollableViewportSize()
|
int |
getScrollableBlockIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
boolean |
getScrollableTracksViewportHeight()
|
boolean |
getScrollableTracksViewportWidth()
|
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
boolean |
isZoomOn()
Return if zoom is on |
void |
nameSort()
Name sort the bars |
void |
paintComponent(Graphics g)
|
protected void |
relayComponents(OperatorBar[] components,
int iSize)
Relay the bars and their labels after sort |
void |
severitySort()
Sort by severity |
double |
translateLength(double barLen)
Convert the bar length to the length it should draw itself to based on the zoom level |
protected void |
zoomIn()
zoom in |
protected void |
zoomOut()
zoom out |
Methods inherited from class javax.swing.JPanel |
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
OperatorInterfacePanel operatorParent
private int maxUnitIncrement
double normal
double warning
double lowestLen
double highestLen
OperatorBar firstBar
String ID
String LEVEL
boolean bZoomIn
Color greenColor
Color yellowColor
Color redColor
final String ID_SEPARATOR
Constructor Detail |
OperatorChartPanel(OperatorInterfacePanel parentPanel, String id, String levelName, String dataFileName) throws IOException
Method Detail |
public void nameSort()
public void severitySort()
protected void relayComponents(OperatorBar[] components, int iSize)
protected void zoomIn()
protected void zoomOut()
public boolean isZoomOn()
public Vector getLabels()
String createHtml(Object barSysName, Object barSysDescr)
public void paintComponent(Graphics g)
paintComponent
in class JComponent
public double translateLength(double barLen)
public Color getColor(double length)
public String getID()
public String getLevel()
public double getHighestLen()
public double getLowestLen()
public double getChartWidth()
public int getChartX(Component comp)
public Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize
in interface Scrollable
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableUnitIncrement
in interface Scrollable
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
getScrollableBlockIncrement
in interface Scrollable
public boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth
in interface Scrollable
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight
in interface Scrollable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |