|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JScrollPane
|
+--edu.neu.ccs.gui.JPTScrollPane
Class JPTScrollPane extends JScrollPane
by adding methods that help control the preferred size of the
JViewport window.
| Field Summary |
| Fields inherited from class javax.swing.JScrollPane |
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
JPTScrollPane()
Creates an empty (no viewport view) JPTScrollPane
where both horizontal and vertical scrollbars appear when needed. |
|
JPTScrollPane(Component view)
Creates a JPTScrollPane that displays the contents
of the specified component,
where both horizontal and vertical scrollbars appear whenever the
component's contents are larger than the view. |
|
JPTScrollPane(Component view,
int vsbPolicy,
int hsbPolicy)
Creates a JPTScrollPane that displays the view component
in a viewport whose view position can be controlled with a pair of
scrollbars that are displayed in accordance with the scrollbar policies. |
|
JPTScrollPane(int vsbPolicy,
int hsbPolicy)
Creates an empty (no viewport view) JPTScrollPane whose
scrollbars are displayed in accordance with the scrollbar policies. |
|
| Method Summary | |
void |
boundViewportPreferredSize(Dimension d)
Bounds the preferred size of the scrollpane's viewport to be no larger than the given Dimension. |
void |
boundViewportPreferredSize(int width,
int height)
Bounds the preferred size of the scrollpane's viewport to be no larger than the given width and height. |
void |
setViewportPreferredSize(Dimension d)
Sets the preferred size of the scrollpane's viewport to the given Dimension. |
void |
setViewportPreferredSize(int width,
int height)
Sets the preferred size of the scrollpane's viewport to the given width and height. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JPTScrollPane()
Creates an empty (no viewport view) JPTScrollPane
where both horizontal and vertical scrollbars appear when needed.
JPTScrollPane(Component),
JPTScrollPane(int, int),
JPTScrollPane(Component, int, int)public JPTScrollPane(Component view)
Creates a JPTScrollPane that displays the contents
of the specified component,
where both horizontal and vertical scrollbars appear whenever the
component's contents are larger than the view.
view - the component to display in the scrollpane's viewportJPTScrollPane(),
JPTScrollPane(int, int),
JPTScrollPane(Component, int, int)
public JPTScrollPane(int vsbPolicy,
int hsbPolicy)
Creates an empty (no viewport view) JPTScrollPane whose
scrollbars are displayed in accordance with the scrollbar policies.
vsbPolicy - an integer that specifies the vertical scrollbar policyhsbPolicy - an integer that specifies the horizontal scrollbar policyJPTScrollPane(),
JPTScrollPane(Component),
JPTScrollPane(Component, int, int),
JScrollPane.setVerticalScrollBarPolicy(int),
JScrollPane.setHorizontalScrollBarPolicy(int)
public JPTScrollPane(Component view,
int vsbPolicy,
int hsbPolicy)
Creates a JPTScrollPane that displays the view component
in a viewport whose view position can be controlled with a pair of
scrollbars that are displayed in accordance with the scrollbar policies.
view - the component to display in the scrollpane's viewportvsbPolicy - an integer that specifies the vertical scrollbar policyhsbPolicy - an integer that specifies the horizontal scrollbar policyJPTScrollPane(),
JPTScrollPane(Component),
JPTScrollPane(int, int),
JScrollPane.setVerticalScrollBarPolicy(int),
JScrollPane.setHorizontalScrollBarPolicy(int)| Method Detail |
public void setViewportPreferredSize(Dimension d)
Sets the preferred size of the scrollpane's viewport to the given
Dimension.
Does nothing if:
nullDimension is nullIf the scrollpane's viewport is changed after this call then this call will have no further effect.
d - the desired preferred size of the scrollpane's viewportsetViewportPreferredSize(int, int)
public void setViewportPreferredSize(int width,
int height)
Sets the preferred size of the scrollpane's viewport to the given width and height.
Does nothing if:
nullIf the scrollpane's viewport is changed after this call then this call will have no further effect.
width - the desired preferred width of the scrollpane's viewportheight - the desired preferred height of the scrollpane's viewportsetViewportPreferredSize(Dimension)public void boundViewportPreferredSize(Dimension d)
Bounds the preferred size of the scrollpane's viewport to be no larger
than the given Dimension.
Operationally, this method calls setViewportPreferredSize
with a dimension that is the minimum of the given dimension and the
preferred size of the viewport's view.
Does nothing if:
nullnullDimension is nullIf the scrollpane's viewport is changed after this call then this call will have no further effect.
d - the desired preferred bound for the scrollpane's viewportsetViewportPreferredSize(Dimension),
boundViewportPreferredSize(int, int),
DimensionUtilities.min(Dimension, Dimension)
public void boundViewportPreferredSize(int width,
int height)
Bounds the preferred size of the scrollpane's viewport to be no larger than the given width and height.
Operationally, this method calls setViewportPreferredSize
with a dimension that is the minimum of the given dimension and the
preferred size of the viewport's view.
Does nothing if:
nullnullIf the scrollpane's viewport is changed after this call then this call will have no further effect.
setViewportPreferredSize(int, int),
boundViewportPreferredSize(Dimension),
DimensionUtilities.min(Dimension, Dimension)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||