JClass 4.5.0 API
Documentation

com.klg.jclass.swing.gauge
Class JCGaugePickEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.klg.jclass.swing.gauge.JCGaugePickEvent

public class JCGaugePickEvent
extends EventObject

Represents a pick event in JCGauge. A pick event occurs when a JCPickListener is installed on a gauge and the mouse button is pressed over a JCGauge object.

See Also:
Serialized Form

Field Summary
protected  Component comp
          The component at the click location.
protected  JCGauge gauge
          The gauge associated with this event.
protected  Point point
          The (x, y) point of the click.
protected  double value
          The scale value closest to this click.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
JCGaugePickEvent(JCGauge gauge, Component comp, double value, Point point)
          Constructor
 
Method Summary
 Component getComponent()
          The component associated with this event.
 JCGauge getGauge()
          Returns the gauge associated with this event.
 Point getPoint()
          Returns the (x, y) point of the click.
 double getValue()
          The value associated with this event.
 String toString()
          Returns the point where the mouse was clicked and the associated scale value.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gauge

protected JCGauge gauge
The gauge associated with this event.

comp

protected Component comp
The component at the click location.

value

protected double value
The scale value closest to this click.

point

protected Point point
The (x, y) point of the click.
Constructor Detail

JCGaugePickEvent

public JCGaugePickEvent(JCGauge gauge,
                        Component comp,
                        double value,
                        Point point)
Constructor
Parameters:
gauge - The gauge associated with this event
comp - The component at the click location
value - The scale value at the pick location
point - The x, y coordinate of the pick
Method Detail

getGauge

public JCGauge getGauge()
Returns the gauge associated with this event.
Returns:
The gauge associated with this event.

getComponent

public Component getComponent()
The component associated with this event.

getValue

public double getValue()
The value associated with this event. The value is found by transforming the (x, y) point of the click to the corresponding scale value.

getPoint

public Point getPoint()
Returns the (x, y) point of the click.

toString

public String toString()
Returns the point where the mouse was clicked and the associated scale value.
Overrides:
toString in class EventObject
Returns:
The point where the mouse was clicked and the associated scale value

Copyright© 1999-2000 KL Group Inc.
All rights reserved.