org.esa.beam.framework.ui.diagram
Class Diagram

java.lang.Object
  extended by org.esa.beam.framework.ui.diagram.Diagram

public class Diagram
extends Object

The Diagram class is used to plot simple X/Y graphs. Instances of this class are composed of DiagramGraph and two DiagramAxis objects for the X and Y axes.


Nested Class Summary
static class Diagram.RectTransform
           
 
Field Summary
static Color DEFAULT_BACKGROUND_COLOR
           
static String DEFAULT_FONT_NAME
           
static int DEFAULT_FONT_SIZE
           
static Color DEFAULT_FOREGROUND_COLOR
           
 
Constructor Summary
Diagram()
           
Diagram(DiagramAxis xAxis, DiagramAxis yAxis, DiagramGraph graph)
           
 
Method Summary
 void addChangeListener(DiagramChangeListener listener)
           
 void addGraph(DiagramGraph graph)
           
 void adjustAxes(boolean reset)
           
protected  void adjustAxes(DiagramGraph graph)
           
 void disableChangeEventMerging()
           
 void dispose()
           
 void enableChangeEventMerging()
           
 Color getBackgroundColor()
           
 DiagramChangeListener[] getChangeListeners()
           
 DiagramGraph getClosestGraph(int x, int y)
           
 boolean getDrawGrid()
           
 Font getFont()
           
 Color getForegroundColor()
           
 DiagramGraph getGraph(int index)
           
 Rectangle getGraphArea()
           
 int getGraphCount()
           
 DiagramGraph[] getGraphs()
           
 Color getMajorGridColor()
           
 Color getMinorGridColor()
           
 int getTextGap()
           
 Diagram.RectTransform getTransform()
           
 DiagramAxis getXAxis()
           
 DiagramAxis getYAxis()
           
 void invalidate()
           
 boolean isValid()
           
 void removeAllGraphs()
           
 void removeChangeListener(DiagramChangeListener listener)
           
 void removeGraph(DiagramGraph graph)
           
 void render(Graphics2D g2d, int x, int y, int width, int height)
           
 void resetMinMaxAccumulators()
           
 void resetMinMaxAccumulatorsFromAxes()
           
 void setBackgroundColor(Color backgroundColor)
           
 void setDrawGrid(boolean drawGrid)
           
 void setFont(Font font)
           
 void setForegroundColor(Color foregroundColor)
           
 void setMajorGridColor(Color majorGridColor)
           
 void setMinorGridColor(Color minorGridColor)
           
 void setTextGap(int textGap)
           
 void setValid(boolean valid)
           
 void setXAxis(DiagramAxis xAxis)
           
 void setYAxis(DiagramAxis yAxis)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FONT_NAME

public static final String DEFAULT_FONT_NAME
See Also:
Constant Field Values

DEFAULT_FONT_SIZE

public static final int DEFAULT_FONT_SIZE
See Also:
Constant Field Values

DEFAULT_FOREGROUND_COLOR

public static final Color DEFAULT_FOREGROUND_COLOR

DEFAULT_BACKGROUND_COLOR

public static final Color DEFAULT_BACKGROUND_COLOR
Constructor Detail

Diagram

public Diagram()

Diagram

public Diagram(DiagramAxis xAxis,
               DiagramAxis yAxis,
               DiagramGraph graph)
Method Detail

enableChangeEventMerging

public void enableChangeEventMerging()

disableChangeEventMerging

public void disableChangeEventMerging()

getTransform

public Diagram.RectTransform getTransform()

getDrawGrid

public boolean getDrawGrid()

setDrawGrid

public void setDrawGrid(boolean drawGrid)

getXAxis

public DiagramAxis getXAxis()

setXAxis

public void setXAxis(DiagramAxis xAxis)

getYAxis

public DiagramAxis getYAxis()

setYAxis

public void setYAxis(DiagramAxis yAxis)

getGraphs

public DiagramGraph[] getGraphs()

getGraphCount

public int getGraphCount()

getGraph

public DiagramGraph getGraph(int index)

addGraph

public void addGraph(DiagramGraph graph)

removeGraph

public void removeGraph(DiagramGraph graph)

removeAllGraphs

public void removeAllGraphs()

getFont

public Font getFont()

setFont

public void setFont(Font font)

getMajorGridColor

public Color getMajorGridColor()

setMajorGridColor

public void setMajorGridColor(Color majorGridColor)

getMinorGridColor

public Color getMinorGridColor()

setMinorGridColor

public void setMinorGridColor(Color minorGridColor)

getForegroundColor

public Color getForegroundColor()

setForegroundColor

public void setForegroundColor(Color foregroundColor)

getBackgroundColor

public Color getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(Color backgroundColor)

getTextGap

public int getTextGap()

setTextGap

public void setTextGap(int textGap)

isValid

public boolean isValid()

setValid

public void setValid(boolean valid)

invalidate

public void invalidate()

getGraphArea

public Rectangle getGraphArea()

render

public void render(Graphics2D g2d,
                   int x,
                   int y,
                   int width,
                   int height)

getClosestGraph

public DiagramGraph getClosestGraph(int x,
                                    int y)

adjustAxes

public void adjustAxes(boolean reset)

adjustAxes

protected void adjustAxes(DiagramGraph graph)

resetMinMaxAccumulators

public void resetMinMaxAccumulators()

resetMinMaxAccumulatorsFromAxes

public void resetMinMaxAccumulatorsFromAxes()

getChangeListeners

public DiagramChangeListener[] getChangeListeners()

addChangeListener

public void addChangeListener(DiagramChangeListener listener)

removeChangeListener

public void removeChangeListener(DiagramChangeListener listener)

dispose

public void dispose()


Copyright © 2002-2013 Brockmann Consult GmbH. All Rights Reserved.