com.alee.laf.scroll
Class WebScrollPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JScrollPane
                  extended by com.alee.laf.scroll.WebScrollPane
All Implemented Interfaces:
LanguageContainerMethods, ShapeProvider, SizeMethods<WebScrollPane>, SwingMethods, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.ScrollPaneConstants

public class WebScrollPane
extends javax.swing.JScrollPane
implements ShapeProvider, SizeMethods<WebScrollPane>, LanguageContainerMethods

User: mgarin Date: 29.04.11 Time: 15:37

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JScrollPane
javax.swing.JScrollPane.AccessibleJScrollPane, javax.swing.JScrollPane.ScrollBar
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.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.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.ScrollPaneConstants
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, VIEWPORT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WebScrollPane(java.awt.Component view)
           
WebScrollPane(java.awt.Component view, boolean drawBorder)
           
WebScrollPane(java.awt.Component view, boolean drawBorder, boolean drawInnerBorder)
           
 
Method Summary
 WebScrollBar createHorizontalScrollBar()
           
 WebScrollBar createVerticalScrollBar()
           
 java.awt.Color getBorderColor()
           
 java.awt.Color getDarkBorder()
           
 java.lang.String getLanguageContainerKey()
          Returns language container key for container which implements this interface.
 java.awt.Insets getMargin()
           
 int getMinimumHeight()
          Returns component minimum height.
 int getMinimumWidth()
          Returns component minimum width.
 int getPreferredHeight()
          Returns component preferred height.
 java.awt.Dimension getPreferredSize()
          Returns component preferred size.
 int getPreferredWidth()
          Returns component preferred width.
 int getRound()
           
 int getShadeWidth()
           
 WebScrollBar getWebHorizontalScrollBar()
           
 WebScrollPaneUI getWebUI()
           
 WebScrollBar getWebVerticalScrollBar()
          Additional Web-component methods
 boolean isDrawBackground()
           
 boolean isDrawBorder()
          UI methods
 boolean isDrawFocus()
           
 java.awt.Shape provideShape()
          Returns component shape.
 void removeLanguageContainerKey()
          Removes language container key for container which implements this interface.
 WebScrollPane setBorderColor(java.awt.Color borderColor)
           
 WebScrollPane setDarkBorder(java.awt.Color darkBorder)
           
 WebScrollPane setDrawBackground(boolean drawBackground)
           
 WebScrollPane setDrawBorder(boolean drawBorder)
           
 WebScrollPane setDrawFocus(boolean drawFocus)
           
 void setLanguageContainerKey(java.lang.String key)
          Sets language container key for container which implements this interface.
 WebScrollPane setMargin(java.awt.Insets margin)
           
 WebScrollPane setMargin(int spacing)
           
 WebScrollPane setMargin(int top, int left, int bottom, int right)
           
 WebScrollPane setMinimumHeight(int minimumHeight)
          Sets component minimum height.
 WebScrollPane setMinimumWidth(int minimumWidth)
          Sets component minimum width.
 void setPaintButtons(boolean paintButtons)
          Scroll bars buttons painting.
 WebScrollPane setPreferredHeight(int preferredHeight)
          Sets component preferred height.
 WebScrollPane setPreferredWidth(int preferredWidth)
          Sets component preferred width.
 WebScrollPane setRound(int round)
           
 void setScrollBarStyleId(java.lang.String id)
          Sets scroll bar style ID.
 WebScrollPane setShadeWidth(int shadeWidth)
           
 void updateUI()
           
 
Methods inherited from class javax.swing.JScrollPane
createViewport, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled
 
Methods inherited from class javax.swing.JComponent
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
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, hide, 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, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WebScrollPane

public WebScrollPane(java.awt.Component view)

WebScrollPane

public WebScrollPane(java.awt.Component view,
                     boolean drawBorder)

WebScrollPane

public WebScrollPane(java.awt.Component view,
                     boolean drawBorder,
                     boolean drawInnerBorder)
Method Detail

createVerticalScrollBar

public WebScrollBar createVerticalScrollBar()
Overrides:
createVerticalScrollBar in class javax.swing.JScrollPane

createHorizontalScrollBar

public WebScrollBar createHorizontalScrollBar()
Overrides:
createHorizontalScrollBar in class javax.swing.JScrollPane

getWebVerticalScrollBar

public WebScrollBar getWebVerticalScrollBar()
Additional Web-component methods


getWebHorizontalScrollBar

public WebScrollBar getWebHorizontalScrollBar()

isDrawBorder

public boolean isDrawBorder()
UI methods


setDrawBorder

public WebScrollPane setDrawBorder(boolean drawBorder)

getRound

public int getRound()

setRound

public WebScrollPane setRound(int round)

getShadeWidth

public int getShadeWidth()

setShadeWidth

public WebScrollPane setShadeWidth(int shadeWidth)

getMargin

public java.awt.Insets getMargin()

setMargin

public WebScrollPane setMargin(java.awt.Insets margin)

setMargin

public WebScrollPane setMargin(int top,
                               int left,
                               int bottom,
                               int right)

setMargin

public WebScrollPane setMargin(int spacing)

isDrawFocus

public boolean isDrawFocus()

setDrawFocus

public WebScrollPane setDrawFocus(boolean drawFocus)

isDrawBackground

public boolean isDrawBackground()

setDrawBackground

public WebScrollPane setDrawBackground(boolean drawBackground)

getBorderColor

public java.awt.Color getBorderColor()

setBorderColor

public WebScrollPane setBorderColor(java.awt.Color borderColor)

getDarkBorder

public java.awt.Color getDarkBorder()

setDarkBorder

public WebScrollPane setDarkBorder(java.awt.Color darkBorder)

setPaintButtons

public void setPaintButtons(boolean paintButtons)
Scroll bars buttons painting.


setScrollBarStyleId

public void setScrollBarStyleId(java.lang.String id)
Sets scroll bar style ID.

Parameters:
id - scroll bar style ID

provideShape

public java.awt.Shape provideShape()
Description copied from interface: ShapeProvider
Returns component shape.

Specified by:
provideShape in interface ShapeProvider
Returns:
component shape

getWebUI

public WebScrollPaneUI getWebUI()

updateUI

public void updateUI()
Overrides:
updateUI in class javax.swing.JScrollPane

getPreferredWidth

public int getPreferredWidth()
Returns component preferred width.

Specified by:
getPreferredWidth in interface SizeMethods<WebScrollPane>
Returns:
component preferred width

setPreferredWidth

public WebScrollPane setPreferredWidth(int preferredWidth)
Sets component preferred width. Pass -1 to let component choose preferred width on its own.

Specified by:
setPreferredWidth in interface SizeMethods<WebScrollPane>
Parameters:
preferredWidth - new component preferred width
Returns:
modified component

getPreferredHeight

public int getPreferredHeight()
Returns component preferred height.

Specified by:
getPreferredHeight in interface SizeMethods<WebScrollPane>
Returns:
component preferred height

setPreferredHeight

public WebScrollPane setPreferredHeight(int preferredHeight)
Sets component preferred height. Pass -1 to let component choose preferred height on its own.

Specified by:
setPreferredHeight in interface SizeMethods<WebScrollPane>
Parameters:
preferredHeight - new component preferred height
Returns:
modified component

getMinimumWidth

public int getMinimumWidth()
Returns component minimum width.

Specified by:
getMinimumWidth in interface SizeMethods<WebScrollPane>
Returns:
component minimum width

setMinimumWidth

public WebScrollPane setMinimumWidth(int minimumWidth)
Sets component minimum width. Pass -1 to let component choose minimum width on its own.

Specified by:
setMinimumWidth in interface SizeMethods<WebScrollPane>
Parameters:
minimumWidth - new component minimum width
Returns:
modified component

getMinimumHeight

public int getMinimumHeight()
Returns component minimum height.

Specified by:
getMinimumHeight in interface SizeMethods<WebScrollPane>
Returns:
component minimum height

setMinimumHeight

public WebScrollPane setMinimumHeight(int minimumHeight)
Sets component minimum height. Pass -1 to let component choose minimum height on its own.

Specified by:
setMinimumHeight in interface SizeMethods<WebScrollPane>
Parameters:
minimumHeight - new component minimum height
Returns:
modified component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns component preferred size.

Specified by:
getPreferredSize in interface SizeMethods<WebScrollPane>
Overrides:
getPreferredSize in class javax.swing.JComponent
Returns:
component preferred size

setLanguageContainerKey

public void setLanguageContainerKey(java.lang.String key)
Sets language container key for container which implements this interface.

Specified by:
setLanguageContainerKey in interface LanguageContainerMethods
Parameters:
key - language container key

removeLanguageContainerKey

public void removeLanguageContainerKey()
Removes language container key for container which implements this interface.

Specified by:
removeLanguageContainerKey in interface LanguageContainerMethods

getLanguageContainerKey

public java.lang.String getLanguageContainerKey()
Returns language container key for container which implements this interface.

Specified by:
getLanguageContainerKey in interface LanguageContainerMethods
Returns:
language container key for container which implements this interface