+ /**
+ * Get the tab stop size.
+ *
+ * @return the tab stop size
+ */
+ public int getTabSize() {
+ return tabSize;
+ }
+
+ /**
+ * Set the tab stop size.
+ *
+ * @param tabSize the new tab stop size
+ */
+ public void setTabSize(final int tabSize) {
+ this.tabSize = tabSize;
+ }
+
+ /**
+ * Set the backspace unindent option.
+ *
+ * @param backspaceUnindents If true, backspace at an indent level goes
+ * back a full indent level. If false, backspace always goes back one
+ * column.
+ */
+ public void setBackspaceUnindents(final boolean backspaceUnindents) {
+ this.backspaceUnindents = backspaceUnindents;
+ }
+
+ /**
+ * Set the save with tabs option.
+ *
+ * @param saveWithTabs If true, save files with tab characters. If
+ * false, convert tabs to spaces when saving files.
+ */
+ public void setSaveWithTabs(final boolean saveWithTabs) {
+ this.saveWithTabs = saveWithTabs;
+ }
+
+ /**
+ * Handle the tab character.
+ */
+ public void tab() {
+ if (overwrite) {
+ del();
+ }
+ lines.get(lineNumber).tab(tabSize);
+ }
+
+ /**
+ * Handle the backtab (shift-tab) character.
+ */
+ public void backTab() {
+ lines.get(lineNumber).backTab(tabSize);
+ }
+