Package com.reportmill.editor
Class RMEditorProxGuide
- java.lang.Object
- 
- com.reportmill.editor.RMEditorProxGuide
 
- 
 public class RMEditorProxGuide extends java.lang.ObjectThis class offers some methods to provide "proximity guides" for RMEditor. This feature draws lines indicating when dragged shapes share alignments with some of their neighboring shapes (and also snaps to these alignments, too).
- 
- 
Constructor SummaryConstructors Constructor Description RMEditorProxGuide()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclearGuidelines(RMEditor anEditor)Empties the guideline list and marks the old guideline region for repaintstatic voidcreateGuidelines(RMEditor anEditor)Calculate guidelines for the bounds of the selected shapes against all other superselected shapes.static voidcreateGuidelines(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.ListgetCandidateShapes(RMEditor anEditor)Returns the list of shapes to be included in the proximity check.static booleanisEnabled()Returns whether proximity guides are enabled.static voidmarkGuidelinesDirty(RMEditor anEditor)Runs through the guideline list and asks the editor to repaint the enclosing rect.static voidpaintProximityGuides(RMEditor anEditor, java.awt.Graphics2D g)Called by the editor to paint all the guidelines in the guideline liststatic RMPointpointSnappedToProximityGuides(RMEditor anEditor, RMPoint aPoint)Returns the given point snapped to relevant proximity guides.static RMPointpointSnappedToProximityGuides(RMEditor anEditor, RMPoint aPoint, int dragMode)Returns the given point snapped to relevant proxity guides for a given drag mode.static voidsetEnabled(boolean aFlag)Sets whether proximity guides are enabled.static voidsetIncludesSuperselectedShape(boolean aFlag)If this flag is set, the bounds of the parent shape are also checked for proximity.
 
- 
- 
- 
Method Detail- 
isEnabledpublic static boolean isEnabled() Returns whether proximity guides are enabled.
 - 
setEnabledpublic static void setEnabled(boolean aFlag) Sets whether proximity guides are enabled.
 - 
clearGuidelinespublic static void clearGuidelines(RMEditor anEditor) Empties the guideline list and marks the old guideline region for repaint
 - 
markGuidelinesDirtypublic static void markGuidelinesDirty(RMEditor anEditor) Runs through the guideline list and asks the editor to repaint the enclosing rect.
 - 
paintProximityGuidespublic static void paintProximityGuides(RMEditor anEditor, java.awt.Graphics2D g) Called by the editor to paint all the guidelines in the guideline list
 - 
setIncludesSuperselectedShapepublic static void setIncludesSuperselectedShape(boolean aFlag) If this flag is set, the bounds of the parent shape are also checked for proximity.
 - 
getCandidateShapespublic static java.util.List getCandidateShapes(RMEditor anEditor) Returns the list of shapes to be included in the proximity check.
 - 
createGuidelinespublic static void createGuidelines(RMEditor anEditor) Calculate guidelines for the bounds of the selected shapes against all other superselected shapes.
 - 
createGuidelinespublic 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. Guides are calculated between the bounds rectangle and each of the candidateShapes, within the parent RMShape.
 - 
pointSnappedToProximityGuidespublic static RMPoint pointSnappedToProximityGuides(RMEditor anEditor, RMPoint aPoint) Returns the given point snapped to relevant proximity guides.
 
- 
 
-