public class RMEditorProxGuide
extends java.lang.Object
Constructor and Description |
---|
RMEditorProxGuide() |
Modifier and Type | Method and Description |
---|---|
static void |
clearGuidelines(RMEditor anEditor)
Empties the guideline list and marks the old guideline region for repaint
|
static void |
createGuidelines(RMEditor anEditor)
Calculate guidelines for the bounds of the selected shapes against all other superselected shapes.
|
static void |
createGuidelines(RMEditor anEditor,
RMShape parent,
RMRect bounds,
java.util.List candidateShapes)
Recalculates all the proximity guides and marks dirty region in editor for old & new guide regions.
|
static java.util.List<RMShape> |
getCandidateShapes(RMEditor anEditor)
Returns the list of shapes to be included in the proximity check.
|
static boolean |
isEnabled()
Returns whether proximity guides are enabled.
|
static void |
markGuidelinesDirty(RMEditor anEditor)
Runs through the guideline list and asks the editor to repaint the enclosing rect.
|
static void |
paintProximityGuides(RMEditor anEditor,
java.awt.Graphics2D g)
Called by the editor to paint all the guidelines in the guideline list
|
static RMPoint |
pointSnappedToProximityGuides(RMEditor anEditor,
RMPoint aPoint)
Returns the given point snapped to relevant proximity guides.
|
static RMPoint |
pointSnappedToProximityGuides(RMEditor anEditor,
RMPoint aPoint,
RMSelectTool.DragMode aDragMode)
Returns the given point snapped to relevant proxity guides for a given drag mode.
|
static void |
setEnabled(boolean aFlag)
Sets whether proximity guides are enabled.
|
static void |
setIncludesSuperselectedShape(boolean aFlag)
If this flag is set, the bounds of the parent shape are also checked for proximity.
|
public static boolean isEnabled()
public static void setEnabled(boolean aFlag)
public static void clearGuidelines(RMEditor anEditor)
public static void markGuidelinesDirty(RMEditor anEditor)
public static void paintProximityGuides(RMEditor anEditor, java.awt.Graphics2D g)
public static void setIncludesSuperselectedShape(boolean aFlag)
public static java.util.List<RMShape> getCandidateShapes(RMEditor anEditor)
public static void createGuidelines(RMEditor anEditor)
public static void createGuidelines(RMEditor anEditor, RMShape parent, RMRect bounds, java.util.List candidateShapes)
public static RMPoint pointSnappedToProximityGuides(RMEditor anEditor, RMPoint aPoint)
public static RMPoint pointSnappedToProximityGuides(RMEditor anEditor, RMPoint aPoint, RMSelectTool.DragMode aDragMode)