com.swfm.mica.core
Class MiVisibleContainer

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
All Implemented Interfaces:
MiiActionTypes, MiiAttributeTypes, MiiCopyable, MiiDragAndDropParticipant, MiiEventTypes, MiiLayout, MiiNames, MiiPropertyTypes, MiiTypes
Direct Known Subclasses:
MiDockingPanel, MiDrawingPages, MiHierarchicalInspector, MiManagedPointsAttributesPanel, MiShapeAttributesPanel, MiWidget

public class MiVisibleContainer
extends MiLayout

This is a MiContainer that can have a visible background. The shape the background has is specified by choosing one of a number of predefined shape types or by specifying a MiPart as the shape. There are also a number of options available to specify how the shape is sized with respect to the bounds of the all of the parts in this container. The background shape always has the same attribute values as this container (for example: background color and border look). Because this is also a MiLayout, the parts of this container can also be automatically laid out, when enabled (see setVisibleContainerAutomaticLayoutEnabled()). Supported contraints are: elementHSizing elementHJustification elementVSizing elementVJustification This layout occurs in addition to any layout that may also be assigned to this container (see setLayout()).

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

Field Summary
static int CIRCLE_SHAPE
           
static int DIAMOND_SHAPE
           
static int MAKE_CONTAINER_SAME_SIZE_AS_CONTENTS
           
static int MAKE_CONTAINER_SAME_SIZE_AS_CONTENTS_OR_OVERRIDDEN_PREFERRED_SIZE
           
static int MAKE_CONTAINER_SAME_SIZE_OR_BIGGER_THAN_CONTENTS
           
static java.lang.String Mi_SHAPE_PROPERTY_NAME
           
static java.lang.String Mi_SHRINK_SHAPE_TO_CONTENT_PROPERTY_NAME
           
static int RECTANGLE_SHAPE
           
static int ROUND_RECTANGLE_SHAPE
           
static int TRIANGLE_POINTING_DOWN_SHAPE
           
static int TRIANGLE_POINTING_LEFT_SHAPE
           
static int TRIANGLE_POINTING_RIGHT_SHAPE
           
static int TRIANGLE_POINTING_UP_SHAPE
           
                 
Constructor Summary
MiVisibleContainer()
          Constructs a new MiVisibleContainer.
 
Method Summary
 void calcMinimumSize(MiSize size)
          Gets the minimum size of this MiPart.
 void calcPreferredSize(MiSize size)
          Gets the preferred size of this MiPart.
 void copy(MiPart source)
          Copy the state of this MiPart into the target MiPart.
 int getContainerLayoutSpec()
          Gets how the background shape is automatically resized with respect to the bounds of the parts of this container.
 boolean getDisplaysFocusBorder()
          Gets whether the focus border (hilite border) is enabled for this container.
 MiBounds getInnerBounds(MiBounds b)
          Gets the inner bounds of this MiPart.
 boolean getIntersectionWithLine(MiPoint insidePoint, MiPoint otherPoint, MiPoint returnedIntersectionPoint)
          Gets whether if there is an intersection between the line formed by the given points and the outer bounds of this MiPart.
 boolean getOKToDrawOutsideInnerBounds()
           
 MiPropertyDescriptions getPropertyDescriptions()
          Gets the descriptions of all of the properties.
 java.lang.String getPropertyValue(java.lang.String name)
          Gets the textual value of the property with the given name.
 MiPart getShadowShape()
          Gets the shape of any shadow.
 MiPart getShape()
          Gets the background shape of this visible container.
 MiMargins getTotalMargins()
          Gets the total margins (inset margins plus margins).
 boolean getVisibleContainerAutomaticLayoutEnabled()
          Gets whether the automatic background shape resizing is enabled.
 void invalidateArea(MiBounds area)
          Invalidates the given area of this container that intersects the draw bounds.
 boolean isShapeShrinkToFitEnabled()
           
 boolean pick(MiBounds area)
          Gets whether the given area intersects the bounds of this MiPart.
 void setAttributes(MiAttributes atts)
          Assigns the given attributes to this MiPart.
 void setContainerLayoutSpec(int spec)
          Specifies how the background shape is to be automatically resized with respect to the bounds of the parts of this container.
 void setDisplaysFocusBorder(boolean flag)
          Specifies whether the focus border (hilite border) is to be enabled for this container.
 void setMargins(MiMargins m)
          Sets the margins of this MiPart.
 void setOKToDrawOutsideInnerBounds(boolean flag)
           
 void setPropertyValue(java.lang.String name, java.lang.String value)
          Sets the property with the given name to the given value.
 void setShape(int style)
          Sets the background shape type of this visible container.
 void setShape(MiPart s)
          Sets the background shape of this visible container.
 void setShapeShrinkToFitEnabled(boolean flag)
           
 void setVisibleContainerAutomaticLayoutEnabled(boolean flag)
          Specifies whether the automatic background shape resizing is enabled.
 
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, appendItem, appendPoint, appendPoint, applyCustomLookAndFeel, containsItem, containsOpaqueRectangles, copy, deleteAllConnections, deleteAllParts, deleteSelf, dispatchAction, dispatchAction, dispatchAction, dispatchActionRequest, dispatchActionRequest, dispatchActionRequest, dispatchEvent, doExport, 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, 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, select, 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, setMouseFocus, setMovable, setName, setNumberOfPoints, setOutgoingInvalidLayoutNotificationsEnabled, setPickable, setPickableWhenTransparent, setPoint, setPoint, setPreferredSize, setPrintable, setPropertyValues, setPrototypeManipulator, setResource, setSavable, setSelectable, setSelectionGraphics, setSensitive, 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_SHAPE_PROPERTY_NAME

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

Mi_SHRINK_SHAPE_TO_CONTENT_PROPERTY_NAME

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

RECTANGLE_SHAPE

public static final int RECTANGLE_SHAPE
See Also:
Constant Field Values

CIRCLE_SHAPE

public static final int CIRCLE_SHAPE
See Also:
Constant Field Values

ROUND_RECTANGLE_SHAPE

public static final int ROUND_RECTANGLE_SHAPE
See Also:
Constant Field Values

DIAMOND_SHAPE

public static final int DIAMOND_SHAPE
See Also:
Constant Field Values

TRIANGLE_POINTING_UP_SHAPE

public static final int TRIANGLE_POINTING_UP_SHAPE
See Also:
Constant Field Values

TRIANGLE_POINTING_DOWN_SHAPE

public static final int TRIANGLE_POINTING_DOWN_SHAPE
See Also:
Constant Field Values

TRIANGLE_POINTING_RIGHT_SHAPE

public static final int TRIANGLE_POINTING_RIGHT_SHAPE
See Also:
Constant Field Values

TRIANGLE_POINTING_LEFT_SHAPE

public static final int TRIANGLE_POINTING_LEFT_SHAPE
See Also:
Constant Field Values

MAKE_CONTAINER_SAME_SIZE_AS_CONTENTS

public static final int MAKE_CONTAINER_SAME_SIZE_AS_CONTENTS
See Also:
Constant Field Values

MAKE_CONTAINER_SAME_SIZE_OR_BIGGER_THAN_CONTENTS

public static final int MAKE_CONTAINER_SAME_SIZE_OR_BIGGER_THAN_CONTENTS
See Also:
Constant Field Values

MAKE_CONTAINER_SAME_SIZE_AS_CONTENTS_OR_OVERRIDDEN_PREFERRED_SIZE

public static final int MAKE_CONTAINER_SAME_SIZE_AS_CONTENTS_OR_OVERRIDDEN_PREFERRED_SIZE
See Also:
Constant Field Values
Constructor Detail

MiVisibleContainer

public MiVisibleContainer()
Constructs a new MiVisibleContainer.

Method Detail

setContainerLayoutSpec

public void setContainerLayoutSpec(int spec)
Specifies how the background shape is to be automatically resized with respect to the bounds of the parts of this container. Valid values are: MAKE_CONTAINER_SAME_SIZE_AS_CONTENTS MAKE_CONTAINER_SAME_SIZE_OR_BIGGER_THAN_CONTENTS MAKE_CONTAINER_SAME_SIZE_AS_CONTENTS_OR_OVERRIDDEN_PREFERRED_SIZE the default value is: MAKE_CONTAINER_SAME_SIZE_OR_BIGGER_THAN_CONTENTS

Parameters:
spec - How the shape is to be sized.
See Also:
getContainerLayoutSpec()

getContainerLayoutSpec

public int getContainerLayoutSpec()
Gets how the background shape is automatically resized with respect to the bounds of the parts of this container.

Returns:
how the background shape is sized.
See Also:
setContainerLayoutSpec(int)

setVisibleContainerAutomaticLayoutEnabled

public void setVisibleContainerAutomaticLayoutEnabled(boolean flag)
Specifies whether the automatic background shape resizing is enabled. NOTE: When 'disabled' the current bounds becomes the preferredSize, minimumSize and the current bounds is not affected by the extent of any parts of this container in any way. The default value is true.

Parameters:
flag - true if auto-sizing is enabled
See Also:
getVisibleContainerAutomaticLayoutEnabled(), setContainerLayoutSpec(int)

getVisibleContainerAutomaticLayoutEnabled

public boolean getVisibleContainerAutomaticLayoutEnabled()
Gets whether the automatic background shape resizing is enabled.

Returns:
true if auto-sizing is enabled
See Also:
setVisibleContainerAutomaticLayoutEnabled(boolean), setContainerLayoutSpec(int)

setShapeShrinkToFitEnabled

public void setShapeShrinkToFitEnabled(boolean flag)

isShapeShrinkToFitEnabled

public boolean isShapeShrinkToFitEnabled()

setOKToDrawOutsideInnerBounds

public void setOKToDrawOutsideInnerBounds(boolean flag)

getOKToDrawOutsideInnerBounds

public boolean getOKToDrawOutsideInnerBounds()

setMargins

public void setMargins(MiMargins m)
Sets the margins of this MiPart.

Overrides:
setMargins in class MiPart
Parameters:
m - the margins or null

setDisplaysFocusBorder

public void setDisplaysFocusBorder(boolean flag)
Specifies whether the focus border (hilite border) is to be enabled for this container.

Parameters:
flag - true if enabled

getDisplaysFocusBorder

public boolean getDisplaysFocusBorder()
Gets whether the focus border (hilite border) is enabled for this container.

Returns:
true if enabled

getShape

public MiPart getShape()
Gets the background shape of this visible container.

Returns:
the background shape

setShape

public void setShape(MiPart s)
Sets the background shape of this visible container.

Parameters:
s - the background shape

setShape

public void setShape(int style)
Sets the background shape type of this visible container. This will create a MiPart of corresponding to the shape type. Supported shape types are: RECTANGLE_SHAPE CIRCLE_SHAPE ROUND_RECTANGLE_SHAPE DIAMOND_SHAPE TRIANGLE_POINTING_UP_SHAPE TRIANGLE_POINTING_DOWN_SHAPE TRIANGLE_POINTING_RIGHT_SHAPE TRIANGLE_POINTING_LEFT_SHAPE

Parameters:
style - the background shape type

getShadowShape

public MiPart getShadowShape()
Gets the shape of any shadow. Used by the shadow renderers. This method returns MiiShadowRenderer.noShadowShape because when the shape associated with this is rendered _it_ will draw the shadow.

Overrides:
getShadowShape in class MiPart
Returns:
the shape

calcMinimumSize

public void calcMinimumSize(MiSize size)
Gets the minimum size of this MiPart. Override this, if desired, as it implements the core functionality.

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

calcPreferredSize

public void calcPreferredSize(MiSize size)
Gets the preferred size of this MiPart. Override this, if desired, as it implements the core functionality.

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

getIntersectionWithLine

public boolean getIntersectionWithLine(MiPoint insidePoint,
                                       MiPoint otherPoint,
                                       MiPoint returnedIntersectionPoint)
Gets whether if there is an intersection between the line formed by the given points and the outer bounds of this MiPart. If, there is, also returns the point of intersection. This method is most usefull when insidePoint is inside these bounds.

Overrides:
getIntersectionWithLine in class MiContainer
Parameters:
insidePoint - the point inside this MiPart's outer bounds
otherPoint - the point outside this MiPart's outer bounds
returnedIntersectionPoint - the (returned) point of intersection of the line between the two given points and the outer bounds of this MiPart
Returns:
true if there was an intersection

getTotalMargins

public MiMargins getTotalMargins()
Gets the total margins (inset margins plus margins).

Returns:
the total margins

getInnerBounds

public MiBounds getInnerBounds(MiBounds b)
Gets the inner bounds of this MiPart. Override this, if desired, as it implements the core functionality.

Overrides:
getInnerBounds in class MiPart
Parameters:
b - the (returned) inner bounds
Returns:
the inner bounds

pick

public boolean pick(MiBounds area)
Gets whether the given area intersects the bounds of this MiPart.

Overrides:
pick in class MiContainer
Parameters:
area - the area
Returns:
true if the given area overlaps the bounds of this MiPart.

invalidateArea

public void invalidateArea(MiBounds area)
Invalidates the given area of this container that intersects the draw bounds. This intersection is necessary so, for example, changing the text in a textfield does not cause areas outside the textfield to repaint.

Overrides:
invalidateArea in class MiPart
Parameters:
area - the area to invalidate
See Also:
MiPart.setInvalidAreaNotificationsEnabled(boolean)

copy

public void copy(MiPart source)
Copy the state of this MiPart into the target MiPart.

Overrides:
copy in class MiLayout
Parameters:
source - the part to copy
See Also:
MiPart.copy()

setAttributes

public void setAttributes(MiAttributes atts)
Assigns the given attributes to this MiPart. Examine the attributes to see if hasFixedWidth or hasFixedHeight are set. If so, these will be assigned to this MiVisualContainer's associated shape and we will need to unassign them in order to resize the shape to the same size as this MiVisualContainer. This replaces 4 method calls and two array accesses with a boolean compare every render.

Overrides:
setAttributes in class MiPart
Parameters:
atts - the attributes

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 MiLayout
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 MiLayout
Parameters:
name - the name of a property
Returns:
the string value of the property

getPropertyDescriptions

public MiPropertyDescriptions getPropertyDescriptions()
Gets the descriptions of all of the properties. These can be used to see if an property is different from the default value or if a proposed value is valid or to get a list of all of the valid values of a property. THIS DOESN'T WORK BECAUSE THE PROPERTIES startWith THESE PROPERTY NAMES...

Overrides:
getPropertyDescriptions in class MiLayout
Returns:
the list of property descriptions