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 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 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;
 }
示例#5
0
 public static void printSystemProperties() {
   java.util.Enumeration e = System.getProperties().propertyNames();
   while (e.hasMoreElements()) {
     String prop = (String) e.nextElement();
     String out = prop;
     out += " = ";
     out += System.getProperty(prop);
     out += "\n";
     System.out.println(out);
   }
 }
示例#6
0
 public static void main(String[] argv) {
   try {
     String os = System.getProperty("os.name");
     if (os.startsWith("Windows")) {
       String laf = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
       UIManager.setLookAndFeel(laf);
     } else {
       UIManager.put("swing.boldMetal", Boolean.FALSE);
       javax.swing.plaf.FontUIResource f =
           new javax.swing.plaf.FontUIResource("SansSerif", Font.PLAIN, 11);
       java.util.Enumeration keys = UIManager.getDefaults().keys();
       while (keys.hasMoreElements()) {
         Object key = keys.nextElement();
         Object value = UIManager.get(key);
         if (value instanceof javax.swing.plaf.FontUIResource) UIManager.put(key, f);
       }
     }
     UIManager.put("TitledBorder.titleColor", Color.blue);
   } catch (java.lang.Exception exc) {
   }
   VncViewer viewer = new VncViewer(argv);
   viewer.start();
 }
 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;
 }