public class GCalculatorFormula extends GPanel implements GListener, GReadWrite, GClear
GPanel.Panel, GPanel.ScrollBarVisibility
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GCalculatorFormula()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
after(GEvent e)
Called after the event is processed.
|
void |
before(GEvent e)
Called before the event is processed.
|
void |
clear()
Called when the element is to be cleared, so it can perform the actions required to return to the last
saved/loaded values.
|
void |
display()
Called when the element is to be displayed, so it can perform the actions required for its display, and
the display of its inmmediate descendants.
|
void |
extendFormula(String item)
Method to extend the formula.
|
void |
generic()
Abstract generic function that need to be implemented by the descendants.
|
Double[] |
getNewData()
Method to get data of the new variable.
|
ColumnInfo |
getNewVarInfo()
Method to get the new variable information.
|
String |
getNewVarName()
Method to get the new variable name.
|
GButton |
getValidateButton()
Method to get the button used for the formula validation.
|
void |
read()
Implementaion of the routines that allow the component to be loaded from a configuration file.
|
boolean |
validate(boolean keepData,
boolean displayMess,
List<String> varNameList,
List<String> prevNames,
int nbPts,
Map<String,Double[]> data)
Method to validate the new variable.
|
void |
write()
Implementaion of the routines that allow the component to be saved to a configuration file.
|
clearConstraint, getClassConstraint, getComponent, getHorizontalScroll, getInnerDescendantClassConstraint, getJPanel, getJScrollPane, getLayoutConstraints, getStringClassConstraint, getVerticalScroll, mainClear, mainDisplay, processMouseWheelEvent, put, setClassConstraint, setColumnConstraints, setConstraint, setDefaultConstraints, setHorizontalScroll, setInnerDescendantClassConstraint, setLayoutConstraints, setMargins, setPanelConstraints, setPreferredSize, setRowConstraints, setUnitIncrement, setVerticalScroll, unput
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getSubComponent, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isEnabled, isForcedStatus, isModified, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, setBusyCursor, setCommentInConfigFile, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setEnabled, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public void display() throws GException
GDisplay
display
in interface GDisplay
GException
- in case of problem while reading the value from file.public void generic() throws GException
GPanel
generic
in class GPanel
GException
- in case of problem.public void read() throws GException
GReadWrite
read
in interface GReadWrite
GException
- in case of problem while reading the value from file.public void write() throws GException
GReadWrite
write
in interface GReadWrite
GException
- in case of problem while writing the value to file.public void clear() throws GException
GClear
clear
in interface GClear
GException
- in case of problem while clearing the values.public void before(GEvent e) throws GException
GListener
before
in interface GListener
e
- event to processed.GException
- in case there is a problem managing the event.public void after(GEvent e) throws GException
GListener
after
in interface GListener
e
- processed event.GException
- in case there is a problem managing the event.public void extendFormula(String item)
item
- next command of the formula.public boolean validate(boolean keepData, boolean displayMess, List<String> varNameList, List<String> prevNames, int nbPts, Map<String,Double[]> data) throws GException
keepData
- we keep the new computed data if truedisplayMess
- we display message window if truevarNameList
- list of initial variable namesprevNames
- list of new variable names located in the list before the current onenbPts
- amount of linesdata
- initial dataGException
- GENIUS exception due to GDisplaypublic GButton getValidateButton()
public String getNewVarName()
public Double[] getNewData()
public ColumnInfo getNewVarInfo()
Copyright © 2024. All rights reserved.