com.datamessenger.awt.graphics
Class AdjustableLayout


java.lang.Object

  |

  +--com.datamessenger.awt.graphics.Layout

        |

        +--com.datamessenger.awt.graphics.AdjustableLayout


public class AdjustableLayout
extends Layout
implements java.awt.Adjustable


Fields inherited from class com.datamessenger.awt.graphics.Layout
insets, offsetx, offsety
 
Fields inherited from interface java.awt.Adjustable
HORIZONTAL, VERTICAL
 
Constructor Summary
AdjustableLayout(int orientation)
           
 
Method Summary
 void addAdjustmentListener(java.awt.event.AdjustmentListener l)
          Add a listener to recieve adjustment events when the value of the adjustable object changes.
protected  void fireAdjustmentEvent(int type)
           
 int getBlockIncrement()
          Gets the block value increment for the adjustable object.
 int getMaximum()
          Gets the maximum value of the adjustable object.
 int getMinimum()
          Gets the minimum value of the adjustable object.
 int getOrientation()
          Gets the orientation of the adjustable object.
 int getUnitIncrement()
          Gets the unit value increment for the adjustable object.
 int getValue()
          Gets the current value of the adjustable object.
 int getVisibleAmount()
          Gets the length of the propertional indicator.
 void incrementBlock(int i)
           
 void incrementUnit(int i)
           
 void removeAdjustmentListener(java.awt.event.AdjustmentListener l)
          Removes an adjustment listener.
 void scroll(int pixels)
          Moves the value by the requested number of pixels.
 void setBlockIncrement(int b)
          Sets the block value increment for the adjustable object.
 void setMaximum(int max)
          Sets the maximum value of the adjustable object.
 void setMinimum(int min)
          Sets the minimum value of the adjustable object.
 void setUnitIncrement(int u)
          Sets the unit value increment for the adjustable object.
 void setValue(int v)
          Sets the current value of the adjustable object.
 void setValues(int value, int visible, int min, int max)
           
 void setVisibleAmount(int v)
          Sets the length of the proportionl indicator of the adjustable object.
 void updateLayout(java.awt.Rectangle parent, LayoutContext child)
           
 
Methods inherited from class com.datamessenger.awt.graphics.Layout
getInsets, getPreferredSize, pack, unpack, updateLayout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdjustableLayout


public AdjustableLayout(int orientation)
Method Detail

updateLayout


public void updateLayout(java.awt.Rectangle parent,

                         LayoutContext child)
Overrides:
updateLayout in class Layout

setValues


public void setValues(int value,

                      int visible,

                      int min,

                      int max)

scroll


public void scroll(int pixels)
Moves the value by the requested number of pixels. Pixels that fall out of range are ignored. This method asumes that the ratio of pixels to increments has not changed since the lst call to updateLayout(..).
Parameters:
pixels - the number of pixels to move from the current value

incrementBlock


public void incrementBlock(int i)

incrementUnit


public void incrementUnit(int i)

getOrientation


public int getOrientation()
Gets the orientation of the adjustable object.
Specified by:
getOrientation in interface java.awt.Adjustable

setMinimum


public void setMinimum(int min)
Sets the minimum value of the adjustable object.
Specified by:
setMinimum in interface java.awt.Adjustable
Parameters:
min - the minimum value

getMinimum


public int getMinimum()
Gets the minimum value of the adjustable object.
Specified by:
getMinimum in interface java.awt.Adjustable

setMaximum


public void setMaximum(int max)
Sets the maximum value of the adjustable object.
Specified by:
setMaximum in interface java.awt.Adjustable
Parameters:
max - the maximum value

getMaximum


public int getMaximum()
Gets the maximum value of the adjustable object.
Specified by:
getMaximum in interface java.awt.Adjustable

setUnitIncrement


public void setUnitIncrement(int u)
Sets the unit value increment for the adjustable object.
Specified by:
setUnitIncrement in interface java.awt.Adjustable
Parameters:
u - the unit increment

getUnitIncrement


public int getUnitIncrement()
Gets the unit value increment for the adjustable object.
Specified by:
getUnitIncrement in interface java.awt.Adjustable

setBlockIncrement


public void setBlockIncrement(int b)
Sets the block value increment for the adjustable object. A block increment less than 1 will reset the block to the visible amount.
Specified by:
setBlockIncrement in interface java.awt.Adjustable
Parameters:
b - the block increment

getBlockIncrement


public int getBlockIncrement()
Gets the block value increment for the adjustable object.
Specified by:
getBlockIncrement in interface java.awt.Adjustable

setVisibleAmount


public void setVisibleAmount(int v)
Sets the length of the proportionl indicator of the adjustable object.
Specified by:
setVisibleAmount in interface java.awt.Adjustable
Parameters:
v - the length of the indicator

getVisibleAmount


public int getVisibleAmount()
Gets the length of the propertional indicator.
Specified by:
getVisibleAmount in interface java.awt.Adjustable

setValue


public void setValue(int v)
Sets the current value of the adjustable object. This value must be within the range defined by the minimum and maximum values for this object.
Specified by:
setValue in interface java.awt.Adjustable
Parameters:
v - the current value

getValue


public int getValue()
Gets the current value of the adjustable object.
Specified by:
getValue in interface java.awt.Adjustable

addAdjustmentListener


public void addAdjustmentListener(java.awt.event.AdjustmentListener l)
Add a listener to recieve adjustment events when the value of the adjustable object changes.
Specified by:
addAdjustmentListener in interface java.awt.Adjustable
Parameters:
l - the listener to recieve events
See Also:
AdjustmentEvent

removeAdjustmentListener


public void removeAdjustmentListener(java.awt.event.AdjustmentListener l)
Removes an adjustment listener.
Specified by:
removeAdjustmentListener in interface java.awt.Adjustable
Parameters:
l - the listener being removed
See Also:
AdjustmentEvent

fireAdjustmentEvent


protected void fireAdjustmentEvent(int type)


Comments, suggestions, and bug reports are welcomed and encouraged.
Please refer them to our support page. Thank you.

Copyright © 1999-2001 Produx House, Corp. All rights reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc.