Package com.reportmill.editor
Class RMEditorProxGuide
java.lang.Object
com.reportmill.editor.RMEditorProxGuide
This 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
- 
Method SummaryModifier and TypeMethodDescriptionstatic 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, List candidateShapes) Recalculates all the proximity guides and marks dirty region in editor for old & new guide regions.static ListgetCandidateShapes(RMEditor anEditor) Returns the list of shapes to be included in the proximity check.static booleanReturns 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, 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.
- 
Constructor Details- 
RMEditorProxGuidepublic RMEditorProxGuide()
 
- 
- 
Method Details- 
isEnabledpublic static boolean isEnabled()Returns whether proximity guides are enabled.
- 
setEnabledpublic static void setEnabled(boolean aFlag) Sets whether proximity guides are enabled.
- 
clearGuidelinesEmpties the guideline list and marks the old guideline region for repaint
- 
markGuidelinesDirtyRuns through the guideline list and asks the editor to repaint the enclosing rect.
- 
paintProximityGuidesCalled 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.
- 
getCandidateShapesReturns the list of shapes to be included in the proximity check.
- 
createGuidelinesCalculate guidelines for the bounds of the selected shapes against all other superselected shapes.
- 
createGuidelinespublic static void createGuidelines(RMEditor anEditor, RMShape parent, RMRect bounds, 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.
- 
pointSnappedToProximityGuidesReturns the given point snapped to relevant proximity guides.
- 
pointSnappedToProximityGuidespublic static RMPoint pointSnappedToProximityGuides(RMEditor anEditor, RMPoint aPoint, int dragMode) Returns the given point snapped to relevant proxity guides for a given drag mode.
 
-