com.swfm.mica.widgets
Class MiScrolledBox

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.MiScrolledBox
All Implemented Interfaces:
MiiActionHandler, MiiActionTypes, MiiAttributeTypes, MiiCopyable, MiiDragAndDropParticipant, MiiEventTypes, MiiLayout, MiiNames, MiiPropertyTypes, MiiTypes

public class MiScrolledBox
extends MiWidget
implements MiiActionHandler, MiiActionTypes

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

Field Summary
                   
Constructor Summary
MiScrolledBox()
           
MiScrolledBox(MiPart subject)
           
 
Method Summary
 void appendItem(MiPart part)
          Appends the given item to this container.
 void calcMinimumSize(MiSize size)
          Gets the minimum size of this MiPart.
 void calcPreferredSize(MiSize size)
          Gets the preferred size of this MiPart.
 MiVisibleContainer getBox()
           
 Strings getContents()
          Gets the contents (list of values) this widget displays.
 MiScrollBar getHScrollBar()
           
 MiRowLayout getHScrollBarBox()
           
 int getHScrollBarDisplayPolicy()
          Gets the horizontal scrollbar display policy which is either: Mi_DISPLAY_ALWAYS Mi_DISPLAY_NEVER Mi_DISPLAY_AS_NEEDED (the default)
 MiiScrollableData getScrollable()
           
 MiPart getSubject()
           
 java.lang.String getValue()
          Gets the value this widget displays.
 MiScrollBar getVScrollBar()
           
 MiColumnLayout getVScrollBarBox()
           
 int getVScrollBarDisplayPolicy()
          Gets the vertical scrollbar display policy which is either: Mi_DISPLAY_ALWAYS Mi_DISPLAY_NEVER Mi_DISPLAY_AS_NEEDED (the default)
 boolean hasValidLayout()
          Gets whether this MiPart's layout, if any, is valid and does not need to be recalculated.
 void invalidateLayout()
          This routine catches changes in layout of the subject and registers this with the containing window so that the containers of this are not re-laid-out which would cause an annoying visual disturbance.
 boolean isIgnoringScrollableContentWhenDeterminingPreferredSize()
          Gets whether the size of this scolled box is entirely determined by the container, usually a layout, of whether the preferred size of the scrollable content is taken ito consideration.
 boolean processAction(MiiAction action)
          Processes the given action.
 void setBackgroundColor(java.awt.Color c)
          Sets the background color.
 void setContents(Strings contents)
          Sets the contents (list of values) this widget displays.
 void setHScrollBarDisplayPolicy(int policy)
          Sets the horizontal scrollbar display policy to either: Mi_DISPLAY_ALWAYS Mi_DISPLAY_NEVER Mi_DISPLAY_AS_NEEDED (the default)
 void setIgnoringScrollableContentWhenDeterminingPreferredSize(boolean flag)
          Sets whether the size of this scolled box is entirely determined by the container, usually a layout, of whether the preferred size of the scrollable content is taken ito consideration.
 void setScrollable(MiiScrollableData scrollable)
           
 void setSubject(MiPart subject)
           
 void setValue(java.lang.String value)
          Sets the value this widget displays.
 void setVScrollBarDisplayPolicy(int policy)
          Gets the vertical scrollbar display policy which is either: Mi_DISPLAY_ALWAYS Mi_DISPLAY_NEVER Mi_DISPLAY_AS_NEEDED (the default)
 void updateScrollBars()
           
 
Methods inherited from class com.swfm.mica.widgets.MiWidget
copy, doExport, 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, getPropertyValue, getRadioStateEnforcer, getSelectedAttributes, getSelectedBackgroundColor, getSelectedBorderLook, getSelectedColor, getSelectedStatusHelp, getToolkit, getWidgetAttributes, isAutoAttributesEnabled, isDesignTime, select, setAttributes, setAutoAttributesEnabled, 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, setPropertyValue, 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, layoutParts, 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, 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, insertActionHandler, insertActionHandler, insertActionHandler, insertConnection, insertContainer, insertEventHandler, insertItem, insertPoint, insertPoint, invalidateArea, 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, 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, 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
 

Constructor Detail

MiScrolledBox

public MiScrolledBox()

MiScrolledBox

public MiScrolledBox(MiPart subject)
Method Detail

appendItem

public void appendItem(MiPart part)
Description copied from class: MiPart
Appends the given item to this container.

Overrides:
appendItem in class MiPart
Parameters:
part - the item to append

setScrollable

public void setScrollable(MiiScrollableData scrollable)

setSubject

public void setSubject(MiPart subject)

getSubject

public MiPart getSubject()

getScrollable

public MiiScrollableData getScrollable()

getHScrollBarBox

public MiRowLayout getHScrollBarBox()

getVScrollBarBox

public MiColumnLayout getVScrollBarBox()

getHScrollBar

public MiScrollBar getHScrollBar()

getVScrollBar

public MiScrollBar getVScrollBar()

getBox

public MiVisibleContainer getBox()

setHScrollBarDisplayPolicy

public void setHScrollBarDisplayPolicy(int policy)
Sets the horizontal scrollbar display policy to either: Mi_DISPLAY_ALWAYS Mi_DISPLAY_NEVER Mi_DISPLAY_AS_NEEDED (the default)

Parameters:
policy - the policy
See Also:
setVScrollBarDisplayPolicy(int), getHScrollBarDisplayPolicy()

getHScrollBarDisplayPolicy

public int getHScrollBarDisplayPolicy()
Gets the horizontal scrollbar display policy which is either: Mi_DISPLAY_ALWAYS Mi_DISPLAY_NEVER Mi_DISPLAY_AS_NEEDED (the default)

Returns:
the policy
See Also:
setVScrollBarDisplayPolicy(int), setHScrollBarDisplayPolicy(int)

setVScrollBarDisplayPolicy

public void setVScrollBarDisplayPolicy(int policy)
Gets the vertical scrollbar display policy which is either: Mi_DISPLAY_ALWAYS Mi_DISPLAY_NEVER Mi_DISPLAY_AS_NEEDED (the default)

Parameters:
policy - the policy
See Also:
getVScrollBarDisplayPolicy(), setHScrollBarDisplayPolicy(int)

getVScrollBarDisplayPolicy

public int getVScrollBarDisplayPolicy()
Gets the vertical scrollbar display policy which is either: Mi_DISPLAY_ALWAYS Mi_DISPLAY_NEVER Mi_DISPLAY_AS_NEEDED (the default)

Returns:
the policy
See Also:
setVScrollBarDisplayPolicy(int), setHScrollBarDisplayPolicy(int)

setIgnoringScrollableContentWhenDeterminingPreferredSize

public void setIgnoringScrollableContentWhenDeterminingPreferredSize(boolean flag)
Sets whether the size of this scolled box is entirely determined by the container, usually a layout, of whether the preferred size of the scrollable content is taken ito consideration. The default is 'false'.

See Also:
isIgnoringScrollableContentWhenDeterminingPreferredSize()

isIgnoringScrollableContentWhenDeterminingPreferredSize

public boolean isIgnoringScrollableContentWhenDeterminingPreferredSize()
Gets whether the size of this scolled box is entirely determined by the container, usually a layout, of whether the preferred size of the scrollable content is taken ito consideration. The default is 'false'.

Returns:
true if ignoring scrollable content
See Also:
setIgnoringScrollableContentWhenDeterminingPreferredSize(boolean)

setBackgroundColor

public void setBackgroundColor(java.awt.Color c)
Description copied from class: MiPart
Sets the background color.

Overrides:
setBackgroundColor in class MiPart
Parameters:
c - the color

setValue

public void setValue(java.lang.String value)
Description copied from class: MiWidget
Sets the value this widget displays. Override this, if desired, as it implements the core functionality. Most widgets do.

Overrides:
setValue in class MiWidget
Parameters:
value - the value in the form of a text string

getValue

public java.lang.String getValue()
Description copied from class: MiWidget
Gets the value this widget displays. Override this, if desired, as it implements the core functionality. Most widgets do.

Overrides:
getValue in class MiWidget
Returns:
the value in the form of a text string

setContents

public void setContents(Strings contents)
Description copied from class: MiWidget
Sets the contents (list of values) this widget displays. Override this, if desired, as it implements the core functionality. Most major widgets do.

Overrides:
setContents in class MiWidget
Parameters:
contents - the contents in the form of a list of text strings

getContents

public Strings getContents()
Description copied from class: MiWidget
Gets the contents (list of values) this widget displays. Override this, if desired, as it implements the core functionality. Most major widgets do.

Overrides:
getContents in class MiWidget
Returns:
the contents in the form of a list of text strings

processAction

public boolean processAction(MiiAction action)
Description copied from interface: MiiActionHandler
Processes 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

calcPreferredSize

public void calcPreferredSize(MiSize size)
Description copied from class: MiVisibleContainer
Gets the preferred size of this MiPart. Override this, if desired, as it implements the core functionality.

Overrides:
calcPreferredSize in class MiVisibleContainer
Parameters:
size - the (returned) preferred size
See Also:
MiPart.getPreferredSize(com.swfm.mica.core.MiSize)

calcMinimumSize

public void calcMinimumSize(MiSize size)
Description copied from class: MiVisibleContainer
Gets the minimum size of this MiPart. Override this, if desired, as it implements the core functionality.

Overrides:
calcMinimumSize in class MiVisibleContainer
Parameters:
size - the (returned) minimum size
See Also:
MiPart.getMinimumSize(com.swfm.mica.core.MiSize)

invalidateLayout

public void invalidateLayout()
This routine catches changes in layout of the subject and registers this with the containing window so that the containers of this are not re-laid-out which would cause an annoying visual disturbance.

Specified by:
invalidateLayout in interface MiiLayout
Overrides:
invalidateLayout in class MiPart
See Also:
MiPart.setInvalidLayoutNotificationsEnabled(boolean), MiPart.setIncomingInvalidLayoutNotificationsEnabled(boolean), MiPart.setOutgoingInvalidLayoutNotificationsEnabled(boolean)

hasValidLayout

public boolean hasValidLayout()
Description copied from class: MiPart
Gets whether this MiPart's layout, if any, is valid and does not need to be recalculated.

Overrides:
hasValidLayout in class MiPart
Returns:
true if any layout is valid

updateScrollBars

public void updateScrollBars()