|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.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.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JScrollPane |
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| 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.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface edu.neu.ccs.util.JPTConstants |
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT, VALUE |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| 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. |
JPTFrame |
frame()
Frame this panel in a JPTFrame and open the frame; return the frame constructed. |
JPTFrame |
frame(int location)
Frame this panel in a JPTFrame and open the frame; use the given location which should be either CENTER or one of the standard constants
for one of the eight compass directions;
return the frame constructed. |
JPTFrame |
frame(String title)
Frame this panel in a JPTFrame and open the frame; use the given title for the frame; return the frame constructed. |
JPTFrame |
frame(String title,
Insets insets)
Frame this panel in a JPTFrame and open the frame; use the given title for the frame; use the given insets to inset the frame in the screen; return the frame constructed. |
JPTFrame |
frame(String title,
int location)
Frame this panel in a JPTFrame and open the frame; use the given title for the frame; use the given location which should be either CENTER or one of the standard constants
for one of the eight compass directions;
return the frame constructed. |
JPTFrame |
frame(String title,
int location,
Insets insets)
Frame this panel in a JPTFrame and open the frame; use the given title for the frame; use the given location which should be either CENTER or one of the standard constants
for one of the eight compass directions;
use the given insets to inset the frame in the screen;
return the frame constructed. |
GeneralDialog |
generalDialog(Object[][] actionData)
Place this panel in a modal general dialog and open the dialog; use the action data to define the dialog buttons; return the dialog constructed. |
GeneralDialog |
generalDialog(Object[][] actionData,
Object defaultAction)
Place this panel in a modal general dialog and open the dialog; use the action data to define the dialog buttons; use the default action object to define the default button; return the dialog constructed. |
GeneralDialog |
generalDialog(String title,
Object[][] actionData)
Place this panel in a modal general dialog and open the dialog; use the given title for the dialog; use the action data to define the dialog buttons; return the dialog constructed. |
GeneralDialog |
generalDialog(String title,
Object[][] actionData,
Object defaultAction)
Place this panel in a modal general dialog and open the dialog; use the given title for the dialog; use the action data to define the dialog buttons; use the default action object to define the default button; return the dialog constructed. |
GeneralDialog |
OKCancelDialog()
Place this panel in a modal OK-Cancel dialog and open the dialog; return the dialog constructed. |
GeneralDialog |
OKCancelDialog(String title)
Place this panel in a modal OK-Cancel dialog and open the dialog; use the given title for the dialog; return the dialog constructed. |
GeneralDialog |
OKDialog()
Place this panel in a modal OK dialog and open the dialog; return the dialog constructed. |
GeneralDialog |
OKDialog(String title)
Place this panel in a modal OK dialog and open the dialog; use the given title for the dialog; return the dialog constructed. |
void |
refreshComponent()
Refreshes the component by repacking the parent window. |
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. |
GeneralDialog |
YesNoCancelDialog()
Place this panel in a modal Yes-No-Cancel dialog and open the dialog; return the dialog constructed. |
GeneralDialog |
YesNoCancelDialog(String title)
Place this panel in a modal Yes-No-Cancel dialog and open the dialog; use the given title for the dialog; return the dialog constructed. |
| 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.
width - the desired preferred width for the scrollpane's viewportheight - the desired preferred height for the scrollpane's viewportsetViewportPreferredSize(int, int),
boundViewportPreferredSize(Dimension),
DimensionUtilities.min(Dimension, Dimension)public JPTFrame frame()
Frame this panel in a JPTFrame and open the frame; return the frame constructed.
public JPTFrame frame(int location)
Frame this panel in a JPTFrame
and open the frame;
use the given location which should be either
CENTER or one of the standard constants
for one of the eight compass directions;
return the frame constructed.
location - the constant representing the frame location
public JPTFrame frame(String title)
Frame this panel in a JPTFrame and open the frame; use the given title for the frame; return the frame constructed.
title - the title for the frame
public JPTFrame frame(String title,
int location)
Frame this panel in a JPTFrame
and open the frame;
use the given title for the frame;
use the given location which should be either
CENTER or one of the standard constants
for one of the eight compass directions;
return the frame constructed.
title - the title for the framelocation - the constant representing the frame location
public JPTFrame frame(String title,
Insets insets)
Frame this panel in a JPTFrame and open the frame; use the given title for the frame; use the given insets to inset the frame in the screen; return the frame constructed.
title - the title for the frameinsets - the screen insets to use to adjust the location
public JPTFrame frame(String title,
int location,
Insets insets)
Frame this panel in a JPTFrame
and open the frame;
use the given title for the frame;
use the given location which should be either
CENTER or one of the standard constants
for one of the eight compass directions;
use the given insets to inset the frame in the screen;
return the frame constructed.
title - the title for the framelocation - the constant representing the frame locationinsets - the screen insets to use to adjust the location
public GeneralDialog OKDialog()
Place this panel in a modal OK dialog and open the dialog; return the dialog constructed.
public GeneralDialog OKDialog(String title)
Place this panel in a modal OK dialog and open the dialog; use the given title for the dialog; return the dialog constructed.
title - the title for the dialog
public GeneralDialog OKCancelDialog()
Place this panel in a modal OK-Cancel dialog and open the dialog; return the dialog constructed.
public GeneralDialog OKCancelDialog(String title)
Place this panel in a modal OK-Cancel dialog and open the dialog; use the given title for the dialog; return the dialog constructed.
title - the title for the dialog
public GeneralDialog YesNoCancelDialog()
Place this panel in a modal Yes-No-Cancel dialog and open the dialog; return the dialog constructed.
public GeneralDialog YesNoCancelDialog(String title)
Place this panel in a modal Yes-No-Cancel dialog and open the dialog; use the given title for the dialog; return the dialog constructed.
title - the title for the dialog
public GeneralDialog generalDialog(Object[][] actionData)
Place this panel in a modal general dialog and open the dialog; use the action data to define the dialog buttons; return the dialog constructed.
The parameter actionData
is an Object[][] array that specifies
each dialog Action in one of the following ways:
ActionIf the option parameter is specified, it must be one of the following values that will determine what is done to the dialog when the action is finished:
- DialogAction.KEEP_OPEN
- DialogAction.AUTO_CLOSE
- DialogAction.SET_CANCEL
If the option parameter is not specified, it is taken to be
DialogAction.AUTO_CLOSE.
actionData - the action data
public GeneralDialog generalDialog(Object[][] actionData,
Object defaultAction)
Place this panel in a modal general dialog and open the dialog; use the action data to define the dialog buttons; use the default action object to define the default button; return the dialog constructed.
The parameter actionData
is an Object[][] array that specifies
each dialog Action in one of the following ways:
ActionIf the option parameter is specified, it must be one of the following values that will determine what is done to the dialog when the action is finished:
- DialogAction.KEEP_OPEN
- DialogAction.AUTO_CLOSE
- DialogAction.SET_CANCEL
If the option parameter is not specified, it is taken to be
DialogAction.AUTO_CLOSE.
The Object supplied for the default action must either be
an Action or a name that is supplied in the action data. If
the parameter is null, no default action is set.
actionData - the action datadefaultAction - the default action
public GeneralDialog generalDialog(String title,
Object[][] actionData)
Place this panel in a modal general dialog and open the dialog; use the given title for the dialog; use the action data to define the dialog buttons; return the dialog constructed.
The parameter actionData
is an Object[][] array that specifies
each dialog Action in one of the following ways:
ActionIf the option parameter is specified, it must be one of the following values that will determine what is done to the dialog when the action is finished:
- DialogAction.KEEP_OPEN
- DialogAction.AUTO_CLOSE
- DialogAction.SET_CANCEL
If the option parameter is not specified, it is taken to be
DialogAction.AUTO_CLOSE.
title - the title for the dialogactionData - the action data
public GeneralDialog generalDialog(String title,
Object[][] actionData,
Object defaultAction)
Place this panel in a modal general dialog and open the dialog; use the given title for the dialog; use the action data to define the dialog buttons; use the default action object to define the default button; return the dialog constructed.
The parameter actionData
is an Object[][] array that specifies
each dialog Action in one of the following ways:
ActionIf the option parameter is specified, it must be one of the following values that will determine what is done to the dialog when the action is finished:
- DialogAction.KEEP_OPEN
- DialogAction.AUTO_CLOSE
- DialogAction.SET_CANCEL
If the option parameter is not specified, it is taken to be
DialogAction.AUTO_CLOSE.
The Object supplied for the default action must either be
an Action or a name that is supplied in the action data. If
the parameter is null, no default action is set.
title - the title for the dialogactionData - the action datadefaultAction - the default action
public void refreshComponent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||