The symbol '.' is now a NumericChar Block
This commit is contained in:
parent
4bb28c3f39
commit
9fb9335e97
@ -6,7 +6,7 @@
|
|||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -8,9 +8,9 @@ import org.warp.picalculator.math.MathematicalSymbols;
|
|||||||
import org.warp.picalculator.math.parser.features.FeatureChar;
|
import org.warp.picalculator.math.parser.features.FeatureChar;
|
||||||
import org.warp.picalculator.math.parser.features.interfaces.Feature;
|
import org.warp.picalculator.math.parser.features.interfaces.Feature;
|
||||||
|
|
||||||
public class BlockNumber extends BlockChar {
|
public class BlockNumericChar extends BlockChar {
|
||||||
|
|
||||||
public BlockNumber(char ch) {
|
public BlockNumericChar(char ch) {
|
||||||
super(ch);
|
super(ch);
|
||||||
}
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ import org.warp.picalculator.gui.expression.blocks.Block;
|
|||||||
import org.warp.picalculator.gui.expression.blocks.BlockChar;
|
import org.warp.picalculator.gui.expression.blocks.BlockChar;
|
||||||
import org.warp.picalculator.gui.expression.blocks.BlockContainer;
|
import org.warp.picalculator.gui.expression.blocks.BlockContainer;
|
||||||
import org.warp.picalculator.gui.expression.blocks.BlockDivision;
|
import org.warp.picalculator.gui.expression.blocks.BlockDivision;
|
||||||
import org.warp.picalculator.gui.expression.blocks.BlockNumber;
|
import org.warp.picalculator.gui.expression.blocks.BlockNumericChar;
|
||||||
import org.warp.picalculator.gui.expression.blocks.BlockParenthesis;
|
import org.warp.picalculator.gui.expression.blocks.BlockParenthesis;
|
||||||
import org.warp.picalculator.gui.expression.blocks.BlockPower;
|
import org.warp.picalculator.gui.expression.blocks.BlockPower;
|
||||||
import org.warp.picalculator.gui.expression.blocks.BlockReference;
|
import org.warp.picalculator.gui.expression.blocks.BlockReference;
|
||||||
@ -70,7 +70,8 @@ public class NormalInputContainer extends InputContainer {
|
|||||||
case '7':
|
case '7':
|
||||||
case '8':
|
case '8':
|
||||||
case '9':
|
case '9':
|
||||||
return new BlockNumber(c);
|
case '.':
|
||||||
|
return new BlockNumericChar(c);
|
||||||
case MathematicalSymbols.SINE:
|
case MathematicalSymbols.SINE:
|
||||||
return new BlockSine();
|
return new BlockSine();
|
||||||
case MathematicalSymbols.PI:
|
case MathematicalSymbols.PI:
|
||||||
@ -102,7 +103,7 @@ public class NormalInputContainer extends InputContainer {
|
|||||||
currentBlock = currentBlock.getPreviousBlock();
|
currentBlock = currentBlock.getPreviousBlock();
|
||||||
if (currentBlock == null) break;
|
if (currentBlock == null) break;
|
||||||
Block b = currentBlock.get();
|
Block b = currentBlock.get();
|
||||||
if (b instanceof BlockNumber || b instanceof BlockVariable) {
|
if (b instanceof BlockNumericChar || b instanceof BlockVariable) {
|
||||||
if (!groupedBefore) {
|
if (!groupedBefore) {
|
||||||
groupedBefore = true;
|
groupedBefore = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user