2017-02-26 10:44:10 +00:00
|
|
|
package com.bytezone.diskbrowser.visicalc;
|
|
|
|
|
|
|
|
public class Choose extends Function
|
|
|
|
{
|
2017-03-03 23:41:08 +00:00
|
|
|
private final Range range;
|
|
|
|
private final String sourceText;
|
|
|
|
private final String rangeText;
|
|
|
|
private final Number source;
|
2017-02-26 10:44:10 +00:00
|
|
|
|
2017-03-14 11:28:52 +00:00
|
|
|
Choose (Sheet parent, Cell cell, String text)
|
2017-02-26 10:44:10 +00:00
|
|
|
{
|
2017-03-14 11:28:52 +00:00
|
|
|
super (parent, cell, text);
|
2017-02-26 10:44:10 +00:00
|
|
|
|
|
|
|
int pos = text.indexOf (',');
|
|
|
|
sourceText = text.substring (8, pos);
|
2017-03-03 23:41:08 +00:00
|
|
|
source = new Number (sourceText);
|
2017-02-26 10:44:10 +00:00
|
|
|
rangeText = text.substring (pos + 1, text.length () - 1);
|
2017-03-15 00:41:45 +00:00
|
|
|
range = new Range (parent, cell, rangeText);
|
2017-03-03 23:41:08 +00:00
|
|
|
|
|
|
|
values.add (source);
|
2017-02-26 10:44:10 +00:00
|
|
|
}
|
2017-03-05 10:42:27 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void calculate ()
|
|
|
|
{
|
|
|
|
source.calculate ();
|
|
|
|
System.out.println ("@CHOOSE not written yet");
|
|
|
|
}
|
2017-02-26 10:44:10 +00:00
|
|
|
}
|