jj2000.disp
Class ImgScrollPane.ISPScrollbar

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Scrollbar
              |
              +--jj2000.disp.ImgScrollPane.ISPScrollbar
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.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Fields inherited from class java.awt.Scrollbar
adjustmentListener, base, HORIZONTAL, lineIncrement, maximum, minimum, nameCounter, orientation, pageIncrement, scrollbarSerializedDataVersion, serialVersionUID, value, VERTICAL, visibleAmount
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
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, constructComponentName, eventEnabled, getBlockIncrement, getLineIncrement, getMaximum, getMinimum, getOrientation, getPageIncrement, getUnitIncrement, getValue, getVisible, getVisibleAmount, initIDs, paramString, processAdjustmentEvent, processEvent, readObject, removeAdjustmentListener, setLineIncrement, setOrientation, setPageIncrement, setUnitIncrement, setValues, writeObject
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getIntrinsicCursor, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, postsOldMouseEvents, preferredSize, prepareImage, prepareImage, print, printAll, printHeavyweightComponents, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, 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.
svt - The scrollbar visible type
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.
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.
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.
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.
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.

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