Exemplo n.º 1
0
  @Listen("onHeaderUpdate = #ss")
  public void onHeaderUpdate(HeaderUpdateEvent event) {
    StringBuilder info = new StringBuilder();
    info.append("Header ").append(event.getAction()).append(" on ").append(event.getType());
    switch (event.getType()) {
      case COLUMN:
        info.append(" ").append(Ranges.getColumnRefString(event.getIndex()));
        break;
      case ROW:
        info.append(" ").append(Ranges.getRowRefString(event.getIndex()));
        break;
    }

    switch (event.getAction()) {
      case RESIZE:
        if (event.isHidden()) {
          info.append(" hides ");
        } else {
          info.append(" changes to ").append(event.getSize());
        }
        break;
    }

    if (isShowEventInfo(event.getName())) {
      addInfo(info.toString());
    }
  }
Exemplo n.º 2
0
  @Listen("onHeaderDoubleClick = #ss")
  public void onHeaderDoubleClick(HeaderMouseEvent event) {
    StringBuilder info = new StringBuilder();
    info.append("Double-click on ").append(event.getType()).append(" ");

    switch (event.getType()) {
      case COLUMN:
        info.append(Ranges.getColumnRefString(event.getIndex()));
        break;
      case ROW:
        info.append(Ranges.getRowRefString(event.getIndex()));
        break;
    }

    if (isShowEventInfo(event.getName())) {
      addInfo(info.toString());
    }
  }