Overview | Package | Class | Tree | Index | Help NetCharts Pro (Applets) 7.0
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class netcharts.apps.
NFColorChartApp

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--netcharts.apps.NFColorChartApp

public class NFColorChartApp
implements NFDwellObserver
This class provides a simple color chart that can be embedded in another applet or applications, or used directly as an applet. See ColorChart user documentation for details concerning the applet parameters supported by this class.

See Also:
Serialized Form

Inner classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
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, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
int numColumns
          Number of columns
boolean showFillWhenSelected
          Display color on mouse click
 
Method Summary
void addObserver(NFDwellObserver observer)
          Adds the given observer to the list of objects notified when a color cell is selected.
void draw(java.awt.Graphics g, java.awt.Dimension dim)
          Draws each of the set colors in a rectangular cell
boolean dwellDisplay(boolean on, NFActiveLabel label)
          This method is called when a dwell label is about to be displayed or erased.
boolean dwellPress(java.awt.Event evt, int x, int y, NFActiveLabel label)
          Called when a color cell has been selected.
void init()
          Initialization routine called when NFColorChartApp is run as a standalone applet.
void init(java.awt.Component comp)
          This method must be called whenever the ColorChart is embedded within another applet or frame.
boolean mouseDown(java.awt.Event evt, int x, int y)
          Overrides Component mouseDown()
boolean mouseMove(java.awt.Event evt, int x, int y)
          Keeps track of mouse movement over the graph.
boolean mouseUp(java.awt.Event evt, int x, int y)
          Overrides Component mouseUp()
void paint(java.awt.Graphics g)
          Paint the Chart.
void setColorTable(java.lang.String s)
          Sets the color table that will be used for the colors.
void setLabel(NFLabel label)
          Sets the label characteristics used for the popup label
void setRegion(NFRegion region)
          Sets the region characteristics used for the popup label
void start()
          Overrides Applet start()
void stop()
          Overrides Applet stop()
 

Field Detail

showFillWhenSelected

public boolean showFillWhenSelected
Display color on mouse click

numColumns

public int numColumns
Number of columns
Method Detail

init

public void init()
Initialization routine called when NFColorChartApp is run as a standalone applet.
Overrides:
init in class java.applet.Applet

init

public void init(java.awt.Component comp)
This method must be called whenever the ColorChart is embedded within another applet or frame. If the "comp" is an applet, then this method will load any applet parameters defined in the HTML file.
Parameters:
cmop - The Component.

addObserver

public void addObserver(NFDwellObserver observer)
Adds the given observer to the list of objects notified when a color cell is selected.
Parameters:
observer - The observer to add.

setLabel

public void setLabel(NFLabel label)
Sets the label characteristics used for the popup label
Parameters:
label - The NFLabel to be used for the ActiveLabels.

setRegion

public void setRegion(NFRegion region)
Sets the region characteristics used for the popup label
Parameters:
region - The region to be used for the ActiveLabels.

setColorTable

public void setColorTable(java.lang.String s)
Sets the color table that will be used for the colors. The given string should consist of a comma (or whitespace) delimited set of color values (xFF00FF) or names ("white").
Parameters:
s - Colors.

mouseMove

public boolean mouseMove(java.awt.Event evt,
                         int x,
                         int y)
Keeps track of mouse movement over the graph.
Parameters:
evt - The Event.
x - The X coordinate.
y - The Y coordinate.
Overrides:
mouseMove in class java.awt.Component

stop

public void stop()
Overrides Applet stop()
Overrides:
stop in class java.applet.Applet

start

public void start()
Overrides Applet start()
Overrides:
start in class java.applet.Applet

dwellDisplay

public boolean dwellDisplay(boolean on,
                            NFActiveLabel label)
This method is called when a dwell label is about to be displayed or erased. When on is true, the label is about to be displayed. If true is returned, the label will NOT be displayed.
Specified by:
dwellDisplay in interface NFDwellObserver
Parameters:
on - Whether the ActiveLabel is to be drawn or not.
label - The ActiveLabel to be drawn or not.

dwellPress

public boolean dwellPress(java.awt.Event evt,
                          int x,
                          int y,
                          NFActiveLabel label)
Called when a color cell has been selected. If "showFillWhenSelected" is true (default) the entire panel will be drawn in the selected color.
Specified by:
dwellPress in interface NFDwellObserver
Parameters:
evt - The Event.
x - The X coordinate.
y - The Y coordinate.
label - The ActiveLabel pressed.

paint

public void paint(java.awt.Graphics g)
Paint the Chart.
Parameters:
g - The Graphics to draw on.
Overrides:
paint in class java.awt.Container

draw

public void draw(java.awt.Graphics g,
                 java.awt.Dimension dim)
Draws each of the set colors in a rectangular cell
Parameters:
g - The Graphics to draw on
dim - The Dimension of the area to draw in.

mouseDown

public boolean mouseDown(java.awt.Event evt,
                         int x,
                         int y)
Overrides Component mouseDown()
Parameters:
evt - The Event.
x - The X coordinate.
y - The Y coordinate.
Returns:
true if the event was handles, false otherwise.
Overrides:
mouseDown in class java.awt.Component

mouseUp

public boolean mouseUp(java.awt.Event evt,
                       int x,
                       int y)
Overrides Component mouseUp()
Parameters:
evt - The Event.
x - The X coordinate.
y - The Y coordinate.
Returns:
true if the event was handles, false otherwise.
Overrides:
mouseUp in class java.awt.Component

Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


Visual Mining, Inc.
2099 Gaither Grove Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2010
All Rights Reserved.

NetCharts ProTM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 29, 2010