src/java.desktop/share/classes/javax/swing/JViewport.java

Print this page

        

@@ -26,10 +26,11 @@
 package javax.swing;
 
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.peer.ComponentPeer;
+import java.beans.BeanProperty;
 import java.beans.Transient;
 import javax.swing.plaf.ViewportUI;
 
 import javax.swing.event.*;
 import javax.swing.border.*;

@@ -298,17 +299,14 @@
     /**
      * Sets the L&F object that renders this component.
      *
      * @param ui  the <code>ViewportUI</code> L&amp;F object
      * @see UIDefaults#getUI
-     * @beaninfo
-     *        bound: true
-     *       hidden: true
-     *    attribute: visualUpdate true
-     *  description: The UI object that implements the Component's LookAndFeel.
      * @since 1.3
      */
+    @BeanProperty(hidden = true, visualUpdate = true, description
+            = "The UI object that implements the Component's LookAndFeel.")
     public void setUI(ViewportUI ui) {
         super.setUI(ui);
     }
 
 

@@ -586,13 +584,12 @@
      * all existing values within this object are overwritten.
      *
      * @param insets the <code>Insets</code> object which can be reused
      * @return this viewports inset values
      * @see #getInsets
-     * @beaninfo
-     *   expert: true
      */
+    @BeanProperty(expert = true)
     public final Insets getInsets(Insets insets) {
         insets.left = insets.top = insets.right = insets.bottom = 0;
         return insets;
     }
 

@@ -859,19 +856,17 @@
       *
       * @see #BLIT_SCROLL_MODE
       * @see #BACKINGSTORE_SCROLL_MODE
       * @see #SIMPLE_SCROLL_MODE
       *
-      * @beaninfo
-      *        bound: false
-      *  description: Method of moving contents for incremental scrolls.
-      *         enum: BLIT_SCROLL_MODE JViewport.BLIT_SCROLL_MODE
-      *               BACKINGSTORE_SCROLL_MODE JViewport.BACKINGSTORE_SCROLL_MODE
-      *               SIMPLE_SCROLL_MODE JViewport.SIMPLE_SCROLL_MODE
-      *
       * @since 1.3
       */
+    @BeanProperty(bound = false, enumerationValues = {
+            "JViewport.BLIT_SCROLL_MODE",
+            "JViewport.BACKINGSTORE_SCROLL_MODE",
+            "JViewport.SIMPLE_SCROLL_MODE"}, description
+            = "Method of moving contents for incremental scrolls.")
     public void setScrollMode(int mode) {
         scrollMode = mode;
         backingStore = mode == BACKINGSTORE_SCROLL_MODE;
     }