|
JIDE 3.5.15 | ||||||||
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 com.jidesoft.swing.SimpleScrollPane
public class SimpleScrollPane
SimpleScrollPane
is a special scroll pane. There is no scroll bar. It just uses four scroll buttons to
do the scrolling.
Nested Class Summary | |
---|---|
class |
SimpleScrollPane.ScrollButton
The scroll button for SimpleScrollPane. |
Nested classes/interfaces inherited from class javax.swing.JScrollPane |
---|
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static String |
SCROLL_DOWN_BUTTON
|
static String |
SCROLL_LEFT_BUTTON
|
static String |
SCROLL_RIGHT_BUTTON
|
static String |
SCROLL_UP_BUTTON
|
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 | |
---|---|
SimpleScrollPane()
Creates an empty (no viewport view) JideScrollPane where both horizontal and vertical scrollbars
appear when needed. |
|
SimpleScrollPane(Component view)
Creates a JideScrollPane 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. |
|
SimpleScrollPane(Component view,
int vsbPolicy,
int hsbPolicy)
Creates a JideScrollPane that displays the view component in a viewport whose view position can be
controlled with a pair of scrollbars. |
|
SimpleScrollPane(int vsbPolicy,
int hsbPolicy)
Creates an empty (no viewport view) JideScrollPane with specified scrollbar policies. |
Method Summary | |
---|---|
protected AbstractButton |
createScrollButton(int type)
Creates the scroll button. |
int |
getHorizontalUnitIncrement()
|
int |
getRepeatDelay()
Gets the delay in ms between each unit scrolling. |
AbstractButton |
getScrollDownButton()
|
AbstractButton |
getScrollLeftButton()
|
AbstractButton |
getScrollRightButton()
|
AbstractButton |
getScrollUpButton()
|
int |
getVerticalUnitIncrement()
|
Rectangle |
getViewportBorderBounds()
|
boolean |
isScrollOnRollover()
Checks if the scroll button scrolls on rollover. |
void |
mouseWheelMoved(MouseWheelEvent e)
|
void |
scroll(JViewport viewport,
int type)
|
void |
setHorizontalUnitIncrement(int horizontalUnitIncrement)
|
void |
setRepeatDelay(int repeatDelay)
Sets the delay in ms between each unit scrolling. |
void |
setScrollDownButton(AbstractButton scrollDownButton)
|
void |
setScrollLeftButton(AbstractButton scrollLeftButton)
|
void |
setScrollOnRollover(boolean scrollOnRollover)
Sets scroll on rollover. |
void |
setScrollRightButton(AbstractButton scrollRightButton)
|
void |
setScrollUpButton(AbstractButton scrollUpButton)
|
void |
setVerticalUnitIncrement(int verticalUnitIncrement)
|
void |
setWheelScrollingEnabled(boolean handleWheel)
|
void |
stateChanged(ChangeEvent e)
|
protected void |
updateButtonState()
|
void |
updateUI()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SCROLL_UP_BUTTON
public static final String SCROLL_DOWN_BUTTON
public static final String SCROLL_LEFT_BUTTON
public static final String SCROLL_RIGHT_BUTTON
Constructor Detail |
---|
public SimpleScrollPane(Component view, int vsbPolicy, int hsbPolicy)
JideScrollPane
that displays the view component in a viewport whose view position can be
controlled with a pair of scrollbars. The scrollbar policies specify when the scrollbars are displayed, For
example, if vsbPolicy
is VERTICAL_SCROLLBAR_AS_NEEDED
then the vertical scrollbar only
appears if the view doesn't fit vertically. The available policy settings are listed at JScrollPane.setVerticalScrollBarPolicy(int)
and JScrollPane.setHorizontalScrollBarPolicy(int)
.
view
- the component to display in the scrollpanes viewportvsbPolicy
- an integer that specifies the vertical scrollbar policyhsbPolicy
- an integer that specifies the horizontal scrollbar policyJScrollPane.setViewportView(java.awt.Component)
public SimpleScrollPane(Component view)
JideScrollPane
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 viewportJScrollPane.setViewportView(java.awt.Component)
public SimpleScrollPane(int vsbPolicy, int hsbPolicy)
JideScrollPane
with specified scrollbar policies. The available
policy settings are listed at JScrollPane.setVerticalScrollBarPolicy(int)
and JScrollPane.setHorizontalScrollBarPolicy(int)
.
vsbPolicy
- an integer that specifies the vertical scrollbar policyhsbPolicy
- an integer that specifies the horizontal scrollbar policyJScrollPane.setViewportView(java.awt.Component)
public SimpleScrollPane()
JideScrollPane
where both horizontal and vertical scrollbars
appear when needed.
Method Detail |
---|
public void updateUI()
updateUI
in class JScrollPane
public void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
public AbstractButton getScrollUpButton()
public void setScrollUpButton(AbstractButton scrollUpButton)
public AbstractButton getScrollDownButton()
public void setScrollDownButton(AbstractButton scrollDownButton)
public AbstractButton getScrollLeftButton()
public void setScrollLeftButton(AbstractButton scrollLeftButton)
public AbstractButton getScrollRightButton()
public void setScrollRightButton(AbstractButton scrollRightButton)
protected AbstractButton createScrollButton(int type)
SimpleScrollPane pane = new SimpleScrollPane(){
protected AbstractButton createScrollButton(int type) {
AbstractButton scrollButton = super.createScrollButton(type);
scrollButton.setPreferredSize(new Dimension(20, 20));
return scrollButton;
}
};
type
- the type of the scroll button. It could be SwingConstants.NORTH
, SwingConstants.SOUTH
, SwingConstants.WEST
or SwingConstants.EAST
.
protected void updateButtonState()
public void scroll(JViewport viewport, int type)
public Rectangle getViewportBorderBounds()
getViewportBorderBounds
in class JScrollPane
public int getHorizontalUnitIncrement()
public void setHorizontalUnitIncrement(int horizontalUnitIncrement)
public int getVerticalUnitIncrement()
public void setVerticalUnitIncrement(int verticalUnitIncrement)
public boolean isScrollOnRollover()
public void setScrollOnRollover(boolean scrollOnRollover)
scrollOnRollover
- true or false.public int getRepeatDelay()
public void setRepeatDelay(int repeatDelay)
repeatDelay
- the new repeat delay.public void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved
in interface MouseWheelListener
public void setWheelScrollingEnabled(boolean handleWheel)
setWheelScrollingEnabled
in class JScrollPane
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |