Package org.formulacompiler.runtime.spreadsheet

Examples of org.formulacompiler.runtime.spreadsheet.CellAddress


  public CellModel createCellModel( CellIndex _cellIndex, boolean _isInput ) throws CompilerException
  {
    final CellInstance cell = _cellIndex.getCell();
    final boolean nonNull = (null != cell);
    if (nonNull || _isInput) {
      final CellAddress cellAddress = _cellIndex.getCellAddress();
      final CellModel result = new CellModel( this.sectionModel, cellAddress );
      this.compiler.addCellModel( _cellIndex, result );
      if (nonNull) {
        buildCellModel( cell, result );
      }
View Full Code Here


  public boolean equals( final Object o )
  {
    if (this == o) return true;
    if (!(o instanceof CellAddress)) return false;

    final CellAddress cellAddress = (CellAddress) o;

    return this.columnIndex == cellAddress.getColumnIndex()
        && this.rowIndex == cellAddress.getRowIndex()
        && this.sheetName.equals( cellAddress.getSheetName() );
  }
View Full Code Here

      String _endSheetName, int _endRowIndex, int _endColumnIndex )
  {
    final int index = _index;
    final RangeAddressImpl range;
    if (_startSheetName != null && _endSheetName != null) {
      final CellAddress startCellAddress = new CellAddressImpl( _startSheetName, _startColumnIndex, _startRowIndex );
      final CellAddress endCellAddress = new CellAddressImpl( _endSheetName, _endColumnIndex, _endRowIndex );
      range = new RangeAddressImpl( startCellAddress, endCellAddress );
    }
    else range = null;
    return new SectionInfoImpl( _name, range, index );
  }
View Full Code Here

  void util_log( Object _value, String _sheetName, int _columnIndex, int _rowIndex, String _definedName, boolean _input, boolean _output )
  {
    final Object value = _value;
    final CellComputationListener listener = this.environment.computationListener();
    final CellAddress cellAddress = new CellAddressImpl( _sheetName, _columnIndex, _rowIndex );
    final CellInfo cellInfo = new CellInfoImpl( cellAddress, _definedName );
    final SpreadsheetCellComputationEvent event = new SpreadsheetCellComputationEvent( cellInfo, this.sectionInfo, value, _input, _output );
    listener.cellCalculated( event );
  }
View Full Code Here

  public void constantExpressionEliminated( final CellModel _cell, final Object _value )
  {
    final Object cellSource = _cell.getSource();
    if (cellSource instanceof CellAddress) {
      final CellAddress cellAddress = (CellAddress) cellSource;
      final CellInfo cellInfo = new CellInfoImpl( cellAddress, _cell.getName() );
      final SectionModel sectionModel = _cell.getSection();
      final Object sectionSource = sectionModel.getSource();
      final RangeAddress range = sectionSource instanceof RangeAddress ? (RangeAddress) sectionSource : null;
      final SectionInfo sectionInfo = new SectionInfoImpl( sectionModel.getName(), range, -1 );
View Full Code Here

  {
    compile( _expressionNodeForLogging.argument( 0 ) );

    final Object source = _expressionNodeForLogging.getSource();
    if (source instanceof CellAddress) {
      final CellAddress cellAddress = (CellAddress) source;
      final String definedName = _expressionNodeForLogging.getDefinedName();
      final boolean input = _expressionNodeForLogging.isInput();
      final boolean output = _expressionNodeForLogging.isOutput();
      compileLogging( cellAddress, definedName, input, output );
    }
View Full Code Here

    if (section().isComputationListenerEnabled()) {
      final CellModel cellModel = this.cellComputation.getCell();
      final Object source = cellModel.getSource();
      if (source instanceof CellAddress) {
        final CellAddress cellAddress = (CellAddress) source;
        final String name = cellModel.getName();
        expressionCompiler().compileLogging( cellAddress, name, true, cellModel.isOutput() );
      }
    }
  }
View Full Code Here

          mv.loadThis();
          mv.loadArg( 2 ); //section index
          final ExpressionCompilerForNumbers c = numericCompiler();
          final SectionModel sectionModel = model();
          final RangeAddress range = (RangeAddress) model().getSource();
          final CellAddress topLeft = range.getTopLeft();
          final CellAddress bottomRight = range.getBottomRight();
          c.compile_util_createSectionInfo( sectionModel.getName(),
              topLeft.getSheetName(), topLeft.getRowIndex(), topLeft.getColumnIndex(),
              bottomRight.getSheetName(), bottomRight.getRowIndex(), bottomRight.getColumnIndex() );
          mv.putField( section().classType(), SECTION_INFO_MEMBER_NAME, SECTION_INFO_CLASS );
        }

        mv.visitInsn( Opcodes.RETURN );
      }
View Full Code Here

TOP

Related Classes of org.formulacompiler.runtime.spreadsheet.CellAddress

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.