com.swfm.mica.widgets
Class MiScrollBar

java.lang.Object
  extended bycom.swfm.mica.core.MiPart
      extended bycom.swfm.mica.core.MiContainer
          extended bycom.swfm.mica.layouts.MiLayout
              extended bycom.swfm.mica.core.MiVisibleContainer
                  extended bycom.swfm.mica.widgets.MiWidget
                      extended bycom.swfm.mica.widgets.MiAdjuster
                          extended bycom.swfm.mica.widgets.MiSlider
                              extended bycom.swfm.mica.widgets.MiScrollBar
All Implemented Interfaces:
MiiActionHandler, MiiActionTypes, MiiAdjuster, MiiAttributeTypes, MiiCopyable, MiiDragAndDropParticipant, MiiDraggable, MiiEventTypes, MiiLayout, MiiNames, MiiPropertyTypes, MiiTypes

public class MiScrollBar
extends MiSlider
implements MiiActionHandler

Version:
%I% %G%
Author:
Michael L. Davis

Field Summary
static java.lang.String Mi_DOWN_ARROW_NAME
           
static java.lang.String Mi_LEFT_ARROW_NAME
           
static java.lang.String Mi_RIGHT_ARROW_NAME
           
static java.lang.String Mi_SCROLLBAR_PROTOTYPE_CLASS_NAME
           
static java.lang.String Mi_UP_ARROW_NAME
           
                     
Constructor Summary
MiScrollBar()
          Constructs a new MiScrollBar with a horizontal orientation.
MiScrollBar(int orient)
          Constructs a new MiScrollBar with the given orientation.
 
Method Summary
 void calcMinimumSize(MiSize size)
          Gets the minimum size of this widget.
 void calcPreferredSize(MiSize size)
          Gets the preferred size of this widget.
static MiWidget create()
          Creates a new widget from the prototype.
 int drag(MiEvent event)
          Handles the user's dragging the associated 'thumb' of this widget in order to change the value.
 MiPushButton getLessArrow()
           
 MiPushButton getMoreArrow()
           
 java.lang.String getPropertyValue(java.lang.String name)
          Gets the textual value of the property with the given name.
static MiWidget getPrototype()
          Gets the prototype that is to be copied when the #create method is called and to have it's attributes and handlers copied whenever any widget of this type is created.
 boolean processAction(MiiAction action)
          Process the given action.
 void setNormalizedPositionOfThumb(double normalizedValue)
          Sets the normalized (between 0.0 and 1.0 inclusive) position of the associated 'thumb' of this widget (a value of 0.0 sets the thumb to the left side of a horizontally oriented widget and the bottom of a vertically oriented widget.
 void setPropertyValue(java.lang.String name, java.lang.String value)
          Sets the property with the given name to the given value.
static void setPrototype(MiScrollBar p)
          Sets the prototype that is to be copied when the #create method is called and to have it's attributes and handlers copied whenever any widget of this type is created.
 
Methods inherited from class com.swfm.mica.widgets.MiSlider
adjustValueFromVector, getNormalizedLengthOfThumb, getOrientation, getSlotWidth, getThumb, getThumbWidth, getValue, layoutParts, moveOneChunkTowardsLocation, refreshLookAndFeel, setNormalizedLengthOfThumb, setNormalizedValue, setOrientation, setPrototype, setSlotWidth, setThumb, setThumbWidth, setValue, setValueFromLocation
 
Methods inherited from class com.swfm.mica.widgets.MiAdjuster
decreaseOneChunk, decreaseOnePage, decreaseOneUnit, decreaseToMinimum, drop, getChunkIncrement, getCurrentValue, getGenerateAbsolutePositionsOnly, getMaximumValue, getMinimumValue, getNormalizedValue, getObserver, getOrientationOfGeneratedMessages, getPageIncrement, getUnitIncrement, increaseOneChunk, increaseOnePage, increaseOneUnit, increaseToMaximum, moveOneChunkTowardsValue, pickup, setChunkIncrement, setCurrentValue, setGenerateAbsolutePositionsOnly, setMaximumValue, setMinimumValue, setObserver, setOrientationOfGeneratedMessages, setPageIncrement, setScrollable, setUnitIncrement
 
Methods inherited from class com.swfm.mica.widgets.MiWidget
copy, doExport, getContents, getEnterKeyFocusAttributes, getEnterKeyFocusBackgroundColor, getEnterKeyFocusBorderLook, getEnterKeyFocusColor, getEnterKeyFocusStatusHelp, getInSensitiveAttributes, getInSensitiveBackgroundColor, getInSensitiveBorderLook, getInSensitiveColor, getInSensitiveStatusHelp, getKeyboardFocusAttributes, getKeyboardFocusBackgroundColor, getKeyboardFocusBorderLook, getKeyboardFocusColor, getKeyboardFocusStatusHelp, getMouseFocusAttributes, getMouseFocusBackgroundColor, getMouseFocusBorderLook, getMouseFocusColor, getMouseFocusStatusHelp, getNormalAttributes, getNormalBackgroundColor, getNormalBorderLook, getNormalColor, getNormalStatusHelp, getPropertyDescriptions, getRadioStateEnforcer, getSelectedAttributes, getSelectedBackgroundColor, getSelectedBorderLook, getSelectedColor, getSelectedStatusHelp, getToolkit, getWidgetAttributes, isAutoAttributesEnabled, isDesignTime, select, setAttributes, setAutoAttributesEnabled, setContents, setCurrentBackgroundColor, setCurrentColor, setEnterKeyFocus, setEnterKeyFocusAttributes, setEnterKeyFocusBackgroundColor, setEnterKeyFocusBorderLook, setEnterKeyFocusColor, setEnterKeyFocusStatusHelpMessage, setInSensitiveAttributes, setInSensitiveBackgroundColor, setInSensitiveBorderLook, setInSensitiveColor, setInSensitiveStatusHelpMessage, setKeyboardFocus, setKeyboardFocusAttributes, setKeyboardFocusBackgroundColor, setKeyboardFocusBorderLook, setKeyboardFocusColor, setKeyboardFocusStatusHelpMessage, setMouseFocus, setMouseFocusAttributes, setMouseFocusBackgroundColor, setMouseFocusBorderLook, setMouseFocusColor, setMouseFocusStatusHelpMessage, setNormalAttributes, setNormalBackgroundColor, setNormalBorderLook, setNormalColor, setNormalStatusHelpMessage, setPropertyValues, setRadioStateEnforcer, setSelectedAttributes, setSelectedBackgroundColor, setSelectedBorderLook, setSelectedColor, setSelectedStatusHelpMessage, setSensitive, setWidgetAttributes, setWidgetAttributes
 
Methods inherited from class com.swfm.mica.core.MiVisibleContainer
getContainerLayoutSpec, getDisplaysFocusBorder, getInnerBounds, getIntersectionWithLine, getOKToDrawOutsideInnerBounds, getShadowShape, getShape, getTotalMargins, getVisibleContainerAutomaticLayoutEnabled, invalidateArea, isShapeShrinkToFitEnabled, pick, setContainerLayoutSpec, setDisplaysFocusBorder, setMargins, setOKToDrawOutsideInnerBounds, setShape, setShape, setShapeShrinkToFitEnabled, setVisibleContainerAutomaticLayoutEnabled
 
Methods inherited from class com.swfm.mica.layouts.MiLayout
determinesPreferredAndMinimumSizes, getAlleyHSpacing, getAlleyMargins, getAlleyVSpacing, getCellMargins, getCellMargins, getElementHJustification, getElementHSizing, getElementVJustification, getElementVSizing, getInsetMargins, getInsetMargins, getLastElementJustification, getTarget, getUniqueElementIndex, getUniqueElementSizing, isEnabled, isIndependantOfTargetPosition, isScalingOfPartsWhenBoundsChangesHandledDuringLayout, makeCopy, setAlleyHSpacing, setAlleySpacing, setAlleyVSpacing, setCellMargins, setCellMargins, setElementHJustification, setElementHSizing, setElementJustification, setElementSizing, setElementVJustification, setElementVSizing, setEnabled, setInsetMargins, setInsetMargins, setLastElementJustification, setScalingOfPartsWhenBoundsChangesHandledDuringLayout, setTarget, setUniqueElementIndex, setUniqueElementSizing, toString
 
Methods inherited from class com.swfm.mica.core.MiContainer
appendPart, containsPart, deepCopy, doImport, getIndexOfPart, getKeepConnectionsBelowNodes, getNumberOfParts, getPart, getPart, getSupportedImportFormats, hasEventHandlers, hasValidCachedEventHandlerInfo, insertPart, invalidateCachedEventHandlerInfo, isContainerOf, isContainerOf, isContainerOfWithAttachments, pickDeepListContents, pickObject, removeAllParts, removePart, removePart, setKeepConnectionsBelowNodes, setPart, translate
 
Methods inherited from class com.swfm.mica.core.MiPart
_reCalcBounds, _render, _replaceBounds, _setContainer, _setDrawManager, _setValidatingLayout, appendActionHandler, appendActionHandler, appendActionHandler, appendActionHandler, appendActionHandler, appendAttachment, appendAttachment, appendCommandHandler, appendCommandHandler, appendCommandHandler, appendConnection, appendContainer, appendEventHandler, appendItem, appendPoint, appendPoint, applyCustomLookAndFeel, containsItem, containsOpaqueRectangles, copy, deleteAllConnections, deleteAllParts, deleteSelf, dispatchAction, dispatchAction, dispatchAction, dispatchActionRequest, dispatchActionRequest, dispatchActionRequest, dispatchEvent, draw, drawNow, drawNow, flip, flip, freeAccessLock, get1DShapeStrokeBackgroundColor, get1DShapeStrokesFilled, getAccessLock, getActionHandler, getActionsGenerated, getActionsLocallyGenerated, getActionsRequestedFromParts, getAfterRenderer, getAlphaCompositeRenderMode, getAnnotationPointManager, getAssociatedParts, getAttachment, getAttachment, getAttachmentMargins, getAttachments, getAttributeLockMask, getAttributePublicMask, getAttributes, getAttributeValue, getBackgroundColor, getBackgroundImage, getBackgroundRenderer, getBackgroundTile, getBalloonHelp, getBeforeRenderer, getBlackColor, getBorderHiliteColor, getBorderHiliteWidth, getBorderLook, getBorderRenderer, getBounds, getBounds, getCenter, getCenter, getCenterOfRotation, getCenterX, getCenterY, getColor, getConnection, getConnectionPointManager, getContainer, getContainerRequestedActions, getContainingEditor, getContainingWindow, getContextCursor, getContextMenu, getContextMenu, getControlPointManager, getCustomLookAndFeels, getCustomLookAndFeels, getDarkColor, getDeepConnection, getDeepConnection, getDeepConnections, getDeeplyInvalidateAreas, getDefaultAttributes, getDialogHelp, getDoubleBuffer, getDragAndDropBehavior, getDrawBounds, getDrawManager, getEventHandler, getEventHandler, getEventHandlerWithClass, getEventHandlingDisabledByContainer, getEventHandlingEnabled, getFlipped, getFont, getFontHorizontalJustification, getFontPointSize, getFontVerticalJustification, getHasBorderHilite, getHasShadow, getHeight, getID, getIncomingInvalidLayoutNotificationsEnabled, getIndexOfItem, getInnerBounds, getInvalidAreaNotificationsEnabled, getInvalidLayoutNotificationsEnabled, getItem, getItem, getKeyFocusTraversalGroup, getLayout, getLayoutManipulator, getLightColor, getLineEndSize, getLineEndsRenderer, getLineEndsSizeFnOfLineWidth, getLineEndStyle, getLineStartSize, getLineStartStyle, getLineStyle, getLineWidth, getLocallyRequestedEventTypes, getManipulator, getMargins, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumPickAreaSize, getMinimumSize, getMinimumWidth, getName, getNumberOfActionHandlers, getNumberOfAttachments, getNumberOfConnections, getNumberOfContainers, getNumberOfDeepConnections, getNumberOfEventHandlers, getNumberOfItems, getNumberOfPoints, getNumberOfResources, getOutgoingInvalidLayoutNotificationsEnabled, getPoint, getPoint, getPointEntryAngle, getPointExitAngle, getPointX, getPointY, getPreferredSize, getPrototypeManipulator, getRelativeLocation, getResource, getResourceName, getRootWindow, getRotation, getSelectionGraphics, getShadowColor, getShadowDirection, getShadowLength, getShadowRenderer, getShadowStyle, getSize, getSnapPointManager, getStatusHelp, getSupportedExportFormats, getThisOrPartHasInvalidArea, getToolHintHelp, getTotalNumberOfPartsCreated, getTransform, getTransparency, getValidatingLayout, getVisibilityAnimator, getWhiteColor, getWidth, getWriteMode, getXmax, getXmin, getXorColor, getYmax, getYmin, hasAttachment, hasAttribute, hasEnterKeyFocus, hasEventHandler, hasFixedAspectRatio, hasFixedHeight, hasFixedWidth, hasKeyboardFocus, hasMouseFocus, hasOverriddenMinimumSize, hasOverriddenPreferredSize, hasProperty, hasTotallyInvalidArea, hasValidLayout, insertActionHandler, insertActionHandler, insertActionHandler, insertConnection, insertContainer, insertEventHandler, insertItem, insertPoint, insertPoint, invalidateArea, invalidateLayout, isAcceptingEnterKeyFocus, isAcceptingKeyboardFocus, isAcceptingMouseFocus, isAcceptingTabKeys, isActionDispatchingEnabled, isConnectable, isConnectedTo, isCopyable, isCopyableAsPartOfCopyable, isDeletable, isDoubleBuffered, isDragAndDropSource, isDragAndDropTarget, isFilled, isFontBold, isFontItalic, isFontUnderlined, isHidden, isMovable, isOpaqueRectangle, isPickable, isPickableWhenTransparent, isPrintable, isSavable, isSelectable, isSelected, isSensitive, isShowing, isSnappable, isUngroupable, isValidConnectionDestination, isValidConnectionSource, isVisible, makeImageFromArea, makeLayoutManipulator, makeManipulator, optimizedInvalidateArea, optimizedInvalidateDrawBoundsArea, overrideAttributes, overrideEventHandlingDisabledByContainer, packLayout, pickDeepList, preRenderToDoubleBuffer, refreshBounds, refreshLookAndFeel, removeActionHandler, removeActionHandler, removeActionHandlers, removeAllActionHandlers, removeAllAttachments, removeAllConnections, removeAllEventHandlers, removeAllItems, removeAllManipulators, removeAttachment, removeAttachment, removeCommandHandler, removeCommandHandler, removeConnection, removeConnection, removeContainer, removeContainer, removeEventHandler, removeFromAllContainers, removeItem, removeItem, removePoint, removeResource, removeSelf, replaceDrawBounds, replaceSelf, requestEnterKeyFocus, requestKeyboardFocus, rotate, rotate, rotateTo, scale, scale, scale, set1DShapeStrokeBackgroundColor, set1DShapeStrokesFilled, setAcceptingEnterKeyFocus, setAcceptingKeyboardFocus, setAcceptingMouseFocus, setAcceptingTabKeys, setActionDispatchingEnabled, setAfterRenderer, setAlphaCompositeRenderMode, setAnnotationPointManager, setAttachmentDrawnAfter, setAttachmentMargins, setAttachmentsVisibility, setAttributeLockMask, setAttributePublicMask, setAttributeValue, setAttributeValue, setAttributeValue, setAttributeValue, setAttributeValue, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundRenderer, setBackgroundTile, setBalloonHelp, setBalloonHelpMessage, setBeforeRenderer, setBlackColor, setBorderHiliteColor, setBorderHiliteWidth, setBorderLook, setBorderRenderer, setBounds, setBounds, setCenter, setCenter, setCenterX, setCenterY, setColor, setColor, setConnectable, setConnectionPointManager, setContextCursor, setContextMenu, setControlPointManager, setCopyable, setCopyableAsPartOfCopyable, setCustomLookAndFeels, setCustomLookAndFeels, setDarkColor, setDeeplyInvalidateAreas, setDefaultAttributes, setDeletable, setDialogHelp, setDialogHelpMessage, setDoubleBuffer, setDoubleBuffered, setDragAndDropBehavior, setEventHandlingEnabled, setFilled, setFixedAspectRatio, setFixedHeight, setFixedWidth, setFont, setFontBold, setFontHorizontalJustification, setFontItalic, setFontPointSize, setFontUnderlined, setFontVerticalJustification, setHasBorderHilite, setHasShadow, setHeight, setHidden, setIncomingInvalidLayoutNotificationsEnabled, setInvalidAreaNotificationsEnabled, setInvalidLayoutNotificationsEnabled, setIsDragAndDropSource, setIsDragAndDropTarget, setIsOpaqueRectangle, setItem, setKeyFocusTraversalGroup, setLayout, setLightColor, setLineEndSize, setLineEndSizeFnOfLineWidth, setLineEndsRenderer, setLineEndStyle, setLineStartSize, setLineStartStyle, setLineStyle, setLineWidth, setMaximumHeight, setMaximumWidth, setMinimumHeight, setMinimumPickAreaSize, setMinimumSize, setMinimumWidth, setMovable, setName, setNumberOfPoints, setOutgoingInvalidLayoutNotificationsEnabled, setPickable, setPickableWhenTransparent, setPoint, setPoint, setPreferredSize, setPrintable, setPrototypeManipulator, setResource, setSavable, setSelectable, setSelectionGraphics, setShadowColor, setShadowDirection, setShadowLength, setShadowRenderer, setShadowStyle, setSize, setSize, setSnappable, setSnapPointManager, setStatusHelp, setStatusHelpMessage, setSupportedImportFormats, setToolHintHelp, setToolHintMessage, setTransparency, setTransparency, setUngroupable, setVisibilityAnimator, setVisible, setWhiteColor, setWidth, setWriteMode, setXmax, setXmin, setXorColor, setYmax, setYmin, supportsImportOfSpecificInstance, translate, translate, translatePoint, validateLayout, validatePropertyValue, waitUntilRedrawn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.swfm.mica.layouts.MiiLayout
getMinimumSize, getPreferredSize, invalidateLayout
 

Field Detail

Mi_SCROLLBAR_PROTOTYPE_CLASS_NAME

public static final java.lang.String Mi_SCROLLBAR_PROTOTYPE_CLASS_NAME
See Also:
Constant Field Values

Mi_RIGHT_ARROW_NAME

public static final java.lang.String Mi_RIGHT_ARROW_NAME
See Also:
Constant Field Values

Mi_LEFT_ARROW_NAME

public static final java.lang.String Mi_LEFT_ARROW_NAME
See Also:
Constant Field Values

Mi_UP_ARROW_NAME

public static final java.lang.String Mi_UP_ARROW_NAME
See Also:
Constant Field Values

Mi_DOWN_ARROW_NAME

public static final java.lang.String Mi_DOWN_ARROW_NAME
See Also:
Constant Field Values
Constructor Detail

MiScrollBar

public MiScrollBar()
Constructs a new MiScrollBar with a horizontal orientation.


MiScrollBar

public MiScrollBar(int orient)
Constructs a new MiScrollBar with the given orientation.

Method Detail

getMoreArrow

public MiPushButton getMoreArrow()

getLessArrow

public MiPushButton getLessArrow()

create

public static MiWidget create()
Creates a new widget from the prototype. This is the factory pattern implementation for this widget. If the prototype is null, then the default contructor is used.

Returns:
the new widget
See Also:
setPrototype(com.swfm.mica.widgets.MiScrollBar)

calcPreferredSize

public void calcPreferredSize(MiSize size)
Gets the preferred size of this widget.

Overrides:
calcPreferredSize in class MiSlider
Parameters:
size - the returned preferred size.

calcMinimumSize

public void calcMinimumSize(MiSize size)
Gets the minimum size of this widget.

Overrides:
calcMinimumSize in class MiSlider
Parameters:
size - the returned minimum size.

setNormalizedPositionOfThumb

public void setNormalizedPositionOfThumb(double normalizedValue)
Sets the normalized (between 0.0 and 1.0 inclusive) position of the associated 'thumb' of this widget (a value of 0.0 sets the thumb to the left side of a horizontally oriented widget and the bottom of a vertically oriented widget. Similarly a value of 1.0 sets the thumb to the right side of a horizontally oriented widget and the top of a vertically oriented widget.

Overrides:
setNormalizedPositionOfThumb in class MiSlider
Parameters:
normalizedValue - the normalized thumb position

setPrototype

public static void setPrototype(MiScrollBar p)
Sets the prototype that is to be copied when the #create method is called and to have it's attributes and handlers copied whenever any widget of this type is created.

Parameters:
p - the new prototype
See Also:
getPrototype(), create(), MiPart.copy()

getPrototype

public static MiWidget getPrototype()
Gets the prototype that is to be copied when the #create method is called and to have it's attributes and handlers copied whenever any widget of this type is created.

Returns:
the prototype
See Also:
setPrototype(com.swfm.mica.widgets.MiScrollBar), create(), MiPart.copy()

processAction

public boolean processAction(MiiAction action)
Process the given action.

Specified by:
processAction in interface MiiActionHandler
Parameters:
action - the action to process.
Returns:
true if it is OK to send action to the next action handler false if it is NOT OK to send action to the next action handler

drag

public int drag(MiEvent event)
Handles the user's dragging the associated 'thumb' of this widget in order to change the value.

Specified by:
drag in interface MiiDraggable
Overrides:
drag in class MiSlider
Parameters:
event - the user's event
Returns:
the event is consumed

setPropertyValue

public void setPropertyValue(java.lang.String name,
                             java.lang.String value)
Sets the property with the given name to the given value. If no such property is found then sets the attribute with the given name to the given value. Valid attribute names are found in the MiiNames.attributeNames array.

Overrides:
setPropertyValue in class MiWidget
Parameters:
name - the name of an attribute
value - the value of the attribute

getPropertyValue

public java.lang.String getPropertyValue(java.lang.String name)
Gets the textual value of the property with the given name. If the value is null then MiiTypes.Mi_NULL_VALUE_NAME is returned.

Overrides:
getPropertyValue in class MiWidget
Parameters:
name - the name of a property
Returns:
the string value of the property