com.jinsight.jetchart
Class GradientPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--com.jinsight.jetchart.GradientPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
GenericGraph

public class GradientPanel
extends java.awt.Panel

The GradientPanel class is the super class of the GenericGraph class, the chart context used to plot all types of series. GradientPanel provides methods to display a gradient effect across the chart background,

See Also:
GenericGraph, Serialized Form

Inner classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
Field Summary
static int BOTTOM_TO_TOP
          Constant used to define gradient colors orientation from bottom to top.
static int LEFT_TO_RIGHT
          Constant used to define gradient colors orientation from left to right.
static int RIGHT_TO_LEFT
          Constant used to define gradient colors orientation from right to left.
static int TOP_TO_BOTTOM
          Constant used to define gradient colors orientation from top to bottom.
 
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
GradientPanel()
          Creates a GradientPanel object.
GradientPanel(java.awt.Color initialColor, java.awt.Color finalColor)
          Creates a GradientPanel object.
GradientPanel(java.awt.Color initialColor, java.awt.Color finalColor, int orientation)
          Creates a GradientPanel object.
 
Method Summary
protected  void finalize()
           
 void paint(java.awt.Graphics g)
          Overrides the Component class paint() method to provide gradient effect.
 void setGradientColors(java.awt.Color initialColor, java.awt.Color finalColor)
          Sets initial and final colors of the gradient colors effect.
 void setGradientOrientation(int orientation)
          Sets gradient colors orientation.
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOP_TO_BOTTOM

public static final int TOP_TO_BOTTOM
Constant used to define gradient colors orientation from top to bottom.

BOTTOM_TO_TOP

public static final int BOTTOM_TO_TOP
Constant used to define gradient colors orientation from bottom to top.

LEFT_TO_RIGHT

public static final int LEFT_TO_RIGHT
Constant used to define gradient colors orientation from left to right.

RIGHT_TO_LEFT

public static final int RIGHT_TO_LEFT
Constant used to define gradient colors orientation from right to left.
Constructor Detail

GradientPanel

public GradientPanel()
Creates a GradientPanel object. This is the default constructor. The initial and final colors are set to Color.white, and there is no gradient effect.

GradientPanel

public GradientPanel(java.awt.Color initialColor,
                     java.awt.Color finalColor)
Creates a GradientPanel object. The initial and final colors of the gradient colors effect must be passed to the constructor.
Parameters:
initialColor - A Color object.
finalColor - A Color object.

GradientPanel

public GradientPanel(java.awt.Color initialColor,
                     java.awt.Color finalColor,
                     int orientation)
Creates a GradientPanel object. This constructor takes the initial and final colors as well as the gradient effect orientation.
Parameters:
initialColor - A Color object.
finalColor - A Color object.
orientation - An integer number.
See Also:
TOP_TO_BOTTOM, BOTTOM_TO_TOP, LEFT_TO_RIGHT, RIGHT_TO_LEFT
Method Detail

setGradientOrientation

public void setGradientOrientation(int orientation)
Sets gradient colors orientation. Default value is TOP_TO_BOTTOM.
Parameters:
orientation - An integer number.
See Also:
TOP_TO_BOTTOM, BOTTOM_TO_TOP, LEFT_TO_RIGHT, RIGHT_TO_LEFT

setGradientColors

public void setGradientColors(java.awt.Color initialColor,
                              java.awt.Color finalColor)
Sets initial and final colors of the gradient colors effect.
Parameters:
initialColor - A Color object.
finalColor - A Color object.

paint

public void paint(java.awt.Graphics g)
Overrides the Component class paint() method to provide gradient effect.
Overrides:
paint in class java.awt.Container
Parameters:
g - A Graphics object.

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object