Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class uk.co.ist.mwt.ScrollablePanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--uk.co.ist.mwt.ScrollablePanel
Subclasses:
ScrolledPanel

public class ScrollablePanel
extends java.awt.Panel
implements java.awt.LayoutManager, ScrollConstants, java.io.Serializable
The ScrollablePanel provides a base mechanism for scrolling components. It is a Panel which lays out its work area child and two scrollbars in an appropriate manner. It can be regarded as the equivalent of a XmScrolledWindow with a scrolling policy of XmAPPLICATION_DEFINED. If you want fuller built-in functionality, you need to use the ScrolledPanel, which is a subclass of this providing the equivalent of the XmAUTOMATIC scrolling policy.

See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
ScrollablePanel()
          Simple constructor, setting the panel's layout to itself...
 
Method Summary
void addLayoutComponent(java.lang.String name, java.awt.Component comp)
          Add the specified component with the specified name to the layout.
int getScrollbarPlacement()
          Getter for scrollbar placement
java.awt.Scrollbar getScrollHorz()
          Gets the horizontal scroll bar
java.awt.Scrollbar getScrollVert()
          Gets the vertical scroll bar
boolean hsbNeeded(java.awt.Dimension pSz)
          Function to determine whether the ScrollablePanel needs a horizontal scroll bar if it's compressed into the parent passed in
void layoutContainer(java.awt.Container parent)
          Lay out the container in the specified panel.
java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
          Calculate the minimum size dimensions for the specified panel given the components in the specified parent container.
java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
          Calculate the preferred size dimensions for the specified panel given the components in the specified parent container.
void removeLayoutComponent(java.awt.Component comp)
          Remove the specified component from the layout.
void setScrollbarPlacement(int newPlacement)
          An accessor method to allow the specification of the point in the container where the scroll bars meet; if the value is invalid the change is ignored.
void setScrollHorz(java.awt.Scrollbar s)
          Sets the horizontal scroll bar
void setScrollVert(java.awt.Scrollbar s)
          Sets the vertical scroll bar
boolean vsbNeeded(java.awt.Dimension pSz)
          Function to determine whether the ScrollablePanel needs a vertical scroll bar if it's compressed into the parent passed in
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paint, preferredSize, printComponents, print, removeAll, remove, remove, removeContainerListener, removeNotify, setLayout, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

ScrollablePanel

public ScrollablePanel()
Simple constructor, setting the panel's layout to itself...
Method Detail

setScrollbarPlacement

public void setScrollbarPlacement(int newPlacement)
An accessor method to allow the specification of the point in the container where the scroll bars meet; if the value is invalid the change is ignored. The panel is only re-laid-out if the new value is different to the old one.
See Also:
#kSouthEast, #kSouthWest, #kNorthEast, #kNorthWest

getScrollbarPlacement

public int getScrollbarPlacement()
Getter for scrollbar placement
See Also:
setScrollbarPlacement

setScrollVert

public void setScrollVert(java.awt.Scrollbar s)
Sets the vertical scroll bar

getScrollVert

public java.awt.Scrollbar getScrollVert()
Gets the vertical scroll bar

setScrollHorz

public void setScrollHorz(java.awt.Scrollbar s)
Sets the horizontal scroll bar

getScrollHorz

public java.awt.Scrollbar getScrollHorz()
Gets the horizontal scroll bar

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
Add the specified component with the specified name to the layout.
Specified by:
addLayoutComponent(java.lang.String, java.awt.Component) in interface java.awt.LayoutManager
Parameters:
name - the component name
comp - the component to be added
See Also:
removeLayoutComponent

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Remove the specified component from the layout.
Specified by:
removeLayoutComponent(java.awt.Component) in interface java.awt.LayoutManager
Parameters:
comp - the component to be removed
See Also:
addLayoutComponent

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Calculate the preferred size dimensions for the specified panel given the components in the specified parent container.
Specified by:
preferredLayoutSize(java.awt.Container) in interface java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
minimumLayoutSize, #layoutSize

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
Calculate the minimum size dimensions for the specified panel given the components in the specified parent container.
Specified by:
minimumLayoutSize(java.awt.Container) in interface java.awt.LayoutManager
Parameters:
parent - the component to be laid out
See Also:
preferredLayoutSize, #layoutSize

vsbNeeded

public boolean vsbNeeded(java.awt.Dimension pSz)
Function to determine whether the ScrollablePanel needs a vertical scroll bar if it's compressed into the parent passed in

hsbNeeded

public boolean hsbNeeded(java.awt.Dimension pSz)
Function to determine whether the ScrollablePanel needs a horizontal scroll bar if it's compressed into the parent passed in

layoutContainer

public void layoutContainer(java.awt.Container parent)
Lay out the container in the specified panel.
Specified by:
layoutContainer(java.awt.Container) in interface java.awt.LayoutManager
Parameters:
parent - the component which needs to be laid out

Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD