javax.swing
Class JViewport

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.Component sample code for java.awt.Component definition code for java.awt.Component 
      extended by java.awt.Container sample code for java.awt.Container definition code for java.awt.Container 
          extended by javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent 
              extended by javax.swing.JViewport
All Implemented Interfaces:
ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver , MenuContainer sample code for java.awt.MenuContainer definition code for java.awt.MenuContainer , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible

public class JViewport
extends JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
implements Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible

The "viewport" or "porthole" through which you see the underlying information. When you scroll, what moves is the viewport. It is like peering through a camera's viewfinder. Moving the viewfinder upwards brings new things into view at the top of the picture and loses things that were at the bottom.

By default, JViewport is opaque. To change this, use the setOpaque method.

NOTE:We have implemented a faster scrolling algorithm that does not require a buffer to draw in. The algorithm works as follows:

  1. The view and parent view and checked to see if they are JComponents, if they aren't, stop and repaint the whole viewport.
  2. If the viewport is obscured by an ancestor, stop and repaint the whole viewport.
  3. Compute the region that will become visible, if it is as big as the viewport, stop and repaint the whole view region.
  4. Obtain the ancestor Window's graphics and do a copyArea on the scrolled region.
  5. Message the view to repaint the newly visible region.
  6. The next time paint is invoked on the viewport, if the clip region is smaller than the viewport size a timer is kicked off to repaint the whole region.
In general this approach is much faster. Compared to the backing store approach this avoids the overhead of maintaining an offscreen buffer and having to do two copyAreas. Compared to the non backing store case this approach will greatly reduce the painted region.

This approach can cause slower times than the backing store approach when the viewport is obscured by another window, or partially offscreen. When another window obscures the viewport the copyArea will copy garbage and a paint event will be generated by the system to inform us we need to paint the newly exposed region. The only way to handle this is to repaint the whole viewport, which can cause slower performance than the backing store case. In most applications very rarely will the user be scrolling while the viewport is obscured by another window or offscreen, so this optimization is usually worth the performance hit when obscured.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
JScrollPane sample code for javax.swing.JScrollPane definition code for javax.swing.JScrollPane , Serialized Form

Nested Class Summary
protected  class JViewport.AccessibleJViewport sample code for javax.swing.JViewport.AccessibleJViewport definition code for javax.swing.JViewport.AccessibleJViewport
          This class implements accessibility support for the JViewport class.
protected  class JViewport.ViewListener sample code for javax.swing.JViewport.ViewListener definition code for javax.swing.JViewport.ViewListener
          A listener for the view.
 
Nested classes/interfaces inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
JComponent.AccessibleJComponent sample code for javax.swing.JComponent.AccessibleJComponent definition code for javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container sample code for java.awt.Container definition code for java.awt.Container
Container.AccessibleAWTContainer sample code for java.awt.Container.AccessibleAWTContainer definition code for java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
Component.AccessibleAWTComponent sample code for java.awt.Component.AccessibleAWTComponent definition code for java.awt.Component.AccessibleAWTComponent , Component.BltBufferStrategy sample code for java.awt.Component.BltBufferStrategy definition code for java.awt.Component.BltBufferStrategy , Component.FlipBufferStrategy sample code for java.awt.Component.FlipBufferStrategy definition code for java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  boolean backingStore sample code for javax.swing.JViewport.backingStore definition code for javax.swing.JViewport.backingStore
          Deprecated. As of Java 2 platform v1.3
static int BACKINGSTORE_SCROLL_MODE sample code for javax.swing.JViewport.BACKINGSTORE_SCROLL_MODE definition code for javax.swing.JViewport.BACKINGSTORE_SCROLL_MODE
          Draws viewport contents into an offscreen image.
protected  Image sample code for java.awt.Image definition code for java.awt.Image backingStoreImage sample code for javax.swing.JViewport.backingStoreImage definition code for javax.swing.JViewport.backingStoreImage
          The view image used for a backing store.
static int BLIT_SCROLL_MODE sample code for javax.swing.JViewport.BLIT_SCROLL_MODE definition code for javax.swing.JViewport.BLIT_SCROLL_MODE
          Use graphics.copyArea to implement scrolling.
protected  boolean isViewSizeSet sample code for javax.swing.JViewport.isViewSizeSet definition code for javax.swing.JViewport.isViewSizeSet
          True when the viewport dimensions have been determined.
protected  Point sample code for java.awt.Point definition code for java.awt.Point lastPaintPosition sample code for javax.swing.JViewport.lastPaintPosition definition code for javax.swing.JViewport.lastPaintPosition
          The last viewPosition that we've painted, so we know how much of the backing store image is valid.
protected  boolean scrollUnderway sample code for javax.swing.JViewport.scrollUnderway definition code for javax.swing.JViewport.scrollUnderway
          The scrollUnderway flag is used for components like JList.
static int SIMPLE_SCROLL_MODE sample code for javax.swing.JViewport.SIMPLE_SCROLL_MODE definition code for javax.swing.JViewport.SIMPLE_SCROLL_MODE
          This mode uses the very simple method of redrawing the entire contents of the scrollpane each time it is scrolled.
 
Fields inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
accessibleContext sample code for javax.swing.JComponent.accessibleContext definition code for javax.swing.JComponent.accessibleContext , listenerList sample code for javax.swing.JComponent.listenerList definition code for javax.swing.JComponent.listenerList , TOOL_TIP_TEXT_KEY sample code for javax.swing.JComponent.TOOL_TIP_TEXT_KEY definition code for javax.swing.JComponent.TOOL_TIP_TEXT_KEY , ui sample code for javax.swing.JComponent.ui definition code for javax.swing.JComponent.ui , UNDEFINED_CONDITION sample code for javax.swing.JComponent.UNDEFINED_CONDITION definition code for javax.swing.JComponent.UNDEFINED_CONDITION , WHEN_ANCESTOR_OF_FOCUSED_COMPONENT sample code for javax.swing.JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT definition code for javax.swing.JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT , WHEN_FOCUSED sample code for javax.swing.JComponent.WHEN_FOCUSED definition code for javax.swing.JComponent.WHEN_FOCUSED , WHEN_IN_FOCUSED_WINDOW sample code for javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW definition code for javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
BOTTOM_ALIGNMENT sample code for java.awt.Component.BOTTOM_ALIGNMENT definition code for java.awt.Component.BOTTOM_ALIGNMENT , CENTER_ALIGNMENT sample code for java.awt.Component.CENTER_ALIGNMENT definition code for java.awt.Component.CENTER_ALIGNMENT , LEFT_ALIGNMENT sample code for java.awt.Component.LEFT_ALIGNMENT definition code for java.awt.Component.LEFT_ALIGNMENT , RIGHT_ALIGNMENT sample code for java.awt.Component.RIGHT_ALIGNMENT definition code for java.awt.Component.RIGHT_ALIGNMENT , TOP_ALIGNMENT sample code for java.awt.Component.TOP_ALIGNMENT definition code for java.awt.Component.TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver
ABORT sample code for java.awt.image.ImageObserver.ABORT definition code for java.awt.image.ImageObserver.ABORT , ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS definition code for java.awt.image.ImageObserver.ALLBITS , ERROR sample code for java.awt.image.ImageObserver.ERROR definition code for java.awt.image.ImageObserver.ERROR , FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS definition code for java.awt.image.ImageObserver.FRAMEBITS , HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT definition code for java.awt.image.ImageObserver.HEIGHT , PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES definition code for java.awt.image.ImageObserver.PROPERTIES , SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS definition code for java.awt.image.ImageObserver.SOMEBITS , WIDTH sample code for java.awt.image.ImageObserver.WIDTH definition code for java.awt.image.ImageObserver.WIDTH
 
Constructor Summary
JViewport sample code for javax.swing.JViewport.JViewport() definition code for javax.swing.JViewport.JViewport() ()
          Creates a JViewport.
 
Method Summary
 void addChangeListener sample code for javax.swing.JViewport.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.JViewport.addChangeListener(javax.swing.event.ChangeListener) (ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener  l)
          Adds a ChangeListener to the list that is notified each time the view's size, position, or the viewport's extent size has changed.
protected  void addImpl sample code for javax.swing.JViewport.addImpl(java.awt.Component, java.lang.Object, int) definition code for javax.swing.JViewport.addImpl(java.awt.Component, java.lang.Object, int) (Component sample code for java.awt.Component definition code for java.awt.Component  child, Object sample code for java.lang.Object definition code for java.lang.Object  constraints, int index)
          Sets the JViewport's one lightweight child, which can be null.
protected  boolean computeBlit sample code for javax.swing.JViewport.computeBlit(int, int, java.awt.Point, java.awt.Point, java.awt.Dimension, java.awt.Rectangle) definition code for javax.swing.JViewport.computeBlit(int, int, java.awt.Point, java.awt.Point, java.awt.Dimension, java.awt.Rectangle) (int dx, int dy, Point sample code for java.awt.Point definition code for java.awt.Point  blitFrom, Point sample code for java.awt.Point definition code for java.awt.Point  blitTo, Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  blitSize, Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  blitPaint)
          Computes the parameters for a blit where the backing store image currently contains oldLoc in the upper left hand corner and we're scrolling to newLoc.
protected  LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager createLayoutManager sample code for javax.swing.JViewport.createLayoutManager() definition code for javax.swing.JViewport.createLayoutManager() ()
          Subclassers can override this to install a different layout manager (or null) in the constructor.
protected  JViewport.ViewListener sample code for javax.swing.JViewport.ViewListener definition code for javax.swing.JViewport.ViewListener createViewListener sample code for javax.swing.JViewport.createViewListener() definition code for javax.swing.JViewport.createViewListener() ()
          Creates a listener for the view.
protected  void firePropertyChange sample code for javax.swing.JViewport.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for javax.swing.JViewport.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  propertyName, Object sample code for java.lang.Object definition code for java.lang.Object  oldValue, Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
          Notifies listeners of a property change.
protected  void fireStateChanged sample code for javax.swing.JViewport.fireStateChanged() definition code for javax.swing.JViewport.fireStateChanged() ()
          Notifies all ChangeListeners when the views size, position, or the viewports extent size has changed.
 AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext getAccessibleContext sample code for javax.swing.JViewport.getAccessibleContext() definition code for javax.swing.JViewport.getAccessibleContext() ()
          Gets the AccessibleContext associated with this JViewport.
 ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener [] getChangeListeners sample code for javax.swing.JViewport.getChangeListeners() definition code for javax.swing.JViewport.getChangeListeners() ()
          Returns an array of all the ChangeListeners added to this JViewport with addChangeListener().
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getExtentSize sample code for javax.swing.JViewport.getExtentSize() definition code for javax.swing.JViewport.getExtentSize() ()
          Returns the size of the visible part of the view in view coordinates.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getInsets sample code for javax.swing.JViewport.getInsets() definition code for javax.swing.JViewport.getInsets() ()
          Returns the insets (border) dimensions as (0,0,0,0), since borders are not supported on a JViewport.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getInsets sample code for javax.swing.JViewport.getInsets(java.awt.Insets) definition code for javax.swing.JViewport.getInsets(java.awt.Insets) (Insets sample code for java.awt.Insets definition code for java.awt.Insets  insets)
          Returns an Insets object containing this JViewports inset values.
 int getScrollMode sample code for javax.swing.JViewport.getScrollMode() definition code for javax.swing.JViewport.getScrollMode() ()
          Returns the current scrolling mode.
 ViewportUI sample code for javax.swing.plaf.ViewportUI definition code for javax.swing.plaf.ViewportUI getUI sample code for javax.swing.JViewport.getUI() definition code for javax.swing.JViewport.getUI() ()
          Returns the L&F object that renders this component.
 String sample code for java.lang.String definition code for java.lang.String getUIClassID sample code for javax.swing.JViewport.getUIClassID() definition code for javax.swing.JViewport.getUIClassID() ()
          Returns a string that specifies the name of the L&F class that renders this component.
 Component sample code for java.awt.Component definition code for java.awt.Component getView sample code for javax.swing.JViewport.getView() definition code for javax.swing.JViewport.getView() ()
          Returns the JViewport's one child or null.
 Point sample code for java.awt.Point definition code for java.awt.Point getViewPosition sample code for javax.swing.JViewport.getViewPosition() definition code for javax.swing.JViewport.getViewPosition() ()
          Returns the view coordinates that appear in the upper left hand corner of the viewport, or 0,0 if there's no view.
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getViewRect sample code for javax.swing.JViewport.getViewRect() definition code for javax.swing.JViewport.getViewRect() ()
          Returns a rectangle whose origin is getViewPosition and size is getExtentSize.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getViewSize sample code for javax.swing.JViewport.getViewSize() definition code for javax.swing.JViewport.getViewSize() ()
          If the view's size hasn't been explicitly set, return the preferred size, otherwise return the view's current size.
 boolean isBackingStoreEnabled sample code for javax.swing.JViewport.isBackingStoreEnabled() definition code for javax.swing.JViewport.isBackingStoreEnabled() ()
          Deprecated. As of Java 2 platform v1.3, replaced by getScrollMode().
 boolean isOptimizedDrawingEnabled sample code for javax.swing.JViewport.isOptimizedDrawingEnabled() definition code for javax.swing.JViewport.isOptimizedDrawingEnabled() ()
          The JViewport overrides the default implementation of this method (in JComponent) to return false.
 void paint sample code for javax.swing.JViewport.paint(java.awt.Graphics) definition code for javax.swing.JViewport.paint(java.awt.Graphics) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
          Depending on whether the backingStore is enabled, either paint the image through the backing store or paint just the recently exposed part, using the backing store to "blit" the remainder.
protected  String sample code for java.lang.String definition code for java.lang.String paramString sample code for javax.swing.JViewport.paramString() definition code for javax.swing.JViewport.paramString() ()
          Returns a string representation of this JViewport.
 void remove sample code for javax.swing.JViewport.remove(java.awt.Component) definition code for javax.swing.JViewport.remove(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  child)
          Removes the Viewports one lightweight child.
 void removeChangeListener sample code for javax.swing.JViewport.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.JViewport.removeChangeListener(javax.swing.event.ChangeListener) (ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener  l)
          Removes a ChangeListener from the list that's notified each time the views size, position, or the viewports extent size has changed.
 void repaint sample code for javax.swing.JViewport.repaint(long, int, int, int, int) definition code for javax.swing.JViewport.repaint(long, int, int, int, int) (long tm, int x, int y, int w, int h)
          Always repaint in the parents coordinate system to make sure only one paint is performed by the RepaintManager.
 void reshape sample code for javax.swing.JViewport.reshape(int, int, int, int) definition code for javax.swing.JViewport.reshape(int, int, int, int) (int x, int y, int w, int h)
          Sets the bounds of this viewport.
 void scrollRectToVisible sample code for javax.swing.JViewport.scrollRectToVisible(java.awt.Rectangle) definition code for javax.swing.JViewport.scrollRectToVisible(java.awt.Rectangle) (Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  contentRect)
          Scrolls the view so that Rectangle within the view becomes visible.
 void setBackingStoreEnabled sample code for javax.swing.JViewport.setBackingStoreEnabled(boolean) definition code for javax.swing.JViewport.setBackingStoreEnabled(boolean) (boolean enabled)
          Deprecated. As of Java 2 platform v1.3, replaced by setScrollMode().
 void setBorder sample code for javax.swing.JViewport.setBorder(javax.swing.border.Border) definition code for javax.swing.JViewport.setBorder(javax.swing.border.Border) (Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border)
          The viewport "scrolls" its child (called the "view") by the normal parent/child clipping (typically the view is moved in the opposite direction of the scroll).
 void setExtentSize sample code for javax.swing.JViewport.setExtentSize(java.awt.Dimension) definition code for javax.swing.JViewport.setExtentSize(java.awt.Dimension) (Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  newExtent)
          Sets the size of the visible part of the view using view coordinates.
 void setScrollMode sample code for javax.swing.JViewport.setScrollMode(int) definition code for javax.swing.JViewport.setScrollMode(int) (int mode)
          Used to control the method of scrolling the viewport contents.
 void setUI sample code for javax.swing.JViewport.setUI(javax.swing.plaf.ViewportUI) definition code for javax.swing.JViewport.setUI(javax.swing.plaf.ViewportUI) (ViewportUI sample code for javax.swing.plaf.ViewportUI definition code for javax.swing.plaf.ViewportUI  ui)
          Sets the L&F object that renders this component.
 void setView sample code for javax.swing.JViewport.setView(java.awt.Component) definition code for javax.swing.JViewport.setView(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  view)
          Sets the JViewport's one lightweight child (view), which can be null.
 void setViewPosition sample code for javax.swing.JViewport.setViewPosition(java.awt.Point) definition code for javax.swing.JViewport.setViewPosition(java.awt.Point) (Point sample code for java.awt.Point definition code for java.awt.Point  p)
          Sets the view coordinates that appear in the upper left hand corner of the viewport, does nothing if there's no view.
 void setViewSize sample code for javax.swing.JViewport.setViewSize(java.awt.Dimension) definition code for javax.swing.JViewport.setViewSize(java.awt.Dimension) (Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  newSize)
          Sets the size of the view.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension toViewCoordinates sample code for javax.swing.JViewport.toViewCoordinates(java.awt.Dimension) definition code for javax.swing.JViewport.toViewCoordinates(java.awt.Dimension) (Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  size)
          Converts a size in pixel coordinates to view coordinates.
 Point sample code for java.awt.Point definition code for java.awt.Point toViewCoordinates sample code for javax.swing.JViewport.toViewCoordinates(java.awt.Point) definition code for javax.swing.JViewport.toViewCoordinates(java.awt.Point) (Point sample code for java.awt.Point definition code for java.awt.Point  p)
          Converts a point in pixel coordinates to view coordinates.
 void updateUI sample code for javax.swing.JViewport.updateUI() definition code for javax.swing.JViewport.updateUI() ()
          Resets the UI property to a value from the current look and feel.
 
Methods inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
addAncestorListener sample code for javax.swing.JComponent.addAncestorListener(javax.swing.event.AncestorListener) definition code for javax.swing.JComponent.addAncestorListener(javax.swing.event.AncestorListener) , addNotify sample code for javax.swing.JComponent.addNotify() definition code for javax.swing.JComponent.addNotify() , addVetoableChangeListener sample code for javax.swing.JComponent.addVetoableChangeListener(java.beans.VetoableChangeListener) definition code for javax.swing.JComponent.addVetoableChangeListener(java.beans.VetoableChangeListener) , computeVisibleRect sample code for javax.swing.JComponent.computeVisibleRect(java.awt.Rectangle) definition code for javax.swing.JComponent.computeVisibleRect(java.awt.Rectangle) , contains sample code for javax.swing.JComponent.contains(int, int) definition code for javax.swing.JComponent.contains(int, int) , createToolTip sample code for javax.swing.JComponent.createToolTip() definition code for javax.swing.JComponent.createToolTip() , disable sample code for javax.swing.JComponent.disable() definition code for javax.swing.JComponent.disable() , enable sample code for javax.swing.JComponent.enable() definition code for javax.swing.JComponent.enable() , firePropertyChange sample code for javax.swing.JComponent.firePropertyChange(java.lang.String, boolean, boolean) definition code for javax.swing.JComponent.firePropertyChange(java.lang.String, boolean, boolean) , firePropertyChange sample code for javax.swing.JComponent.firePropertyChange(java.lang.String, char, char) definition code for javax.swing.JComponent.firePropertyChange(java.lang.String, char, char) , firePropertyChange sample code for javax.swing.JComponent.firePropertyChange(java.lang.String, int, int) definition code for javax.swing.JComponent.firePropertyChange(java.lang.String, int, int) , fireVetoableChange sample code for javax.swing.JComponent.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for javax.swing.JComponent.fireVetoableChange(java.lang.String, java.lang.Object, java.lang.Object) , getActionForKeyStroke sample code for javax.swing.JComponent.getActionForKeyStroke(javax.swing.KeyStroke) definition code for javax.swing.JComponent.getActionForKeyStroke(javax.swing.KeyStroke) , getActionMap sample code for javax.swing.JComponent.getActionMap() definition code for javax.swing.JComponent.getActionMap() , getAlignmentX sample code for javax.swing.JComponent.getAlignmentX() definition code for javax.swing.JComponent.getAlignmentX() , getAlignmentY sample code for javax.swing.JComponent.getAlignmentY() definition code for javax.swing.JComponent.getAlignmentY() , getAncestorListeners sample code for javax.swing.JComponent.getAncestorListeners() definition code for javax.swing.JComponent.getAncestorListeners() , getAutoscrolls sample code for javax.swing.JComponent.getAutoscrolls() definition code for javax.swing.JComponent.getAutoscrolls() , getBorder sample code for javax.swing.JComponent.getBorder() definition code for javax.swing.JComponent.getBorder() , getBounds sample code for javax.swing.JComponent.getBounds(java.awt.Rectangle) definition code for javax.swing.JComponent.getBounds(java.awt.Rectangle) , getClientProperty sample code for javax.swing.JComponent.getClientProperty(java.lang.Object) definition code for javax.swing.JComponent.getClientProperty(java.lang.Object) , getComponentGraphics sample code for javax.swing.JComponent.getComponentGraphics(java.awt.Graphics) definition code for javax.swing.JComponent.getComponentGraphics(java.awt.Graphics) , getComponentPopupMenu sample code for javax.swing.JComponent.getComponentPopupMenu() definition code for javax.swing.JComponent.getComponentPopupMenu() , getConditionForKeyStroke sample code for javax.swing.JComponent.getConditionForKeyStroke(javax.swing.KeyStroke) definition code for javax.swing.JComponent.getConditionForKeyStroke(javax.swing.KeyStroke) , getDebugGraphicsOptions sample code for javax.swing.JComponent.getDebugGraphicsOptions() definition code for javax.swing.JComponent.getDebugGraphicsOptions() , getDefaultLocale sample code for javax.swing.JComponent.getDefaultLocale() definition code for javax.swing.JComponent.getDefaultLocale() , getFontMetrics sample code for javax.swing.JComponent.getFontMetrics(java.awt.Font) definition code for javax.swing.JComponent.getFontMetrics(java.awt.Font) , getGraphics sample code for javax.swing.JComponent.getGraphics() definition code for javax.swing.JComponent.getGraphics() , getHeight sample code for javax.swing.JComponent.getHeight() definition code for javax.swing.JComponent.getHeight() , getInheritsPopupMenu sample code for javax.swing.JComponent.getInheritsPopupMenu() definition code for javax.swing.JComponent.getInheritsPopupMenu() , getInputMap sample code for javax.swing.JComponent.getInputMap() definition code for javax.swing.JComponent.getInputMap() , getInputMap sample code for javax.swing.JComponent.getInputMap(int) definition code for javax.swing.JComponent.getInputMap(int) , getInputVerifier sample code for javax.swing.JComponent.getInputVerifier() definition code for javax.swing.JComponent.getInputVerifier() , getListeners sample code for javax.swing.JComponent.getListeners(java.lang.Class) definition code for javax.swing.JComponent.getListeners(java.lang.Class) , getLocation sample code for javax.swing.JComponent.getLocation(java.awt.Point) definition code for javax.swing.JComponent.getLocation(java.awt.Point) , getMaximumSize sample code for javax.swing.JComponent.getMaximumSize() definition code for javax.swing.JComponent.getMaximumSize() , getMinimumSize sample code for javax.swing.JComponent.getMinimumSize() definition code for javax.swing.JComponent.getMinimumSize() , getNextFocusableComponent sample code for javax.swing.JComponent.getNextFocusableComponent() definition code for javax.swing.JComponent.getNextFocusableComponent() , getPopupLocation sample code for javax.swing.JComponent.getPopupLocation(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.getPopupLocation(java.awt.event.MouseEvent) , getPreferredSize sample code for javax.swing.JComponent.getPreferredSize() definition code for javax.swing.JComponent.getPreferredSize() , getRegisteredKeyStrokes sample code for javax.swing.JComponent.getRegisteredKeyStrokes() definition code for javax.swing.JComponent.getRegisteredKeyStrokes() , getRootPane sample code for javax.swing.JComponent.getRootPane() definition code for javax.swing.JComponent.getRootPane() , getSize sample code for javax.swing.JComponent.getSize(java.awt.Dimension) definition code for javax.swing.JComponent.getSize(java.awt.Dimension) , getToolTipLocation sample code for javax.swing.JComponent.getToolTipLocation(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.getToolTipLocation(java.awt.event.MouseEvent) , getToolTipText sample code for javax.swing.JComponent.getToolTipText() definition code for javax.swing.JComponent.getToolTipText() , getToolTipText sample code for javax.swing.JComponent.getToolTipText(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.getToolTipText(java.awt.event.MouseEvent) , getTopLevelAncestor sample code for javax.swing.JComponent.getTopLevelAncestor() definition code for javax.swing.JComponent.getTopLevelAncestor() , getTransferHandler sample code for javax.swing.JComponent.getTransferHandler() definition code for javax.swing.JComponent.getTransferHandler() , getVerifyInputWhenFocusTarget sample code for javax.swing.JComponent.getVerifyInputWhenFocusTarget() definition code for javax.swing.JComponent.getVerifyInputWhenFocusTarget() , getVetoableChangeListeners sample code for javax.swing.JComponent.getVetoableChangeListeners() definition code for javax.swing.JComponent.getVetoableChangeListeners() , getVisibleRect sample code for javax.swing.JComponent.getVisibleRect() definition code for javax.swing.JComponent.getVisibleRect() , getWidth sample code for javax.swing.JComponent.getWidth() definition code for javax.swing.JComponent.getWidth() , getX sample code for javax.swing.JComponent.getX() definition code for javax.swing.JComponent.getX() , getY sample code for javax.swing.JComponent.getY() definition code for javax.swing.JComponent.getY() , grabFocus sample code for javax.swing.JComponent.grabFocus() definition code for javax.swing.JComponent.grabFocus() , isDoubleBuffered sample code for javax.swing.JComponent.isDoubleBuffered() definition code for javax.swing.JComponent.isDoubleBuffered() , isLightweightComponent sample code for javax.swing.JComponent.isLightweightComponent(java.awt.Component) definition code for javax.swing.JComponent.isLightweightComponent(java.awt.Component) , isManagingFocus sample code for javax.swing.JComponent.isManagingFocus() definition code for javax.swing.JComponent.isManagingFocus() , isOpaque sample code for javax.swing.JComponent.isOpaque() definition code for javax.swing.JComponent.isOpaque() , isPaintingTile sample code for javax.swing.JComponent.isPaintingTile() definition code for javax.swing.JComponent.isPaintingTile() , isRequestFocusEnabled sample code for javax.swing.JComponent.isRequestFocusEnabled() definition code for javax.swing.JComponent.isRequestFocusEnabled() , isValidateRoot sample code for javax.swing.JComponent.isValidateRoot() definition code for javax.swing.JComponent.isValidateRoot() , paintBorder sample code for javax.swing.JComponent.paintBorder(java.awt.Graphics) definition code for javax.swing.JComponent.paintBorder(java.awt.Graphics) , paintChildren sample code for javax.swing.JComponent.paintChildren(java.awt.Graphics) definition code for javax.swing.JComponent.paintChildren(java.awt.Graphics) , paintComponent sample code for javax.swing.JComponent.paintComponent(java.awt.Graphics) definition code for javax.swing.JComponent.paintComponent(java.awt.Graphics) , paintImmediately sample code for javax.swing.JComponent.paintImmediately(int, int, int, int) definition code for javax.swing.JComponent.paintImmediately(int, int, int, int) , paintImmediately sample code for javax.swing.JComponent.paintImmediately(java.awt.Rectangle) definition code for javax.swing.JComponent.paintImmediately(java.awt.Rectangle) , print sample code for javax.swing.JComponent.print(java.awt.Graphics) definition code for javax.swing.JComponent.print(java.awt.Graphics) , printAll sample code for javax.swing.JComponent.printAll(java.awt.Graphics) definition code for javax.swing.JComponent.printAll(java.awt.Graphics) , printBorder sample code for javax.swing.JComponent.printBorder(java.awt.Graphics) definition code for javax.swing.JComponent.printBorder(java.awt.Graphics) , printChildren sample code for javax.swing.JComponent.printChildren(java.awt.Graphics) definition code for javax.swing.JComponent.printChildren(java.awt.Graphics) , printComponent sample code for javax.swing.JComponent.printComponent(java.awt.Graphics) definition code for javax.swing.JComponent.printComponent(java.awt.Graphics) , processComponentKeyEvent sample code for javax.swing.JComponent.processComponentKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JComponent.processComponentKeyEvent(java.awt.event.KeyEvent) , processKeyBinding sample code for javax.swing.JComponent.processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean) definition code for javax.swing.JComponent.processKeyBinding(javax.swing.KeyStroke, java.awt.event.KeyEvent, int, boolean) , processKeyEvent sample code for javax.swing.JComponent.processKeyEvent(java.awt.event.KeyEvent) definition code for javax.swing.JComponent.processKeyEvent(java.awt.event.KeyEvent) , processMouseEvent sample code for javax.swing.JComponent.processMouseEvent(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.processMouseEvent(java.awt.event.MouseEvent) , processMouseMotionEvent sample code for javax.swing.JComponent.processMouseMotionEvent(java.awt.event.MouseEvent) definition code for javax.swing.JComponent.processMouseMotionEvent(java.awt.event.MouseEvent) , putClientProperty sample code for javax.swing.JComponent.putClientProperty(java.lang.Object, java.lang.Object) definition code for javax.swing.JComponent.putClientProperty(java.lang.Object, java.lang.Object) , registerKeyboardAction sample code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int) definition code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, javax.swing.KeyStroke, int) , registerKeyboardAction sample code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int) definition code for javax.swing.JComponent.registerKeyboardAction(java.awt.event.ActionListener, java.lang.String, javax.swing.KeyStroke, int) , removeAncestorListener sample code for javax.swing.JComponent.removeAncestorListener(javax.swing.event.AncestorListener) definition code for javax.swing.JComponent.removeAncestorListener(javax.swing.event.AncestorListener) , removeNotify sample code for javax.swing.JComponent.removeNotify() definition code for javax.swing.JComponent.removeNotify() , removeVetoableChangeListener sample code for javax.swing.JComponent.removeVetoableChangeListener(java.beans.VetoableChangeListener) definition code for javax.swing.JComponent.removeVetoableChangeListener(java.beans.VetoableChangeListener) , repaint sample code for javax.swing.JComponent.repaint(java.awt.Rectangle) definition code for javax.swing.JComponent.repaint(java.awt.Rectangle) , requestDefaultFocus sample code for javax.swing.JComponent.requestDefaultFocus() definition code for javax.swing.JComponent.requestDefaultFocus() , requestFocus sample code for javax.swing.JComponent.requestFocus() definition code for javax.swing.JComponent.requestFocus() , requestFocus sample code for javax.swing.JComponent.requestFocus(boolean) definition code for javax.swing.JComponent.requestFocus(boolean) , requestFocusInWindow sample code for javax.swing.JComponent.requestFocusInWindow() definition code for javax.swing.JComponent.requestFocusInWindow() , requestFocusInWindow sample code for javax.swing.JComponent.requestFocusInWindow(boolean) definition code for javax.swing.JComponent.requestFocusInWindow(boolean) , resetKeyboardActions sample code for javax.swing.JComponent.resetKeyboardActions() definition code for javax.swing.JComponent.resetKeyboardActions() , revalidate sample code for javax.swing.JComponent.revalidate() definition code for javax.swing.JComponent.revalidate() , setActionMap sample code for javax.swing.JComponent.setActionMap(javax.swing.ActionMap) definition code for javax.swing.JComponent.setActionMap(javax.swing.ActionMap) , setAlignmentX sample code for javax.swing.JComponent.setAlignmentX(float) definition code for javax.swing.JComponent.setAlignmentX(float) , setAlignmentY sample code for javax.swing.JComponent.setAlignmentY(float) definition code for javax.swing.JComponent.setAlignmentY(float) , setAutoscrolls sample code for javax.swing.JComponent.setAutoscrolls(boolean) definition code for javax.swing.JComponent.setAutoscrolls(boolean) , setBackground sample code for javax.swing.JComponent.setBackground(java.awt.Color) definition code for javax.swing.JComponent.setBackground(java.awt.Color) , setComponentPopupMenu sample code for javax.swing.JComponent.setComponentPopupMenu(javax.swing.JPopupMenu) definition code for javax.swing.JComponent.setComponentPopupMenu(javax.swing.JPopupMenu) , setDebugGraphicsOptions sample code for javax.swing.JComponent.setDebugGraphicsOptions(int) definition code for javax.swing.JComponent.setDebugGraphicsOptions(int) , setDefaultLocale sample code for javax.swing.JComponent.setDefaultLocale(java.util.Locale) definition code for javax.swing.JComponent.setDefaultLocale(java.util.Locale) , setDoubleBuffered sample code for javax.swing.JComponent.setDoubleBuffered(boolean) definition code for javax.swing.JComponent.setDoubleBuffered(boolean) , setEnabled sample code for javax.swing.JComponent.setEnabled(boolean) definition code for javax.swing.JComponent.setEnabled(boolean) , setFocusTraversalKeys sample code for javax.swing.JComponent.setFocusTraversalKeys(int, java.util.Set) definition code for javax.swing.JComponent.setFocusTraversalKeys(int, java.util.Set) , setFont sample code for javax.swing.JComponent.setFont(java.awt.Font) definition code for javax.swing.JComponent.setFont(java.awt.Font) , setForeground sample code for javax.swing.JComponent.setForeground(java.awt.Color) definition code for javax.swing.JComponent.setForeground(java.awt.Color) , setInheritsPopupMenu sample code for javax.swing.JComponent.setInheritsPopupMenu(boolean) definition code for javax.swing.JComponent.setInheritsPopupMenu(boolean) , setInputMap sample code for javax.swing.JComponent.setInputMap(int, javax.swing.InputMap) definition code for javax.swing.JComponent.setInputMap(int, javax.swing.InputMap) , setInputVerifier sample code for javax.swing.JComponent.setInputVerifier(javax.swing.InputVerifier) definition code for javax.swing.JComponent.setInputVerifier(javax.swing.InputVerifier) , setMaximumSize sample code for javax.swing.JComponent.setMaximumSize(java.awt.Dimension) definition code for javax.swing.JComponent.setMaximumSize(java.awt.Dimension) , setMinimumSize sample code for javax.swing.JComponent.setMinimumSize(java.awt.Dimension) definition code for javax.swing.JComponent.setMinimumSize(java.awt.Dimension) , setNextFocusableComponent sample code for javax.swing.JComponent.setNextFocusableComponent(java.awt.Component) definition code for javax.swing.JComponent.setNextFocusableComponent(java.awt.Component) , setOpaque sample code for javax.swing.JComponent.setOpaque(boolean) definition code for javax.swing.JComponent.setOpaque(boolean) , setPreferredSize sample code for javax.swing.JComponent.setPreferredSize(java.awt.Dimension) definition code for javax.swing.JComponent.setPreferredSize(java.awt.Dimension) , setRequestFocusEnabled sample code for javax.swing.JComponent.setRequestFocusEnabled(boolean) definition code for javax.swing.JComponent.setRequestFocusEnabled(boolean) , setToolTipText sample code for javax.swing.JComponent.setToolTipText(java.lang.String) definition code for javax.swing.JComponent.setToolTipText(java.lang.String) , setTransferHandler sample code for javax.swing.JComponent.setTransferHandler(javax.swing.TransferHandler) definition code for javax.swing.JComponent.setTransferHandler(javax.swing.TransferHandler) , setUI sample code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) definition code for javax.swing.JComponent.setUI(javax.swing.plaf.ComponentUI) , setVerifyInputWhenFocusTarget sample code for javax.swing.JComponent.setVerifyInputWhenFocusTarget(boolean) definition code for javax.swing.JComponent.setVerifyInputWhenFocusTarget(boolean) , setVisible sample code for javax.swing.JComponent.setVisible(boolean) definition code for javax.swing.JComponent.setVisible(boolean) , unregisterKeyboardAction sample code for javax.swing.JComponent.unregisterKeyboardAction(javax.swing.KeyStroke) definition code for javax.swing.JComponent.unregisterKeyboardAction(javax.swing.KeyStroke) , update sample code for javax.swing.JComponent.update(java.awt.Graphics) definition code for javax.swing.JComponent.update(java.awt.Graphics)
 
Methods inherited from class java.awt.Container sample code for java.awt.Container definition code for java.awt.Container
add sample code for java.awt.Container.add(java.awt.Component) definition code for java.awt.Container.add(java.awt.Component) , add sample code for java.awt.Container.add(java.awt.Component, int) definition code for java.awt.Container.add(java.awt.Component, int) , add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object) , add sample code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.add(java.awt.Component, java.lang.Object, int) , add sample code for java.awt.Container.add(java.lang.String, java.awt.Component) definition code for java.awt.Container.add(java.lang.String, java.awt.Component) , addContainerListener sample code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.addContainerListener(java.awt.event.ContainerListener) , addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.beans.PropertyChangeListener) , addPropertyChangeListener sample code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Container.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , applyComponentOrientation sample code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Container.applyComponentOrientation(java.awt.ComponentOrientation) , areFocusTraversalKeysSet sample code for java.awt.Container.areFocusTraversalKeysSet(int) definition code for java.awt.Container.areFocusTraversalKeysSet(int) , countComponents sample code for java.awt.Container.countComponents() definition code for java.awt.Container.countComponents() , deliverEvent sample code for java.awt.Container.deliverEvent(java.awt.Event) definition code for java.awt.Container.deliverEvent(java.awt.Event) , doLayout sample code for java.awt.Container.doLayout() definition code for java.awt.Container.doLayout() , findComponentAt sample code for java.awt.Container.findComponentAt(int, int) definition code for java.awt.Container.findComponentAt(int, int) , findComponentAt sample code for java.awt.Container.findComponentAt(java.awt.Point) definition code for java.awt.Container.findComponentAt(java.awt.Point) , getComponent sample code for java.awt.Container.getComponent(int) definition code for java.awt.Container.getComponent(int) , getComponentAt sample code for java.awt.Container.getComponentAt(int, int) definition code for java.awt.Container.getComponentAt(int, int) , getComponentAt sample code for java.awt.Container.getComponentAt(java.awt.Point) definition code for java.awt.Container.getComponentAt(java.awt.Point) , getComponentCount sample code for java.awt.Container.getComponentCount() definition code for java.awt.Container.getComponentCount() , getComponents sample code for java.awt.Container.getComponents() definition code for java.awt.Container.getComponents() , getComponentZOrder sample code for java.awt.Container.getComponentZOrder(java.awt.Component) definition code for java.awt.Container.getComponentZOrder(java.awt.Component) , getContainerListeners sample code for java.awt.Container.getContainerListeners() definition code for java.awt.Container.getContainerListeners() , getFocusTraversalKeys sample code for java.awt.Container.getFocusTraversalKeys(int) definition code for java.awt.Container.getFocusTraversalKeys(int) , getFocusTraversalPolicy sample code for java.awt.Container.getFocusTraversalPolicy() definition code for java.awt.Container.getFocusTraversalPolicy() , getLayout sample code for java.awt.Container.getLayout() definition code for java.awt.Container.getLayout() , getMousePosition sample code for java.awt.Container.getMousePosition(boolean) definition code for java.awt.Container.getMousePosition(boolean) , insets sample code for java.awt.Container.insets() definition code for java.awt.Container.insets() , invalidate sample code for java.awt.Container.invalidate() definition code for java.awt.Container.invalidate() , isAncestorOf sample code for java.awt.Container.isAncestorOf(java.awt.Component) definition code for java.awt.Container.isAncestorOf(java.awt.Component) , isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot() definition code for java.awt.Container.isFocusCycleRoot() , isFocusCycleRoot sample code for java.awt.Container.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Container.isFocusCycleRoot(java.awt.Container) , isFocusTraversalPolicyProvider sample code for java.awt.Container.isFocusTraversalPolicyProvider() definition code for java.awt.Container.isFocusTraversalPolicyProvider() , isFocusTraversalPolicySet sample code for java.awt.Container.isFocusTraversalPolicySet() definition code for java.awt.Container.isFocusTraversalPolicySet() , layout sample code for java.awt.Container.layout() definition code for java.awt.Container.layout() , list sample code for java.awt.Container.list(java.io.PrintStream, int) definition code for java.awt.Container.list(java.io.PrintStream, int) , list sample code for java.awt.Container.list(java.io.PrintWriter, int) definition code for java.awt.Container.list(java.io.PrintWriter, int) , locate sample code for java.awt.Container.locate(int, int) definition code for java.awt.Container.locate(int, int) , minimumSize sample code for java.awt.Container.minimumSize() definition code for java.awt.Container.minimumSize() , paintComponents sample code for java.awt.Container.paintComponents(java.awt.Graphics) definition code for java.awt.Container.paintComponents(java.awt.Graphics) , preferredSize sample code for java.awt.Container.preferredSize() definition code for java.awt.Container.preferredSize() , printComponents sample code for java.awt.Container.printComponents(java.awt.Graphics) definition code for java.awt.Container.printComponents(java.awt.Graphics) , processContainerEvent sample code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) definition code for java.awt.Container.processContainerEvent(java.awt.event.ContainerEvent) , processEvent sample code for java.awt.Container.processEvent(java.awt.AWTEvent) definition code for java.awt.Container.processEvent(java.awt.AWTEvent) , remove sample code for java.awt.Container.remove(int) definition code for java.awt.Container.remove(int) , removeAll sample code for java.awt.Container.removeAll() definition code for java.awt.Container.removeAll() , removeContainerListener sample code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) definition code for java.awt.Container.removeContainerListener(java.awt.event.ContainerListener) , setComponentZOrder sample code for java.awt.Container.setComponentZOrder(java.awt.Component, int) definition code for java.awt.Container.setComponentZOrder(java.awt.Component, int) , setFocusCycleRoot sample code for java.awt.Container.setFocusCycleRoot(boolean) definition code for java.awt.Container.setFocusCycleRoot(boolean) , setFocusTraversalPolicy sample code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) definition code for java.awt.Container.setFocusTraversalPolicy(java.awt.FocusTraversalPolicy) , setFocusTraversalPolicyProvider sample code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) definition code for java.awt.Container.setFocusTraversalPolicyProvider(boolean) , setLayout sample code for java.awt.Container.setLayout(java.awt.LayoutManager) definition code for java.awt.Container.setLayout(java.awt.LayoutManager) , transferFocusBackward sample code for java.awt.Container.transferFocusBackward() definition code for java.awt.Container.transferFocusBackward() , transferFocusDownCycle sample code for java.awt.Container.transferFocusDownCycle() definition code for java.awt.Container.transferFocusDownCycle() , validate sample code for java.awt.Container.validate() definition code for java.awt.Container.validate() , validateTree sample code for java.awt.Container.validateTree() definition code for java.awt.Container.validateTree()
 
Methods inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
action sample code for java.awt.Component.action(java.awt.Event, java.lang.Object) definition code for java.awt.Component.action(java.awt.Event, java.lang.Object) , add sample code for java.awt.Component.add(java.awt.PopupMenu) definition code for java.awt.Component.add(java.awt.PopupMenu) , addComponentListener sample code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) , addFocusListener sample code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) , addHierarchyBoundsListener sample code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , addHierarchyListener sample code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) , addInputMethodListener sample code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) , addKeyListener sample code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) , addMouseListener sample code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) , addMouseMotionListener sample code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) , addMouseWheelListener sample code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) , bounds sample code for java.awt.Component.bounds() definition code for java.awt.Component.bounds() , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , coalesceEvents sample code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) definition code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) , contains sample code for java.awt.Component.contains(java.awt.Point) definition code for java.awt.Component.contains(java.awt.Point) , createImage sample code for java.awt.Component.createImage(java.awt.image.ImageProducer) definition code for java.awt.Component.createImage(java.awt.image.ImageProducer) , createImage sample code for java.awt.Component.createImage(int, int) definition code for java.awt.Component.createImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int) definition code for java.awt.Component.createVolatileImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) definition code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) , disableEvents sample code for java.awt.Component.disableEvents(long) definition code for java.awt.Component.disableEvents(long) , dispatchEvent sample code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) , enable sample code for java.awt.Component.enable(boolean) definition code for java.awt.Component.enable(boolean) , enableEvents sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long) , enableInputMethods sample code for java.awt.Component.enableInputMethods(boolean) definition code for java.awt.Component.enableInputMethods(boolean) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) definition code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, double, double) definition code for java.awt.Component.firePropertyChange(java.lang.String, double, double) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, float, float) definition code for java.awt.Component.firePropertyChange(java.lang.String, float, float) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, long, long) definition code for java.awt.Component.firePropertyChange(java.lang.String, long, long) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, short, short) definition code for java.awt.Component.firePropertyChange(java.lang.String, short, short) , getBackground sample code for java.awt.Component.getBackground() definition code for java.awt.Component.getBackground() , getBounds sample code for java.awt.Component.getBounds() definition code for java.awt.Component.getBounds() , getColorModel sample code for java.awt.Component.getColorModel() definition code for java.awt.Component.getColorModel() , getComponentListeners sample code for java.awt.Component.getComponentListeners() definition code for java.awt.Component.getComponentListeners() , getComponentOrientation sample code for java.awt.Component.getComponentOrientation() definition code for java.awt.Component.getComponentOrientation() , getCursor sample code for java.awt.Component.getCursor() definition code for java.awt.Component.getCursor() , getDropTarget sample code for java.awt.Component.getDropTarget() definition code for java.awt.Component.getDropTarget() , getFocusCycleRootAncestor sample code for java.awt.Component.getFocusCycleRootAncestor() definition code for java.awt.Component.getFocusCycleRootAncestor() , getFocusListeners sample code for java.awt.Component.getFocusListeners() definition code for java.awt.Component.getFocusListeners() , getFocusTraversalKeysEnabled sample code for java.awt.Component.getFocusTraversalKeysEnabled() definition code for java.awt.Component.getFocusTraversalKeysEnabled() , getFont sample code for java.awt.Component.getFont() definition code for java.awt.Component.getFont() , getForeground sample code for java.awt.Component.getForeground() definition code for java.awt.Component.getForeground() , getGraphicsConfiguration sample code for java.awt.Component.getGraphicsConfiguration() definition code for java.awt.Component.getGraphicsConfiguration() , getHierarchyBoundsListeners sample code for java.awt.Component.getHierarchyBoundsListeners() definition code for java.awt.Component.getHierarchyBoundsListeners() , getHierarchyListeners sample code for java.awt.Component.getHierarchyListeners() definition code for java.awt.Component.getHierarchyListeners() , getIgnoreRepaint sample code for java.awt.Component.getIgnoreRepaint() definition code for java.awt.Component.getIgnoreRepaint() , getInputContext sample code for java.awt.Component.getInputContext() definition code for java.awt.Component.getInputContext() , getInputMethodListeners sample code for java.awt.Component.getInputMethodListeners() definition code for java.awt.Component.getInputMethodListeners() , getInputMethodRequests sample code for java.awt.Component.getInputMethodRequests() definition code for java.awt.Component.getInputMethodRequests() , getKeyListeners sample code for java.awt.Component.getKeyListeners() definition code for java.awt.Component.getKeyListeners() , getLocale sample code for java.awt.Component.getLocale() definition code for java.awt.Component.getLocale() , getLocation sample code for java.awt.Component.getLocation() definition code for java.awt.Component.getLocation() , getLocationOnScreen sample code for java.awt.Component.getLocationOnScreen() definition code for java.awt.Component.getLocationOnScreen() , getMouseListeners sample code for java.awt.Component.getMouseListeners() definition code for java.awt.Component.getMouseListeners() , getMouseMotionListeners sample code for java.awt.Component.getMouseMotionListeners() definition code for java.awt.Component.getMouseMotionListeners() , getMousePosition sample code for java.awt.Component.getMousePosition() definition code for java.awt.Component.getMousePosition() , getMouseWheelListeners sample code for java.awt.Component.getMouseWheelListeners() definition code for java.awt.Component.getMouseWheelListeners() , getName sample code for java.awt.Component.getName() definition code for java.awt.Component.getName() , getParent sample code for java.awt.Component.getParent() definition code for java.awt.Component.getParent() , getPeer sample code for java.awt.Component.getPeer() definition code for java.awt.Component.getPeer() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners() definition code for java.awt.Component.getPropertyChangeListeners() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners(java.lang.String) definition code for java.awt.Component.getPropertyChangeListeners(java.lang.String) , getSize sample code for java.awt.Component.getSize() definition code for java.awt.Component.getSize() , getToolkit sample code for java.awt.Component.getToolkit() definition code for java.awt.Component.getToolkit() , getTreeLock sample code for java.awt.Component.getTreeLock() definition code for java.awt.Component.getTreeLock() , gotFocus sample code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) , handleEvent sample code for java.awt.Component.handleEvent(java.awt.Event) definition code for java.awt.Component.handleEvent(java.awt.Event) , hasFocus sample code for java.awt.Component.hasFocus() definition code for java.awt.Component.hasFocus() , hide sample code for java.awt.Component.hide() definition code for java.awt.Component.hide() , imageUpdate sample code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) , inside sample code for java.awt.Component.inside(int, int) definition code for java.awt.Component.inside(int, int) , isBackgroundSet sample code for java.awt.Component.isBackgroundSet() definition code for java.awt.Component.isBackgroundSet() , isCursorSet sample code for java.awt.Component.isCursorSet() definition code for java.awt.Component.isCursorSet() , isDisplayable sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , isEnabled sample code for java.awt.Component.isEnabled() definition code for java.awt.Component.isEnabled() , isFocusable sample code for java.awt.Component.isFocusable() definition code for java.awt.Component.isFocusable() , isFocusOwner sample code for java.awt.Component.isFocusOwner() definition code for java.awt.Component.isFocusOwner() , isFocusTraversable sample code for java.awt.Component.isFocusTraversable() definition code for java.awt.Component.isFocusTraversable() , isFontSet sample code for java.awt.Component.isFontSet() definition code for java.awt.Component.isFontSet() , isForegroundSet sample code for java.awt.Component.isForegroundSet() definition code for java.awt.Component.isForegroundSet() , isLightweight sample code for java.awt.Component.isLightweight() definition code for java.awt.Component.isLightweight() , isMaximumSizeSet sample code for java.awt.Component.isMaximumSizeSet() definition code for java.awt.Component.isMaximumSizeSet() , isMinimumSizeSet sample code for java.awt.Component.isMinimumSizeSet() definition code for java.awt.Component.isMinimumSizeSet() , isPreferredSizeSet sample code for java.awt.Component.isPreferredSizeSet() definition code for java.awt.Component.isPreferredSizeSet() , isShowing sample code for java.awt.Component.isShowing() definition code for java.awt.Component.isShowing() , isValid sample code for java.awt.Component.isValid() definition code for java.awt.Component.isValid() , isVisible sample code for java.awt.Component.isVisible() definition code for java.awt.Component.isVisible() , keyDown sample code for java.awt.Component.keyDown(java.awt.Event, int) definition code for java.awt.Component.keyDown(java.awt.Event, int) , keyUp sample code for java.awt.Component.keyUp(java.awt.Event, int) definition code for java.awt.Component.keyUp(java.awt.Event, int) , list sample code for java.awt.Component.list() definition code for java.awt.Component.list() , list sample code for java.awt.Component.list(java.io.PrintStream) definition code for java.awt.Component.list(java.io.PrintStream) , list sample code for java.awt.Component.list(java.io.PrintWriter) definition code for java.awt.Component.list(java.io.PrintWriter) , location sample code for java.awt.Component.location() definition code for java.awt.Component.location() , lostFocus sample code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) , mouseDown sample code for java.awt.Component.mouseDown(java.awt.Event, int, int) definition code for java.awt.Component.mouseDown(java.awt.Event, int, int) , mouseDrag sample code for java.awt.Component.mouseDrag(java.awt.Event, int, int) definition code for java.awt.Component.mouseDrag(java.awt.Event, int, int) , mouseEnter sample code for java.awt.Component.mouseEnter(java.awt.Event, int, int) definition code for java.awt.Component.mouseEnter(java.awt.Event, int, int) , mouseExit sample code for java.awt.Component.mouseExit(java.awt.Event, int, int) definition code for java.awt.Component.mouseExit(java.awt.Event, int, int) , mouseMove sample code for java.awt.Component.mouseMove(java.awt.Event, int, int) definition code for java.awt.Component.mouseMove(java.awt.Event, int, int) , mouseUp sample code for java.awt.Component.mouseUp(java.awt.Event, int, int) definition code for java.awt.Component.mouseUp(java.awt.Event, int, int) , move sample code for java.awt.Component.move(int, int) definition code for java.awt.Component.move(int, int) , nextFocus sample code for java.awt.Component.nextFocus() definition code for java.awt.Component.nextFocus() , paintAll sample code for java.awt.Component.paintAll(java.awt.Graphics) definition code for java.awt.Component.paintAll(java.awt.Graphics) , postEvent sample code for java.awt.Component.postEvent(java.awt.Event) definition code for java.awt.Component.postEvent(java.awt.Event) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , processComponentEvent sample code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) definition code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) , processFocusEvent sample code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) definition code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) , processHierarchyBoundsEvent sample code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) , processHierarchyEvent sample code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) , processInputMethodEvent sample code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) definition code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) , processMouseWheelEvent sample code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) definition code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) , remove sample code for java.awt.Component.remove(java.awt.MenuComponent) definition code for java.awt.Component.remove(java.awt.MenuComponent) , removeComponentListener sample code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) , removeFocusListener sample code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) , removeHierarchyBoundsListener sample code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , removeHierarchyListener sample code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) , removeInputMethodListener sample code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) , removeKeyListener sample code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) , removeMouseListener sample code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) , removeMouseMotionListener sample code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) , removeMouseWheelListener sample code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , repaint sample code for java.awt.Component.repaint() definition code for java.awt.Component.repaint() , repaint sample code for java.awt.Component.repaint(int, int, int, int) definition code for java.awt.Component.repaint(int, int, int, int) , repaint sample code for java.awt.Component.repaint(long) definition code for java.awt.Component.repaint(long) , resize sample code for java.awt.Component.resize(java.awt.Dimension) definition code for java.awt.Component.resize(java.awt.Dimension) , resize sample code for java.awt.Component.resize(int, int) definition code for java.awt.Component.resize(int, int) , setBounds sample code for java.awt.Component.setBounds(int, int, int, int) definition code for java.awt.Component.setBounds(int, int, int, int) , setBounds sample code for java.awt.Component.setBounds(java.awt.Rectangle) definition code for java.awt.Component.setBounds(java.awt.Rectangle) , setComponentOrientation sample code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) , setCursor sample code for java.awt.Component.setCursor(java.awt.Cursor) definition code for java.awt.Component.setCursor(java.awt.Cursor) , setDropTarget sample code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) definition code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) , setFocusable sample code for java.awt.Component.setFocusable(boolean) definition code for java.awt.Component.setFocusable(boolean) , setFocusTraversalKeysEnabled sample code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) definition code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) , setIgnoreRepaint sample code for java.awt.Component.setIgnoreRepaint(boolean) definition code for java.awt.Component.setIgnoreRepaint(boolean) , setLocale sample code for java.awt.Component.setLocale(java.util.Locale) definition code for java.awt.Component.setLocale(java.util.Locale) , setLocation sample code for java.awt.Component.setLocation(int, int) definition code for java.awt.Component.setLocation(int, int) , setLocation sample code for java.awt.Component.setLocation(java.awt.Point) definition code for java.awt.Component.setLocation(java.awt.Point) , setName sample code for java.awt.Component.setName(java.lang.String) definition code for java.awt.Component.setName(java.lang.String) , setSize sample code for java.awt.Component.setSize(java.awt.Dimension) definition code for java.awt.Component.setSize(java.awt.Dimension) , setSize sample code for java.awt.Component.setSize(int, int) definition code for java.awt.Component.setSize(int, int) , show sample code for java.awt.Component.show() definition code for java.awt.Component.show() , show sample code for java.awt.Component.show(boolean) definition code for java.awt.Component.show(boolean) , size sample code for java.awt.Component.size() definition code for java.awt.Component.size() , toString sample code for java.awt.Component.toString() definition code for java.awt.Component.toString() , transferFocus sample code for java.awt.Component.transferFocus() definition code for java.awt.Component.transferFocus() , transferFocusUpCycle sample code for java.awt.Component.transferFocusUpCycle() definition code for java.awt.Component.transferFocusUpCycle()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

isViewSizeSet sample code for javax.swing.JViewport.isViewSizeSet

protected boolean isViewSizeSet
True when the viewport dimensions have been determined. The default is false.


lastPaintPosition sample code for javax.swing.JViewport.lastPaintPosition

protected Point sample code for java.awt.Point definition code for java.awt.Point  lastPaintPosition
The last viewPosition that we've painted, so we know how much of the backing store image is valid.


backingStore sample code for javax.swing.JViewport.backingStore

@Deprecated
protected boolean backingStore
Deprecated. As of Java 2 platform v1.3
True when this viewport is maintaining an offscreen image of its contents, so that some scrolling can take place using fast "bit-blit" operations instead of by accessing the view object to construct the display. The default is false.

See Also:
setScrollMode(int) sample code for javax.swing.JViewport.setScrollMode(int) definition code for javax.swing.JViewport.setScrollMode(int)

backingStoreImage sample code for javax.swing.JViewport.backingStoreImage

protected transient Image sample code for java.awt.Image definition code for java.awt.Image  backingStoreImage
The view image used for a backing store.


scrollUnderway sample code for javax.swing.JViewport.scrollUnderway

protected boolean scrollUnderway
The scrollUnderway flag is used for components like JList. When the downarrow key is pressed on a JList and the selected cell is the last in the list, the scrollpane autoscrolls. Here, the old selected cell needs repainting and so we need a flag to make the viewport do the optimized painting only when there is an explicit call to setViewPosition(Point). When setBounds is called through other routes, the flag is off and the view repaints normally. Another approach would be to remove this from the JViewport class and have the JList manage this case by using setBackingStoreEnabled. The default is false.


BLIT_SCROLL_MODE sample code for javax.swing.JViewport.BLIT_SCROLL_MODE

public static final int BLIT_SCROLL_MODE
Use graphics.copyArea to implement scrolling. This is the fastest for most applications.

Since:
1.3
See Also:
setScrollMode(int) sample code for javax.swing.JViewport.setScrollMode(int) definition code for javax.swing.JViewport.setScrollMode(int) , Constant Field Values

BACKINGSTORE_SCROLL_MODE sample code for javax.swing.JViewport.BACKINGSTORE_SCROLL_MODE

public static final int BACKINGSTORE_SCROLL_MODE
Draws viewport contents into an offscreen image. This was previously the default mode for JTable. This mode may offer advantages over "blit mode" in some cases, but it requires a large chunk of extra RAM.

Since:
1.3
See Also:
setScrollMode(int) sample code for javax.swing.JViewport.setScrollMode(int) definition code for javax.swing.JViewport.setScrollMode(int) , Constant Field Values

SIMPLE_SCROLL_MODE sample code for javax.swing.JViewport.SIMPLE_SCROLL_MODE

public static final int SIMPLE_SCROLL_MODE
This mode uses the very simple method of redrawing the entire contents of the scrollpane each time it is scrolled. This was the default behavior in Swing 1.0 and Swing 1.1. Either of the other two options will provide better performance in most cases.

Since:
1.3
See Also:
setScrollMode(int) sample code for javax.swing.JViewport.setScrollMode(int) definition code for javax.swing.JViewport.setScrollMode(int) , Constant Field Values
Constructor Detail

JViewport sample code for javax.swing.JViewport() definition code for javax.swing.JViewport()

public JViewport()
Creates a JViewport.

Method Detail

getUI sample code for javax.swing.JViewport.getUI() definition code for javax.swing.JViewport.getUI()

public ViewportUI sample code for javax.swing.plaf.ViewportUI definition code for javax.swing.plaf.ViewportUI  getUI()
Returns the L&F object that renders this component.

Returns:
a ViewportUI object

setUI sample code for javax.swing.JViewport.setUI(javax.swing.plaf.ViewportUI) definition code for javax.swing.JViewport.setUI(javax.swing.plaf.ViewportUI)

public void setUI(ViewportUI sample code for javax.swing.plaf.ViewportUI definition code for javax.swing.plaf.ViewportUI  ui)
Sets the L&F object that renders this component.

Parameters:
ui - the ViewportUI L&F object
See Also:
UIDefaults.getUI(javax.swing.JComponent) sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent)

updateUI sample code for javax.swing.JViewport.updateUI() definition code for javax.swing.JViewport.updateUI()

public void updateUI()
Resets the UI property to a value from the current look and feel.

Overrides:
updateUI sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
See Also:
JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

getUIClassID sample code for javax.swing.JViewport.getUIClassID() definition code for javax.swing.JViewport.getUIClassID()

public String sample code for java.lang.String definition code for java.lang.String  getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component.

Overrides:
getUIClassID sample code for javax.swing.JComponent.getUIClassID() definition code for javax.swing.JComponent.getUIClassID() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
the string "ViewportUI"
See Also:
JComponent.getUIClassID() sample code for javax.swing.JComponent.getUIClassID() definition code for javax.swing.JComponent.getUIClassID() , UIDefaults.getUI(javax.swing.JComponent) sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent)

addImpl sample code for javax.swing.JViewport.addImpl(java.awt.Component, java.lang.Object, int) definition code for javax.swing.JViewport.addImpl(java.awt.Component, java.lang.Object, int)

protected void addImpl(Component sample code for java.awt.Component definition code for java.awt.Component  child,
                       Object sample code for java.lang.Object definition code for java.lang.Object  constraints,
                       int index)
Sets the JViewport's one lightweight child, which can be null. (Since there is only one child which occupies the entire viewport, the constraints and index arguments are ignored.)

Overrides:
addImpl sample code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) definition code for java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) in class Container sample code for java.awt.Container definition code for java.awt.Container
Parameters:
child - the lightweight child of the viewport
constraints - the constraints to be respected
index - the index
See Also:
setView(java.awt.Component) sample code for javax.swing.JViewport.setView(java.awt.Component) definition code for javax.swing.JViewport.setView(java.awt.Component)

remove sample code for javax.swing.JViewport.remove(java.awt.Component) definition code for javax.swing.JViewport.remove(java.awt.Component)

public void remove(Component sample code for java.awt.Component definition code for java.awt.Component  child)
Removes the Viewports one lightweight child.

Overrides:
remove sample code for java.awt.Container.remove(java.awt.Component) definition code for java.awt.Container.remove(java.awt.Component) in class Container sample code for java.awt.Container definition code for java.awt.Container
Parameters:
child - the component to be removed
See Also:
setView(java.awt.Component) sample code for javax.swing.JViewport.setView(java.awt.Component) definition code for javax.swing.JViewport.setView(java.awt.Component)

scrollRectToVisible sample code for javax.swing.JViewport.scrollRectToVisible(java.awt.Rectangle) definition code for javax.swing.JViewport.scrollRectToVisible(java.awt.Rectangle)

public void scrollRectToVisible(Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  contentRect)
Scrolls the view so that Rectangle within the view becomes visible.

This attempts to validate the view before scrolling if the view is currently not valid - isValid returns false. To avoid excessive validation when the containment hierarchy is being created this will not validate if one of the ancestors does not have a peer, or there is no validate root ancestor, or one of the ancestors is not a Window or Applet.

Note that this method will not scroll outside of the valid viewport; for example, if contentRect is larger than the viewport, scrolling will be confined to the viewport's bounds.

Overrides:
scrollRectToVisible sample code for javax.swing.JComponent.scrollRectToVisible(java.awt.Rectangle) definition code for javax.swing.JComponent.scrollRectToVisible(java.awt.Rectangle) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
contentRect - the Rectangle to display
See Also:
JComponent.isValidateRoot() sample code for javax.swing.JComponent.isValidateRoot() definition code for javax.swing.JComponent.isValidateRoot() , Component.isValid() sample code for java.awt.Component.isValid() definition code for java.awt.Component.isValid() , Component.getPeer() sample code for java.awt.Component.getPeer() definition code for java.awt.Component.getPeer()

setBorder sample code for javax.swing.JViewport.setBorder(javax.swing.border.Border) definition code for javax.swing.JViewport.setBorder(javax.swing.border.Border)

public final void setBorder(Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  border)
The viewport "scrolls" its child (called the "view") by the normal parent/child clipping (typically the view is moved in the opposite direction of the scroll). A non-null border, or non-zero insets, isn't supported, to prevent the geometry of this component from becoming complex enough to inhibit subclassing. To create a JViewport with a border, add it to a JPanel that has a border.

Note: If border is non-null, this method will throw an exception as borders are not supported on a JViewPort.

Overrides:
setBorder sample code for javax.swing.JComponent.setBorder(javax.swing.border.Border) definition code for javax.swing.JComponent.setBorder(javax.swing.border.Border) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
border - the Border to set
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - this method is not implemented
See Also:
Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border , CompoundBorder sample code for javax.swing.border.CompoundBorder definition code for javax.swing.border.CompoundBorder

getInsets sample code for javax.swing.JViewport.getInsets() definition code for javax.swing.JViewport.getInsets()

public final Insets sample code for java.awt.Insets definition code for java.awt.Insets  getInsets()
Returns the insets (border) dimensions as (0,0,0,0), since borders are not supported on a JViewport.

Overrides:
getInsets sample code for javax.swing.JComponent.getInsets() definition code for javax.swing.JComponent.getInsets() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
a Rectange of zero dimension and zero origin
See Also:
setBorder(javax.swing.border.Border) sample code for javax.swing.JViewport.setBorder(javax.swing.border.Border) definition code for javax.swing.JViewport.setBorder(javax.swing.border.Border)

getInsets sample code for javax.swing.JViewport.getInsets(java.awt.Insets) definition code for javax.swing.JViewport.getInsets(java.awt.Insets)

public final Insets sample code for java.awt.Insets definition code for java.awt.Insets  getInsets(Insets sample code for java.awt.Insets definition code for java.awt.Insets  insets)
Returns an Insets object containing this JViewports inset values. The passed-in Insets object will be reinitialized, and all existing values within this object are overwritten.

Overrides:
getInsets sample code for javax.swing.JComponent.getInsets(java.awt.Insets) definition code for javax.swing.JComponent.getInsets(java.awt.Insets) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
insets - the Insets object which can be reused
Returns:
this viewports inset values
See Also:
getInsets() sample code for javax.swing.JViewport.getInsets() definition code for javax.swing.JViewport.getInsets()

isOptimizedDrawingEnabled sample code for javax.swing.JViewport.isOptimizedDrawingEnabled() definition code for javax.swing.JViewport.isOptimizedDrawingEnabled()

public boolean isOptimizedDrawingEnabled()
The JViewport overrides the default implementation of this method (in JComponent) to return false. This ensures that the drawing machinery will call the Viewport's paint implementation rather than messaging the JViewport's children directly.

Overrides:
isOptimizedDrawingEnabled sample code for javax.swing.JComponent.isOptimizedDrawingEnabled() definition code for javax.swing.JComponent.isOptimizedDrawingEnabled() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
false

paint sample code for javax.swing.JViewport.paint(java.awt.Graphics) definition code for javax.swing.JViewport.paint(java.awt.Graphics)

public void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g)
Depending on whether the backingStore is enabled, either paint the image through the backing store or paint just the recently exposed part, using the backing store to "blit" the remainder.
The term "blit" is the pronounced version of the PDP-10 BLT (BLock Transfer) instruction, which copied a block of bits. (In case you were curious.)

Overrides:
paint sample code for javax.swing.JComponent.paint(java.awt.Graphics) definition code for javax.swing.JComponent.paint(java.awt.Graphics) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
g - the Graphics context within which to paint
See Also:
JComponent.paintComponent(java.awt.Graphics) sample code for javax.swing.JComponent.paintComponent(java.awt.Graphics) definition code for javax.swing.JComponent.paintComponent(java.awt.Graphics) , JComponent.paintBorder(java.awt.Graphics) sample code for javax.swing.JComponent.paintBorder(java.awt.Graphics) definition code for javax.swing.JComponent.paintBorder(java.awt.Graphics) , JComponent.paintChildren(java.awt.Graphics) sample code for javax.swing.JComponent.paintChildren(java.awt.Graphics) definition code for javax.swing.JComponent.paintChildren(java.awt.Graphics) , JComponent.getComponentGraphics(java.awt.Graphics) sample code for javax.swing.JComponent.getComponentGraphics(java.awt.Graphics) definition code for javax.swing.JComponent.getComponentGraphics(java.awt.Graphics) , JComponent.repaint(long, int, int, int, int) sample code for javax.swing.JComponent.repaint(long, int, int, int, int) definition code for javax.swing.JComponent.repaint(long, int, int, int, int)

reshape sample code for javax.swing.JViewport.reshape(int, int, int, int) definition code for javax.swing.JViewport.reshape(int, int, int, int)

public void reshape(int x,
                    int y,
                    int w,
                    int h)
Sets the bounds of this viewport. If the viewport's width or height has changed, fire a StateChanged event.

Overrides:
reshape sample code for javax.swing.JComponent.reshape(int, int, int, int) definition code for javax.swing.JComponent.reshape(int, int, int, int) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
x - left edge of the origin
y - top edge of the origin
w - width in pixels
h - height in pixels
See Also:
JComponent.reshape(int, int, int, int) sample code for javax.swing.JComponent.reshape(int, int, int, int) definition code for javax.swing.JComponent.reshape(int, int, int, int)

setScrollMode sample code for javax.swing.JViewport.setScrollMode(int) definition code for javax.swing.JViewport.setScrollMode(int)

public void setScrollMode(int mode)
Used to control the method of scrolling the viewport contents. You may want to change this mode to get maximum performance for your use case.

Parameters:
mode - one of the following values:
  • JViewport.BLIT_SCROLL_MODE
  • JViewport.BACKINGSTORE_SCROLL_MODE
  • JViewport.SIMPLE_SCROLL_MODE
Since:
1.3
See Also:
BLIT_SCROLL_MODE sample code for javax.swing.JViewport.BLIT_SCROLL_MODE definition code for javax.swing.JViewport.BLIT_SCROLL_MODE , BACKINGSTORE_SCROLL_MODE sample code for javax.swing.JViewport.BACKINGSTORE_SCROLL_MODE definition code for javax.swing.JViewport.BACKINGSTORE_SCROLL_MODE , SIMPLE_SCROLL_MODE sample code for javax.swing.JViewport.SIMPLE_SCROLL_MODE definition code for javax.swing.JViewport.SIMPLE_SCROLL_MODE

getScrollMode sample code for javax.swing.JViewport.getScrollMode() definition code for javax.swing.JViewport.getScrollMode()

public int getScrollMode()
Returns the current scrolling mode.

Returns:
the scrollMode property
Since:
1.3
See Also:
setScrollMode(int) sample code for javax.swing.JViewport.setScrollMode(int) definition code for javax.swing.JViewport.setScrollMode(int)

isBackingStoreEnabled sample code for javax.swing.JViewport.isBackingStoreEnabled() definition code for javax.swing.JViewport.isBackingStoreEnabled()

@Deprecated
public boolean isBackingStoreEnabled()
Deprecated. As of Java 2 platform v1.3, replaced by getScrollMode().

Returns true if this viewport is maintaining an offscreen image of its contents.

Returns:
true if scrollMode is BACKINGSTORE_SCROLL_MODE

setBackingStoreEnabled sample code for javax.swing.JViewport.setBackingStoreEnabled(boolean) definition code for javax.swing.JViewport.setBackingStoreEnabled(boolean)

@Deprecated
public void setBackingStoreEnabled(boolean enabled)
Deprecated. As of Java 2 platform v1.3, replaced by setScrollMode().

If true if this viewport will maintain an offscreen image of its contents. The image is used to reduce the cost of small one dimensional changes to the viewPosition. Rather than repainting the entire viewport we use Graphics.copyArea to effect some of the scroll.

Parameters:
enabled - if true, maintain an offscreen backing store

getView sample code for javax.swing.JViewport.getView() definition code for javax.swing.JViewport.getView()

public Component sample code for java.awt.Component definition code for java.awt.Component  getView()
Returns the JViewport's one child or null.

Returns:
the viewports child, or null if none exists
See Also:
setView(java.awt.Component) sample code for javax.swing.JViewport.setView(java.awt.Component) definition code for javax.swing.JViewport.setView(java.awt.Component)

setView sample code for javax.swing.JViewport.setView(java.awt.Component) definition code for javax.swing.JViewport.setView(java.awt.Component)

public void setView(Component sample code for java.awt.Component definition code for java.awt.Component  view)
Sets the JViewport's one lightweight child (view), which can be null.

Parameters:
view - the viewport's new lightweight child
See Also:
getView() sample code for javax.swing.JViewport.getView() definition code for javax.swing.JViewport.getView()

getViewSize sample code for javax.swing.JViewport.getViewSize() definition code for javax.swing.JViewport.getViewSize()

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getViewSize()
If the view's size hasn't been explicitly set, return the preferred size, otherwise return the view's current size. If there is no view, return 0,0.

Returns:
a Dimension object specifying the size of the view

setViewSize sample code for javax.swing.JViewport.setViewSize(java.awt.Dimension) definition code for javax.swing.JViewport.setViewSize(java.awt.Dimension)

public void setViewSize(Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  newSize)
Sets the size of the view. A state changed event will be fired.

Parameters:
newSize - a Dimension object specifying the new size of the view

getViewPosition sample code for javax.swing.JViewport.getViewPosition() definition code for javax.swing.JViewport.getViewPosition()

public Point sample code for java.awt.Point definition code for java.awt.Point  getViewPosition()
Returns the view coordinates that appear in the upper left hand corner of the viewport, or 0,0 if there's no view.

Returns:
a Point object giving the upper left coordinates

setViewPosition sample code for javax.swing.JViewport.setViewPosition(java.awt.Point) definition code for javax.swing.JViewport.setViewPosition(java.awt.Point)

public void setViewPosition(Point sample code for java.awt.Point definition code for java.awt.Point  p)
Sets the view coordinates that appear in the upper left hand corner of the viewport, does nothing if there's no view.

Parameters:
p - a Point object giving the upper left coordinates

getViewRect sample code for javax.swing.JViewport.getViewRect() definition code for javax.swing.JViewport.getViewRect()

public Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  getViewRect()
Returns a rectangle whose origin is getViewPosition and size is getExtentSize. This is the visible part of the view, in view coordinates.

Returns:
a Rectangle giving the visible part of the view using view coordinates.

computeBlit sample code for javax.swing.JViewport.computeBlit(int, int, java.awt.Point, java.awt.Point, java.awt.Dimension, java.awt.Rectangle) definition code for javax.swing.JViewport.computeBlit(int, int, java.awt.Point, java.awt.Point, java.awt.Dimension, java.awt.Rectangle)

protected boolean computeBlit(int dx,
                              int dy,
                              Point sample code for java.awt.Point definition code for java.awt.Point  blitFrom,
                              Point sample code for java.awt.Point definition code for java.awt.Point  blitTo,
                              Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  blitSize,
                              Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle  blitPaint)
Computes the parameters for a blit where the backing store image currently contains oldLoc in the upper left hand corner and we're scrolling to newLoc. The parameters are modified to return the values required for the blit.

Parameters:
dx - the horizontal delta
dy - the vertical delta
blitFrom - the Point we're blitting from
blitTo - the Point we're blitting to
blitSize - the Dimension of the area to blit
blitPaint - the area to blit
Returns:
true if the parameters are modified and we're ready to blit; false otherwise

getExtentSize sample code for javax.swing.JViewport.getExtentSize() definition code for javax.swing.JViewport.getExtentSize()

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getExtentSize()
Returns the size of the visible part of the view in view coordinates.

Returns:
a Dimension object giving the size of the view

toViewCoordinates sample code for javax.swing.JViewport.toViewCoordinates(java.awt.Dimension) definition code for javax.swing.JViewport.toViewCoordinates(java.awt.Dimension)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  toViewCoordinates(Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  size)
Converts a size in pixel coordinates to view coordinates. Subclasses of viewport that support "logical coordinates" will override this method.

Parameters:
size - a Dimension object using pixel coordinates
Returns:
a Dimension object converted to view coordinates

toViewCoordinates sample code for javax.swing.JViewport.toViewCoordinates(java.awt.Point) definition code for javax.swing.JViewport.toViewCoordinates(java.awt.Point)

public Point sample code for java.awt.Point definition code for java.awt.Point  toViewCoordinates(Point sample code for java.awt.Point definition code for java.awt.Point  p)
Converts a point in pixel coordinates to view coordinates. Subclasses of viewport that support "logical coordinates" will override this method.

Parameters:
p - a Point object using pixel coordinates
Returns:
a Point object converted to view coordinates

setExtentSize sample code for javax.swing.JViewport.setExtentSize(java.awt.Dimension) definition code for javax.swing.JViewport.setExtentSize(java.awt.Dimension)

public void setExtentSize(Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  newExtent)
Sets the size of the visible part of the view using view coordinates.

Parameters:
newExtent - a Dimension object specifying the size of the view

createViewListener sample code for javax.swing.JViewport.createViewListener() definition code for javax.swing.JViewport.createViewListener()

protected JViewport.ViewListener sample code for javax.swing.JViewport.ViewListener definition code for javax.swing.JViewport.ViewListener  createViewListener()
Creates a listener for the view.

Returns:
a ViewListener

createLayoutManager sample code for javax.swing.JViewport.createLayoutManager() definition code for javax.swing.JViewport.createLayoutManager()

protected LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager  createLayoutManager()
Subclassers can override this to install a different layout manager (or null) in the constructor. Returns the LayoutManager to install on the JViewport.

Returns:
a LayoutManager

addChangeListener sample code for javax.swing.JViewport.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.JViewport.addChangeListener(javax.swing.event.ChangeListener)

public void addChangeListener(ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener  l)
Adds a ChangeListener to the list that is notified each time the view's size, position, or the viewport's extent size has changed.

Parameters:
l - the ChangeListener to add
See Also:
removeChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.JViewport.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.JViewport.removeChangeListener(javax.swing.event.ChangeListener) , setViewPosition(java.awt.Point) sample code for javax.swing.JViewport.setViewPosition(java.awt.Point) definition code for javax.swing.JViewport.setViewPosition(java.awt.Point) , setViewSize(java.awt.Dimension) sample code for javax.swing.JViewport.setViewSize(java.awt.Dimension) definition code for javax.swing.JViewport.setViewSize(java.awt.Dimension) , setExtentSize(java.awt.Dimension) sample code for javax.swing.JViewport.setExtentSize(java.awt.Dimension) definition code for javax.swing.JViewport.setExtentSize(java.awt.Dimension)

removeChangeListener sample code for javax.swing.JViewport.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.JViewport.removeChangeListener(javax.swing.event.ChangeListener)

public void removeChangeListener(ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener  l)
Removes a ChangeListener from the list that's notified each time the views size, position, or the viewports extent size has changed.

Parameters:
l - the ChangeListener to remove
See Also:
addChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.JViewport.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.JViewport.addChangeListener(javax.swing.event.ChangeListener)

getChangeListeners sample code for javax.swing.JViewport.getChangeListeners() definition code for javax.swing.JViewport.getChangeListeners()

public ChangeListener sample code for javax.swing.event.ChangeListener definition code for javax.swing.event.ChangeListener [] getChangeListeners()
Returns an array of all the ChangeListeners added to this JViewport with addChangeListener().

Returns:
all of the ChangeListeners added or an empty array if no listeners have been added
Since:
1.4

fireStateChanged sample code for javax.swing.JViewport.fireStateChanged() definition code for javax.swing.JViewport.fireStateChanged()

protected void fireStateChanged()
Notifies all ChangeListeners when the views size, position, or the viewports extent size has changed.

See Also:
addChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.JViewport.addChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.JViewport.addChangeListener(javax.swing.event.ChangeListener) , removeChangeListener(javax.swing.event.ChangeListener) sample code for javax.swing.JViewport.removeChangeListener(javax.swing.event.ChangeListener) definition code for javax.swing.JViewport.removeChangeListener(javax.swing.event.ChangeListener) , EventListenerList sample code for javax.swing.event.EventListenerList definition code for javax.swing.event.EventListenerList

repaint sample code for javax.swing.JViewport.repaint(long, int, int, int, int) definition code for javax.swing.JViewport.repaint(long, int, int, int, int)

public void repaint(long tm,
                    int x,
                    int y,
                    int w,
                    int h)
Always repaint in the parents coordinate system to make sure only one paint is performed by the RepaintManager.

Overrides:
repaint sample code for javax.swing.JComponent.repaint(long, int, int, int, int) definition code for javax.swing.JComponent.repaint(long, int, int, int, int) in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Parameters:
tm - maximum time in milliseconds before update
x - the x coordinate (pixels over from left)
y - the y coordinate (pixels down from top)
w - the width
h - the height
See Also:
Component.update(java.awt.Graphics) sample code for java.awt.Component.update(java.awt.Graphics) definition code for java.awt.Component.update(java.awt.Graphics)

paramString sample code for javax.swing.JViewport.paramString() definition code for javax.swing.JViewport.paramString()

protected String sample code for java.lang.String definition code for java.lang.String  paramString()
Returns a string representation of this JViewport. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
paramString sample code for javax.swing.JComponent.paramString() definition code for javax.swing.JComponent.paramString() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
a string representation of this JViewport

firePropertyChange sample code for javax.swing.JViewport.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for javax.swing.JViewport.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

protected void firePropertyChange(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                  Object sample code for java.lang.Object definition code for java.lang.Object  oldValue,
                                  Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
Notifies listeners of a property change. This is subclassed to update the windowBlit property. (The putClientProperty property is final).

Overrides:
firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) in class Component sample code for java.awt.Component definition code for java.awt.Component
Parameters:
propertyName - a string containing the property name
oldValue - the old value of the property
newValue - the new value of the property

getAccessibleContext sample code for javax.swing.JViewport.getAccessibleContext() definition code for javax.swing.JViewport.getAccessibleContext()

public AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext  getAccessibleContext()
Gets the AccessibleContext associated with this JViewport. For viewports, the AccessibleContext takes the form of an AccessibleJViewport. A new AccessibleJViewport instance is created if necessary.

Specified by:
getAccessibleContext sample code for javax.accessibility.Accessible.getAccessibleContext() definition code for javax.accessibility.Accessible.getAccessibleContext() in interface Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible
Overrides:
getAccessibleContext sample code for javax.swing.JComponent.getAccessibleContext() definition code for javax.swing.JComponent.getAccessibleContext() in class JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
Returns:
an AccessibleJViewport that serves as the AccessibleContext of this JViewport