Java Doc for Scrollable.java in  » 6.0-JDK-Core » swing » javax » swing » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » swing » javax.swing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.Scrollable

All known Subclasses:   javax.swing.JTree,  javax.swing.JList,  javax.swing.JTable,  javax.swing.text.JTextComponent,
Scrollable
public interface Scrollable (Code)
An interface that provides information to a scrolling container like JScrollPane. A complex component that's likely to be used as a viewing a JScrollPane viewport (or other scrolling container) should implement this interface.
See Also:   JViewport
See Also:   JScrollPane
See Also:   JScrollBar
version:
   1.19 05/05/07
author:
   Hans Muller




Method Summary
 DimensiongetPreferredScrollableViewportSize()
     Returns the preferred size of the viewport for a view component.
 intgetScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
     Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.
 booleangetScrollableTracksViewportHeight()
     Return true if a viewport should always force the height of this Scrollable to match the height of the viewport.
 booleangetScrollableTracksViewportWidth()
     Return true if a viewport should always force the width of this Scrollable to match the width of the viewport.
 intgetScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)
     Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation.



Method Detail
getPreferredScrollableViewportSize
Dimension getPreferredScrollableViewportSize()(Code)
Returns the preferred size of the viewport for a view component. For example, the preferred size of a JList component is the size required to accommodate all of the cells in its list. However, the value of preferredScrollableViewportSize is the size required for JList.getVisibleRowCount rows. A component without any properties that would affect the viewport size should just return getPreferredSize here. the preferredSize of a JViewport whose viewis this Scrollable
See Also:   JViewport.getPreferredSize



getScrollableBlockIncrement
int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)(Code)
Components that display logical rows or columns should compute the scroll increment that will completely expose one block of rows or columns, depending on the value of orientation.

Scrolling containers, like JScrollPane, will use this method each time the user requests a block scroll.
Parameters:
  visibleRect - The view area visible within the viewport
Parameters:
  orientation - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.
Parameters:
  direction - Less than zero to scroll up/left, greater than zero for down/right. The "block" increment for scrolling in the specified direction.This value should always be positive.
See Also:   JScrollBar.setBlockIncrement




getScrollableTracksViewportHeight
boolean getScrollableTracksViewportHeight()(Code)
Return true if a viewport should always force the height of this Scrollable to match the height of the viewport. For example a columnar text view that flowed text in left to right columns could effectively disable vertical scrolling by returning true here.

Scrolling containers, like JViewport, will use this method each time they are validated. True if a viewport should force the Scrollables height to match its own.




getScrollableTracksViewportWidth
boolean getScrollableTracksViewportWidth()(Code)
Return true if a viewport should always force the width of this Scrollable to match the width of the viewport. For example a normal text view that supported line wrapping would return true here, since it would be undesirable for wrapped lines to disappear beyond the right edge of the viewport. Note that returning true for a Scrollable whose ancestor is a JScrollPane effectively disables horizontal scrolling.

Scrolling containers, like JViewport, will use this method each time they are validated. True if a viewport should force the Scrollables width to match its own.




getScrollableUnitIncrement
int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)(Code)
Components that display logical rows or columns should compute the scroll increment that will completely expose one new row or column, depending on the value of orientation. Ideally, components should handle a partially exposed row or column by returning the distance required to completely expose the item.

Scrolling containers, like JScrollPane, will use this method each time the user requests a unit scroll.
Parameters:
  visibleRect - The view area visible within the viewport
Parameters:
  orientation - Either SwingConstants.VERTICAL or SwingConstants.HORIZONTAL.
Parameters:
  direction - Less than zero to scroll up/left, greater than zero for down/right. The "unit" increment for scrolling in the specified direction.This value should always be positive.
See Also:   JScrollBar.setUnitIncrement




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.