|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.co.ist.mwt.ClipLayout
A ClipLayout is used to lay out a Panel contained in a ScrolledPanel; this Panel is used as a clipping window by the ScrolledPanel. It is not really for use outside this package, but has been made public in case someone finds a use for it... NB. only the first child is used; all others are disregarded.
Fields inherited from interface uk.co.ist.mwt.ScrollConstants |
kEast,
kFill,
kNorth,
kNorthEast,
kNorthWest,
kSouth,
kSouthEast,
kSouthWest,
kWest |
Constructor Summary | |
ClipLayout()
|
Method Summary | |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Adds the specified component with the specified name to the layout. |
int |
getChildPlacement()
Gets the placement of the child for when the size of the child is smaller than the parent container. |
java.awt.Scrollbar |
getHSB()
Gets the horizontal scroll bar for this clipping layout. |
java.awt.Scrollbar |
getVSB()
Gets the vertical scroll bar for this clipping layout. |
int |
getXOffset()
Gets the X offset |
int |
getYOffset()
Gets the Y offset |
protected void |
handleSmallChildCase(java.awt.Dimension childSize,
java.awt.Dimension mySize)
Handle the layout when the child component is smaller than the parent container. |
boolean |
hsbNeeded(java.awt.Container clipWindow,
java.awt.Dimension pSz)
Function to see if the horizontal scroll bar will be needed (eg. |
void |
layoutContainer(java.awt.Container parent)
Lays out the container . |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Calculates the minimum dimensions for the specified panel given the components in the specified parent container. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Calculates the preferred dimensions for the specified panel given the components in the specified parent container. |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout. |
void |
scrollLeft(int delta)
Tell the clipping region to scroll (pan) left by a certain increment. |
void |
scrollUp(int delta)
Tell the clipping region to scroll (pan) up by a certain increment. |
void |
setChildPlacement(int newPlacement)
Sets the placement of the child for when the size of the child is smaller than the parent container. |
void |
setHSB(java.awt.Scrollbar hsb)
Sets the horizontal scroll bar for this clipping layout. |
void |
setVSB(java.awt.Scrollbar vsb)
Sets the vertical scroll bar for this clipping layout. |
void |
setXOffset(int newX)
Sets the X offset; newX must be in the range 0..100, where 0 means that the child's LHS is at the LHS of the clipping window, and 100 means that the child's RHS is at the RHS of the clipping window |
void |
setYOffset(int newY)
Sets the Y offset; newY must be in the range 0..100, where 0 means that the child's top is at the top of the clipping window, and 100 means that the child's bottom is at the bottom of the clipping window |
protected void |
updateChild(java.awt.Container parent)
Update the current work area to match the children belonging to the clip window parent passed in |
boolean |
vsbNeeded(java.awt.Container clipWindow,
java.awt.Dimension pSz)
Function to see if the vertical scroll bar will be needed (eg. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ClipLayout()
Method Detail |
public void setChildPlacement(int newPlacement)
public int getChildPlacement()
public void setXOffset(int newX)
newX
- the new valuegetXOffset()
,
setYOffset(int)
,
getYOffset()
,
scrollUp(int)
,
scrollLeft(int)
public int getXOffset()
setXOffset(int)
public void setYOffset(int newY)
newY
- the new valuegetYOffset()
,
setXOffset(int)
,
getXOffset()
,
scrollUp(int)
,
scrollLeft(int)
public int getYOffset()
setYOffset(int)
public void scrollUp(int delta)
delta
- the amount by which to pan. Can be negative.setXOffset(int)
,
setYOffset(int)
,
scrollLeft(int)
public void scrollLeft(int delta)
delta
- the amount by which to pan. Can be negative.setXOffset(int)
,
setYOffset(int)
,
scrollUp(int)
public void setHSB(java.awt.Scrollbar hsb)
vsb
- the new horizontal scroll bargetHSB()
public java.awt.Scrollbar getHSB()
setHSB(java.awt.Scrollbar)
public void setVSB(java.awt.Scrollbar vsb)
vsb
- the new vertical scroll bargetVSB()
public java.awt.Scrollbar getVSB()
setVSB(java.awt.Scrollbar)
protected void updateChild(java.awt.Container parent)
parent
- the parent container to which this layout is attachedpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
parent
- the component to be laid outminimumLayoutSize(java.awt.Container)
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
parent
- the component to be laid outpreferredLayoutSize(java.awt.Container)
public void layoutContainer(java.awt.Container parent)
parent
- the component which needs to be laid outprotected void handleSmallChildCase(java.awt.Dimension childSize, java.awt.Dimension mySize)
childSize
- the preferred size of the childmySize
- the size of this componentlayoutContainer
public boolean vsbNeeded(java.awt.Container clipWindow, java.awt.Dimension pSz)
clipWindow
- the container whose layout this ClipLayout ispSz
- this clipWindow's size.public boolean hsbNeeded(java.awt.Container clipWindow, java.awt.Dimension pSz)
clipWindow
- the container whose layout this ClipLayout ispSz
- this clipWindow's size.public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
name
- the component namecomp
- the component to be addedpublic void removeLayoutComponent(java.awt.Component comp)
comp
- the component to be removed
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |