Copyright (C) 2000, 2001, Geert Vernaeve. All Rights Reserved.
package
gve.calc.formula;
import
gve.calc.packaging.*;
public
class
PackageInfo
extends
PackageDescriptor
{
public
PackageInfo
() {}
public
PartDescriptor
[] getParts() {
PartDescriptor
[] result = {
new
MatrixInfo(),
new
RewriteRuleInfo(),
new
StackInfo() };
return
result; } }
class
MatrixInfo
extends
PartDescriptor
{
public
MatrixInfo() {
super
(
"Matrix"
); }
public
void
generateNew(
Part
dummy,
FormulaView
view) {
Formula
f = view.getFormula();
Matrix
mat =
new
Matrix
(1,1); f.replace(dummy,mat); view.setCursorPart(mat.elementAt(0,0)); } }
class
RewriteRuleInfo
extends
PartDescriptor
{
public
RewriteRuleInfo() {
super
(
"RewriteRule"
); }
public
Part
genNew() {
return
new
RewriteRule
(); } }
class
StackInfo
extends
PartDescriptor
{
public
StackInfo() {
super
(
"Stack"
); }
public
Part
genNew() {
return
new
Stack
(); } }