@BeanSettings(acceptChildren=true, useXdevCustomizer=true) public class XdevScrollPane extends JScrollPane implements Persistable
JScrollPane
.JScrollPane
,
Serialized FormJScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static int |
CONTENT_PANE |
protected boolean |
rootPaneCheckingEnabled |
static int |
VIEWPORT |
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
VALUE_SEPARATOR
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
XdevScrollPane()
Creates an new
XdevScrollPane . |
XdevScrollPane(int vsbPolicy,
int hsbPolicy)
Creates an new
XdevScrollPane with specified scrollbar
policies. |
XdevScrollPane(LayoutManager layout)
Creates an new
XdevScrollPane with specified
LayoutManager . |
XdevScrollPane(LayoutManager layout,
int vsbPolicy,
int hsbPolicy)
Creates an new
XdevScrollPane with specified
LayoutManager and scrollbar policies. |
Modifier and Type | Method and Description |
---|---|
protected void |
addImpl(Component comp,
Object constraints,
int index) |
int |
getBackgroundType()
Returns the background type as
int for this
XdevScrollPane . |
Container |
getContentPane()
Returns the
contentPane for this XdevScrollPane . |
int |
getDesignTarget() |
int |
getGradientAlign()
Returns the gradient align for this
XdevScrollPane . |
Color |
getGradientColor1()
Returns the gradient
Color one for this XdevScrollPane . |
Color |
getGradientColor2()
Returns the gradient
Color two for this XdevScrollPane . |
int |
getInnerHeight() |
int |
getInnerWidth() |
int |
getInnerX()
Returns the horizontal scrollbar's value.
|
int |
getInnerY()
Returns the vertical scrollbar's value.
|
LayoutManager |
getLayout() |
String |
getPersistentId()
Uses the name of the component as a persistent id.
|
int |
getScrollMode()
Returns the current scrolling mode.
|
int |
getScrollRange() |
XdevImage |
getTexture()
Returns the texture for this
XdevScrollPane . |
int |
getTextureOption()
Returns the texture option for this
XdevScrollPane . |
String |
getTexturePath()
Returns the texture path for this
XdevScrollPane . |
boolean |
isPersistenceEnabled()
Flag, indicates, if the gui state for this component should be persisted.
|
protected boolean |
isRootPaneCheckingEnabled() |
void |
loadPersistentState(String persistentState)
Restores this
Components persistent state. |
void |
pack() |
String |
savePersistentState()
Generates a
String representation of this Components
persistent state and returns it for being stored. |
void |
scrollToX(int x)
Scroll to the position of
x in the horizontal scrollbar. |
void |
scrollToY(int y)
Scroll to the position of
y in the vertical scrollbar. |
void |
setBackground(Color bg) |
void |
setBackgroundType(int backgroundType)
Sets the background type as
int for this
XdevScrollPane . |
void |
setDesignTarget(int designTarget) |
void |
setFont(Font font) |
void |
setForeground(Color fg) |
void |
setGradientAlign(int gradientAlign)
Sets the gradient align for this
XdevScrollPane . |
void |
setGradientColor1(Color gradientColor1)
Sets the gradient
Color one for this XdevScrollPane . |
void |
setGradientColor2(Color gradientColor2)
Sets the gradient
Color two for this XdevScrollPane . |
void |
setInnerHeight(int height) |
void |
setInnerSize(Dimension d)
Sets the inner size of this
XdevScrollPane . |
void |
setInnerSize(int width,
int height)
Sets the inner size of this
XdevScrollPane . |
void |
setInnerWidth(int width) |
void |
setInnerX(int x)
Sets the horizontal scrollbar's value.
|
void |
setInnerY(int y)
Sets the vertical scrollbar's value.
|
void |
setLayout(LayoutManager manager) |
void |
setOpaque(boolean isOpaque) |
void |
setPersistenceEnabled(boolean persistenceEnabled)
Sets the persistenceEnabled flag.
|
protected void |
setRootPaneCheckingEnabled(boolean enabled) |
void |
setScrollMode(int mode)
Used to control the method of scrolling the viewport contents.
|
void |
setScrollRange(int range) |
void |
setTexture(XdevImage image)
Sets the texture for this
XdevScrollPane . |
void |
setTextureOption(int textureOption)
Sets the texture option for this
XdevScrollPane . |
void |
setTexturePath(String texturePath)
Sets the texture path for this
XdevScrollPane . |
String |
toString() |
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int VIEWPORT
public static final int CONTENT_PANE
protected boolean rootPaneCheckingEnabled
public XdevScrollPane()
XdevScrollPane
.
Alias for XdevScrollPane(LayoutManager)
public XdevScrollPane(LayoutManager layout)
XdevScrollPane
with specified
LayoutManager
.
Alias for XdevScrollPane(LayoutManager, int, int)
layout
- the LayoutManager to usepublic XdevScrollPane(int vsbPolicy, int hsbPolicy)
XdevScrollPane
with specified scrollbar
policies.
The available policy settings are listed at
JScrollPane.setVerticalScrollBarPolicy(int)
and
JScrollPane.setHorizontalScrollBarPolicy(int)
.
Alias for XdevScrollPane(LayoutManager, int, int)
vsbPolicy
- an integer that specifies the vertical scrollbar policyhsbPolicy
- an integer that specifies the horizontal scrollbar policypublic XdevScrollPane(LayoutManager layout, int vsbPolicy, int hsbPolicy)
XdevScrollPane
with specified
LayoutManager
and scrollbar policies.
The available policy settings are listed at
JScrollPane.setVerticalScrollBarPolicy(int)
and
JScrollPane.setHorizontalScrollBarPolicy(int)
.
layout
- the LayoutManager to usevsbPolicy
- an integer that specifies the vertical scrollbar policyhsbPolicy
- an integer that specifies the horizontal scrollbar policypublic Container getContentPane()
contentPane
for this XdevScrollPane
.sp_contentPane
property as Container
public void setScrollMode(int mode)
mode
- one of the following values:
#BLIT_SCROLL_MODE
,
#BACKINGSTORE_SCROLL_MODE
,
#SIMPLE_SCROLL_MODE
public int getScrollMode()
scrollMode
propertysetScrollMode(int)
public void setDesignTarget(int designTarget)
public int getDesignTarget()
public void scrollToX(int x)
x
in the horizontal scrollbar.x
- the current value, between minimum and maximum - visibleAmountsetInnerX(int)
,
JScrollBar.setValue(int)
public void setInnerX(int x)
x
- the current value, between minimum and maximum - visibleAmountJScrollBar.setValue(int)
public void scrollToY(int y)
y
in the vertical scrollbar.y
- the current value, between minimum and maximum - visibleAmountsetInnerY(int)
,
JScrollBar.setValue(int)
public void setInnerY(int y)
y
- the current value, between minimum and maximum - visibleAmountJScrollBar.setValue(int)
public void setInnerSize(int width, int height)
XdevScrollPane
.width
- the new width of the inner sizeheight
- the new width of the inner sizepublic void setInnerSize(Dimension d)
XdevScrollPane
. If d
is
null
, the UI will be asked for the preferred size.d
- The new inner size, or null
public int getScrollRange()
public void setScrollRange(int range)
public int getInnerX()
0
if the
scrollbar
is null
public int getInnerY()
0
if the
scrollbar
is null
public int getInnerWidth()
public void setInnerWidth(int width)
public int getInnerHeight()
public void setInnerHeight(int height)
public void pack()
public void setOpaque(boolean isOpaque)
setOpaque
in class JComponent
public void setBackground(Color bg)
setBackground
in class JComponent
public int getBackgroundType()
int
for this
XdevScrollPane
.int
for this
XdevScrollPane
.xdevBackground
,
XdevStyle
public void setBackgroundType(int backgroundType)
int
for this
XdevScrollPane
.backgroundType
- the background type as int
for this
XdevScrollPane
.xdevBackground
,
XdevStyle.NONE
,
XdevStyle.COLOR
,
XdevStyle.GRADIENT
,
XdevStyle.SYSTEM
public Color getGradientColor1()
Color
one for this XdevScrollPane
.Color
one for this XdevScrollPane
.xdevBackground
,
XdevStyle.GRADIENT
public void setGradientColor1(Color gradientColor1)
Color
one for this XdevScrollPane
.
Gradient colors are only applied if the background type of this
XdevScrollPane
is set to XdevStyle.GRADIENT
. You can set
the background type via XDEV IDE or manually with
setBackgroundType(int)
.
gradientColor1
- the gradient Color
one for this XdevScrollPane
.xdevBackground
,
XdevStyle.GRADIENT
public Color getGradientColor2()
Color
two for this XdevScrollPane
.Color
two for this XdevScrollPane
.xdevBackground
,
XdevStyle.GRADIENT
public void setGradientColor2(Color gradientColor2)
Color
two for this XdevScrollPane
.
Gradient colors are only applied if the background type of this
XdevScrollPane
is set to XdevStyle.GRADIENT
. You can set
the background type via XDEV IDE or manually with
setBackgroundType(int)
.
gradientColor2
- the gradient Color
two for this XdevScrollPane
.xdevBackground
,
XdevStyle.GRADIENT
public int getGradientAlign()
XdevScrollPane
.XdevScrollPane
.setBackgroundType(int)
,
XdevStyle.LEFF_RIGHT
,
XdevStyle.TOP_BOTTOM
,
XdevStyle.TOPLEFT_BOTTOMRIGHT
,
XdevStyle.TOPRIGHT_BOTTOMLEFT
,
XdevStyle.RECTANGULAR
,
XdevStyle.RADIAL
public void setGradientAlign(int gradientAlign)
XdevScrollPane
.
Gradient align is only applied if the background type of this
XdevScrollPane
is set to XdevStyle.GRADIENT
. You can set
the background type via XDEV IDE or manually with
setBackgroundType(int)
.
gradientAlign
- the gradient align for this XdevScrollPane
.setBackgroundType(int)
,
XdevStyle.LEFF_RIGHT
,
XdevStyle.TOP_BOTTOM
,
XdevStyle.TOPLEFT_BOTTOMRIGHT
,
XdevStyle.TOPRIGHT_BOTTOMLEFT
,
XdevStyle.RECTANGULAR
,
XdevStyle.RADIAL
public String getTexturePath()
XdevScrollPane
.XdevScrollPane
.xdevBackground
,
XdevStyle.setTexturePath(String)
public void setTexturePath(String texturePath)
XdevScrollPane
.texturePath
- the texture path for this XdevScrollPane
.xdevBackground
,
XdevStyle.getTexturePath()
public XdevImage getTexture()
XdevScrollPane
.XdevScrollPane
.xdevBackground
,
XdevStyle.getTexture()
,
XdevImage
public void setTexture(XdevImage image)
XdevScrollPane
.image
- the texture for this XdevScrollPane
.xdevBackground
,
XdevStyle.setTexture(XdevImage)
,
XdevImage
public int getTextureOption()
XdevScrollPane
.XdevScrollPane
as
int
.xdevBackground
,
XdevStyle.getTextureOption()
,
XdevStyle.CENTER
,
XdevStyle.STRECHED
,
XdevStyle.TILED
public void setTextureOption(int textureOption)
XdevScrollPane
.textureOption
- the texture option for this XdevScrollPane
.xdevBackground
,
XdevStyle.setTextureOption(int)
,
XdevStyle.CENTER
,
XdevStyle.STRECHED
,
XdevStyle.TILED
public void loadPersistentState(String persistentState)
Components
persistent state.
By calling this method, the passed state information get interpreted and applied on the affected attributes.
loadPersistentState
in interface Persistable
persistentState
- String
representation for the persistent state of the
Component
.savePersistentState()
public String savePersistentState()
String
representation of this Components
persistent state and returns it for being stored.
Persisted properties:
savePersistentState
in interface Persistable
String
containing persistent statepublic String getPersistentId()
If no name is specified the name of the class will be used. This will work only for one persistent instance of the class!
Return a persistent id for thisComponent
.
The following requirements have to be met for the persistent id:
getPersistentId
in interface Persistable
public boolean isPersistenceEnabled()
isPersistenceEnabled
in interface Persistable
true
if a instance of type Persistable
is to be
persisted.public void setPersistenceEnabled(boolean persistenceEnabled)
persistenceEnabled
- the state for this instanceprotected boolean isRootPaneCheckingEnabled()
protected void setRootPaneCheckingEnabled(boolean enabled)
public void setLayout(LayoutManager manager)
setLayout
in class JScrollPane
public LayoutManager getLayout()
public void setForeground(Color fg)
setForeground
in class JComponent
public void setFont(Font font)
setFont
in class JComponent
Copyright © 2003–2021 XDEV Software. All rights reserved.