|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject com.jp.comp.calculator.CalculatorEvent
CalculatorEvent
is an event which indicates that either calculation
result or number of fraction digits change is occurred
CalculatorListener
,
Serialized FormField Summary | |
protected boolean |
fFinalResult
|
protected int |
fFractionDigits
|
protected double |
fResult
|
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
CalculatorEvent(java.lang.Object aSource)
Constructs a new CalculatorEvent |
|
CalculatorEvent(java.lang.Object aSource,
double aResult)
Constructs a new CalculatorEvent |
|
CalculatorEvent(java.lang.Object aSource,
double aResult,
boolean aFinalResult)
Constructs a new CalculatorEvent |
|
CalculatorEvent(java.lang.Object aSource,
double aResult,
boolean aFinalResult,
int aFractionDigits)
Constructs a new CalculatorEvent |
|
CalculatorEvent(java.lang.Object aSource,
int aFractionDigits)
Constructs a new CalculatorEvent |
Method Summary | |
int |
getFractionDigits()
Returns the number of fraction digits |
double |
getResult()
Returns the calculation result. |
boolean |
isFinalResult()
Returns true if the result is final and false if intermediate |
void |
setFinalResult(boolean aFinalResult)
Sets true if the result is final and false if intermediate |
void |
setFractionDigits(int aFractionDigits)
Sets the number of fraction digits |
void |
setResult(double aResult)
Sets the calculation result value |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double fResult
protected int fFractionDigits
protected boolean fFinalResult
Constructor Detail |
public CalculatorEvent(java.lang.Object aSource)
CalculatorEvent
aSource
- the source of the eventpublic CalculatorEvent(java.lang.Object aSource, double aResult)
CalculatorEvent
aSource
- the source of the eventaResult
- the calculation result valuepublic CalculatorEvent(java.lang.Object aSource, double aResult, boolean aFinalResult)
CalculatorEvent
aSource
- the source of the eventaResult
- the calculation result valueaFinalResult
- the result flagpublic CalculatorEvent(java.lang.Object aSource, int aFractionDigits)
CalculatorEvent
aSource
- the source of the eventaFractionDigits
- the number of fraction digitspublic CalculatorEvent(java.lang.Object aSource, double aResult, boolean aFinalResult, int aFractionDigits)
CalculatorEvent
aSource
- the source of the eventaResult
- the calculation result valueaFinalResult
- the result flagaFractionDigits
- the number of fraction digitsMethod Detail |
public double getResult()
public void setResult(double aResult)
aResult
- the calculation result valuepublic int getFractionDigits()
public void setFractionDigits(int aFractionDigits)
aFractionDigits
- the number of fraction digitspublic boolean isFinalResult()
true
if the result is final and false
if intermediate
public void setFinalResult(boolean aFinalResult)
true
if the result is final and false
if intermediate
aFinalResult
- the result flag
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |