@Override
	public void onMenuItemPressed(MenuPressedEventArgs param){
		if (param.getMenuItem().getText() == Constants.ScrollOnText){
			// turn on scrolling
			List<Row> rows = this.logicalDocument.getRows();
			this.logicalDocument = new ScrollableDocument(this.logicalDocument);
			// this.logicalDocument = new BorderedDocument(new ScrollableDocument(this.logicalDocument));
			this.logicalDocument.setRows(rows);			
		}
		else if (param.getMenuItem().getText() == Constants.ScrollOffText) {
			// turn scrolling off
			List<Row> rows = this.logicalDocument.getRows();
			this.logicalDocument = new ConcreteDocument();
			this.logicalDocument.setRows(rows);
			this.index = 0;
		}
		else if (param.getMenuItem().getText() == Constants.SpellCheckOnText){
			this.spellCheckEnabled = true;
		}
		else if (param.getMenuItem().getText() == Constants.SpellCheckOffText){
			this.spellCheckEnabled = false;
			this.misspelledGlyphs = null;
		}
	}