com.swfm.mica.editors
Class MiSnapManager
java.lang.Object
com.swfm.mica.editors.MiSnapManager
- All Implemented Interfaces:
- MiiNames, MiiTypes
- public class MiSnapManager
- extends java.lang.Object
- implements MiiTypes, MiiNames
- Version:
- %I% %G%
- Author:
- Michael L. Davis
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Mi_PART_SPECIFIC_SNAP_GRID_SIZE_OVERRIDE_RESOURCE
public static final java.lang.String Mi_PART_SPECIFIC_SNAP_GRID_SIZE_OVERRIDE_RESOURCE
- See Also:
- Constant Field Values
Mi_PART_SNAP_ONLY_TO_MAJOR_GRID_RESOURCE
public static final java.lang.String Mi_PART_SNAP_ONLY_TO_MAJOR_GRID_RESOURCE
- See Also:
- Constant Field Values
MiSnapManager
public MiSnapManager()
setEnabled
public void setEnabled(boolean flag)
isEnabled
public boolean isEnabled()
setJustSnappingToMajorGrid
public void setJustSnappingToMajorGrid(boolean flag)
- otherwise snap to minor/finest grid
isJustSnappingToMajorGrid
public boolean isJustSnappingToMajorGrid()
setApplySnapToDefaultSnapLocationsIfPartHasNoSnapMananger
public void setApplySnapToDefaultSnapLocationsIfPartHasNoSnapMananger(boolean flag)
getApplySnapToDefaultSnapLocationsIfPartHasNoSnapMananger
public boolean getApplySnapToDefaultSnapLocationsIfPartHasNoSnapMananger()
setKeepShapesWithinPageBounds
public void setKeepShapesWithinPageBounds(boolean flag)
getKeepShapesWithinPageBounds
public boolean getKeepShapesWithinPageBounds()
_setTargetEditor
public void _setTargetEditor(MiEditor editor)
addGuidePoint
public void addGuidePoint(com.swfm.mica.editors.MiGuidePoint guidePoint)
addGuide
public void addGuide(com.swfm.mica.editors.MiGuide guide)
setGrid
public void setGrid(MiDrawingGrid grid)
getGrid
public MiDrawingGrid getGrid()
setHorizontalRuler
public void setHorizontalRuler(MiRuler ruler)
setVerticalRuler
public void setVerticalRuler(MiRuler ruler)
applyHorizontalAdjustment
public boolean applyHorizontalAdjustment(MiPoint point)
applyVerticalAdjustment
public boolean applyVerticalAdjustment(MiPoint point)
snap
public boolean snap(MiPoint point)
snap
public boolean snap(MiPoint point,
boolean snapToMajorGrid)
snap
public boolean snap(MiPart part)
getSnapTranslation
public boolean getSnapTranslation(MiPart part,
MiVector initialTranslation)
setPropertyValue
public void setPropertyValue(java.lang.String name,
java.lang.String value)
- Sets the property with the given name to the given value.
- Parameters:
name - the name of an propertyvalue - the value of the property
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.
- 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.
- Returns:
- the list of property descriptions