コード例 #1
0
 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;
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 public void setChanged(boolean _ch) {
   changed = _ch;
   for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); )
     e.nextElement().setChanged(_ch);
 }
コード例 #6
0
 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;
 }
コード例 #7
0
 public void setFont(Font _font) {
   myFont = _font;
   for (java.util.Enumeration<Editor> e = pageList.elements(); e.hasMoreElements(); )
     e.nextElement().setFont(_font);
 }
コード例 #8
0
 /** 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;
 }