jj2000.disp
Class ImgScrollPane.ISPScrollbar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Scrollbar
              |
              +--jj2000.disp.ImgScrollPane.ISPScrollbar
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.Adjustable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Enclosing class:
ImgScrollPane

class ImgScrollPane.ISPScrollbar
extends java.awt.Scrollbar

Scrollbars for the ImgScrollPane container. They are normal AWT Scrollbars, but with a thickness of ImgScrollPane.SCROLLBAR_THICKNESS. Also many of the set method of the Adjustable interface are overriden and throw IllegalArgumentException since they are not to be used externally.


Nested Class Summary
 
Nested classes inherited from class java.awt.Scrollbar
java.awt.Scrollbar.AccessibleAWTScrollBar
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Scrollbar
HORIZONTAL, VERTICAL
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.Adjustable
NO_ORIENTATION
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
(package private) ImgScrollPane.ISPScrollbar(int orientation, int value, int visible, int min, int max)
          Constructs a new scroll bar with the specified orientation and values.
 
Method Summary
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of the scrollbar.
 void setBlockIncrement(int b)
          Throws an IllegalArgumentException since the block increment should never be set externally.
(package private)  void setBlockIncrementI(int v)
          Sets the block increment for this scroll bar.
 void setMaximum(int max)
          Throws an IllegalArgumentException since the maximum value should never be set externally.
 void setMinimum(int min)
          Throws an IllegalArgumentException since the minimum value should never be set externally.
 void setValue(int newValue)
          Sets the value of this scroll bar to the specified value and requests a repaint of the image area.
(package private)  void setValueI(int newValue)
          Sets the value of this scroll bar to the specified value.
 void setVisibleAmount(int v)
          Throws an IllegalArgumentException since the visible amount should never be set externally.
 
Methods inherited from class java.awt.Scrollbar
addAdjustmentListener, addNotify, getAccessibleContext, getAdjustmentListeners, getBlockIncrement, getLineIncrement, getListeners, getMaximum, getMinimum, getOrientation, getPageIncrement, getUnitIncrement, getValue, getValueIsAdjusting, getVisible, getVisibleAmount, paramString, processAdjustmentEvent, processEvent, removeAdjustmentListener, setLineIncrement, setOrientation, setPageIncrement, setUnitIncrement, setValueIsAdjusting, setValues
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImgScrollPane.ISPScrollbar

ImgScrollPane.ISPScrollbar(int orientation,
                           int value,
                           int visible,
                           int min,
                           int max)
Constructs a new scroll bar with the specified orientation and values.

The orientation argument must take one of the two values Scrollbar.HORIZONTAL, or Scrollbar.VERTICAL, indicating a horizontal or vertical scroll bar, respectively.

Parameters:
orientation - indicates the orientation of the scroll bar
value - the initial value of the scroll bar.
visible - the size of the scroll bar's bubble, representing the visible portion; the scroll bar uses this value when paging up or down by a page.
min - the minimum value of the scroll bar.
max - the maximum value of the scroll bar.
Method Detail

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size of the scrollbar. It is the same as the preferred size of a normal scrollbar but with a thickness of ImgScrollPane.SCROLLBAR_THICKNESS.

Overrides:
getPreferredSize in class java.awt.Component
Returns:
The Scrollbar preferred size

setMinimum

public void setMinimum(int min)
Throws an IllegalArgumentException since the minimum value should never be set externally.

Specified by:
setMinimum in interface java.awt.Adjustable
Overrides:
setMinimum in class java.awt.Scrollbar

setMaximum

public void setMaximum(int max)
Throws an IllegalArgumentException since the maximum value should never be set externally.

Specified by:
setMaximum in interface java.awt.Adjustable
Overrides:
setMaximum in class java.awt.Scrollbar

setVisibleAmount

public void setVisibleAmount(int v)
Throws an IllegalArgumentException since the visible amount should never be set externally.

Specified by:
setVisibleAmount in interface java.awt.Adjustable
Overrides:
setVisibleAmount in class java.awt.Scrollbar

setBlockIncrement

public void setBlockIncrement(int b)
Throws an IllegalArgumentException since the block increment should never be set externally.

Specified by:
setBlockIncrement in interface java.awt.Adjustable
Overrides:
setBlockIncrement in class java.awt.Scrollbar

setBlockIncrementI

void setBlockIncrementI(int v)
Sets the block increment for this scroll bar.

The block increment is the value that is added (subtracted) when the user activates the block increment area of the scroll bar, generally through a mouse or keyboard gesture that the scroll bar receives as an adjustment event.

This is a version to be used by The ImgScrollPane class only.

Parameters:
v - the amount by which to increment or decrement the scroll bar's value.

setValueI

void setValueI(int newValue)
Sets the value of this scroll bar to the specified value.

If the value supplied is less than the current minimum or greater than the current maximum, then one of those values is substituted, as appropriate.

This is a version to be used by The ImgScrollPane class only.

Parameters:
newValue - he new value of the scroll bar.

setValue

public void setValue(int newValue)
Sets the value of this scroll bar to the specified value and requests a repaint of the image area.

If the value supplied is less than the current minimum or greater than the current maximum, then one of those values is substituted, as appropriate.

Specified by:
setValue in interface java.awt.Adjustable
Overrides:
setValue in class java.awt.Scrollbar
Parameters:
newValue - he new value of the scroll bar.