swingwtx.swing
Class JScrollPane
java.lang.Object
swingwt.awt.Component
swingwt.awt.Container
swingwtx.swing.JComponent
swingwtx.swing.JPanel
swingwtx.swing.JScrollPane
- All Implemented Interfaces:
- AdjustmentListener, java.util.EventListener, ImageObserver, MenuContainer
- Direct Known Subclasses:
- ScrollPane
- public class JScrollPane
- extends JPanel
- implements AdjustmentListener
Fields inherited from class swingwtx.swing.JComponent |
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap |
Fields inherited from class swingwt.awt.Component |
actionCommand, actionListeners, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListeners, componentName, consumeAvailableHeight, consumeAvailableWidth, focusable, focusListeners, graphicsConfig, inputMethodListeners, isUserSetFont, keyListeners, layoutModifier, LEFT_ALIGNMENT, LOCK, mouseListeners, mouseMotionListeners, mouseWheelListeners, parent, pBackground, pCursor, pDoubleBuffered, peer, pEnabled, pFont, pForeground, pLayoutData, pLocation, pMaxSize, pMinSize, pPrefSize, pSize, pToolTipText, pVisible, RIGHT_ALIGNMENT, swingWTDefaultActionEventAdapter, swingWTEventAdapter, TOP_ALIGNMENT |
Methods inherited from class swingwtx.swing.JComponent |
add, add, add, addPropertyChangeListener, addPropertyChangeListener, checkInternalFrameChild, dispose, getAccessibleContext, getActionMap, getAutoscrolls, getBorder, getClientProperty, getInputMap, getInsets, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVisibleRect, isDoubleBuffered, isOpaque, isOptimizedDrawingEnabled, isValidateRoot, paint, paintBackground, paintChildren, paintComponent, paintImmediately, paintImmediately, putClientProperty, remove, remove, removePropertyChangeListener, removePropertyChangeListener, repaint, revalidate, scrollRectToVisible, setActionMap, setAutoscrolls, setDoubleBuffered, setInputMap, setMargin, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled |
Methods inherited from class swingwt.awt.Container |
addComponentToLayout, addContainerListener, debug_showContainmentTree, doAdd, doLayout, getComponent, getComponentCount, getComponentOrientation, getComposite, getLayout, getMaximumSize, getMinimumSize, getParent, getPreferredSize, invalidate, minimumSize, preferredSize, processContainerEvent, processEvent, queuedValidate, removeAll, removeComponentFromCache, removeContainerListener, setLayout, setLayoutImpl, validate |
Methods inherited from class swingwt.awt.Component |
add, addActionListener, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, componentOnlyDispose, computePreferredSize, contains, contains, createImage, createListenerArrayFromVector, createVolatileImage, dispatchEvent, getActionCommand, getAlignmentX, getAlignmentY, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getListeners, getLocation, getLocationOnScreen, getName, getPeer, getPeerSize, getSize, getSWTPeer, getToolkit, getToolTipText, getTreeLock, getX, getY, grabFocus, hasFocus, hasSetFont, hide, imageUpdate, inside, isEnabled, isFocusable, isMinimumSizeSet, isShowing, isVisible, processActionEvent, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processTraverseEvent, registerActionEvents, registerComponentEvents, registerEvents, registerExtendedModifyEvents, registerFocusEvents, registerKeyEvents, registerModifyEvents, registerMouseEvents, registerPaintEvents, registerTraversalEvents, remove, removeActionListener, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, repaint, repaint, repaint, requestFocus, setActionCommand, setAlignmentX, setAlignmentY, setBackground, setBounds, setBounds, setCachedProperties, setComponentOrientation, setComponentRemoved, setCursor, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setFont, setForeground, setHeight, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setSize, setSize, setToolTipText, setVisible, setWidth, show, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERTICAL_SCROLLBAR_ALWAYS
public static final int VERTICAL_SCROLLBAR_ALWAYS
- See Also:
- Constant Field Values
VERTICAL_SCROLLBAR_AS_NEEDED
public static final int VERTICAL_SCROLLBAR_AS_NEEDED
- See Also:
- Constant Field Values
VERTICAL_SCROLLBAR_NEVER
public static final int VERTICAL_SCROLLBAR_NEVER
- See Also:
- Constant Field Values
HORIZONTAL_SCROLLBAR_ALWAYS
public static final int HORIZONTAL_SCROLLBAR_ALWAYS
- See Also:
- Constant Field Values
HORIZONTAL_SCROLLBAR_AS_NEEDED
public static final int HORIZONTAL_SCROLLBAR_AS_NEEDED
- See Also:
- Constant Field Values
HORIZONTAL_SCROLLBAR_NEVER
public static final int HORIZONTAL_SCROLLBAR_NEVER
- See Also:
- Constant Field Values
VIEWPORT
public static final java.lang.String VIEWPORT
- See Also:
- Constant Field Values
VERTICAL_SCROLLBAR
public static final java.lang.String VERTICAL_SCROLLBAR
- See Also:
- Constant Field Values
HORIZONTAL_SCROLLBAR
public static final java.lang.String HORIZONTAL_SCROLLBAR
- See Also:
- Constant Field Values
ROW_HEADER
public static final java.lang.String ROW_HEADER
- See Also:
- Constant Field Values
COLUMN_HEADER
public static final java.lang.String COLUMN_HEADER
- See Also:
- Constant Field Values
LOWER_LEFT_CORNER
public static final java.lang.String LOWER_LEFT_CORNER
- See Also:
- Constant Field Values
LOWER_RIGHT_CORNER
public static final java.lang.String LOWER_RIGHT_CORNER
- See Also:
- Constant Field Values
UPPER_LEFT_CORNER
public static final java.lang.String UPPER_LEFT_CORNER
- See Also:
- Constant Field Values
UPPER_RIGHT_CORNER
public static final java.lang.String UPPER_RIGHT_CORNER
- See Also:
- Constant Field Values
LOWER_LEADING_CORNER
public static final java.lang.String LOWER_LEADING_CORNER
- See Also:
- Constant Field Values
LOWER_TRAILING_CORNER
public static final java.lang.String LOWER_TRAILING_CORNER
- See Also:
- Constant Field Values
UPPER_LEADING_CORNER
public static final java.lang.String UPPER_LEADING_CORNER
- See Also:
- Constant Field Values
UPPER_TRAILING_CORNER
public static final java.lang.String UPPER_TRAILING_CORNER
- See Also:
- Constant Field Values
VERTICAL_SCROLLBAR_POLICY
public static final java.lang.String VERTICAL_SCROLLBAR_POLICY
- See Also:
- Constant Field Values
HORIZONTAL_SCROLLBAR_POLICY
public static final java.lang.String HORIZONTAL_SCROLLBAR_POLICY
- See Also:
- Constant Field Values
BAR_SCALE_FACTOR
protected static final int BAR_SCALE_FACTOR
- See Also:
- Constant Field Values
verticalPolicy
protected int verticalPolicy
horizontalPolicy
protected int horizontalPolicy
hbar
protected JScrollBar hbar
vbar
protected JScrollBar vbar
childComponent
protected Component childComponent
northPanel
protected JPanel northPanel
westPanel
protected JPanel westPanel
southPanel
protected JPanel southPanel
columnView
protected Component columnView
rowView
protected Component rowView
ypix
protected int ypix
xpix
protected int xpix
showY
protected int showY
realY
protected int realY
diffY
protected int diffY
showX
protected int showX
realX
protected int realX
diffX
protected int diffX
deactivated
protected boolean deactivated
view
protected JViewport view
JScrollPane
public JScrollPane()
JScrollPane
public JScrollPane(Component component)
JScrollPane
public JScrollPane(int vsbPolicy,
int hsbPolicy)
JScrollPane
public JScrollPane(Component component,
int vsbPolicy,
int hsbPolicy)
layoutScrollPane
protected void layoutScrollPane()
- Lays out the scrollpane and puts the bars on
where necessary.
handleBarVisibility
protected void handleBarVisibility()
calculateBarSize
protected void calculateBarSize()
getViewport
public JViewport getViewport()
setViewport
public void setViewport(JViewport view)
setViewportBorder
public void setViewportBorder(Border b)
getViewportBorder
public Border getViewportBorder()
add
public Component add(Component c)
- Overrides:
add
in class JComponent
add
public void add(Component c,
java.lang.Object layoutmodifier)
- Description copied from class:
Container
- Addition for layouts requiring object based modifiers
- Overrides:
add
in class JComponent
setViewportView
public void setViewportView(Component component)
getHorizontalScrollBarPolicy
public int getHorizontalScrollBarPolicy()
setHorizontalScrollBarPolicy
public void setHorizontalScrollBarPolicy(int policy)
getVerticalScrollBarPolicy
public int getVerticalScrollBarPolicy()
setVerticalScrollBarPolicy
public void setVerticalScrollBarPolicy(int policy)
setHorizontalScrollBar
public void setHorizontalScrollBar(JScrollBar bar)
setVerticalScrollBar
public void setVerticalScrollBar(JScrollBar bar)
getHorizontalScrollBar
public JScrollBar getHorizontalScrollBar()
getVerticalScrollBar
public JScrollBar getVerticalScrollBar()
getComponents
public Component[] getComponents()
- Overrides:
getComponents
in class Container
setCorner
public void setCorner(java.lang.String key,
Component corner)
setColumnHeaderView
public void setColumnHeaderView(Component view)
setRowHeaderView
public void setRowHeaderView(Component view)
setSwingWTParent
public void setSwingWTParent(Container parent)
throws java.lang.Exception
- Description copied from class:
JPanel
- Callback for when this is added to a Container to create the
peer and load cached values.
- Overrides:
setSwingWTParent
in class JPanel
- Throws:
java.lang.Exception
checkIfComponentCanHandleItself
protected void checkIfComponentCanHandleItself(Component c)
- Sets the deactivated flag if the contained component is not
a JPanel or JLabel (the only things you'd want to scroll around
really).
adjustmentValueChanged
public void adjustmentValueChanged(AdjustmentEvent e)
- Called when the scrollbar is dragged. We simply move the container
holding the components around, relying on the platform widgets/SWT
to handle clipping. I really wouldn't want it any other way :-)
- Specified by:
adjustmentValueChanged
in interface AdjustmentListener