Examples of escapeAndUpdateText()


Examples of org.zkoss.zss.app.zul.ctrl.WorkbookCtrl.escapeAndUpdateText()

    WorkbookCtrl bookCtrl = getDesktopWorkbenchContext().getWorkbookCtrl();
    newEdit = event.getValue();
    if (isComposingFormula(newEdit)) {
      //if (editExistingFormula && allowAppendCellReference(newEdit))
      //  editExistingFormula = allowAppendCellReference(newEdit);
      bookCtrl.escapeAndUpdateText(formulaCell, newEdit);
      if (isStartEditingFormula(newEdit))
        cacheFormulaEditingInfo();
      generateCellFocus(newEdit);
    else if (currentEditcell != null) {
      final int left = bookCtrl.getSelection().getLeft();
View Full Code Here

Examples of org.zkoss.zss.app.zul.ctrl.WorkbookCtrl.escapeAndUpdateText()

    else if (currentEditcell != null) {
      final int left = bookCtrl.getSelection().getLeft();
      final int top = bookCtrl.getSelection().getTop();
      final Worksheet sheet = bookCtrl.getSelectedSheet();
      currentEditcell = Utils.getOrCreateCell(sheet, top, left);
      bookCtrl.escapeAndUpdateText(currentEditcell, newEdit);
    }
  }

  private static boolean allowAppendCellReference(String editLabel) {
    return editLabel != null && editLabel.length() > 0 &&
View Full Code Here

Examples of org.zkoss.zss.app.zul.ctrl.WorkbookCtrl.escapeAndUpdateText()

   
    if (currentEditcell != null) {
      oldEdit = Ranges.range(sheet, top, left).getEditText();
      oldText = Utils.getCellText(sheet, currentEditcell); //escaped HTML to show cell value
      if (!isComposingFormula(newEdit))
        bookCtrl.escapeAndUpdateText(currentEditcell, oldEdit);

      if (!editExistingFormula && isComposingFormula(oldEdit) && addedFocusNames.size() == 0) {
        editExistingFormula = true;
        cacheFormulaEditingInfo();
        generateCellFocus(oldEdit);
View Full Code Here

Examples of org.zkoss.zss.app.zul.ctrl.WorkbookCtrl.escapeAndUpdateText()

  private void recoverCellText() {
    WorkbookCtrl bookCtrl = getDesktopWorkbenchContext().getWorkbookCtrl();
    if (oldText != null && currentEditcell != null) {
      //already escape, simply update
      bookCtrl.updateText(currentEditcell, oldText);
      bookCtrl.escapeAndUpdateText(formulaCell, formulaText != null ? formulaText : oldText);
      if (formulaEdit != null) {
        Utils.setEditText(formulaCell, formulaEdit);
      }
    }
  }
View Full Code Here

Examples of org.zkoss.zss.app.zul.ctrl.WorkbookCtrl.escapeAndUpdateText()

    if (refStartIndex >= 0 && target != null && !target.equals(replacement) &&
        (newEdit.indexOf(target, refStartIndex) + target.length() ==  newEdit.length())) {
      newEdit = newEdit.substring(0, refStartIndex + 1) + replacement;
      setText(newEdit);
      bookCtrl.escapeAndUpdateText(formulaCell, newEdit);
      return true;
    }
    return false;
  }
View Full Code Here

Examples of org.zkoss.zss.app.zul.ctrl.WorkbookCtrl.escapeAndUpdateText()

  private void appendFormulaReference(String cellRef) {
    final WorkbookCtrl bookCtrl = getDesktopWorkbenchContext().getWorkbookCtrl();
    if (allowAppendCellReference(newEdit)) {
      newEdit += focusCellRef;
      setText(newEdit);
      bookCtrl.escapeAndUpdateText(formulaCell, newEdit);
    }
  }
 
  private void clearCellReferenceFocus() {
    WorkbookCtrl bookCtrl = getDesktopWorkbenchContext().getWorkbookCtrl();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.