public StringBuffer saveStringBuffer() { StringBuffer save = new StringBuffer(); for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); ) { Editor page = e.nextElement(); save.append( "<" + name + ".Page>\n" + "<Type>" + typeOfPage(page) + "</Type>\n" + "<Name>" + page.getName() + "</Name>\n" + "<Active>" + page.isActive() + "</Active>\n" + "<" + contentDelim + ">\n"); save.append(page.saveStringBuffer()); save.append("</" + contentDelim + ">\n" + "</" + name + ".Page>\n"); } return save; }
public void setColor(Color _color) { myColor = _color; tabbedPanel.setForeground(_color); firstButton.setForeground(_color); for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); ) e.nextElement().setColor(_color); }
public java.util.List<SearchResult> search(String _info, String _searchString, int _mode) { String passName = getName(); if (passName.startsWith("Osejs.")) passName = passName.substring(6); java.util.List<SearchResult> list = new ArrayList<SearchResult>(); for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); ) list.addAll(e.nextElement().search(passName, _searchString, _mode)); return list; }
public void clear() { for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); ) e.nextElement().clear(); pageList.clear(); tabbedPanel.removeAll(); showFirstPage(); updatePageCounterField(pageList.size()); changed = false; }
public void setChanged(boolean _ch) { changed = _ch; for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); ) e.nextElement().setChanged(_ch); }
public boolean isChanged() { if (changed) return true; for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); ) if (e.nextElement().isChanged()) return true; return false; }
public void setFont(Font _font) { myFont = _font; for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); ) e.nextElement().setFont(_font); }
/** Returns the number of active pages of this TabbedEditor */ public int getActivePageCount() { int counter = 0; for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); ) if (e.nextElement().isActive()) counter++; return counter; }