< prev index next >

src/java.desktop/share/classes/javax/swing/text/LayoutQueue.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -48,10 +48,11 @@
         tasks = new Vector<Runnable>();
     }
 
     /**
      * Fetch the default layout queue.
+     * @return the default layout queue
      */
     public static LayoutQueue getDefaultQueue() {
         AppContext ac = AppContext.getAppContext();
         synchronized (DEFAULT_QUEUE) {
             LayoutQueue defaultQueue = (LayoutQueue) ac.get(DEFAULT_QUEUE);

@@ -75,10 +76,11 @@
     }
 
     /**
      * Add a task that is not needed immediately because
      * the results are not believed to be visible.
+     * @param task the task to add to the queue
      */
     public synchronized void addTask(Runnable task) {
         if (worker == null) {
             worker = new LayoutThread();
             worker.start();

@@ -86,11 +88,12 @@
         tasks.addElement(task);
         notifyAll();
     }
 
     /**
-     * Used by the worker thread to get a new task to execute
+     * Used by the worker thread to get a new task to execute.
+     * @return a task from the queue
      */
     protected synchronized Runnable waitForWork() {
         while (tasks.size() == 0) {
             try {
                 wait();
< prev index next >